diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-05-16 22:21:33 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-05-16 22:21:33 +0000 |
commit | 9090794d6cc9b8867376522131d6ff69824038a7 (patch) | |
tree | d1b866f7d301b4bec265f000dad8c55d69b27f08 /sys/geom | |
parent | b7a63fb85cd07072afa8e91201882f5a9c432e55 (diff) | |
download | FreeBSD-src-9090794d6cc9b8867376522131d6ff69824038a7.zip FreeBSD-src-9090794d6cc9b8867376522131d6ff69824038a7.tar.gz |
Teach gpart about bootcode on APM.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/part/g_part_apm.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c index c80925a..c73d7f6 100644 --- a/sys/geom/part/g_part_apm.c +++ b/sys/geom/part/g_part_apm.c @@ -131,6 +131,26 @@ apm_parse_type(const char *type, char *buf, size_t bufsz) strncpy(buf, type, bufsz); return (0); } + alias = g_part_alias_name(G_PART_ALIAS_APPLE_BOOT); + if (!strcasecmp(type, alias)) { + strcpy(buf, APM_ENT_TYPE_APPLE_BOOT); + return (0); + } + alias = g_part_alias_name(G_PART_ALIAS_APPLE_HFS); + if (!strcasecmp(type, alias)) { + strcpy(buf, APM_ENT_TYPE_APPLE_HFS); + return (0); + } + alias = g_part_alias_name(G_PART_ALIAS_APPLE_UFS); + if (!strcasecmp(type, alias)) { + strcpy(buf, APM_ENT_TYPE_APPLE_UFS); + return (0); + } + alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_BOOT); + if (!strcasecmp(type, alias)) { + strcpy(buf, APM_ENT_TYPE_APPLE_BOOT); + return (0); + } alias = g_part_alias_name(G_PART_ALIAS_FREEBSD); if (!strcasecmp(type, alias)) { strcpy(buf, APM_ENT_TYPE_FREEBSD); @@ -445,6 +465,12 @@ g_part_apm_type(struct g_part_table *basetable, struct g_part_entry *baseentry, entry = (struct g_part_apm_entry *)baseentry; type = entry->ent.ent_type; + if (!strcmp(type, APM_ENT_TYPE_APPLE_BOOT)) + return (g_part_alias_name(G_PART_ALIAS_APPLE_BOOT)); + if (!strcmp(type, APM_ENT_TYPE_APPLE_HFS)) + return (g_part_alias_name(G_PART_ALIAS_APPLE_HFS)); + if (!strcmp(type, APM_ENT_TYPE_APPLE_UFS)) + return (g_part_alias_name(G_PART_ALIAS_APPLE_UFS)); if (!strcmp(type, APM_ENT_TYPE_FREEBSD)) return (g_part_alias_name(G_PART_ALIAS_FREEBSD)); if (!strcmp(type, APM_ENT_TYPE_FREEBSD_SWAP)) |