]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: fix last free sector detection if partition size specified
authorKarel Zak <kzak@redhat.com>
Mon, 10 Aug 2020 09:37:32 +0000 (11:37 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Aug 2020 09:37:32 +0000 (11:37 +0200)
commit4fe7f9b614e2b5bb97f6d89af02acb867cffccc1
treec32271ac7a9c20820a4920920791de65bcc5e049
parentfbc9b6915141d7402479afc4be9b18cda549da16
libfdisk: fix last free sector detection if partition size specified

We need to skip useless gaps between partition if the gap is no large
enough for a new partition. Unfortunately, the current code checks
size of the gap, but does not care for location of the gap -- this is
good enough for dialog driven partitioning, but it's pretty bad if
start of the partition is explicitly specified (e.g. sfdisk).

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1860461
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c