summaryrefslogtreecommitdiffstats
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-06-22 20:02:46 +0200
committerGitHub <noreply@github.com>2019-06-22 20:02:46 +0200
commitcee97d57687e93e07a8ee36edf0e0d0f3317fccc (patch)
tree7278ba990e750ae119cacfd6c19a0866579374ab /src/nspawn
parentbpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users) (diff)
parentsd-path: use _cleanup_ attribute (diff)
downloadsystemd-cee97d57687e93e07a8ee36edf0e0d0f3317fccc.tar.xz
systemd-cee97d57687e93e07a8ee36edf0e0d0f3317fccc.zip
Merge pull request #12836 from yuwata/tree-wide-replace-strjoin
tree-wide: replace strjoin() with path_join()
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn-mount.c2
-rw-r--r--src/nspawn/nspawn.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index e0740a6cc4..82b7068fcd 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -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();
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index e7f8cf389f..b3f4be0e6e 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -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();
@@ -2596,7 +2596,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();
}
@@ -3991,7 +3991,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();