chiark / gitweb /
fstab-generator: Do not try to fsck non-devices
authorThomas Bächler <thomas@archlinux.org>
Sat, 21 Dec 2013 10:22:37 +0000 (11:22 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 22 Dec 2013 03:52:56 +0000 (22:52 -0500)
This fixes a regression introduced in 64e70e4 where the mount fails
when fstab is misconfigured with fs_passno > 0 on a virtual file
system like nfs, and the type is specified as "auto".

src/fstab-generator/fstab-generator.c

index 1227f0895dbe4915ee395f89731974d8d7be51c0..5480e54b4ea87073d7b13f853e20dbc4056c22a8 100644 (file)
@@ -152,6 +152,11 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
         if (passno == 0)
                 return 0;
 
         if (passno == 0)
                 return 0;
 
+        if (!is_device_path(what)) {
+                log_warning("Checking was requested for \"%s\", but it is not a device.", what);
+                return 0;
+        }
+
         if (type && !streq(type, "auto")) {
                 int r;
                 const char *checker;
         if (type && !streq(type, "auto")) {
                 int r;
                 const char *checker;