chiark / gitweb /
swap: don't add mount links for swap devices
[elogind.git] / unit.c
diff --git a/unit.c b/unit.c
index ee0c120b24fe0eee8aba3ab7758427c936821c7b..1959b1b940074d0ff23dd81ed3be72d511814f6a 100644 (file)
--- a/unit.c
+++ b/unit.c
@@ -1864,7 +1864,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
 
         /* Adds in links to the device node that this unit is based on */
 
-        if (!path_startswith(what, "/dev/") && !path_startswith(what, "/sys/"))
+        if (!is_device_path(what))
                 return 0;
 
         if (!(e = unit_name_build_escape(what+1, NULL, ".device")))