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 MFC after: 2 weeks
This commit is contained in:
parent
ad71f089ab
commit
b5bad28182
@ -333,9 +333,10 @@ g_part_ebr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
|
||||
{
|
||||
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)
|
||||
|
@ -304,9 +304,10 @@ g_part_mbr_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
|
||||
{
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user