Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge Skip protective MBR early too.
details: https://anonhg.NetBSD.org/src/rev/6edc61719d6d
branches: trunk
changeset: 341997:6edc61719d6d
user: christos <christos%NetBSD.org@localhost>
date: Wed Dec 02 01:09:49 2015 +0000
description:
Skip protective MBR early too.
diffstat:
sys/dev/dkwedge/dkwedge_mbr.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r b84c78018674 -r 6edc61719d6d sys/dev/dkwedge/dkwedge_mbr.c
--- a/sys/dev/dkwedge/dkwedge_mbr.c Wed Dec 02 01:01:55 2015 +0000
+++ b/sys/dev/dkwedge/dkwedge_mbr.c Wed Dec 02 01:09:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkwedge_mbr.c,v 1.8 2014/11/04 07:46:26 mlelstv Exp $ */
+/* $NetBSD: dkwedge_mbr.c,v 1.9 2015/12/02 01:09:49 christos Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_mbr.c,v 1.8 2014/11/04 07:46:26 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_mbr.c,v 1.9 2015/12/02 01:09:49 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,10 +103,16 @@
dp = mbr->mbr_parts;
for (i = 0; i < MBR_PART_COUNT; i++) {
- /* Extended partitions are handled below. */
- if (dp[i].mbrp_type == 0 ||
- MBR_IS_EXTENDED(dp[i].mbrp_type))
- continue;
+ switch (dp[i].mbrp_type) {
+ case 0: /* empty */
+ case MBR_PTYPE_PMBR: /* Handled by GPT */
+ continue;
+ default:
+ /* Extended partitions are handled below. */
+ if (MBR_IS_EXTENDED(dp[i].mbrp_type))
+ continue;
+ break;
+ }
if ((ptype = mbr_ptype_to_str(dp[i].mbrp_type)) == NULL) {
/*
Home |
Main Index |
Thread Index |
Old Index