diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-09-16 14:56:13 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-09-16 14:56:13 +0000 |
commit | 5eb18275d5f599528c5f4b8e4f00a190668d1070 (patch) | |
tree | b51db191094845101bda34df20f30e1a97328161 /sys/arch/macppc | |
parent | 323127da28857fb031b3953bca7dbec13cb816ea (diff) |
Revert new check for DOS partitions running past d_secperunit (e.g.
r1.54 of i386/disksubr.c). The check incorrectly handled extended
partitions. Possibly a symptom of a deeper problem with extended
partition offsets that will be addressed post-4.0.
Problem reported/fix tested by A. Velichinsky, cause diagnosed by
otto@.
ok pedro@ mickey@ miod@ deraadt@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index de962013ae6..35195b5e07b 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.21 2006/08/20 03:14:21 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.22 2006/09/16 14:56:11 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -260,13 +260,10 @@ donot: */ for (dp2=dp, i=0; i < NDOSPART && n < 8; i++, dp2++) { struct partition *pp = &lp->d_partitions[8+n]; - u_int64_t blkno = (u_int64_t)part_blkno + - (u_int64_t)letoh32(dp2->dp_start) + - (u_int64_t)letoh32(dp2->dp_size); if (dp2->dp_typ == DOSPTYP_OPENBSD) continue; - if (blkno > lp->d_secperunit) + if (letoh32(dp2->dp_size) > lp->d_secperunit) continue; if (letoh32(dp2->dp_size)) pp->p_size = letoh32(dp2->dp_size); |