diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-06 17:15:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-06 17:15:15 +0000 |
commit | 64b0758a0244e515108eec4f2cd5d05a5939ebf1 (patch) | |
tree | e5e991586e626374ede95d07956bcaf6a47372be /sys/kern/subr_disk.c | |
parent | a0f03208acbc7a85466c7cf68058959c1bbe9668 (diff) |
now that all partition size/offsets are potentially 64-bit, change the
type of all variables to daddr64_t. this includes the APIs for XXsize()
and XXdump(), all range checks inside bio drivers, internal variables
for disklabel handling, and even uvm's swap offsets. re-read numerous
times by otto, miod, krw, thib to look for errors
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index db97b94d3a8..27c07c3dec8 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.49 2007/06/06 16:49:51 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.50 2007/06/06 17:15:13 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -248,7 +248,7 @@ diskerr(struct buf *bp, char *dname, char *what, int pri, int blkdone, int unit = DISKUNIT(bp->b_dev), part = DISKPART(bp->b_dev); int (*pr)(const char *, ...); char partname = 'a' + part; - int sn; + daddr64_t sn; if (pri != LOG_PRINTF) { static const char fmt[] = ""; @@ -260,18 +260,18 @@ diskerr(struct buf *bp, char *dname, char *what, int pri, int blkdone, bp->b_flags & B_READ ? "read" : "writ"); sn = bp->b_blkno; if (bp->b_bcount <= DEV_BSIZE) - (*pr)("%d", sn); + (*pr)("%lld", sn); else { if (blkdone >= 0) { sn += blkdone; - (*pr)("%d of ", sn); + (*pr)("%lld of ", sn); } - (*pr)("%d-%d", bp->b_blkno, + (*pr)("%lld-%lld", bp->b_blkno, bp->b_blkno + (bp->b_bcount - 1) / DEV_BSIZE); } if (lp && (blkdone >= 0 || bp->b_bcount <= lp->d_secsize)) { sn += DL_GETPOFFSET(&lp->d_partitions[part]); - (*pr)(" (%s%d bn %d; cn %d", dname, unit, sn, + (*pr)(" (%s%d bn %lld; cn %d", dname, unit, sn, sn / lp->d_secpercyl); sn %= lp->d_secpercyl; (*pr)(" tn %d sn %d)", sn / lp->d_nsectors, sn % lp->d_nsectors); |