chiark / gitweb /
cryptsetup: fix escaping when generating cryptsetup units
[elogind.git] / src / core / unit.c
index 4cffc57793723c612cf1303bd5e0c702e28625e3..64e26b7a94603ff5615ab4960b9e4ebfa4c34163 100644 (file)
@@ -2509,7 +2509,8 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
         if (!is_device_path(what))
                 return 0;
 
-        if (!(e = unit_name_build_escape(what+1, NULL, ".device")))
+        e = unit_name_from_path(what, ".device");
+        if (!e)
                 return -ENOMEM;
 
         r = manager_load_unit(u->manager, e, NULL, NULL, &device);