summaryrefslogtreecommitdiffstats
path: root/sys/geom/part
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-10-22 02:08:54 +0000
committermarcel <marcel@FreeBSD.org>2008-10-22 02:08:54 +0000
commitc02233b6bd48b89e7ffa97d7e7b6ba7f7622f72e (patch)
tree1ab5065cf32bc670143419f256bb53234c379241 /sys/geom/part
parentd0d7e3dcb3b0125c2346eaf5119af0811c1f8ff8 (diff)
downloadFreeBSD-src-c02233b6bd48b89e7ffa97d7e7b6ba7f7622f72e.zip
FreeBSD-src-c02233b6bd48b89e7ffa97d7e7b6ba7f7622f72e.tar.gz
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.
Diffstat (limited to 'sys/geom/part')
-rw-r--r--sys/geom/part/g_part_vtoc8.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/part/g_part_vtoc8.c b/sys/geom/part/g_part_vtoc8.c
index 141d201..0fae760 100644
--- a/sys/geom/part/g_part_vtoc8.c
+++ b/sys/geom/part/g_part_vtoc8.c
@@ -266,10 +266,13 @@ g_part_vtoc8_dumpto(struct g_part_table *basetable, struct g_part_entry *entry)
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
OpenPOWER on IntegriCloud