]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: ignore x-systemd.device-timeout for non-devices (#6368)
authorNeilBrown <neil@brown.name>
Mon, 17 Jul 2017 08:03:34 +0000 (18:03 +1000)
committerLennart Poettering <lennart@poettering.net>
Mon, 17 Jul 2017 08:03:34 +0000 (10:03 +0200)
If you specify "x-systemd.device-timeout" for an NFS mount
point, you get no warning and a meaningless device unit
dependency created.

Better to have a warning and no dependency.

src/shared/generator.c

index 2f459bf778646d4e8c7f6dcb7efef25949e775da..86e9356dd11edcf063f27f5905571705a8b4c726 100644 (file)
@@ -198,6 +198,10 @@ int generator_write_timeouts(
         node = fstab_node_to_udev_node(what);
         if (!node)
                 return log_oom();
+        if (!is_device_path(node)) {
+                log_warning("x-systemd.device-timeout ignored for %s", what);
+                return 0;
+        }
 
         r = unit_name_from_path(node, ".device", &unit);
         if (r < 0)