From 5eb18275d5f599528c5f4b8e4f00a190668d1070 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 16 Sep 2006 14:56:13 +0000 Subject: 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@ --- sys/arch/amd64/amd64/disksubr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c index 30e89d1fd20..a7a3e77ad73 100644 --- a/sys/arch/amd64/amd64/disksubr.c +++ b/sys/arch/amd64/amd64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.13 2006/08/24 00:22:22 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.14 2006/09/16 14:56:11 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -173,13 +173,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); -- cgit v1.2.3