tree-wide: replace strjoin() with path_join()

This commit is contained in:
Yu Watanabe
2019-06-21 03:26:16 +09:00
parent f9dc94408d
commit 657ee2d82b
44 changed files with 90 additions and 119 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ int custom_mount_prepare_all(const char *dest, CustomMount *l, size_t n) {
return log_error_errno(errno, "Failed to acquire temporary directory: %m");
}
m->source = strjoin(m->rm_rf_tmpdir, "/src");
m->source = path_join(m->rm_rf_tmpdir, "src");
if (!m->source)
return log_oom();
+3 -3
View File
@@ -1934,7 +1934,7 @@ static int copy_devnodes(const char *dest) {
if (r < 0)
return log_error_errno(r, "chown() of device node %s failed: %m", to);
dn = strjoin("/dev/", S_ISCHR(st.st_mode) ? "char" : "block");
dn = path_join("/dev", S_ISCHR(st.st_mode) ? "char" : "block");
if (!dn)
return log_oom();
@@ -2585,7 +2585,7 @@ static int determine_names(void) {
* search for a machine, but instead create a new one
* in /var/lib/machine. */
arg_directory = strjoin("/var/lib/machines/", arg_machine);
arg_directory = path_join("/var/lib/machines", arg_machine);
if (!arg_directory)
return log_oom();
}
@@ -3980,7 +3980,7 @@ static int load_settings(void) {
FOREACH_STRING(i, "/etc/systemd/nspawn", "/run/systemd/nspawn") {
_cleanup_free_ char *j = NULL;
j = strjoin(i, "/", fn);
j = path_join(i, fn);
if (!j)
return log_oom();