]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (dos) Fix check error message when CHS calculated sector does not match LBA
authorPali Rohár <pali.rohar@gmail.com>
Tue, 6 Jul 2021 12:08:42 +0000 (14:08 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Thu, 15 Jul 2021 19:49:30 +0000 (21:49 +0200)
commit7ab459dff15b450d968db3af71c3cb6d7e55b60a
treefe9a08e44f606742759207f34472e53f65adb329
parent6fc455661a225877743163a7f35d3bc34bb3a259
libfdisk: (dos) Fix check error message when CHS calculated sector does not match LBA

Function check() checks that LBA addresses sector number matches CHS sector
number. But error message contains information about "previous sectors" and
"total sectors" which is misleading so change it.

Also rename variables 'start' and 'total' to make it clear what value is
stored in them. Note that in 'start' variable is currently stored last LBA
partition sector and in 'total' is stored last CHS partition sector. So
neither sector where partition starts nor total sectors of partition.

Code and check logic looks to be correct, just error message and variable
names are misleading. Therefore no functional changes in this patch.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
libfdisk/src/dos.c