]> 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>
Tue, 18 Nov 2008 14:50:38 +0000 (15:50 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/lomount.c

index 8b1eb126a0c72ed072211771a0f02c858e168cbb..5675eac0a7e89054b8ee58030cbe3f8e71dbaf68 100644 (file)
@@ -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) {