summaryrefslogtreecommitdiffstats
path: root/sys/dev/ccd
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-05-25 11:05:07 +0000
committerbde <bde@FreeBSD.org>2002-05-25 11:05:07 +0000
commitaa68d84998c8d1596cff8135490267fe5643d5dc (patch)
tree67ecb1f2e41e13012e63469ab4f80b525e08c393 /sys/dev/ccd
parenta361c10d4b99d2c893b8032fdc0a4facb145240f (diff)
downloadFreeBSD-src-aa68d84998c8d1596cff8135490267fe5643d5dc.zip
FreeBSD-src-aa68d84998c8d1596cff8135490267fe5643d5dc.tar.gz
Fixed printf format errors. Most of them are 64-bit daddr_t casualties.
Printing daddr_t's using %d format was always an error, but gcc's warning about it was ignored for supported 64-bit arches and not printed for supported 32-bit arches. Hundreds if not thousands thousands of previously "fixed" daddr_t printings are now broken on 32-bit machines by casting daddr_t's to longs. daddr_t's should be printed using %jd format, but this fix uses %lld since %j is not implemented in the kernel yet. Fixed some nearby format printf errors (style bugs).
Diffstat (limited to 'sys/dev/ccd')
-rw-r--r--sys/dev/ccd/ccd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index bdb4043..415c0eb 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -947,8 +947,9 @@ ccdbuffer(struct ccdbuf **cb, struct ccd_s *cs, struct bio *bp, daddr_t bn, cadd
#ifdef DEBUG
if (ccddebug & CCDB_IO)
- printf("ccdbuffer(%p, %p, %d, %p, %ld)\n",
- cs, bp, bn, addr, bcount);
+ printf("ccdbuffer(%p, %p, %lld, %p, %ld)\n",
+ (void *)cs, (void *)bp, (long long)bn, (void *)addr,
+ bcount);
#endif
/*
* Determine which component bn falls in.
@@ -1741,8 +1742,9 @@ printiinfo(struct ccdiinfo *ii)
int ix, i;
for (ix = 0; ii->ii_ndisk; ix++, ii++) {
- printf(" itab[%d]: #dk %d sblk %d soff %d",
- ix, ii->ii_ndisk, ii->ii_startblk, ii->ii_startoff);
+ printf(" itab[%d]: #dk %d sblk %lld soff %lld",
+ ix, ii->ii_ndisk, (long long)ii->ii_startblk,
+ (long long)ii->ii_startoff);
for (i = 0; i < ii->ii_ndisk; i++)
printf(" %d", ii->ii_index[i]);
printf("\n");
OpenPOWER on IntegriCloud