svn commit: r230764 - stable/8/sys/geom/part

Don Lewis truckman at FreeBSD.org
Mon Jan 30 07:23:53 UTC 2012


Author: truckman
Date: Mon Jan 30 07:23:53 2012
New Revision: 230764
URL: http://svn.freebsd.org/changeset/base/230764

Log:
  MFC r230064:
  
  Allow an MBR primary or extended Linux swap partition to be specified
  as the system dump device.  This was already allowed for GPT.  The Linux
  swap metadata at the beginning of the partition should not be disturbed
  because the crash dump is written at the end.
  
  Reviewed by:	alfred, pjd, marcel

Modified:
  stable/8/sys/geom/part/g_part_ebr.c
  stable/8/sys/geom/part/g_part_mbr.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/geom/part/g_part_ebr.c
==============================================================================
--- stable/8/sys/geom/part/g_part_ebr.c	Mon Jan 30 07:20:52 2012	(r230763)
+++ stable/8/sys/geom/part/g_part_ebr.c	Mon Jan 30 07:23:53 2012	(r230764)
@@ -326,9 +326,10 @@ g_part_ebr_dumpto(struct g_part_table *t
 {
 	struct g_part_ebr_entry *entry;
 
-	/* Allow dumping to a FreeBSD partition only. */
+	/* Allow dumping to a FreeBSD partition or Linux swap partition only. */
 	entry = (struct g_part_ebr_entry *)baseentry;
-	return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
+	return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
+	    entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
 }
 
 #if defined(GEOM_PART_EBR_COMPAT)

Modified: stable/8/sys/geom/part/g_part_mbr.c
==============================================================================
--- stable/8/sys/geom/part/g_part_mbr.c	Mon Jan 30 07:20:52 2012	(r230763)
+++ stable/8/sys/geom/part/g_part_mbr.c	Mon Jan 30 07:23:53 2012	(r230764)
@@ -301,9 +301,10 @@ g_part_mbr_dumpto(struct g_part_table *t
 {
 	struct g_part_mbr_entry *entry;
 
-	/* Allow dumping to a FreeBSD partition only. */
+	/* Allow dumping to a FreeBSD partition or Linux swap partition only. */
 	entry = (struct g_part_mbr_entry *)baseentry;
-	return ((entry->ent.dp_typ == DOSPTYP_386BSD) ? 1 : 0);
+	return ((entry->ent.dp_typ == DOSPTYP_386BSD ||
+	    entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0);
 }
 
 static int


More information about the svn-src-stable-8 mailing list