Abstract duplicated code scanning gpt_types[] into a helper
authorkrw <krw@openbsd.org>
Mon, 14 Mar 2022 17:11:44 +0000 (17:11 +0000)
committerkrw <krw@openbsd.org>
Mon, 14 Mar 2022 17:11:44 +0000 (17:11 +0000)
commitf2ec1a1396ab80e38332c311eb55fa4fa7267f24
treeb861f875fcd3013b6b1b1ce132b99e9cde7c1972
parent225d6b92e39a58de90bcd4f4a089091f4dbcbe7c
Abstract duplicated code scanning gpt_types[] into a helper
function find_gpt_type().

Use find_gpt_type() to simplify the functions obtaining
information from gpt_types[]. Add not yet used
PRT_uuid_to_protection() to allow simplification of GPT partition
protection code..

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