diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-19 02:46:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-19 02:46:41 +0000 |
commit | c6839f962490abf9876dc231d78cf05526d854e0 (patch) | |
tree | 34da9a9c0837f43e47ff2aceba18416b97c78f65 | |
parent | 190c0f6693361834ec40851dc9b5a71d041338da (diff) |
correct extended partition botch; gluk, in PR 1449
-rw-r--r-- | sys/arch/alpha/alpha/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/disksubr.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 8 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 8 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/disksubr.c | 8 |
5 files changed, 27 insertions, 9 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index 4eb71d564ad..18e3958058d 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.32 2001/02/13 16:05:34 art Exp $ */ +/* $OpenBSD: disksubr.c,v 1.33 2002/02/19 02:46:39 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -367,6 +367,8 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, 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; diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index b572980013f..0394d8b26bd 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $ */ +/* $OpenBSD: disksubr.c,v 1.7 2002/02/19 02:46:39 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -383,6 +383,8 @@ readdoslabel(bp, strat, lp, osdep, partoffp, cylp, 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; @@ -490,8 +492,10 @@ donot: break; case DOSPTYP_EXTEND: part_blkno = dp2->dp_start + extoff; - if (!extoff) + if (!extoff) { extoff = dp2->dp_start; + part_blkno = 0; + } wander = 1; break; default: 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: diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index 5181f68359b..e6fc78d6404 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.1 2001/09/01 15:44:20 drahn Exp $ */ +/* $OpenBSD: disksubr.c,v 1.2 2002/02/19 02:46:40 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -213,6 +213,8 @@ hfs_done: while (wander && n < 8 && loop < 8) { loop++; wander = 0; + if (part_blkno < extoff) + part_blkno = extoff; /* read boot record */ bp->b_blkno = part_blkno; @@ -318,8 +320,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: diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c index 797709db486..15b04b2cd28 100644 --- a/sys/arch/mvmeppc/mvmeppc/disksubr.c +++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.2 2001/11/06 22:46:00 miod Exp $ */ +/* $OpenBSD: disksubr.c,v 1.3 2002/02/19 02:46:40 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -124,6 +124,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: |