From: Karel Zak Date: Tue, 18 Nov 2008 14:50:38 +0000 (+0100) Subject: losetup: add warning about read-only mode X-Git-Tag: v2.14.2-rc1~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b6a53ae83305cdeb2521dfb9607173817e901a2;p=thirdparty%2Futil-linux.git losetup: add warning about read-only mode Signed-off-by: Karel Zak --- diff --git a/mount/lomount.c b/mount/lomount.c index d47f3dd927..c7fb12b76a 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -659,6 +659,9 @@ set_loop(const char *device, const char *file, unsigned long long offset, perror(file); return 1; } + if (verbose) + printf(_("warning: %s: is write-protected, using read-only.\n"), + file); *options |= SETLOOP_RDONLY; } if ((fd = open(device, mode)) < 0) {