Fix types of printf() args to match the format strings.

This commit is contained in:
itohy 2003-10-21 12:26:27 +00:00
parent 76595c213b
commit 59f09ea752
1 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pdc.c,v 1.2 2002/11/28 05:38:42 chs Exp $ */
/* $NetBSD: pdc.c,v 1.3 2003/10/21 12:26:27 itohy Exp $ */
/* $OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $ */
@ -141,7 +141,7 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
#ifdef PDCDEBUG
if (debug)
printf("iodcstrategy(%p, %s, %u, %u, %p, %p)\n", devdata,
rw==F_READ?"READ":"WRITE", blk, size, buf, rsize);
rw==F_READ?"READ":"WRITE", (unsigned) blk, (unsigned) size, buf, rsize);
if (debug > 1)
PZDEV_PRINT(pzdev);
@ -172,7 +172,7 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
#ifdef PDCDEBUG
if (debug)
printf("seek %d ", dp->last_blk);
printf("seek %d ", (int) dp->last_blk);
#endif
for (; (dp->last_blk + dp->last_read) <= blk;
dp->last_read = ret) {
@ -180,7 +180,7 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
dp->last_blk += dp->last_read;
if ((ret = (pzdev->pz_iodc_io)(pzdev->pz_hpa,
IODC_IO_READ, pzdev->pz_spa, pzdev->pz_layers,
pdcbuf, dp->last_blk, dp->buf, IODC_MAXIOSIZ,
pdcbuf, (unsigned) dp->last_blk, dp->buf, IODC_MAXIOSIZ,
IODC_MAXIOSIZ)) < 0) {
#ifdef DEBUG
if (debug)
@ -197,7 +197,7 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
}
#ifdef PDCDEBUG
if (debug)
printf("> %d[%d]\n", dp->last_blk, dp->last_read);
printf("> %d[%d]\n", (int)dp->last_blk, dp->last_read);
#endif
}
@ -212,27 +212,28 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
#ifdef PDCDEBUG
if (debug)
printf("off=%d,xfer=%d,size=%d,blk=%d\n",
offset, xfer, size, blk);
offset, xfer, size, (int)blk);
#endif
bcopy(dp->buf + offset, buf, xfer);
buf += xfer;
buf = (char *) buf + xfer;
}
/*
* double buffer it all the time, to cache
*/
for (; size; size -= ret, buf += ret, blk += ret, xfer += ret) {
for (; size;
size -= ret, buf = (char *) buf + ret, blk += ret, xfer += ret) {
twiddle();
offset = blk & IOPGOFSET;
if ((ret = (pzdev->pz_iodc_io)(pzdev->pz_hpa,
(rw == F_READ? IODC_IO_READ: IODC_IO_WRITE),
pzdev->pz_spa, pzdev->pz_layers, pdcbuf,
blk - offset, dp->buf, IODC_MAXIOSIZ,
(int)blk - offset, dp->buf, IODC_MAXIOSIZ,
IODC_MAXIOSIZ)) < 0) {
#ifdef DEBUG
if (debug)
printf("iodc_read(%d,%d): %d\n",
blk - offset, IODC_MAXIOSIZ, ret);
(int)blk - offset, IODC_MAXIOSIZ, ret);
#endif
if (xfer)
break;
@ -249,7 +250,7 @@ iodcstrategy(void *devdata, int rw, daddr_t blk, size_t size, void *buf,
#ifdef PDCDEBUG
if (debug)
printf("read %d(%d,%d)@%x ", ret,
dp->last_blk, dp->last_read, (u_int)buf);
(int)dp->last_blk, dp->last_read, (u_int)buf);
#endif
}