summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.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/journal/sd-journal.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/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 9dea5470be..ecf47fda3d 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1155,9 +1155,9 @@ static void check_network(sd_journal *j, int fd) {
static bool file_has_type_prefix(const char *prefix, const char *filename) {
const char *full, *tilded, *atted;
- full = strappenda(prefix, ".journal");
- tilded = strappenda(full, "~");
- atted = strappenda(prefix, "@");
+ full = strjoina(prefix, ".journal");
+ tilded = strjoina(full, "~");
+ atted = strjoina(prefix, "@");
return streq(filename, full) ||
streq(filename, tilded) ||
@@ -1399,7 +1399,7 @@ static int add_root_directory(sd_journal *j, const char *p) {
return -EINVAL;
if (j->prefix)
- p = strappenda(j->prefix, p);
+ p = strjoina(j->prefix, p);
d = opendir(p);
if (!d)
@@ -1643,7 +1643,7 @@ _public_ int sd_journal_open_container(sd_journal **ret, const char *machine, in
assert_return((flags & ~(SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM)) == 0, -EINVAL);
assert_return(machine_name_is_valid(machine), -EINVAL);
- p = strappenda("/run/systemd/machines/", machine);
+ p = strjoina("/run/systemd/machines/", machine);
r = parse_env_file(p, NEWLINE, "ROOT", &root, "CLASS", &class, NULL);
if (r == -ENOENT)
return -EHOSTDOWN;