svn commit: r184151 - head/sys/geom/part
Marcel Moolenaar
marcel at FreeBSD.org
Wed Oct 22 02:08:55 UTC 2008
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
More information about the svn-src-head
mailing list