summaryrefslogtreecommitdiff
path: root/src/boot/bootctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-03-12 09:30:45 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-03-14 08:28:18 +0100
commite2600fd5823f3307b787d104e08b7f005f06b09a (patch)
treed192a7ccc44e51cc5449af8cdfca44932f404548 /src/boot/bootctl.c
parent694fe6daf59deef54be8bb210e89d8e694b9b3d7 (diff)
downloadsystemd-e2600fd5823f3307b787d104e08b7f005f06b09a.tar.gz
bootctl: use path_join() to join paths
We would say "/boot/efi//loader/entries"...
Diffstat (limited to 'src/boot/bootctl.c')
-rw-r--r--src/boot/bootctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index ff830dc745..381c234f3b 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -517,9 +517,9 @@ static int copy_file_with_version_check(const char *from, const char *to, bool f
}
static int mkdir_one(const char *prefix, const char *suffix) {
- char *p;
+ _cleanup_free_ char *p = NULL;
- p = strjoina(prefix, "/", suffix);
+ p = path_join(prefix, suffix);
if (mkdir(p, 0700) < 0) {
if (errno != EEXIST)
return log_error_errno(errno, "Failed to create \"%s\": %m", p);
@@ -935,7 +935,7 @@ static int install_entries_directories(const char *dollar_boot_path, sd_id128_t
* partition. Also create the parent directory for entry directories, so that kernel-install
* knows where to put them. */
- r = mkdir_one(dollar_boot_path, "/loader/entries");
+ r = mkdir_one(dollar_boot_path, "loader/entries");
if (r < 0)
return r;