Use a dedicated struct mbr to hold the GPT protective MBR,
authorkrw <krw@openbsd.org>
Wed, 21 Jul 2021 12:22:54 +0000 (12:22 +0000)
committerkrw <krw@openbsd.org>
Wed, 21 Jul 2021 12:22:54 +0000 (12:22 +0000)
commitdfcac45eea04e0ae341a9133ae665c0ebff6b943
treee4e7ae0934042ff4bb5266e81ee2b0fd3a9d3b09
parent0f717407742e1f961a919be29cbb9f276638c5b5
Use a dedicated struct mbr to hold the GPT protective MBR,
either the one read from disk or the default one created
when initializing GPT.

Simplifies logic, eliminates MBR_init_GPT() and demotes
MBR_protective_mbr() to a helper function called from
GPT_read().

Nuke an unused variable in passing.

No intentional functional change.
sbin/fdisk/cmd.c
sbin/fdisk/fdisk.c
sbin/fdisk/gpt.c
sbin/fdisk/gpt.h
sbin/fdisk/mbr.c
sbin/fdisk/mbr.h
sbin/fdisk/user.c