From: Zbigniew Jędrzejewski-Szmek Date: Tue, 12 Mar 2019 08:30:45 +0000 (+0100) Subject: bootctl: use path_join() to join paths X-Git-Tag: v242-rc1~136^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2600fd5823f3307b787d104e08b7f005f06b09a;p=thirdparty%2Fsystemd.git bootctl: use path_join() to join paths We would say "/boot/efi//loader/entries"... --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index ff830dc7459..381c234f3b0 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;