Date: Mon, 30 Jan 2012 07:23:53 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r230764 - stable/8/sys/geom/part Message-ID: <201201300723.q0U7Nr4f072821@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201300723.q0U7Nr4f072821>