summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-06-25 09:27:01 +0200
committerGitHub <noreply@github.com>2019-06-25 09:27:01 +0200
commit05b2ace14732fd4401c856f7c375a311ac6f2af1 (patch)
tree419344328d3208fd7de780d73ef9f56f2a333aa1 /src/shared
parentMerge pull request #12871 from keszybz/various-printing-fixes (diff)
parenttree-wide: replace strjoina() with prefix_roota() (diff)
downloadsystemd-05b2ace14732fd4401c856f7c375a311ac6f2af1.tar.xz
systemd-05b2ace14732fd4401c856f7c375a311ac6f2af1.zip
Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanups
tree-wide: further path_join() and path_joina() cleanups
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/generator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 0a5413ce04..7273fde186 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -31,7 +31,7 @@ int generator_open_unit_file(
FILE *f;
int r;
- unit = strjoina(dest, "/", name);
+ unit = prefix_roota(dest, name);
r = fopen_unlocked(unit, "wxe", &f);
if (r < 0) {
@@ -319,7 +319,7 @@ int generator_hook_up_mkswap(
return log_error_errno(r, "Failed to make unit instance name from path \"%s\": %m",
node);
- unit_file = strjoina(dir, "/", unit);
+ unit_file = prefix_roota(dir, unit);
log_debug("Creating %s", unit_file);
escaped = cescape(node);
@@ -394,7 +394,7 @@ int generator_hook_up_mkfs(
return log_error_errno(r, "Failed to make unit instance name from path \"%s\": %m",
node);
- unit_file = strjoina(dir, "/", unit);
+ unit_file = prefix_roota(dir, unit);
log_debug("Creating %s", unit_file);
escaped = cescape(node);
@@ -466,7 +466,7 @@ int generator_hook_up_growfs(
return log_error_errno(r, "Failed to make unit name from path \"%s\": %m",
where);
- unit_file = strjoina(dir, "/", unit);
+ unit_file = prefix_roota(dir, unit);
log_debug("Creating %s", unit_file);
f = fopen(unit_file, "wxe");