Skip to content

Commit 175dafa

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)
1 parent bc72d95 commit 175dafa

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
@@ -7619,6 +7619,10 @@ static int run(int argc, char *argv[]) {
76197619
if (!context)
76207620
return log_oom();
76217621

7622+
r = context_read_seed(context, arg_root);
7623+
if (r < 0)
7624+
return r;
7625+
76227626
r = context_copy_from(context);
76237627
if (r < 0)
76247628
return r;
@@ -7696,10 +7700,6 @@ static int run(int argc, char *argv[]) {
76967700
return r;
76977701
}
76987702

7699-
r = context_read_seed(context, arg_root);
7700-
if (r < 0)
7701-
return r;
7702-
77037703
/* Make sure each partition has a unique UUID and unique label */
77047704
r = context_acquire_partition_uuids_and_labels(context);
77057705
if (r < 0)

0 commit comments

Comments
 (0)