summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2006-06-22 22:22:32 +0000
committermarcel <marcel@FreeBSD.org>2006-06-22 22:22:32 +0000
commit4499ab674633d57fb0fdedba278cfe9a156e90c7 (patch)
tree8b64e0d4b5e478825690a947eb2579b877901d85 /sbin
parentdfa030a122779e872b25787b952b02f5ed871d0e (diff)
downloadFreeBSD-src-4499ab674633d57fb0fdedba278cfe9a156e90c7.zip
FreeBSD-src-4499ab674633d57fb0fdedba278cfe9a156e90c7.tar.gz
Improve support for Intel based Macs:
o Accept hfs as partition type. o Print Apple HFS partitions using a friendly name.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/gpt/gpt.84
-rw-r--r--sbin/gpt/gpt.c7
-rw-r--r--sbin/gpt/show.c3
3 files changed, 12 insertions, 2 deletions
diff --git a/sbin/gpt/gpt.8 b/sbin/gpt/gpt.8
index ab2d87c..13f9223 100644
--- a/sbin/gpt/gpt.8
+++ b/sbin/gpt/gpt.8
@@ -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.
diff --git a/sbin/gpt/gpt.c b/sbin/gpt/gpt.c
index 569c923..38dc557 100644
--- a/sbin/gpt/gpt.c
+++ b/sbin/gpt/gpt.c
@@ -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;
diff --git a/sbin/gpt/show.c b/sbin/gpt/show.c
index 4df3be1..43fd6ea 100644
--- a/sbin/gpt/show.c
+++ b/sbin/gpt/show.c
@@ -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);
OpenPOWER on IntegriCloud