diff options
-rw-r--r-- | sbin/geom/class/part/geom_part.c | 2 | ||||
-rw-r--r-- | sys/geom/part/g_part_apm.c | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c index 3ddbd7a..6fca208 100644 --- a/sbin/geom/class/part/geom_part.c +++ b/sbin/geom/class/part/geom_part.c @@ -705,7 +705,7 @@ gpart_bootcode(struct gctl_req *req, unsigned int fl) if (gctl_has_param(req, bootcode_param)) { s = gctl_get_ascii(req, bootcode_param); - bootsize = 64 * 1024; /* Arbitrary limit. */ + bootsize = 800 * 1024; /* Arbitrary limit. */ bootcode = gpart_bootfile_read(s, &bootsize); error = gctl_change_param(req, bootcode_param, bootsize, bootcode); 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)) |