svn commit: r208431 - in stable/8: sbin/geom/class/part
sys/geom/part sys/sys
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun May 23 02:40:04 UTC 2010
Author: nwhitehorn
Date: Sun May 23 02:40:04 2010
New Revision: 208431
URL: http://svn.freebsd.org/changeset/base/208431
Log:
MFC r200557,208173:
Teach gpart about bootcode on APM.
Modified:
stable/8/sbin/geom/class/part/geom_part.c
stable/8/sys/geom/part/g_part_apm.c
stable/8/sys/sys/apm.h
Directory Properties:
stable/8/sbin/geom/ (props changed)
stable/8/sbin/geom/class/stripe/ (props changed)
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sbin/geom/class/part/geom_part.c
==============================================================================
--- stable/8/sbin/geom/class/part/geom_part.c Sun May 23 02:32:52 2010 (r208430)
+++ stable/8/sbin/geom/class/part/geom_part.c Sun May 23 02:40:04 2010 (r208431)
@@ -602,7 +602,7 @@ gpart_bootcode(struct gctl_req *req, uns
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);
Modified: stable/8/sys/geom/part/g_part_apm.c
==============================================================================
--- stable/8/sys/geom/part/g_part_apm.c Sun May 23 02:32:52 2010 (r208430)
+++ stable/8/sys/geom/part/g_part_apm.c Sun May 23 02:40:04 2010 (r208431)
@@ -128,6 +128,26 @@ apm_parse_type(const char *type, char *b
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);
@@ -429,6 +449,12 @@ g_part_apm_type(struct g_part_table *bas
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))
Modified: stable/8/sys/sys/apm.h
==============================================================================
--- stable/8/sys/sys/apm.h Sun May 23 02:32:52 2010 (r208430)
+++ stable/8/sys/sys/apm.h Sun May 23 02:40:04 2010 (r208431)
@@ -61,6 +61,8 @@ struct apm_ent {
#define APM_ENT_TYPE_FREEBSD_VINUM "FreeBSD-Vinum"
#define APM_ENT_TYPE_FREEBSD_ZFS "FreeBSD-ZFS"
+#define APM_ENT_TYPE_APPLE_BOOT "Apple_Bootstrap"
#define APM_ENT_TYPE_APPLE_HFS "Apple_HFS"
+#define APM_ENT_TYPE_APPLE_UFS "Apple_UNIX_SVR2"
#endif /* _SYS_APM_H_ */
More information about the svn-src-stable
mailing list