summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-10-28 23:26:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-10-28 23:26:06 +0000
commit4e0f1e78370ad55cf306abe9f217f5034545699a (patch)
tree0b0dad7de1105af315e3c6197684e6567449b04c /sys/arch/i386
parent44a0e294d9c521a86958e94b01e28c823699d44c (diff)
We don't currently write a disklabel into an OpenBSD ('A6') DOS MBR
extended partition except on alpha, hppa, hppa64 and mips64. So don't spoof extended partitions as 'a' and try to read a disklabel from them. Make all archs consistant. When we can boot from extended partitions we can change to reading and writing disklabels from them. This means the first OpenBSD ('A6') extended partition will now be ignored during spoofing, just as subsequent ones have always been. Feedback from tom@, weingart@ and deraadt@.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/disksubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index c74021103a7..81cec55ab01 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.66 2006/10/21 20:10:39 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.67 2006/10/28 23:26:05 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -121,7 +121,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
}
bcopy(bp->b_data + DOSPARTOFF, dp, sizeof(dp));
- if (ourpart == -1) {
+ if (ourpart == -1 && part_blkno == DOSBBSECTOR) {
/* Search for our MBR partition */
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
i++, dp2++)