Skip to content

Commit b859991

Browse files
yuwatabluca
authored andcommitted
repart: initialize seed earlier
As the seed is used by context_load_partition_table() -> derive_uuid(). Fixes #34257. (cherry picked from commit b8a8000) (cherry picked from commit f85a4fb) (cherry picked from commit 175dafa) (cherry picked from commit ed474d3)
1 parent 675c577 commit b859991

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/partition/repart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6491,6 +6491,10 @@ static int run(int argc, char *argv[]) {
64916491
if (!context)
64926492
return log_oom();
64936493

6494+
r = context_read_seed(context, arg_root);
6495+
if (r < 0)
6496+
return r;
6497+
64946498
strv_uniq(arg_definitions);
64956499

64966500
r = context_read_definitions(context, arg_definitions, arg_root);
@@ -6546,10 +6550,6 @@ static int run(int argc, char *argv[]) {
65466550
return r;
65476551
}
65486552

6549-
r = context_read_seed(context, arg_root);
6550-
if (r < 0)
6551-
return r;
6552-
65536553
/* Make sure each partition has a unique UUID and unique label */
65546554
r = context_acquire_partition_uuids_and_labels(context);
65556555
if (r < 0)

0 commit comments

Comments
 (0)