X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Funit.c;h=64e26b7a94603ff5615ab4960b9e4ebfa4c34163;hb=461b1822321d6be0d7fd8be29bf3b4993ebd1b85;hp=4cffc57793723c612cf1303bd5e0c702e28625e3;hpb=48899192a7b28b6a338cc8ec18aa35ccd8867acb;p=elogind.git diff --git a/src/core/unit.c b/src/core/unit.c index 4cffc5779..64e26b7a9 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);