Use the first fitting gap for ESP, instead of the largest gap

This commit is contained in:
Michael Hudson-Doyle 2023-08-17 15:23:43 +12:00
parent f338cfed64
commit 7367a373ec
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ def get_add_part_plan(device, *, spec, args, resize_partition=None):
# is a bad idea. So avoid putting any sort of boot stuff on a logical - # is a bad idea. So avoid putting any sort of boot stuff on a logical -
# it's probably a bad idea for all cases. # it's probably a bad idea for all cases.
gap = gaps.largest_gap(device, in_extended=False) gap = gaps.gap_with_size(device, size, in_extended=False)
if gap is not None and gap.size >= size and gap.is_usable: if gap is not None and gap.size >= size and gap.is_usable:
create_part_plan.gap = gap.split(size)[0] create_part_plan.gap = gap.split(size)[0]
return create_part_plan return create_part_plan