summaryrefslogtreecommitdiff
path: root/src/dbus1-generator
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/dbus1-generator
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/dbus1-generator')
-rw-r--r--src/dbus1-generator/dbus1-generator.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dbus1-generator/dbus1-generator.c b/src/dbus1-generator/dbus1-generator.c
index ca737e3d1b..2e08af2df2 100644
--- a/src/dbus1-generator/dbus1-generator.c
+++ b/src/dbus1-generator/dbus1-generator.c
@@ -164,7 +164,7 @@ static int add_dbus(const char *path, const char *fname, const char *type) {
assert(path);
assert(fname);
- p = strappenda(path, "/", fname);
+ p = strjoina(path, "/", fname);
r = config_parse(NULL, p, NULL,
"D-BUS Service\0",
config_item_table_lookup, table,
@@ -250,8 +250,8 @@ fail:
static int link_busnames_target(const char *units) {
const char *f, *t;
- f = strappenda(units, "/" SPECIAL_BUSNAMES_TARGET);
- t = strappenda(arg_dest, "/" SPECIAL_BASIC_TARGET ".wants/" SPECIAL_BUSNAMES_TARGET);
+ f = strjoina(units, "/" SPECIAL_BUSNAMES_TARGET);
+ t = strjoina(arg_dest, "/" SPECIAL_BASIC_TARGET ".wants/" SPECIAL_BUSNAMES_TARGET);
mkdir_parents_label(t, 0755);
if (symlink(f, t) < 0)
@@ -263,19 +263,19 @@ static int link_busnames_target(const char *units) {
static int link_compatibility(const char *units) {
const char *f, *t;
- f = strappenda(units, "/systemd-bus-proxyd.socket");
- t = strappenda(arg_dest, "/" SPECIAL_DBUS_SOCKET);
+ f = strjoina(units, "/systemd-bus-proxyd.socket");
+ t = strjoina(arg_dest, "/" SPECIAL_DBUS_SOCKET);
mkdir_parents_label(t, 0755);
if (symlink(f, t) < 0)
return log_error_errno(errno, "Failed to create symlink %s: %m", t);
- f = strappenda(units, "/systemd-bus-proxyd.socket");
- t = strappenda(arg_dest, "/" SPECIAL_SOCKETS_TARGET ".wants/systemd-bus-proxyd.socket");
+ f = strjoina(units, "/systemd-bus-proxyd.socket");
+ t = strjoina(arg_dest, "/" SPECIAL_SOCKETS_TARGET ".wants/systemd-bus-proxyd.socket");
mkdir_parents_label(t, 0755);
if (symlink(f, t) < 0)
return log_error_errno(errno, "Failed to create symlink %s: %m", t);
- t = strappenda(arg_dest, "/" SPECIAL_DBUS_SERVICE);
+ t = strjoina(arg_dest, "/" SPECIAL_DBUS_SERVICE);
if (symlink("/dev/null", t) < 0)
return log_error_errno(errno, "Failed to mask %s: %m", t);