From c268327edd764be783cf11f99bea73b9790b2e02 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 18 Nov 2008 15:50:38 +0100 Subject: [PATCH] losetup: add warning about read-only mode Signed-off-by: Karel Zak --- mount/lomount.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.5