diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2008-09-05 12:49:14 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2008-09-05 12:49:14 +0000 |
commit | ed7177a94f36fcc7c19de810e6feae21ae110f66 (patch) | |
tree | c53fdf22825abad36d8d86345147ed26bc94afac /sys/geom | |
parent | 1dfa0b9157918610241fac142e3dc1f8af0bbbc0 (diff) | |
download | FreeBSD-src-ed7177a94f36fcc7c19de810e6feae21ae110f66.zip FreeBSD-src-ed7177a94f36fcc7c19de810e6feae21ae110f66.tar.gz |
Detect Apple HFS GPT slices.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/part/g_part.c | 3 | ||||
-rw-r--r-- | sys/geom/part/g_part.h | 1 | ||||
-rw-r--r-- | sys/geom/part/g_part_gpt.c | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index e12c0fa..403d1c0 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -72,7 +72,8 @@ struct g_part_alias_list { { "freebsd-ufs", G_PART_ALIAS_FREEBSD_UFS }, { "freebsd-vinum", G_PART_ALIAS_FREEBSD_VINUM }, { "freebsd-zfs", G_PART_ALIAS_FREEBSD_ZFS }, - { "mbr", G_PART_ALIAS_MBR } + { "mbr", G_PART_ALIAS_MBR }, + { "hfs", G_PART_ALIAS_APPLE_HFS } }; /* diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h index 94e1714..8560845 100644 --- a/sys/geom/part/g_part.h +++ b/sys/geom/part/g_part.h @@ -44,6 +44,7 @@ enum g_part_alias { G_PART_ALIAS_FREEBSD_VINUM, /* A Vinum partition entry. */ G_PART_ALIAS_FREEBSD_ZFS, /* A ZFS file system entry. */ G_PART_ALIAS_MBR, /* A MBR (extended) partition entry. */ + G_PART_ALIAS_APPLE_HFS, /* An HFS file system entry. */ /* Keep the following last */ G_PART_ALIAS_COUNT }; diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index d700d0e..3a3179d 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -140,6 +140,7 @@ static struct uuid gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; static struct uuid gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static struct uuid gpt_uuid_linux_swap = GPT_ENT_TYPE_LINUX_SWAP; static struct uuid gpt_uuid_mbr = GPT_ENT_TYPE_MBR; +static struct uuid gpt_uuid_apple_hfs = GPT_ENT_TYPE_APPLE_HFS; static struct uuid gpt_uuid_unused = GPT_ENT_TYPE_UNUSED; static void @@ -337,6 +338,11 @@ gpt_parse_type(const char *type, struct uuid *uuid) *uuid = gpt_uuid_mbr; return (0); } + alias = g_part_alias_name(G_PART_ALIAS_APPLE_HFS); + if (!strcasecmp(type, alias)) { + *uuid = gpt_uuid_apple_hfs; + return (0); + } return (EINVAL); } |