Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix printf() format strings problems caused by "daddr_t"...
details: https://anonhg.NetBSD.org/src/rev/a7672aa69c4a
branches: trunk
changeset: 542278:a7672aa69c4a
user: tron <tron%NetBSD.org@localhost>
date: Sat Jan 25 12:50:38 2003 +0000
description:
Fix printf() format strings problems caused by "daddr_t" change.
diffstat:
sys/dev/isa/fd.c | 6 +++---
sys/ufs/ext2fs/ext2fs_subr.c | 6 +++---
sys/ufs/ffs/ffs_softdep.c | 8 ++++----
sys/ufs/ffs/ffs_subr.c | 8 ++++----
sys/ufs/lfs/lfs_alloc.c | 6 +++---
sys/ufs/lfs/lfs_segment.c | 32 ++++++++++++++++----------------
sys/ufs/lfs/lfs_vfsops.c | 6 +++---
7 files changed, 36 insertions(+), 36 deletions(-)
diffs (296 lines):
diff -r e94c0355cc9c -r a7672aa69c4a sys/dev/isa/fd.c
--- a/sys/dev/isa/fd.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/dev/isa/fd.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.33 2003/01/08 23:51:11 jmcneill Exp $ */
+/* $NetBSD: fd.c,v 1.34 2003/01/25 13:02:07 tron Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.33 2003/01/08 23:51:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.34 2003/01/25 13:02:07 tron Exp $");
#include "rnd.h"
#include "opt_ddb.h"
@@ -1026,7 +1026,7 @@
block = (fd->sc_cylin * type->heads + head)
* type->sectrac + sec;
if (block != fd->sc_blkno) {
- printf("fdcintr: block %d != blkno %d\n",
+ printf("fdcintr: block %d != blkno %lld\n",
block, fd->sc_blkno);
#ifdef DDB
Debugger();
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/ext2fs/ext2fs_subr.c
--- a/sys/ufs/ext2fs/ext2fs_subr.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/ext2fs/ext2fs_subr.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_subr.c,v 1.7 2003/01/24 21:55:20 fvdl Exp $ */
+/* $NetBSD: ext2fs_subr.c,v 1.8 2003/01/25 12:50:38 tron Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_subr.c,v 1.7 2003/01/24 21:55:20 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_subr.c,v 1.8 2003/01/25 12:50:38 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -110,7 +110,7 @@
ep->b_blkno + btodb(ep->b_bcount) <= start)
continue;
vprint("Disk overlap", vp);
- printf("\tstart %d, end %d overlap start %d, end %ld\n",
+ printf("\tstart %lld, end %lld overlap start %lld, end %lld\n",
start, last, ep->b_blkno,
ep->b_blkno + btodb(ep->b_bcount) - 1);
panic("Disk buffer overlap");
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/ffs/ffs_softdep.c
--- a/sys/ufs/ffs/ffs_softdep.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/ffs/ffs_softdep.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_softdep.c,v 1.39 2003/01/24 21:55:22 fvdl Exp $ */
+/* $NetBSD: ffs_softdep.c,v 1.40 2003/01/25 12:52:47 tron Exp $ */
/*
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.39 2003/01/24 21:55:22 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.40 2003/01/25 12:52:47 tron Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -3419,14 +3419,14 @@
if (adp->ad_lbn < NDADDR &&
ufs_rw32(dp->di_db[adp->ad_lbn], needswap) !=
adp->ad_newblkno)
- panic("%s: direct pointer #%d mismatch %d != %d",
+ panic("%s: direct pointer #%d mismatch %d != %lld",
"softdep_write_inodeblock", (int)adp->ad_lbn,
ufs_rw32(dp->di_db[adp->ad_lbn], needswap),
adp->ad_newblkno);
if (adp->ad_lbn >= NDADDR &&
ufs_rw32(dp->di_ib[adp->ad_lbn - NDADDR], needswap) !=
adp->ad_newblkno)
- panic("%s: indirect pointer #%d mismatch %d != %d",
+ panic("%s: indirect pointer #%d mismatch %d != %lld",
"softdep_write_inodeblock",
(int)(adp->ad_lbn - NDADDR),
(int)ufs_rw32(dp->di_ib[adp->ad_lbn - NDADDR],
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/ffs/ffs_subr.c
--- a/sys/ufs/ffs/ffs_subr.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/ffs/ffs_subr.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_subr.c,v 1.25 2003/01/24 21:55:23 fvdl Exp $ */
+/* $NetBSD: ffs_subr.c,v 1.26 2003/01/25 12:53:45 tron Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__KERNEL_RCSID)
-__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.25 2003/01/24 21:55:23 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.26 2003/01/25 12:53:45 tron Exp $");
#endif
#if HAVE_CONFIG_H
@@ -172,9 +172,9 @@
ep->b_blkno + btodb(ep->b_bcount) <= start)
continue;
vprint("Disk overlap", vp);
- printf("\tstart %d, end %d overlap start %d, end %ld\n",
+ printf("\tstart %lld, end %lld overlap start %lld, end %lld\n",
start, last, ep->b_blkno,
- (long) ep->b_blkno + btodb(ep->b_bcount) - 1);
+ ep->b_blkno + btodb(ep->b_bcount) - 1);
panic("Disk buffer overlap");
}
}
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.59 2003/01/24 21:55:25 fvdl Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.60 2003/01/25 12:58:21 tron Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.59 2003/01/24 21:55:25 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.60 2003/01/25 12:58:21 tron Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -589,7 +589,7 @@
#ifdef DIAGNOSTIC
if (sup->su_nbytes < DINODE_SIZE) {
printf("lfs_vfree: negative byte count"
- " (segment %d short by %d)\n",
+ " (segment %lld short by %d)\n",
dtosn(fs, old_iaddr),
(int)DINODE_SIZE - sup->su_nbytes);
panic("lfs_vfree: negative byte count");
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.91 2003/01/24 21:55:27 fvdl Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.92 2003/01/25 12:58:23 tron 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.91 2003/01/24 21:55:27 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.92 2003/01/25 12:58:23 tron Exp $");
#define ivndebug(vp,str) printf("ino %d: %s\n",VTOI(vp)->i_number,(str))
@@ -967,7 +967,7 @@
#ifdef DIAGNOSTIC
if (sup->su_nbytes + DINODE_SIZE * ndupino < DINODE_SIZE) {
printf("lfs_writeinode: negative bytes "
- "(segment %d short by %d, "
+ "(segment %lld short by %d, "
"oldsn=%u, cursn=%u, daddr=%d, su_nbytes=%u, "
"ndupino=%d)\n",
dtosn(fs, daddr),
@@ -1096,14 +1096,14 @@
} else {
#ifdef DIAGNOSTIC
if ((bp->b_flags & (B_CALL|B_INVAL)) == B_INVAL) {
- printf("lfs_gather: lbn %d is B_INVAL\n",
+ printf("lfs_gather: lbn %lld is B_INVAL\n",
bp->b_lblkno);
VOP_PRINT(bp->b_vp);
}
if (!(bp->b_flags & B_DELWRI))
panic("lfs_gather: bp not B_DELWRI");
if (!(bp->b_flags & B_LOCKED)) {
- printf("lfs_gather: lbn %d blk %d"
+ printf("lfs_gather: lbn %lld blk %lld"
" not B_LOCKED\n", bp->b_lblkno,
dbtofsb(fs, bp->b_blkno));
VOP_PRINT(bp->b_vp);
@@ -1215,7 +1215,7 @@
#ifdef DEBUG
if (ooff == 0) {
printf("lfs_updatemeta[1]: warning: writing "
- "ino %d lbn %d at 0x%x, was 0x0\n",
+ "ino %d lbn %lld at 0x%x, was 0x0\n",
ip->i_number, lbn, off);
}
#endif
@@ -1233,7 +1233,7 @@
#ifdef DEBUG
if (ooff == 0) {
printf("lfs_updatemeta[2]: warning: writing "
- "ino %d lbn %d at 0x%x, was 0x0\n",
+ "ino %d lbn %lld at 0x%x, was 0x0\n",
ip->i_number, lbn, off);
}
#endif
@@ -1252,7 +1252,7 @@
#if DEBUG
if (ooff == 0) {
printf("lfs_updatemeta[3]: warning: writing "
- "ino %d lbn %d at 0x%x, was 0x0\n",
+ "ino %d lbn %lld at 0x%x, was 0x0\n",
ip->i_number, lbn, off);
}
#endif
@@ -1264,7 +1264,7 @@
}
#ifdef DEBUG
if (daddr >= fs->lfs_lastpseg && daddr <= off) {
- printf("lfs_updatemeta: ino %d, lbn %d, addr = %x "
+ printf("lfs_updatemeta: ino %d, lbn %lld, addr = %x "
"in same pseg\n", VTOI(sp->vp)->i_number,
sbp->b_lblkno, daddr);
}
@@ -1287,19 +1287,19 @@
#ifdef DIAGNOSTIC
if (sup->su_nbytes + DINODE_SIZE * ndupino < osize) {
printf("lfs_updatemeta: negative bytes "
- "(segment %d short by %d)\n",
+ "(segment %lld short by %d)\n",
dtosn(fs, daddr),
osize - sup->su_nbytes);
- printf("lfs_updatemeta: ino %d, lbn %d, "
- "addr = 0x%x\n", VTOI(sp->vp)->i_number,
- lbn, daddr);
+ printf("lfs_updatemeta: ino %d, lbn %lld, "
+ "addr = 0x%llx\n",
+ VTOI(sp->vp)->i_number, lbn, daddr);
printf("lfs_updatemeta: ndupino=%d\n", ndupino);
panic("lfs_updatemeta: negative bytes");
sup->su_nbytes = osize;
}
#endif
#ifdef DEBUG_SU_NBYTES
- printf("seg %d -= %ld for ino %d lbn %d db 0x%x\n",
+ printf("seg %d -= %ld for ino %d lbn %lld db 0x%x\n",
dtosn(fs, daddr), osize, VTOI(sp->vp)->i_number,
lbn, daddr);
#endif
@@ -1613,7 +1613,7 @@
if ((*bpp)->b_vp != devvp) {
sup->su_nbytes += (*bpp)->b_bcount;
#ifdef DEBUG_SU_NBYTES
- printf("seg %d += %ld for ino %d lbn %d db 0x%x\n",
+ printf("seg %d += %ld for ino %d lbn %lld db 0x%x\n",
sp->seg_number, (*bpp)->b_bcount,
VTOI((*bpp)->b_vp)->i_number,
(*bpp)->b_lblkno, (*bpp)->b_blkno);
@@ -1661,7 +1661,7 @@
if (bp->b_flags & B_BUSY) {
#ifdef DEBUG
printf("lfs_writeseg: avoiding potential data "
- "summary corruption for ino %d, lbn %d\n",
+ "summary corruption for ino %d, lbn %lld\n",
VTOI(bp->b_vp)->i_number, bp->b_lblkno);
#endif
bp->b_flags |= B_WANTED;
diff -r e94c0355cc9c -r a7672aa69c4a sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Sat Jan 25 04:45:24 2003 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Sat Jan 25 12:50:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.85 2003/01/24 21:55:29 fvdl Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.86 2003/01/25 12:58:23 tron 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.85 2003/01/24 21:55:29 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.86 2003/01/25 12:58:23 tron Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -446,7 +446,7 @@
#ifdef DIAGNOSTIC
if (sup->su_nbytes < size) {
panic("update_meta: negative bytes "
- "(segment %d short by %ld)\n",
+ "(segment %lld short by %ld)\n",
dtosn(fs, dbtofsb(fs, odaddr)), (long)size - sup->su_nbytes);
sup->su_nbytes = size;
}
Home |
Main Index |
Thread Index |
Old Index