chiark / gitweb /
util: rename join() to strjoin()
authorLennart Poettering <lennart@poettering.net>
Fri, 13 Jul 2012 11:41:01 +0000 (13:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Jul 2012 11:41:01 +0000 (13:41 +0200)
This is to match strappend() and the other string related functions.

24 files changed:
TODO
src/cgtop/cgtop.c
src/core/cgroup.c
src/core/dbus-manager.c
src/core/load-dropin.c
src/core/manager.c
src/core/mount.c
src/core/service.c
src/core/unit.c
src/cryptsetup/cryptsetup-generator.c
src/delta/delta.c
src/fstab-generator/fstab-generator.c
src/getty-generator/getty-generator.c
src/journal/coredump.c
src/journal/journald.c
src/journal/sd-journal.c
src/shared/cgroup-util.c
src/shared/conf-parser.c
src/shared/hwclock.c
src/shared/path-util.c
src/shared/unit-name.c
src/shared/util.c
src/shared/util.h
src/tmpfiles/tmpfiles.c

diff --git a/TODO b/TODO
index 25266b2845d1986308866f52bd0f2a0ca74608ab..c0a553bf829617c7a47aac81d29fff3b49fd4c41 100644 (file)
--- a/TODO
+++ b/TODO
@@ -34,6 +34,10 @@ Bugfixes:
 
 Features:
 
+* logind: wakelock/opportunistic suspend support
+
+* seccomp filters for services
+
 * replace BindTo= by BindsTo=, but keep old name for compat
 
 * switch-root: sockets need relabelling
index f988adb363f5d428828241396d8896fa3e176d54..5557094a4f8bfb3ba5678a9731eb4dfd57c61401 100644 (file)
@@ -310,7 +310,7 @@ static int refresh_one(
                 if (r <= 0)
                         goto finish;
 
-                p = join(path, "/", fn, NULL);
+                p = strjoin(path, "/", fn, NULL);
                 free(fn);
 
                 if (!p) {
index 5513f6560c26be9e74d68ac2e5a8a548cd564d45..aaea96b820a595069e26d96195d9a2b0785a63ec 100644 (file)
@@ -120,7 +120,7 @@ int cgroup_bonding_install(CGroupBonding *b, pid_t pid, const char *cgroup_suffi
         assert(pid >= 0);
 
         if (cgroup_suffix) {
-                p = join(b->path, "/", cgroup_suffix, NULL);
+                p = strjoin(b->path, "/", cgroup_suffix, NULL);
                 if (!p)
                         return -ENOMEM;
 
@@ -208,7 +208,7 @@ int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, bool rem, Set *
                 return 0;
 
         if (cgroup_suffix) {
-                p = join(b->path, "/", cgroup_suffix, NULL);
+                p = strjoin(b->path, "/", cgroup_suffix, NULL);
                 if (!p)
                         return -ENOMEM;
 
index f8a54000552476fad60d3cbbec71854765069ea6..67b7b13eacf3e1bde64df8effa86a376417670e9 100644 (file)
@@ -1179,7 +1179,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
                 else {
                         char *p;
 
-                        p = join(switch_root, "/", switch_root_init, NULL);
+                        p = strjoin(switch_root, "/", switch_root_init, NULL);
                         if (!p)
                                 goto oom;
 
index 4323147a01ce62517de1018ee22b5195894c2272..86f81c7484ea6674c4661f2252130800fe5c0d26 100644 (file)
@@ -51,7 +51,7 @@ static int iterate_dir(Unit *u, const char *path, UnitDependency dependency) {
                 if (ignore_file(de->d_name))
                         continue;
 
-                f = join(path, "/", de->d_name, NULL);
+                f = strjoin(path, "/", de->d_name, NULL);
                 if (!f) {
                         r = -ENOMEM;
                         goto finish;
@@ -80,7 +80,7 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c
         assert(name);
         assert(suffix);
 
-        path = join(unit_path, "/", name, suffix, NULL);
+        path = strjoin(unit_path, "/", name, suffix, NULL);
         if (!path)
                 return -ENOMEM;
 
@@ -102,7 +102,7 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c
                 if (!template)
                         return -ENOMEM;
 
-                path = join(unit_path, "/", template, suffix, NULL);
+                path = strjoin(unit_path, "/", template, suffix, NULL);
                 free(template);
 
                 if (!path)
index 7bd484be6cfc3797a4de9f56ea5cba059830fde7..8f2635051e87a1a7bd0042e8382e664bbec0f103 100644 (file)
@@ -590,7 +590,7 @@ static void manager_build_unit_path_cache(Manager *m) {
                         if (ignore_file(de->d_name))
                                 continue;
 
-                        p = join(streq(*i, "/") ? "" : *i, "/", de->d_name, NULL);
+                        p = strjoin(streq(*i, "/") ? "" : *i, "/", de->d_name, NULL);
                         if (!p) {
                                 r = -ENOMEM;
                                 goto fail;
@@ -2085,7 +2085,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name)
                         return r;
                 }
         } else {
-                p = join("/tmp/systemd-", name, ".XXXXXX", NULL);
+                p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL);
                 if (!p) {
                         log_error("Out of memory");
                         return -ENOMEM;
index fab922ea9ef1dd8fa742e8086062f9a139fc3efb..15d5f215303376c40a688f9c2dada51fdac2e591 100644 (file)
@@ -1534,7 +1534,7 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
                         goto clean_up;
                 }
 
-                o = join(options, ",", options2, NULL);
+                o = strjoin(options, ",", options2, NULL);
                 if (!o) {
                         r = -ENOMEM;
                         goto finish;
index e57b0e970c7794d55b59b2af07b01fd9c37bfeda..2be6ee5d99a992459cfdc0478d5add4c73928fb7 100644 (file)
@@ -722,7 +722,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
                                 char *d = NULL;
 
                                 if (chkconfig_description)
-                                        d = join(chkconfig_description, " ", j, NULL);
+                                        d = strjoin(chkconfig_description, " ", j, NULL);
                                 else
                                         d = strdup(j);
 
@@ -879,7 +879,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
                                                 char *d = NULL;
 
                                                 if (long_description)
-                                                        d = join(long_description, " ", t, NULL);
+                                                        d = strjoin(long_description, " ", t, NULL);
                                                 else
                                                         d = strdup(j);
 
@@ -1001,7 +1001,7 @@ static int service_load_sysv_name(Service *s, const char *name) {
                 char *path;
                 int r;
 
-                path = join(*p, "/", name, NULL);
+                path = strjoin(*p, "/", name, NULL);
                 if (!path)
                         return -ENOMEM;
 
@@ -1023,7 +1023,7 @@ static int service_load_sysv_name(Service *s, const char *name) {
                 if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) {
                         /* Try SUSE style boot.* init scripts */
 
-                        path = join(*p, "/boot.", name, NULL);
+                        path = strjoin(*p, "/boot.", name, NULL);
                         if (!path)
                                 return -ENOMEM;
 
@@ -1038,7 +1038,7 @@ static int service_load_sysv_name(Service *s, const char *name) {
                 if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) {
                         /* Try Frugalware style rc.* init scripts */
 
-                        path = join(*p, "/rc.", name, NULL);
+                        path = strjoin(*p, "/rc.", name, NULL);
                         if (!path)
                                 return -ENOMEM;
 
@@ -3407,7 +3407,7 @@ static int service_enumerate(Manager *m) {
                         struct dirent *de;
 
                         free(path);
-                        path = join(*p, "/", rcnd_table[i].path, NULL);
+                        path = strjoin(*p, "/", rcnd_table[i].path, NULL);
                         if (!path) {
                                 r = -ENOMEM;
                                 goto finish;
@@ -3442,7 +3442,7 @@ static int service_enumerate(Manager *m) {
                                         continue;
 
                                 free(fpath);
-                                fpath = join(path, "/", de->d_name, NULL);
+                                fpath = strjoin(path, "/", de->d_name, NULL);
                                 if (!fpath) {
                                         r = -ENOMEM;
                                         goto finish;
index 37711afeafc6760fc26de27a26fa7ba5baad8e36..516f4fad8bb980d18cbed062a487e71d5684acc3 100644 (file)
@@ -1891,10 +1891,10 @@ static char *default_cgroup_path(Unit *u) {
                 if (!t)
                         return NULL;
 
-                p = join(u->manager->cgroup_hierarchy, "/", t, "/", u->instance, NULL);
+                p = strjoin(u->manager->cgroup_hierarchy, "/", t, "/", u->instance, NULL);
                 free(t);
         } else
-                p = join(u->manager->cgroup_hierarchy, "/", u->id, NULL);
+                p = strjoin(u->manager->cgroup_hierarchy, "/", u->id, NULL);
 
         return p;
 }
index f714c8c2414b6c0f2f0de9373fadf21695b6db63..7801de64b52ba929d433d367a28f03eeff5259d0 100644 (file)
@@ -88,7 +88,7 @@ static int create_disk(
                 goto fail;
         }
 
-        p = join(arg_dest, "/", n, NULL);
+        p = strjoin(arg_dest, "/", n, NULL);
         if (!p) {
                 r = -ENOMEM;
                 log_error("Failed to allocate unit file name.");
@@ -175,7 +175,7 @@ static int create_disk(
 
         if (!noauto) {
 
-                to = join(arg_dest, "/", d, ".wants/", n, NULL);
+                to = strjoin(arg_dest, "/", d, ".wants/", n, NULL);
                 if (!to) {
                         r = -ENOMEM;
                         goto fail;
@@ -191,9 +191,9 @@ static int create_disk(
                 free(to);
 
                 if (!nofail)
-                        to = join(arg_dest, "/cryptsetup.target.requires/", n, NULL);
+                        to = strjoin(arg_dest, "/cryptsetup.target.requires/", n, NULL);
                 else
-                        to = join(arg_dest, "/cryptsetup.target.wants/", n, NULL);
+                        to = strjoin(arg_dest, "/cryptsetup.target.wants/", n, NULL);
                 if (!to) {
                         r = -ENOMEM;
                         goto fail;
@@ -211,7 +211,7 @@ static int create_disk(
         }
 
         e = unit_name_escape(name);
-        to = join(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL);
+        to = strjoin(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL);
         if (!to) {
                 r = -ENOMEM;
                 goto fail;
index 01c63353151549ca8dceb8ad0014aa478ae13ead..eef6536b01f0897d9d182bc50d0f0f01b00e6b2c 100644 (file)
@@ -192,7 +192,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) {
                 if (!dirent_is_file(de))
                         continue;
 
-                p = join(path, "/", de->d_name, NULL);
+                p = strjoin(path, "/", de->d_name, NULL);
                 if (!p) {
                         r = -ENOMEM;
                         goto finish;
@@ -254,7 +254,7 @@ static int process_suffix(const char *prefixes, const char *suffix) {
         NULSTR_FOREACH(p, prefixes) {
                 char *t;
 
-                t = join(p, "/", suffix, NULL);
+                t = strjoin(p, "/", suffix, NULL);
                 if (!t) {
                         r = -ENOMEM;
                         goto finish;
index f832730b4041ee2bb8e2ce29d1a3e7bd6750f88f..3a59b85d665b5884cbcabc801c91e4bde7e9243c 100644 (file)
@@ -103,7 +103,7 @@ static int add_swap(const char *what, struct mntent *me) {
                 goto finish;
         }
 
-        unit = join(arg_dest, "/", name, NULL);
+        unit = strjoin(arg_dest, "/", name, NULL);
         if (!unit) {
                 log_error("Out of memory");
                 r = -ENOMEM;
@@ -146,7 +146,7 @@ static int add_swap(const char *what, struct mntent *me) {
         }
 
         if (!noauto) {
-                lnk = join(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL);
+                lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL);
                 if (!lnk) {
                         log_error("Out of memory");
                         r = -ENOMEM;
@@ -169,7 +169,7 @@ static int add_swap(const char *what, struct mntent *me) {
 
                 if (r > 0) {
                         free(lnk);
-                        lnk = join(arg_dest, "/", device, ".wants/", name, NULL);
+                        lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL);
                         if (!lnk) {
                                 log_error("Out of memory");
                                 r = -ENOMEM;
@@ -261,7 +261,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
                 goto finish;
         }
 
-        unit = join(arg_dest, "/", name, NULL);
+        unit = strjoin(arg_dest, "/", name, NULL);
         if (!unit) {
                 log_error("Out of memory");
                 r = -ENOMEM;
@@ -321,7 +321,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
         }
 
         if (!noauto) {
-                lnk = join(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
+                lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
                 if (!lnk) {
                         log_error("Out of memory");
                         r = -ENOMEM;
@@ -347,7 +347,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
 
                         if (r > 0) {
                                 free(lnk);
-                                lnk = join(arg_dest, "/", device, ".wants/", name, NULL);
+                                lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL);
                                 if (!lnk) {
                                         log_error("Out of memory");
                                         r = -ENOMEM;
@@ -372,7 +372,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
                         goto finish;
                 }
 
-                automount_unit = join(arg_dest, "/", automount_name, NULL);
+                automount_unit = strjoin(arg_dest, "/", automount_name, NULL);
                 if (!automount_unit) {
                         log_error("Out of memory");
                         r = -ENOMEM;
@@ -408,7 +408,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
                 }
 
                 free(lnk);
-                lnk = join(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL);
+                lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL);
                 if (!lnk) {
                         log_error("Out of memory");
                         r = -ENOMEM;
index bb7c225e0267f0f70668da04a25fc01b7beb3dac..b2e3eb63932235ce9bd0e4c6ed6ca81b49322e20 100644 (file)
@@ -39,7 +39,7 @@ static int add_symlink(const char *fservice, const char *tservice) {
         assert(tservice);
 
         from = strappend(SYSTEM_DATA_UNIT_PATH "/", fservice);
-        to = join(arg_dest,"/getty.target.wants/", tservice, NULL);
+        to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL);
 
         if (!from || !to) {
                 log_error("Out of memory");
index 300677bb92ff44964629bc90a9d04a53f8e620e2..fcd0d1e625e782cb543e1b1b7d8599de4d024b6e 100644 (file)
@@ -213,14 +213,14 @@ int main(int argc, char* argv[]) {
                         IOVEC_SET_STRING(iovec[j++], core_cmdline);
         }
 
-        core_timestamp = join("COREDUMP_TIMESTAMP=", argv[ARG_TIMESTAMP], "000000", NULL);
+        core_timestamp = strjoin("COREDUMP_TIMESTAMP=", argv[ARG_TIMESTAMP], "000000", NULL);
         if (core_timestamp)
                 IOVEC_SET_STRING(iovec[j++], core_timestamp);
 
         IOVEC_SET_STRING(iovec[j++], "MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1");
         IOVEC_SET_STRING(iovec[j++], "PRIORITY=2");
 
-        core_message = join("MESSAGE=Process ", argv[ARG_PID], " (", argv[ARG_COMM], ") dumped core.", NULL);
+        core_message = strjoin("MESSAGE=Process ", argv[ARG_PID], " (", argv[ARG_COMM], ") dumped core.", NULL);
         if (core_message)
                 IOVEC_SET_STRING(iovec[j++], core_message);
 
index 2402f7f6d083d92c9782329fbf5ab77889f741f6..fd292f019e2237b89fdd70d105d0be45717cc6c9 100644 (file)
@@ -1976,7 +1976,7 @@ static int system_journal_open(Server *s) {
                 (void) mkdir(fn, 0755);
                 free(fn);
 
-                fn = join("/var/log/journal/", ids, "/system.journal", NULL);
+                fn = strjoin("/var/log/journal/", ids, "/system.journal", NULL);
                 if (!fn)
                         return -ENOMEM;
 
@@ -2002,7 +2002,7 @@ static int system_journal_open(Server *s) {
         if (!s->runtime_journal &&
             (s->storage != STORAGE_NONE)) {
 
-                fn = join("/run/log/journal/", ids, "/system.journal", NULL);
+                fn = strjoin("/run/log/journal/", ids, "/system.journal", NULL);
                 if (!fn)
                         return -ENOMEM;
 
index 4bcc65c5c717c6c1e8b516e7c43aed9cd841b360..57572d4f0113f988c8d88db5cf105501eb927c76 100644 (file)
@@ -313,7 +313,7 @@ static char *match_make_string(Match *m) {
                 }
 
                 if (p) {
-                        k = join(p, m->type == MATCH_OR_TERM ? " OR " : " AND ", t, NULL);
+                        k = strjoin(p, m->type == MATCH_OR_TERM ? " OR " : " AND ", t, NULL);
                         free(p);
                         free(t);
 
@@ -330,7 +330,7 @@ static char *match_make_string(Match *m) {
         }
 
         if (enclose) {
-                r = join("(", p, ")", NULL);
+                r = strjoin("(", p, ")", NULL);
                 free(p);
                 return r;
         }
@@ -1101,7 +1101,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) {
              (startswith(filename, "system@") && endswith(filename, ".journal"))))
                 return 0;
 
-        path = join(prefix, "/", filename, NULL);
+        path = strjoin(prefix, "/", filename, NULL);
         if (!path)
                 return -ENOMEM;
 
@@ -1149,7 +1149,7 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
         assert(prefix);
         assert(filename);
 
-        path = join(prefix, "/", filename, NULL);
+        path = strjoin(prefix, "/", filename, NULL);
         if (!path)
                 return -ENOMEM;
 
@@ -1184,7 +1184,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname)
              !sd_id128_equal(id, mid)))
             return 0;
 
-        path = join(prefix, "/", dirname, NULL);
+        path = strjoin(prefix, "/", dirname, NULL);
         if (!path)
                 return -ENOMEM;
 
index 6740d3b8856c2c1f0d616e1a8e0e124a3f2bac3b..b0d378de5ade1e577a0c7f86cd7b294b3e0ec709 100644 (file)
@@ -522,16 +522,16 @@ static int join_path(const char *controller, const char *path, const char *suffi
 
         if (controller) {
                 if (path && suffix)
-                        t = join("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL);
+                        t = strjoin("/sys/fs/cgroup/", controller, "/", path, "/", suffix, NULL);
                 else if (path)
-                        t = join("/sys/fs/cgroup/", controller, "/", path, NULL);
+                        t = strjoin("/sys/fs/cgroup/", controller, "/", path, NULL);
                 else if (suffix)
-                        t = join("/sys/fs/cgroup/", controller, "/", suffix, NULL);
+                        t = strjoin("/sys/fs/cgroup/", controller, "/", suffix, NULL);
                 else
-                        t = join("/sys/fs/cgroup/", controller, NULL);
+                        t = strjoin("/sys/fs/cgroup/", controller, NULL);
         } else {
                 if (path && suffix)
-                        t = join(path, "/", suffix, NULL);
+                        t = strjoin(path, "/", suffix, NULL);
                 else if (path)
                         t = strdup(path);
         }
index 8c62fb959b8b292262e6eaa0bd5f8ab7a5bc385e..1eccec59899d4dcfd64cb289f36896e7032b4925 100644 (file)
@@ -90,7 +90,7 @@ int config_item_perf_lookup(
         else {
                 char *key;
 
-                key = join(section, ".", lvalue, NULL);
+                key = strjoin(section, ".", lvalue, NULL);
                 if (!key)
                         return -ENOMEM;
 
index d40bb2653f886b5ef70b70c53d94aaa15d7715b4..9f8ab08e2bdd0589b9fd5a0d7446c713afbbe5dc 100644 (file)
@@ -74,7 +74,7 @@ static int rtc_open(int flags) {
                 if (ignore_file(de->d_name))
                         continue;
 
-                p = join("/sys/class/rtc/", de->d_name, "/hctosys", NULL);
+                p = strjoin("/sys/class/rtc/", de->d_name, "/hctosys", NULL);
                 if (!p) {
                         closedir(d);
                         return -ENOMEM;
index ccd766760802ab3e6e5230975440ed6e8bee782e..8bc7955020e1ba7fec1cc9719ff96e91c9d10b7b 100644 (file)
@@ -120,7 +120,7 @@ char *path_make_absolute(const char *p, const char *prefix) {
         if (path_is_absolute(p) || !prefix)
                 return strdup(p);
 
-        return join(prefix, "/", p, NULL);
+        return strjoin(prefix, "/", p, NULL);
 }
 
 char *path_make_absolute_cwd(const char *p) {
index 3e437b77a1d0c10f7281672395982c51ae3c83b0..fcf5902c78409041695b823acd95c04294f23b7f 100644 (file)
@@ -208,7 +208,7 @@ char *unit_name_build(const char *prefix, const char *instance, const char *suff
         if (!instance)
                 return strappend(prefix, suffix);
 
-        return join(prefix, "@", instance, suffix, NULL);
+        return strjoin(prefix, "@", instance, suffix, NULL);
 }
 
 static char *do_escape_char(char c, char *t) {
@@ -425,7 +425,7 @@ char *unit_name_from_path_instance(const char *prefix, const char *path, const c
         if (!p)
                 return NULL;
 
-        r = join(prefix, "@", p, suffix, NULL);
+        r = strjoin(prefix, "@", p, suffix, NULL);
         free(p);
 
         return r;
index 63471899fd111f8d21da5c74baecfcd464fb130d..2aabd8d6346df41de2419754c4b56f56abd71979 100644 (file)
@@ -1083,7 +1083,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char *
                 if (h < 0)
                         return h;
 
-                r = join("[", t, "]", NULL);
+                r = strjoin("[", t, "]", NULL);
                 free(t);
 
                 if (!r)
@@ -5145,7 +5145,7 @@ finish:
         return r;
 }
 
-char *join(const char *x, ...) {
+char *strjoin(const char *x, ...) {
         va_list ap;
         size_t l;
         char *r, *p;
index c8d048f9b28999110ed311776da7a73e90a24b3d..d9b656d2ca081e96ddf76fab60b4e03d35998824 100644 (file)
@@ -451,7 +451,7 @@ int dirent_ensure_type(DIR *d, struct dirent *de);
 int in_search_path(const char *path, char **search);
 int get_files_in_directory(const char *path, char ***list);
 
-char *join(const char *x, ...) _sentinel_;
+char *strjoin(const char *x, ...) _sentinel_;
 
 bool is_main_thread(void);
 
index 2d5d90d265a9d24a111bdd6242da2398a31aef75..3b52b9889cc55f71cb54c5434b8594c4d215f045 100644 (file)
@@ -1297,7 +1297,7 @@ static char *resolve_fragment(const char *fragment, const char **search_paths) {
                 return strdup(fragment);
 
         STRV_FOREACH(p, search_paths) {
-                resolved_path = join(*p, "/", fragment, NULL);
+                resolved_path = strjoin(*p, "/", fragment, NULL);
                 if (resolved_path == NULL) {
                         log_error("Out of memory");
                         return NULL;