Report write() and ioctl() errors encountered when writing GPT or MBR to disk.
authorkrw <krw@openbsd.org>
Mon, 26 Jul 2021 13:05:14 +0000 (13:05 +0000)
committerkrw <krw@openbsd.org>
Mon, 26 Jul 2021 13:05:14 +0000 (13:05 +0000)
commit605b5690e5c189ae13d35daba0358ae919f04b63
treea084312db821d05efe47a4e9909f39cc24955a49
parentdfa73d75a0bbe30421e1738608d646262023357c
Report write() and ioctl() errors encountered when writing GPT or MBR to disk.

Consolidate GPT/MBR read()/write() operations into DISK_writesectors() and
DISK_readsectors(), producing clearer logic and consistent handling of i/o and
errors.

Add some DPRINTF() and #ifdef DEBUG sections to allow more detailed error
reporting when desired.
sbin/fdisk/disk.c
sbin/fdisk/disk.h
sbin/fdisk/gpt.c
sbin/fdisk/mbr.c