diff options
author | Karel Zak | 2008-11-18 15:50:38 +0100 |
---|---|---|
committer | Karel Zak | 2008-11-18 15:50:38 +0100 |
commit | c268327edd764be783cf11f99bea73b9790b2e02 (patch) | |
tree | 65a219491a186994e8e49174c6dcc7780e52dda1 /mount | |
parent | losetup: try to set up loop readonly if EACCES (diff) | |
download | kernel-qcow2-util-linux-c268327edd764be783cf11f99bea73b9790b2e02.tar.gz kernel-qcow2-util-linux-c268327edd764be783cf11f99bea73b9790b2e02.tar.xz kernel-qcow2-util-linux-c268327edd764be783cf11f99bea73b9790b2e02.zip |
losetup: add warning about read-only mode
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount')
-rw-r--r-- | mount/lomount.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mount/lomount.c b/mount/lomount.c index 8b1eb126a..5675eac0a 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) { |