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 <p...@macqel.be> Cc: Andrew Morton <a...@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/