mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
Improve support for Intel based Macs:
o Accept hfs as partition type. o Print Apple HFS partitions using a friendly name.
This commit is contained in:
parent
97b94c0e72
commit
3e82a4a197
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159867
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 31, 2005
|
||||
.Dd June 22, 2006
|
||||
.Os
|
||||
.Dt GPT 8
|
||||
.Sh NAME
|
||||
@ -130,7 +130,7 @@ option allows the user to specify the partition type.
|
||||
The type is given as an UUID, but
|
||||
.Nm
|
||||
accepts
|
||||
.Cm efi , swap , ufs , linux
|
||||
.Cm efi , swap , ufs , hfs , linux
|
||||
and
|
||||
.Cm windows
|
||||
as aliases for the most commonly used partition types.
|
||||
|
@ -275,6 +275,13 @@ parse_uuid(const char *s, uuid_t *uuid)
|
||||
return (0);
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
if (strcmp(optarg, "hfs") == 0) {
|
||||
uuid_t hfs = GPT_ENT_TYPE_APPLE_HFS;
|
||||
*uuid = hfs;
|
||||
return (0);
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
if (strcmp(optarg, "linux") == 0) {
|
||||
uuid_t lnx = GPT_ENT_TYPE_MS_BASIC_DATA;
|
||||
|
@ -57,6 +57,7 @@ friendly(uuid_t *t)
|
||||
static uuid_t efi_slice = GPT_ENT_TYPE_EFI;
|
||||
static uuid_t mslinux = GPT_ENT_TYPE_MS_BASIC_DATA;
|
||||
static uuid_t freebsd = GPT_ENT_TYPE_FREEBSD;
|
||||
static uuid_t hfs = GPT_ENT_TYPE_APPLE_HFS;
|
||||
static uuid_t linuxswap = GPT_ENT_TYPE_LINUX_SWAP;
|
||||
static uuid_t msr = GPT_ENT_TYPE_MS_RESERVED;
|
||||
static uuid_t swap = GPT_ENT_TYPE_FREEBSD_SWAP;
|
||||
@ -85,6 +86,8 @@ friendly(uuid_t *t)
|
||||
return ("Linux swap");
|
||||
if (uuid_equal(t, &msr, NULL))
|
||||
return ("Windows reserved");
|
||||
if (uuid_equal(t, &hfs, NULL))
|
||||
return ("Apple HFS");
|
||||
|
||||
unfriendly:
|
||||
uuid_to_string(t, &s, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user