mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 13:08:26 +00:00
If we want to open read-only in losetup.c, flags should be O_RDONLY not O_RDWR
This commit is contained in:
parent
fd5d811b0a
commit
57b6dec74d
1 changed files with 1 additions and 1 deletions
|
|
@ -440,7 +440,7 @@ int losetup(FAR const char *devname, FAR const char *filename,
|
|||
{
|
||||
/* If that fails, then try to open the device read-only */
|
||||
|
||||
fd = open(filename, O_RDWR);
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
ret = -get_errno();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue