]> err.no Git - util-linux/commitdiff
losetup: add warning about read-only mode
authorKarel Zak <kzak@redhat.com>
Tue, 18 Nov 2008 14:50:38 +0000 (15:50 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Dec 2008 12:03:09 +0000 (13:03 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/lomount.c

index d47f3dd927809b833188e9c2de4444cd6acc907a..c7fb12b76a8cd9c8149bff09ecfa510ff32500b6 100644 (file)
@@ -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) {