diff --git a/drivers/loop/losetup.c b/drivers/loop/losetup.c index 32c2f4d437..0690776e23 100644 --- a/drivers/loop/losetup.c +++ b/drivers/loop/losetup.c @@ -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();