]> 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>
Thu, 27 Aug 2020 13:17:14 +0000 (15:17 +0200)
commit430952f254cddf1ccb47a5f8caf5b5cd64193c3a
tree53b7aecd2acf2db65b72dd0cf37dbb151a40f811
parentc8b8326b070b00b835f163cbed3c8051081f4011
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