]> err.no Git - util-linux/commit
losetup: try to set up loop readonly if EACCES
authorMatthias Koenig <mkoenig@suse.de>
Thu, 6 Nov 2008 13:45:38 +0000 (14:45 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Dec 2008 12:05:36 +0000 (13:05 +0100)
commitb23a771db18751a12bf4a7fb32f6dacb5a23938c
tree07d8fdc0877d0d73d01c9ba3bdeaf77c4623c84d
parentbc2a022781db5500ce6bb4f48f7ec111f4a4da14
losetup: try to set up loop readonly if EACCES

Currently mounting/losetup an image fails if it is accessable readonly.

There are no problems if it is a file on a local filesystem.
It seems only to happen if it is a NFS mounted image, which is
read-write in permission but with root_squash option.

set_loop checks only for EROFS to retry open with readonly mode,
but in this case we get EACCES.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
mount/lomount.c