X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fswitch-root.c;h=813641ad44da59b7c0969c89adc192a40623aceb;hb=e530ed5e1407e0571afc01552e41365ffb01befa;hp=ca3875628aa2be32d6b9a8a4e906cdf66a05893b;hpb=4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f;p=elogind.git diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index ca3875628..813641ad4 100644 --- a/src/shared/switch-root.c +++ b/src/shared/switch-root.c @@ -51,7 +51,7 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, if (path_equal(new_root, "/")) return 0; - temporary_old_root = strappenda(new_root, oldroot); + temporary_old_root = strjoina(new_root, oldroot); mkdir_p_label(temporary_old_root, 0755); old_root_remove = in_initrd(); @@ -72,7 +72,6 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, struct stat sb; snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i); - char_array_0(new_mount); mkdir_p_label(new_mount, 0755);