diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-25 00:24:23 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-25 01:31:26 +0900 |
commit | 270384b2d494bd1f53242c923f875ccfdf6e214d (patch) | |
tree | 66b619dc3c5e218b9ac87b5034d807a78fda5cb7 /src/import | |
parent | 2d9b74ba87a3fef313f362460d5d9a4283548ff6 (diff) | |
download | systemd-270384b2d494bd1f53242c923f875ccfdf6e214d.tar.gz |
tree-wide: replace strjoina() with prefix_roota()
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-common.c | 2 | ||||
-rw-r--r-- | src/import/import-fs.c | 2 | ||||
-rw-r--r-- | src/import/pull-common.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/import/import-common.c b/src/import/import-common.c index 1f63ebb761..2f27dda76b 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -213,7 +213,7 @@ int import_mangle_os_tree(const char *path) { return 0; } - joined = strjoina(path, "/", child); + joined = prefix_roota(path, child); r = path_is_os_tree(joined); if (r == -ENOTDIR) { log_debug("Directory '%s' does not look like a directory tree, and contains a single regular file only, leaving as it is.", path); diff --git a/src/import/import-fs.c b/src/import/import-fs.c index abb4efac99..f8f3a23206 100644 --- a/src/import/import-fs.c +++ b/src/import/import-fs.c @@ -161,7 +161,7 @@ static int import_fs(int argc, char *argv[], void *userdata) { log_info("Importing '%s', saving as '%s'.", strempty(pretty), local); } - final_path = strjoina(arg_image_root, "/", local); + final_path = prefix_roota(arg_image_root, local); r = tempfn_random(final_path, NULL, &temp_path); if (r < 0) diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 62b52309a4..249ea533e6 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -120,7 +120,7 @@ int pull_make_local_copy(const char *final, const char *image_root, const char * if (!image_root) image_root = "/var/lib/machines"; - p = strjoina(image_root, "/", local); + p = prefix_roota(image_root, local); if (force_local) (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME); |