Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Fix further printf format warnings for DEBUG, in the wak...



details:   https://anonhg.NetBSD.org/src/rev/fdfaa77203e7
branches:  trunk
changeset: 542286:fdfaa77203e7
user:      kleink <kleink%NetBSD.org@localhost>
date:      Sat Jan 25 23:00:09 2003 +0000

description:
Fix further printf format warnings for DEBUG, in the wake of daddr_t
having changed.

diffstat:

 sys/dev/ccd.c             |  14 ++++++++------
 sys/dev/vnd.c             |  12 +++++++-----
 sys/ufs/lfs/lfs_debug.c   |  15 ++++++++-------
 sys/ufs/lfs/lfs_segment.c |  24 +++++++++++++-----------
 sys/ufs/lfs/lfs_vfsops.c  |   7 ++++---
 sys/ufs/lfs/lfs_vnops.c   |   6 +++---
 6 files changed, 43 insertions(+), 35 deletions(-)

diffs (284 lines):

diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/dev/ccd.c
--- a/sys/dev/ccd.c     Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/dev/ccd.c     Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ccd.c,v 1.80 2002/11/01 11:31:55 mrg Exp $     */
+/*     $NetBSD: ccd.c,v 1.81 2003/01/25 23:09:58 kleink Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.80 2002/11/01 11:31:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.81 2003/01/25 23:09:58 kleink Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -749,7 +749,7 @@
 
 #ifdef DEBUG
        if (ccddebug & CCDB_IO)
-               printf("ccdbuffer(%p, %p, %d, %p, %ld)\n",
+               printf("ccdbuffer(%p, %p, %" PRId64 ", %p, %ld)\n",
                       cs, bp, bn, addr, bcount);
 #endif
        /*
@@ -825,7 +825,8 @@
 
 #ifdef DEBUG
        if (ccddebug & CCDB_IO)
-               printf(" dev 0x%x(u%lu): cbp %p bn %d addr %p bcnt %ld\n",
+               printf(" dev 0x%x(u%lu): cbp %p bn %" PRId64 " addr %p"
+                      " bcnt %ld\n",
                    ci->ci_dev, (unsigned long) (ci-cs->sc_cinfo), cbp,
                    cbp->cb_buf.b_blkno, cbp->cb_buf.b_data,
                    cbp->cb_buf.b_bcount);
@@ -875,7 +876,8 @@
        if (ccddebug & CCDB_IO) {
                printf("ccdiodone: bp %p bcount %ld resid %ld\n",
                       bp, bp->b_bcount, bp->b_resid);
-               printf(" dev 0x%x(u%d), cbp %p bn %d addr %p bcnt %ld\n",
+               printf(" dev 0x%x(u%d), cbp %p bn %" PRId64 " addr %p"
+                      " bcnt %ld\n",
                       cbp->cb_buf.b_dev, cbp->cb_comp, cbp,
                       cbp->cb_buf.b_blkno, cbp->cb_buf.b_data,
                       cbp->cb_buf.b_bcount);
@@ -1479,7 +1481,7 @@
        int ix, i;
 
        for (ix = 0; ii->ii_ndisk; ix++, ii++) {
-               printf(" itab[%d]: #dk %d sblk %d soff %d",
+               printf(" itab[%d]: #dk %d sblk %" PRId64 " soff %" PRId64,
                    ix, ii->ii_ndisk, ii->ii_startblk, ii->ii_startoff);
                for (i = 0; i < ii->ii_ndisk; i++)
                        printf(" %d", ii->ii_index[i]);
diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/dev/vnd.c     Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.89 2002/11/16 08:10:48 mrg Exp $     */
+/*     $NetBSD: vnd.c,v 1.90 2003/01/25 23:09:59 kleink Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.89 2002/11/16 08:10:48 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.90 2003/01/25 23:09:59 kleink Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "fs_nfs.h"
@@ -482,7 +482,8 @@
                        sz = resid;
 #ifdef DEBUG
                if (vnddebug & VDB_IO)
-                       printf("vndstrategy: vp %p/%p bn 0x%qx/0x%x sz 0x%x\n",
+                       printf("vndstrategy: vp %p/%p bn 0x%qx/0x%" PRIx64
+                              " sz 0x%x\n",
                            vnd->sc_vp, vp, (long long)bn, nbn, sz);
 #endif
 
@@ -568,7 +569,7 @@
                vnd->sc_active++;
 #ifdef DEBUG
                if (vnddebug & VDB_IO)
-                       printf("vndstart(%ld): bp %p vp %p blkno 0x%x"
+                       printf("vndstart(%ld): bp %p vp %p blkno 0x%" PRIx64
                                " flags %lx addr %p cnt 0x%lx\n",
                            (long) (vnd-vnd_softc), bp, bp->b_vp, bp->b_blkno,
                            bp->b_flags, bp->b_data, bp->b_bcount);
@@ -597,7 +598,8 @@
        s = splbio();
 #ifdef DEBUG
        if (vnddebug & VDB_IO)
-               printf("vndiodone(%ld): vbp %p vp %p blkno 0x%x addr %p cnt 0x%lx\n",
+               printf("vndiodone(%ld): vbp %p vp %p blkno 0x%" PRIx64
+                      " addr %p cnt 0x%lx\n",
                    (long) (vnd-vnd_softc), vbp, vbp->vb_buf.b_vp,
                    vbp->vb_buf.b_blkno, vbp->vb_buf.b_data,
                    vbp->vb_buf.b_bcount);
diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/ufs/lfs/lfs_debug.c
--- a/sys/ufs/lfs/lfs_debug.c   Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/ufs/lfs/lfs_debug.c   Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_debug.c,v 1.17 2003/01/24 21:55:27 fvdl Exp $      */
+/*     $NetBSD: lfs_debug.c,v 1.18 2003/01/25 23:00:09 kleink Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
 #ifdef DEBUG
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_debug.c,v 1.17 2003/01/24 21:55:27 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_debug.c,v 1.18 2003/01/25 23:00:09 kleink Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/namei.h>
@@ -105,7 +105,7 @@
 
        for (i = lfs_lognum; i != (lfs_lognum - 1) % LFS_LOGLENGTH; i = (i + 1) % LFS_LOGLENGTH)
                if (lfs_log[i].file) {
-                       printf("lbn %d %s %lx %d %s\n",
+                       printf("lbn %" PRId64 " %s %lx %d %s\n",
                                lfs_log[i].block,
                                lfs_log[i].op,
                                lfs_log[i].flags,
@@ -276,13 +276,14 @@
        for (bpp = sp->bpp; bpp < sp->cbpp; bpp++) {
                if ((*bpp)->b_blkno != blkno) {
                        if ((*bpp)->b_vp == devvp) {
-                               printf("Oops, would misplace raw block 0x%x at "
-                                      "0x%x\n",
+                               printf("Oops, would misplace raw block "
+                                      "0x%" PRIx64 " at 0x%" PRIx64 "\n",
                                       (*bpp)->b_blkno,
                                       blkno);
                        } else {
-                               printf("%s:%d: misplace ino %d lbn %d at "
-                                      "0x%x instead of 0x%x\n",
+                               printf("%s:%d: misplace ino %d lbn %" PRId64
+                                      " at 0x%" PRIx64 " instead of "
+                                      "0x%" PRIx64 "\n",
                                       file, line,
                                       VTOI((*bpp)->b_vp)->i_number, (*bpp)->b_lblkno,
                                       blkno,
diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_segment.c,v 1.93 2003/01/25 18:12:33 tron Exp $    */
+/*     $NetBSD: lfs_segment.c,v 1.94 2003/01/25 23:00:09 kleink Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.93 2003/01/25 18:12:33 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.94 2003/01/25 23:00:09 kleink Exp $");
 
 #define ivndebug(vp,str) printf("ino %d: %s\n",VTOI(vp)->i_number,(str))
 
@@ -1035,7 +1035,8 @@
        
 #ifdef DEBUG
        if (bp->b_flags & B_GATHERED) {
-               printf("lfs_gatherblock: already gathered! Ino %d, lbn %d\n",
+               printf("lfs_gatherblock: already gathered! Ino %d,"
+                      " lbn %" PRId64 "\n",
                       sp->fip->fi_ino, bp->b_lblkno);
                return (0);
        }
@@ -1217,8 +1218,8 @@
 #ifdef DEBUG
                        if (ooff == 0) {
                                printf("lfs_updatemeta[1]: warning: writing "
-                                       "ino %d lbn %" PRId64 " at 0x%x, :"
-                                       "was 0x0\n", ip->i_number, lbn, off);
+                                       "ino %d lbn %" PRId64 " at 0x%" PRIx64
+                                       ", was 0x0\n", ip->i_number, lbn, off);
                        }
 #endif
                        if (ooff == UNWRITTEN)
@@ -1235,8 +1236,8 @@
 #ifdef DEBUG
                        if (ooff == 0) {
                                printf("lfs_updatemeta[2]: warning: writing "
-                                       "ino %d lbn %" PRId64 " at 0x%x, was "
-                                       "0x0\n", ip->i_number, lbn, off);
+                                       "ino %d lbn %" PRId64 " at 0x%" PRIx64
+                                       ", was 0x0\n", ip->i_number, lbn, off);
                        }
 #endif
                        if (ooff == UNWRITTEN)
@@ -1254,8 +1255,8 @@
 #if DEBUG
                        if (ooff == 0) {
                                printf("lfs_updatemeta[3]: warning: writing "
-                                       "ino %d lbn %" PRId64 " at 0x%x, was "
-                                       "0x0\n", ip->i_number, lbn, off);
+                                       "ino %d lbn %" PRId64 " at 0x%" PRIx64
+                                       ", was 0x0\n", ip->i_number, lbn, off);
                        }
 #endif
                        if (ooff == UNWRITTEN)
@@ -1267,7 +1268,7 @@
 #ifdef DEBUG
                if (daddr >= fs->lfs_lastpseg && daddr <= off) {
                        printf("lfs_updatemeta: ino %d, lbn %" PRId64 ", "
-                               "addr = %x in same pseg\n",
+                               "addr = %" PRIx64 " in same pseg\n",
                                VTOI(sp->vp)->i_number, sbp->b_lblkno, daddr);
                }
 #endif
@@ -1858,7 +1859,8 @@
 #if defined(DEBUG) && defined(DIAGNOSTIC)
                if(dtosn(fs, dbtofsb(fs, (*bpp)->b_blkno + btodb((*bpp)->b_bcount - 1))) !=
                   dtosn(fs, dbtofsb(fs, cbp->b_blkno))) {
-                       printf("block at %x (%d), cbp at %x (%d)\n",
+                       printf("block at %" PRIx64 " (%" PRId64 "), "
+                              "cbp at %" PRIx64 " (%" PRId64 ")\n",
                                (*bpp)->b_blkno, dtosn(fs, dbtofsb(fs, (*bpp)->b_blkno)),
                               cbp->b_blkno, dtosn(fs, dbtofsb(fs, cbp->b_blkno)));
                        panic("lfs_writeseg: Segment overwrite");
diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.87 2003/01/25 18:12:33 tron Exp $     */
+/*     $NetBSD: lfs_vfsops.c,v 1.88 2003/01/25 23:00:09 kleink Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.87 2003/01/25 18:12:33 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.88 2003/01/25 23:00:09 kleink Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -1461,7 +1461,8 @@
                                        if ((*bpp)->b_vp == fs->lfs_ivnode &&
                                            bpp != fs->lfs_sp->bpp) {
                                                /* Inode block */
-                                               printf("block 0x%x: ", (*bpp)->b_blkno);
+                                               printf("block 0x%" PRIx64 ": ",
+                                                   (*bpp)->b_blkno);
                                                dp = (struct dinode *)(*bpp)->b_data;
                                                for (i = 0; i < INOPB(fs); i++)
                                                        if (dp[i].di_u.inumber)
diff -r 7a03ac0ceb69 -r fdfaa77203e7 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Sat Jan 25 19:27:43 2003 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Sat Jan 25 23:00:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vnops.c,v 1.80 2003/01/18 09:38:20 thorpej Exp $   */
+/*     $NetBSD: lfs_vnops.c,v 1.81 2003/01/25 23:00:10 kleink Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.80 2003/01/18 09:38:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.81 2003/01/25 23:00:10 kleink Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -320,7 +320,7 @@
                printf("lfs_fsync: flags are 0x%x, numoutput=%d\n",
                        VTOI(vp)->i_flag, vp->v_numoutput);
                printf("lfs_fsync: writecount=%ld\n", vp->v_writecount);
-               printf("lfs_fsync: first bp: %p, flags=0x%lx, lbn=%d\n",
+               printf("lfs_fsync: first bp: %p, flags=0x%lx, lbn=%" PRId64 "\n",
                        bp, bp->b_flags, bp->b_lblkno);
        }
 #endif



Home | Main Index | Thread Index | Old Index