1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

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.
This commit is contained in:
Marcel Moolenaar 2008-10-22 02:08:54 +00:00
parent 87c919e808
commit 66fedfca7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184151

View File

@ -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