mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 16:54:02 +00:00
Fix usages of %ll[dx] with typedef'ed created types.
In the kernel it is wrong 99.9 times out of 100 to use %ll rather than cast to intmax_t and use %j.
This commit is contained in:
parent
bc562db930
commit
2875867356
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114741
|
@ -334,13 +334,13 @@ launch_requests(struct request *rq, int reviveok)
|
||||||
#ifdef VINUMDEBUG
|
#ifdef VINUMDEBUG
|
||||||
if (debug & DEBUG_REVIVECONFLICT)
|
if (debug & DEBUG_REVIVECONFLICT)
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
"Revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%llx, length %ld\n",
|
"Revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%jx, length %ld\n",
|
||||||
rq->sdno,
|
rq->sdno,
|
||||||
rq,
|
rq,
|
||||||
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
||||||
major(rq->bp->b_dev),
|
major(rq->bp->b_dev),
|
||||||
minor(rq->bp->b_dev),
|
minor(rq->bp->b_dev),
|
||||||
rq->bp->b_blkno,
|
(intmax_t)rq->bp->b_blkno,
|
||||||
rq->bp->b_bcount);
|
rq->bp->b_bcount);
|
||||||
#endif
|
#endif
|
||||||
return 0; /* and get out of here */
|
return 0; /* and get out of here */
|
||||||
|
@ -357,12 +357,12 @@ launch_requests(struct request *rq, int reviveok)
|
||||||
#ifdef VINUMDEBUG
|
#ifdef VINUMDEBUG
|
||||||
if (debug & DEBUG_ADDRESSES)
|
if (debug & DEBUG_ADDRESSES)
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
"Request: %p\n%s dev %d.%d, offset 0x%llx, length %ld\n",
|
"Request: %p\n%s dev %d.%d, offset 0x%jx, length %ld\n",
|
||||||
rq,
|
rq,
|
||||||
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
||||||
major(rq->bp->b_dev),
|
major(rq->bp->b_dev),
|
||||||
minor(rq->bp->b_dev),
|
minor(rq->bp->b_dev),
|
||||||
rq->bp->b_blkno,
|
(intmax_t)rq->bp->b_blkno,
|
||||||
rq->bp->b_bcount);
|
rq->bp->b_bcount);
|
||||||
vinum_conf.lastrq = rq;
|
vinum_conf.lastrq = rq;
|
||||||
vinum_conf.lastbuf = rq->bp;
|
vinum_conf.lastbuf = rq->bp;
|
||||||
|
@ -431,13 +431,13 @@ launch_requests(struct request *rq, int reviveok)
|
||||||
#ifdef VINUMDEBUG
|
#ifdef VINUMDEBUG
|
||||||
if (debug & DEBUG_ADDRESSES)
|
if (debug & DEBUG_ADDRESSES)
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
" %s dev %d.%d, sd %d, offset 0x%x, devoffset 0x%llx, length %ld\n",
|
" %s dev %d.%d, sd %d, offset 0x%x, devoffset 0x%jx, length %ld\n",
|
||||||
rqe->b.b_iocmd == BIO_READ ? "Read" : "Write",
|
rqe->b.b_iocmd == BIO_READ ? "Read" : "Write",
|
||||||
major(rqe->b.b_dev),
|
major(rqe->b.b_dev),
|
||||||
minor(rqe->b.b_dev),
|
minor(rqe->b.b_dev),
|
||||||
rqe->sdno,
|
rqe->sdno,
|
||||||
(u_int) (rqe->b.b_blkno - SD[rqe->sdno].driveoffset),
|
(u_int) (rqe->b.b_blkno - SD[rqe->sdno].driveoffset),
|
||||||
rqe->b.b_blkno,
|
(intmax_t)rqe->b.b_blkno,
|
||||||
rqe->b.b_bcount);
|
rqe->b.b_bcount);
|
||||||
if (debug & DEBUG_LASTREQS) {
|
if (debug & DEBUG_LASTREQS) {
|
||||||
microtime(&rqe->launchtime); /* time we launched this request */
|
microtime(&rqe->launchtime); /* time we launched this request */
|
||||||
|
@ -636,16 +636,16 @@ bre(struct request *rq,
|
||||||
#ifdef VINUMDEBUG
|
#ifdef VINUMDEBUG
|
||||||
if (debug & DEBUG_EOFINFO) { /* tell on the request */
|
if (debug & DEBUG_EOFINFO) { /* tell on the request */
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
"vinum: EOF on plex %s, sd %s offset %x (user offset 0x%llx)\n",
|
"vinum: EOF on plex %s, sd %s offset %x (user offset 0x%jx)\n",
|
||||||
plex->name,
|
plex->name,
|
||||||
sd->name,
|
sd->name,
|
||||||
(u_int) sd->sectors,
|
(u_int) sd->sectors,
|
||||||
bp->b_blkno);
|
(intmax_t)bp->b_blkno);
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
"vinum: stripebase %#llx, stripeoffset %#llxx, blockoffset %#llx\n",
|
"vinum: stripebase %#jx, stripeoffset %#jx, blockoffset %#jx\n",
|
||||||
stripebase,
|
(intmax_t)stripebase,
|
||||||
stripeoffset,
|
(intmax_t)stripeoffset,
|
||||||
blockoffset);
|
(intmax_t)blockoffset);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -975,13 +975,13 @@ sdio(struct buf *bp)
|
||||||
#ifdef VINUMDEBUG
|
#ifdef VINUMDEBUG
|
||||||
if (debug & DEBUG_ADDRESSES)
|
if (debug & DEBUG_ADDRESSES)
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
" %s dev %d.%d, sd %d, offset 0x%llx, devoffset 0x%llx, length %ld\n",
|
" %s dev %d.%d, sd %d, offset 0x%jx, devoffset 0x%jx, length %ld\n",
|
||||||
sbp->b.b_iocmd == BIO_READ ? "Read" : "Write",
|
sbp->b.b_iocmd == BIO_READ ? "Read" : "Write",
|
||||||
major(sbp->b.b_dev),
|
major(sbp->b.b_dev),
|
||||||
minor(sbp->b.b_dev),
|
minor(sbp->b.b_dev),
|
||||||
sbp->sdno,
|
sbp->sdno,
|
||||||
sbp->b.b_blkno - SD[sbp->sdno].driveoffset,
|
(intmax_t)(sbp->b.b_blkno - SD[sbp->sdno].driveoffset),
|
||||||
sbp->b.b_blkno,
|
(intmax_t)sbp->b.b_blkno,
|
||||||
sbp->b.b_bcount);
|
sbp->b.b_bcount);
|
||||||
#endif
|
#endif
|
||||||
s = splbio();
|
s = splbio();
|
||||||
|
|
|
@ -204,13 +204,13 @@ revive_block(int sdno)
|
||||||
|
|
||||||
if (debug & DEBUG_REVIVECONFLICT)
|
if (debug & DEBUG_REVIVECONFLICT)
|
||||||
log(LOG_DEBUG,
|
log(LOG_DEBUG,
|
||||||
"Relaunch revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%llx, length %ld\n",
|
"Relaunch revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%jx, length %ld\n",
|
||||||
rq->sdno,
|
rq->sdno,
|
||||||
rq,
|
rq,
|
||||||
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
||||||
major(rq->bp->b_dev),
|
major(rq->bp->b_dev),
|
||||||
minor(rq->bp->b_dev),
|
minor(rq->bp->b_dev),
|
||||||
rq->bp->b_blkno,
|
(intmax_t)rq->bp->b_blkno,
|
||||||
rq->bp->b_bcount);
|
rq->bp->b_bcount);
|
||||||
#endif
|
#endif
|
||||||
launch_requests(sd->waitlist, 1); /* do them now */
|
launch_requests(sd->waitlist, 1); /* do them now */
|
||||||
|
@ -306,8 +306,8 @@ parityops(struct vinum_ioctl_msg *data)
|
||||||
if (op == checkparity)
|
if (op == checkparity)
|
||||||
reply->error = EIO;
|
reply->error = EIO;
|
||||||
sprintf(reply->msg,
|
sprintf(reply->msg,
|
||||||
"Parity incorrect at offset 0x%llx\n",
|
"Parity incorrect at offset 0x%jx\n",
|
||||||
errorloc);
|
(intmax_t)errorloc);
|
||||||
}
|
}
|
||||||
if (reply->error == EAGAIN) { /* still OK, */
|
if (reply->error == EAGAIN) { /* still OK, */
|
||||||
plex->checkblock = pstripe + (pbp->b_bcount >> DEV_BSHIFT); /* moved this much further down */
|
plex->checkblock = pstripe + (pbp->b_bcount >> DEV_BSHIFT); /* moved this much further down */
|
||||||
|
|
Loading…
Reference in a new issue