From 95c7a7e8448aceffb1dc9ab5854db4252b367b90 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 20 Oct 2013 10:11:18 +0000 Subject: (daddr_t) -> (u_int64_t) when multiplying ncylinders * secpercyl to get disk size, since DL_SETDSIZE() takes disk sector values, not 512-byte block values. --- sys/arch/sparc/dev/xd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc/dev/xd.c') diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index f7dd8eba5ad..f16c7bce5e5 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.59 2013/10/14 23:26:22 krw Exp $ */ +/* $OpenBSD: xd.c,v 1.60 2013/10/20 10:11:16 krw Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -300,7 +300,7 @@ xdgetdisklabel(xd, b) lp->d_secsize = XDFM_BPS; if (sl->sl_magic == SUN_DKMAGIC) { lp->d_secpercyl = sl->sl_nsectors * sl->sl_ntracks; - DL_SETDSIZE(lp, (daddr_t)lp->d_secpercyl * sl->sl_ncylinders); + DL_SETDSIZE(lp, (u_int64_t)lp->d_secpercyl * sl->sl_ncylinders); } else { lp->d_secpercyl = 1; } -- cgit v1.2.3