diff options
Diffstat (limited to 'src/shared/unit-name.c')
-rw-r--r-- | src/shared/unit-name.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 1440d2f2ea..91f464ee9c 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -458,3 +458,16 @@ char *unit_name_path_unescape(const char *f) { return e; } + +char *unit_dbus_path_from_name(const char *name) { + char *e, *p; + + e = bus_path_escape(name); + if (!e) + return NULL; + + p = strappend("/org/freedesktop/systemd1/unit/", e); + free(e); + + return p; +} |