From 8b6a53ae83305cdeb2521dfb9607173817e901a2 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 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) { -- 2.39.5