Nuke single use function PRT_fix_BN() and just use the ATA/ATAPI LBA -> CHS
authorkrw <krw@openbsd.org>
Thu, 27 Jan 2022 16:26:32 +0000 (16:26 +0000)
committerkrw <krw@openbsd.org>
Thu, 27 Jan 2022 16:26:32 +0000 (16:26 +0000)
commit45d8ccdea631e6feccc143d73d73b0c00be2c4ac
treee762d24a3fed704eca2561927ab4b8a52d63118d
parent067a2df2f42858f62f74f553177ee74742547211
Nuke single use function PRT_fix_BN() and just use the ATA/ATAPI LBA -> CHS
conversion formula

LBA = (C × HPC + H) × SPT + (S − 1)

instead of the equivalent tortuous arithmetic used in PRT_fix_BN().

No intentional functional change.
sbin/fdisk/cmd.c
sbin/fdisk/part.c
sbin/fdisk/part.h