1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

loader: show APFS partition type name

Add small visual aid in lsdev output.
This commit is contained in:
Toomas Soome 2019-11-04 12:20:19 +00:00
parent 50dacbf6c2
commit 124003d587
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354332
2 changed files with 6 additions and 1 deletions

View File

@ -60,6 +60,7 @@ static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT;
static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP;
static const uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS;
static const uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM;
static const uuid_t gpt_uuid_apple_apfs = GPT_ENT_TYPE_APPLE_APFS;
#endif
struct pentry {
@ -98,6 +99,7 @@ static struct parttypes {
{ PART_LINUX_SWAP, "Linux swap" },
{ PART_DOS, "DOS/Windows" },
{ PART_ISO9660, "ISO9660" },
{ PART_APFS, "APFS" },
};
const char *
@ -141,6 +143,8 @@ gpt_parttype(uuid_t type)
return (PART_FREEBSD_VINUM);
else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL))
return (PART_FREEBSD);
else if (uuid_equal(&type, &gpt_uuid_apple_apfs, NULL))
return (PART_APFS);
return (PART_UNKNOWN);
}

View File

@ -52,7 +52,8 @@ enum partition_type {
PART_LINUX,
PART_LINUX_SWAP,
PART_DOS,
PART_ISO9660
PART_ISO9660,
PART_APFS
};
struct ptable_entry {