summaryrefslogtreecommitdiffstats
path: root/src/nspawn
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-20 20:07:01 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-20 20:26:16 +0200
commit657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76 (patch)
tree3624791030beb2dfd75b654f24cf818a1c6444e2 /src/nspawn
parentsd-resolve: suppress false positive MSan warnings (diff)
downloadsystemd-657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76.tar.xz
systemd-657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76.zip
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 5a1bce4abc..c59e5ffa5d 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 5079918ae1..bba487bdb3 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();
@@ -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();