]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (dos) fix last possible sector calculation
authorKarel Zak <kzak@redhat.com>
Thu, 11 Feb 2021 10:49:56 +0000 (11:49 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Feb 2021 11:32:46 +0000 (12:32 +0100)
commit8367b07f08460b9f449c535cc540429c438980bf
treed03dc48a906c416a48bede96f02468140fa15c2c
parent7a241ef6c7f3791e2cffd1fc26479bef334e9f4d
libfdisk: (dos) fix last possible sector calculation

* rename 'last' to 'first' as we use this value as the first available free
  sector rather than last used

* use '-1' when calculate last partition sector to compare with last
  disk sector

* improve debug messages

Fixes: https://github.com/karelzak/util-linux/issues/1249
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c
libfdisk/src/table.c