Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2008 02:08:54 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184151 - head/sys/geom/part
Message-ID:  <200810220208.m9M28sV0014319@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Wed Oct 22 02:08:54 2008
New Revision: 184151
URL: http://svn.freebsd.org/changeset/base/184151

Log:
  Allow dumps to partitions with a tag of 0. The legacy
  sunlabel implementation in FreeBSD does not use VTOC
  information and as such as no partition types.

Modified:
  head/sys/geom/part/g_part_vtoc8.c

Modified: head/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- head/sys/geom/part/g_part_vtoc8.c	Wed Oct 22 01:50:35 2008	(r184150)
+++ head/sys/geom/part/g_part_vtoc8.c	Wed Oct 22 02:08:54 2008	(r184151)
@@ -266,10 +266,13 @@ g_part_vtoc8_dumpto(struct g_part_table 
 	struct g_part_vtoc8_table *table;
 	uint16_t tag;
 
-	/* Allow dumping to a swap partition only. */
+	/*
+	 * Allow dumping to a swap partition or a partition that
+	 * has no type.
+	 */
 	table = (struct g_part_vtoc8_table *)basetable;
 	tag = be16dec(&table->vtoc.part[entry->gpe_index - 1].tag);
-	return ((tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0);
+	return ((tag == 0 || tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0);
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810220208.m9M28sV0014319>