summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/unit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 4cffc57793..64e26b7a94 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -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);