]> err.no Git - util-linux/commitdiff
fsck: inform about nonexistent devices in verbose mode
authorKarel Zak <kzak@redhat.com>
Thu, 7 Oct 2010 07:26:37 +0000 (09:26 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Oct 2010 07:26:37 +0000 (09:26 +0200)
Reported-by: Serafeim Zanikolas <sez@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
fsck/fsck.c

index e7526f9e6d5855af27ecb5df5cfde4824a8ed4db..7e1608f9e8f589334b1d8a9d8e6a5cc5c68b6caa 100644 (file)
@@ -887,10 +887,17 @@ static int ignore(struct fs_info *fs)
        /*
         * ignore devices that don't exist and have the "nofail" mount option
         */
-       if (!device_exists(fs->device) && opt_in_list("nofail", fs->opts)) {
+       if (!device_exists(fs->device)) {
+               if (opt_in_list("nofail", fs->opts)) {
+                       if (verbose)
+                               printf(_("%s: skipping nonexistent device\n"),
+                                                               fs->device);
+                       return 1;
+               }
                if (verbose)
-                       printf(_("%s: skipping nonexistent device\n"), fs->device);
-               return 1;
+                       printf(_("%s: nonexistent device (\"nofail\" fstab "
+                                "option may be used to skip this device)\n"),
+                                fs->device);
        }
 
        interpret_type(fs);