summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r--sys/arch/hppa64/hppa64/disksubr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c
index 88aa5bdf588..937a610adc0 100644
--- a/sys/arch/hppa64/hppa64/disksubr.c
+++ b/sys/arch/hppa64/hppa64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.14 2006/08/18 00:39:17 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.15 2006/08/20 03:14:21 krw Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -315,10 +315,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);