Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs actually cast to unsigned long long and use %llu...



details:   https://anonhg.NetBSD.org/src/rev/5386f69496e5
branches:  trunk
changeset: 352104:5386f69496e5
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Mar 16 01:09:24 2017 +0000

description:
actually cast to unsigned long long and use %llu. certainly not use hex (oops)
suggested by dh

diffstat:

 sys/ufs/lfs/lfs_inode.c |  24 ++++++++++++------------
 sys/ufs/lfs/lfs_vnops.c |  21 +++++++++++++--------
 2 files changed, 25 insertions(+), 20 deletions(-)

diffs (121 lines):

diff -r 4161c975dc76 -r 5386f69496e5 sys/ufs/lfs/lfs_inode.c
--- a/sys/ufs/lfs/lfs_inode.c   Thu Mar 16 00:21:30 2017 +0000
+++ b/sys/ufs/lfs/lfs_inode.c   Thu Mar 16 01:09:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_inode.c,v 1.149 2017/03/15 21:28:41 maya Exp $     */
+/*     $NetBSD: lfs_inode.c,v 1.150 2017/03/16 01:09:24 maya Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.149 2017/03/15 21:28:41 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.150 2017/03/16 01:09:24 maya Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -149,8 +149,8 @@
        mutex_enter(vp->v_interlock);
        while ((updflags & (UPDATE_WAIT|UPDATE_DIROP)) == UPDATE_WAIT &&
            WRITEINPROG(vp)) {
-               DLOG((DLOG_SEG, "lfs_update: sleeping on ino %"PRIx64
-                     " (in progress)\n", ip->i_number));
+               DLOG((DLOG_SEG, "lfs_update: sleeping on ino %llu"
+                     " (in progress)\n", (unsigned long long) ip->i_number));
                cv_wait(&vp->v_cv, vp->v_interlock);
        }
        mutex_exit(vp->v_interlock);
@@ -168,8 +168,8 @@
                mutex_enter(&lfs_lock);
                ++fs->lfs_diropwait;
                while (vp->v_uflag & VU_DIROP) {
-                       DLOG((DLOG_DIROP, "lfs_update: sleeping on inode %"PRIx64
-                             " (dirops)\n", ip->i_number));
+                       DLOG((DLOG_DIROP, "lfs_update: sleeping on inode %llu "
+                             "(dirops)\n", (unsigned long long) ip->i_number));
                        DLOG((DLOG_DIROP, "lfs_update: vflags 0x%x, iflags"
                              " 0x%x\n",
                              vp->v_iflag | vp->v_vflag | vp->v_uflag,
@@ -590,13 +590,13 @@
 
        KASSERTMSG((oip->i_size != 0 ||
                lfs_dino_getblocks(fs, oip->i_din) == 0),
-           "ino %"PRIx64" truncate to 0 but %jd blks/%jd effblks",
-           oip->i_number, lfs_dino_getblocks(fs, oip->i_din),
-           oip->i_lfs_effnblks);
+           "ino %llu truncate to 0 but %jd blks/%jd effblks",
+           (unsigned long long) oip->i_number,
+           lfs_dino_getblocks(fs, oip->i_din), oip->i_lfs_effnblks);
        KASSERTMSG((oip->i_size != 0 || oip->i_lfs_effnblks == 0),
-           "ino %"PRIx64" truncate to 0 but %jd blks/%jd effblks",
-           oip->i_number, lfs_dino_getblocks(fs, oip->i_din),
-           oip->i_lfs_effnblks);
+           "ino %llu truncate to 0 but %jd blks/%jd effblks",
+           (unsigned long long) oip->i_number,
+           lfs_dino_getblocks(fs, oip->i_din), oip->i_lfs_effnblks);
 
        /*
         * If we truncated to zero, take us off the paging queue.
diff -r 4161c975dc76 -r 5386f69496e5 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Thu Mar 16 00:21:30 2017 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Thu Mar 16 01:09:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vnops.c,v 1.305 2017/03/15 21:28:41 maya Exp $     */
+/*     $NetBSD: lfs_vnops.c,v 1.306 2017/03/16 01:09:24 maya Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.305 2017/03/15 21:28:41 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.306 2017/03/16 01:09:24 maya Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -539,7 +539,8 @@
         */
        if (ap->a_vp->v_uflag & VU_DIROP) {
                struct inode *ip = VTOI(ap->a_vp);
-               printf("lfs_inactive: inactivating VU_DIROP? ino = %"PRIx64"\n", ip->i_number);
+               printf("lfs_inactive: inactivating VU_DIROP? ino = %llu\n",
+                   (unsigned long long) ip->i_number);
        }
 #endif /* DIAGNOSTIC */
 
@@ -837,7 +838,8 @@
         * Can this ever happen (barring hardware failure)?
         */
        if ((error = VOP_FSYNC(*vpp, NOCRED, FSYNC_WAIT, 0, 0)) != 0) {
-               panic("lfs_mknod: couldn't fsync (ino %"PRIx64")", ino);
+               panic("lfs_mknod: couldn't fsync (ino %llu)",
+                   (unsigned long long) ino);
                /* return (error); */
        }
 
@@ -1519,15 +1521,18 @@
                        if (sn == lfs_dtosn(fs, fs->lfs_cleanint[i]) &&
                            tbn >= fs->lfs_cleanint[i]) {
                                DLOG((DLOG_CLEAN,
-                                     "lfs_strategy: ino %"PRIx64" lbn %" PRId64
+                                     "lfs_strategy: ino %llu lbn %" PRId64
                                      " ind %d sn %d fsb %" PRIx64
                                      " given sn %d fsb %" PRIx64 "\n",
-                                     ip->i_number, bp->b_lblkno, i,
+                                     (unsigned long long) ip->i_number,
+                                     bp->b_lblkno, i,
                                      lfs_dtosn(fs, fs->lfs_cleanint[i]),
                                      fs->lfs_cleanint[i], sn, tbn));
                                DLOG((DLOG_CLEAN,
-                                     "lfs_strategy: sleeping on ino %"PRIx64" lbn %"
-                                     PRId64 "\n", ip->i_number, bp->b_lblkno));
+                                     "lfs_strategy: sleeping on ino %llu lbn %"
+                                     PRId64 "\n",
+                                     (unsigned long long) ip->i_number,
+                                     bp->b_lblkno));
                                mutex_enter(&lfs_lock);
                                if (LFS_SEGLOCK_HELD(fs) && fs->lfs_iocount) {
                                        /*



Home | Main Index | Thread Index | Old Index