1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

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).
This commit is contained in:
Bruce Evans 2002-05-25 11:05:07 +00:00
parent 5cc5b1d344
commit ff8cc2eb35
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97272
2 changed files with 12 additions and 8 deletions

View File

@ -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");

View File

@ -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");