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=c268327edd764be783cf11f99bea73b9790b2e02;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 8b1eb126..5675eac0 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -678,6 +678,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) {