From: Karel Zak Date: Tue, 18 Nov 2008 14:50:38 +0000 (+0100) Subject: losetup: add warning about read-only mode X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b6a53ae83305cdeb2521dfb9607173817e901a2;p=util-linux losetup: add warning about read-only mode Signed-off-by: Karel Zak --- diff --git a/mount/lomount.c b/mount/lomount.c index d47f3dd9..c7fb12b7 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) {