summaryrefslogtreecommitdiff
path: root/sys/arch/arm/arm/disksubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arm/arm/disksubr.c')
-rw-r--r--sys/arch/arm/arm/disksubr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index adc93c3ef8d..0887fd4c2b3 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 2006/08/17 10:34:14 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 2006/08/20 03:14:21 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -172,10 +172,13 @@ 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 (letoh32(dp2->dp_size) > lp->d_secperunit)
+ if (blkno > lp->d_secperunit)
continue;
if (letoh32(dp2->dp_size))
pp->p_size = letoh32(dp2->dp_size);