]> 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>
Thu, 11 Feb 2021 11:18:34 +0000 (12:18 +0100)
commite1efda47dd881a2216297c86499c65315b052b4b
tree225a9277eb3be53c7f6c56fcbe8ebce981673e9b
parentee978576b10cf0d62d7ef2081fa627e21dbf9d88
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