From: Daan De Meyer Date: Sun, 2 Oct 2022 19:37:31 +0000 (+0200) Subject: repart: Take --root into account in read only filesystems shortcut X-Git-Tag: v252-rc1~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0e6cb196edaeddfe1ee8d84dfb346021e2ca3c5;p=thirdparty%2Fsystemd.git repart: Take --root into account in read only filesystems shortcut --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 471537d6534..7a24e8ffec8 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3361,7 +3361,7 @@ static int partition_populate_directory(Partition *p, char **ret_root, char **re if (strv_length(p->copy_files) == 2 && strv_length(p->make_directories) == 0 && streq(p->copy_files[1], "/")) { _cleanup_free_ char *s = NULL; - s = strdup(p->copy_files[0]); + s = path_join(arg_root, p->copy_files[0]); if (!s) return log_oom();