summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
commit63c372cb9df3bee01e3bf8cd7f96f336bddda846 (patch)
treebf4d1b6e41f72927a2b58e7dd21daa0c496aaa96 /src/core/service.c
parent44de0efc6e406515fc1cf8b95d9655d0d7f7ffff (diff)
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 15a2ed7f7e..15e29be149 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -562,7 +562,7 @@ static int service_add_extras(Service *s) {
if (r < 0)
return r;
- n = strappenda(s->bus_name, ".busname");
+ n = strjoina(s->bus_name, ".busname");
r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
if (r < 0)
return r;
@@ -619,7 +619,7 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
assert(s);
prefix = strempty(prefix);
- prefix2 = strappenda(prefix, "\t");
+ prefix2 = strjoina(prefix, "\t");
fprintf(f,
"%sService State: %s\n"
@@ -1123,7 +1123,7 @@ static int service_spawn(
}
if (is_control && UNIT(s)->cgroup_path) {
- path = strappenda(UNIT(s)->cgroup_path, "/control");
+ path = strjoina(UNIT(s)->cgroup_path, "/control");
cg_create(SYSTEMD_CGROUP_CONTROLLER, path);
} else
path = UNIT(s)->cgroup_path;
@@ -1489,7 +1489,7 @@ static void service_kill_control_processes(Service *s) {
if (!UNIT(s)->cgroup_path)
return;
- p = strappenda(UNIT(s)->cgroup_path, "/control");
+ p = strjoina(UNIT(s)->cgroup_path, "/control");
cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, p, SIGKILL, true, true, true, NULL);
}