ptgen: do not create stub partition to fill a gap if gap caused by alignment
authorMikhail Kshevetskiy <[email protected]>
Mon, 30 Dec 2024 02:28:49 +0000 (05:28 +0300)
committerDaniel Golle <[email protected]>
Tue, 23 Sep 2025 22:15:33 +0000 (23:15 +0100)
commitf1f98b0b8456e89f6c959d8f028c5204da82365e
tree68f942d0c00f85feb752278932a3db7eb0b33163
parent6ea8b6dd44d023312a0e4dfc3a2133df014e401b
ptgen: do not create stub partition to fill a gap if gap caused by alignment

ptgen tends to create stub partitions between the end of GPT entry table
and the start of the first disk. Normally fdisk/gdisk aligns partition
to 1MB boundary, so there is 2014 sectors gap before the first partition.
It is absolutely normal.

This patch somehow mimics fdisk/gdisk behavior and does NOT create stub
partition in the gap caused by alignment.

Signed-off-by: Mikhail Kshevetskiy <[email protected]>
src/ptgen.c