Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/kern Pull up following revision(s) (requested by matt...
details: https://anonhg.NetBSD.org/src/rev/301f8aed6ff6
branches: netbsd-6
changeset: 776390:301f8aed6ff6
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jul 29 06:00:35 2013 +0000
description:
Pull up following revision(s) (requested by matt in ticket #910):
sys/kern/subr_disk_mbr.c: revision 1.46
If the MBR is a protective MBR, don't bother looking at it.
diffstat:
sys/kern/subr_disk_mbr.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 9d8c4453f8a8 -r 301f8aed6ff6 sys/kern/subr_disk_mbr.c
--- a/sys/kern/subr_disk_mbr.c Mon Jul 29 05:43:13 2013 +0000
+++ b/sys/kern/subr_disk_mbr.c Mon Jul 29 06:00:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk_mbr.c,v 1.42.8.1 2012/08/12 19:02:33 martin Exp $ */
+/* $NetBSD: subr_disk_mbr.c,v 1.42.8.2 2013/07/29 06:00:35 msaitoh Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.42.8.1 2012/08/12 19:02:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.42.8.2 2013/07/29 06:00:35 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -160,6 +160,15 @@
if (mbr->mbr_magic != htole16(MBR_MAGIC))
return SCAN_CONTINUE;
+ /*
+ * If this is a protective MBR, bail now.
+ */
+ if (mbr->mbr_parts[0].mbrp_type == MBR_PTYPE_PMBR
+ && mbr->mbr_parts[1].mbrp_type == MBR_PTYPE_UNUSED
+ && mbr->mbr_parts[2].mbrp_type == MBR_PTYPE_UNUSED
+ && mbr->mbr_parts[3].mbrp_type == MBR_PTYPE_UNUSED)
+ return SCAN_CONTINUE;
+
/* Copy data out of buffer so action can use bp */
memcpy(ptns, &mbr->mbr_parts, sizeof ptns);
Home |
Main Index |
Thread Index |
Old Index