Skip to content

Commit

Permalink
gaps: fix gap when before a partition in extended
Browse files Browse the repository at this point in the history
We need the ebr space if we're doing logical partitions, but not for the
primaries.
  • Loading branch information
dbungert committed Apr 7, 2023
1 parent dc81041 commit 5219ecf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion subiquity/common/filesystem/gaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def maybe_add_gap(start, end, in_extended):
if part is None:
gap_end = ad(device.size - info.min_end_offset)
else:
gap_end = ad(part.offset)
if part.is_logical:
gap_end = ad(part.offset - info.ebr_space)
else:
gap_end = ad(part.offset)

gap_start = au(prev_end)

Expand Down

0 comments on commit 5219ecf

Please sign in to comment.