Module Name: src
Committed By: uwe
Date: Thu Sep 2 03:14:43 UTC 2010
Modified Files:
src/sys/arch/sparc/stand/common: promdev.c
Log Message:
Fix printf formats in -DDEBUG_PROM to make it compile.
XXX: print daddr_t after casting it to int since libsa is not built
with LIBSA_PRINTF_LONGLONG_SUPPORT by default.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sparc/stand/common/promdev.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/stand/common/promdev.c
diff -u src/sys/arch/sparc/stand/common/promdev.c:1.25 src/sys/arch/sparc/stand/common/promdev.c:1.26
--- src/sys/arch/sparc/stand/common/promdev.c:1.25 Wed Aug 25 20:16:49 2010
+++ src/sys/arch/sparc/stand/common/promdev.c Thu Sep 2 03:14:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: promdev.c,v 1.25 2010/08/25 20:16:49 christos Exp $ */
+/* $NetBSD: promdev.c,v 1.26 2010/09/02 03:14:42 uwe Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -304,7 +304,7 @@
dblk += doffset;
#endif
#ifdef DEBUG_PROM
- printf("promstrategy: size=%d dblk=%d\n", size, dblk);
+ printf("promstrategy: size=%zd dblk=%d\n", size, (int)dblk);
#endif
#define prom_bread(fd, nblk, dblk, buf) \
@@ -326,7 +326,7 @@
*rsize = dbtob(n);
#ifdef DEBUG_PROM
- printf("rsize = %x\n", *rsize);
+ printf("rsize = %zx\n", *rsize);
#endif
return (error);
}
@@ -343,7 +343,7 @@
dblk += doffset;
#endif
#ifdef DEBUG_PROM
- printf("promstrategy: size=%d dblk=%d\n", size, dblk);
+ printf("promstrategy: size=%zd dblk=%d\n", size, (int)dblk);
#endif
#ifndef BOOTXX /* We know it's a block device, so save some space */
@@ -356,7 +356,7 @@
: prom_write(fd, buf, size);
#ifdef DEBUG_PROM
- printf("rsize = %x\n", *rsize);
+ printf("rsize = %zx\n", *rsize);
#endif
return (error);
}
@@ -382,7 +382,7 @@
dblk += doffset;
#endif
#ifdef DEBUG_PROM
- printf("prom_strategy: size=%d dblk=%d\n", size, dblk);
+ printf("prom_strategy: size=%zd dblk=%d\n", size, (int)dblk);
#endif
dmabuf = dvma_mapin(buf, size);
@@ -396,7 +396,7 @@
dvma_mapout(dmabuf, size);
#ifdef DEBUG_PROM
- printf("disk_strategy: xcnt = %x\n", xcnt);
+ printf("disk_strategy: xcnt = %zx\n", xcnt);
#endif
if (xcnt <= 0)
@@ -622,7 +622,7 @@
printf("d_dmabytes=%d\n", dip->d_dmabytes);
printf("d_localbytes=%d\n", dip->d_localbytes);
printf("d_stdcount=%d\n", dip->d_stdcount);
- printf("d_stdaddrs[%d]=%x\n", bp->ctlrNum, dip->d_stdaddrs[bp->ctlrNum]);
+ printf("d_stdaddrs[%d]=%lx\n", bp->ctlrNum, dip->d_stdaddrs[bp->ctlrNum]);
printf("d_devtype=%d\n", dip->d_devtype);
printf("d_maxiobytes=%d\n", dip->d_maxiobytes);
#endif
@@ -643,7 +643,7 @@
si->si_devaddr = oldmon_mapin(dip->d_stdaddrs[si->si_ctlr],
dip->d_devbytes, dip->d_devtype);
#ifdef DEBUG_PROM
- printf("prom_iopen: devaddr=0x%x pte=0x%x\n",
+ printf("prom_iopen: devaddr=%p pte=0x%x\n",
si->si_devaddr,
getpte4((u_long)si->si_devaddr & ~PGOFSET));
#endif
@@ -652,14 +652,14 @@
if (dip->d_dmabytes) {
si->si_dmaaddr = dvma_alloc(dip->d_dmabytes);
#ifdef DEBUG_PROM
- printf("prom_iopen: dmaaddr=0x%x\n", si->si_dmaaddr);
+ printf("prom_iopen: dmaaddr=%p\n", si->si_dmaaddr);
#endif
}
if (dip->d_localbytes) {
si->si_devdata = alloc(dip->d_localbytes);
#ifdef DEBUG_PROM
- printf("prom_iopen: devdata=0x%x\n", si->si_devdata);
+ printf("prom_iopen: devdata=%p\n", si->si_devdata);
#endif
}