From 6e4d47b5aee59038d510a9441ee4f48ef978b811 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 8 Sep 2024 10:27:55 +0200 Subject: [PATCH] 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=. --- src/partition/repart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/partition/repart.c b/src/partition/repart.c index 118f7be6180..a1aa3c759cd 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -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; -- 2.47.3