repart: Initialize split_name_format in copy_from_one()

Let's allow splitting the partitions from an existing disk image
by initializing split_name_format when using --copy-from=.
This commit is contained in:
Daan De Meyer
2024-09-09 13:22:26 +02:00
parent c1062559a9
commit 6e4d47b5ae
+4
View File
@@ -2513,6 +2513,10 @@ static int context_copy_from_one(Context *context, const char *src) {
if (!np->definition_path)
return log_oom();
np->split_name_format = strdup("%t");
if (!np->split_name_format)
return log_oom();
r = determine_current_padding(c, t, p, secsz, grainsz, &padding);
if (r < 0)
return r;