Messages in this thread Patch in this message | | | From | Philippe De Muyter <> | Subject | [PATCH] init/do_mounts.c: treat EROFS like EACCES | Date | Wed, 18 Jun 2014 18:12:44 +0200 |
| |
some combinations of filesystem and block device (at least vfat on mmc) yield -EROFS instead of -EACCES when the device is read-only. Retry mounting with MS_RDONLY set, just like for the EACCES case, instead of failing directly.
Signed-off-by: Philippe De Muyter <phdm@macqel.be> Cc: Andrew Morton <akpm@linux-foundation.org> --- init/do_mounts.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c index 82f2288..af7b9b8 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -394,6 +394,7 @@ retry: case 0: goto out; case -EACCES: + case -EROFS: flags |= MS_RDONLY; goto retry; case -EINVAL: -- 1.7.5.3
| |