Skip to content

Commit

Permalink
repart: initialize seed earlier
Browse files Browse the repository at this point in the history
As the seed is used by context_load_partition_table() -> derive_uuid().

Fixes #34257.

(cherry picked from commit b8a8000aba4620a1d93ac1d04dbb86050d9c5fe8)
(cherry picked from commit f85a4fba330822c44f9b2deb527acecc03bcfed9)
(cherry picked from commit 175dafa)
  • Loading branch information
yuwata authored and bluca committed Sep 11, 2024
1 parent b431088 commit ed474d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/partition/repart.c
Original file line number Diff line number Diff line change
Expand Up @@ -6957,6 +6957,10 @@ static int run(int argc, char *argv[]) {
if (!context)
return log_oom();

r = context_read_seed(context, arg_root);
if (r < 0)
return r;

strv_uniq(arg_definitions);

r = context_read_definitions(context);
Expand Down Expand Up @@ -7012,10 +7016,6 @@ static int run(int argc, char *argv[]) {
return r;
}

r = context_read_seed(context, arg_root);
if (r < 0)
return r;

/* Make sure each partition has a unique UUID and unique label */
r = context_acquire_partition_uuids_and_labels(context);
if (r < 0)
Expand Down

0 comments on commit ed474d3

Please sign in to comment.