Only MBR and GPT structures can be edited by fdisk.
authorkrw <krw@openbsd.org>
Mon, 25 Jul 2022 17:45:16 +0000 (17:45 +0000)
committerkrw <krw@openbsd.org>
Mon, 25 Jul 2022 17:45:16 +0000 (17:45 +0000)
commit9ba61043bbb3c1c5354cd29f6ffba92b19fffc3e
tree2942ca122250eda44f2ac3c581f285a881699fd1
parent13d31ce9d625cd457d307aacf713d55b48d659b2
Only MBR and GPT structures can be edited by fdisk.

If neither are found, restrict user actions to printing basic
information on the disk, reading the man page, initializing an
MBR or GPT, or terminating fdisk without changing anything.

Feedback on earlier attempt by miod@ and brynet@.
sbin/fdisk/cmd.c
sbin/fdisk/mbr.c
sbin/fdisk/mbr.h
sbin/fdisk/user.c
sbin/fdisk/user.h