summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-19 02:46:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-19 02:46:41 +0000
commitc6839f962490abf9876dc231d78cf05526d854e0 (patch)
tree34da9a9c0837f43e47ff2aceba18416b97c78f65 /sys/arch/i386
parent190c0f6693361834ec40851dc9b5a71d041338da (diff)
correct extended partition botch; gluk, in PR 1449
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/disksubr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index 3342b6ec535..50ab3bbdf7b 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.40 2000/10/18 21:00:35 mickey Exp $ */
+/* $OpenBSD: disksubr.c,v 1.41 2002/02/19 02:46:40 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -123,6 +123,8 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
while (wander && n < 8 && loop < 8) {
loop++;
wander = 0;
+ if (part_blkno < extoff)
+ part_blkno = extoff;
/* read boot record */
bp->b_blkno = part_blkno;
@@ -229,8 +231,10 @@ donot:
case DOSPTYP_EXTEND:
case DOSPTYP_EXTENDL:
part_blkno = get_le(&dp2->dp_start) + extoff;
- if (!extoff)
+ if (!extoff) {
extoff = get_le(&dp2->dp_start);
+ part_blkno = 0;
+ }
wander = 1;
break;
default: