summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-30 17:40:45 +0000
committerbde <bde@FreeBSD.org>1998-07-30 17:40:45 +0000
commit0c01873b017eb8d89f9004ca2b49025ce75281df (patch)
tree075e2904988cbaded4b2d5050ac5bb1282d6701d /sys
parentd00cccd49fea9ae2af8d4289c3a2e668c7dff3c5 (diff)
downloadFreeBSD-src-0c01873b017eb8d89f9004ca2b49025ce75281df.zip
FreeBSD-src-0c01873b017eb8d89f9004ca2b49025ce75281df.tar.gz
Fixed printf format errors.
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nullfs/null_subr.c10
-rw-r--r--sys/fs/nullfs/null_vfsops.c20
-rw-r--r--sys/fs/umapfs/umap_vnops.c51
-rw-r--r--sys/miscfs/devfs/devfs_vnops.c4
-rw-r--r--sys/miscfs/kernfs/kernfs_vnops.c8
-rw-r--r--sys/miscfs/nullfs/null_subr.c10
-rw-r--r--sys/miscfs/nullfs/null_vfsops.c20
-rw-r--r--sys/miscfs/umapfs/umap_vnops.c51
8 files changed, 94 insertions, 80 deletions
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index e4d49b6..603f418 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.17 1998/02/09 06:09:45 eivind Exp $
+ * $Id: null_subr.c,v 1.18 1998/07/15 02:32:18 bde Exp $
*/
#include "opt_debug_nullfs.h"
@@ -274,9 +274,9 @@ null_checkvp(vp, fil, lno)
if (a->null_lowervp == NULLVP) {
/* Should never happen */
int i; u_long *p;
- printf("vp = %x, ZERO ptr\n", vp);
+ printf("vp = %p, ZERO ptr\n", (void *)vp);
for (p = (u_long *) a, i = 0; i < 8; i++)
- printf(" %x", p[i]);
+ printf(" %lx", p[i]);
printf("\n");
/* wait for debugger */
while (null_checkvp_barrier) /*WAIT*/ ;
@@ -284,9 +284,9 @@ null_checkvp(vp, fil, lno)
}
if (a->null_lowervp->v_usecount < 1) {
int i; u_long *p;
- printf("vp = %x, unref'ed lowervp\n", vp);
+ printf("vp = %p, unref'ed lowervp\n", (void *)vp);
for (p = (u_long *) a, i = 0; i < 8; i++)
- printf(" %x", p[i]);
+ printf(" %lx", p[i]);
printf("\n");
/* wait for debugger */
while (null_checkvp_barrier) /*WAIT*/ ;
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 67bad8a..2730d9f 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
- * $Id: null_vfsops.c,v 1.25 1998/03/01 22:46:18 msmith Exp $
+ * $Id: null_vfsops.c,v 1.26 1998/05/06 05:29:34 msmith Exp $
*/
/*
@@ -97,7 +97,7 @@ nullfs_mount(mp, path, data, ndp, p)
int isvnunlocked = 0;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_mount(mp = %x)\n", mp);
+ printf("nullfs_mount(mp = %p)\n", (void *)mp);
#endif
/*
@@ -237,7 +237,7 @@ nullfs_unmount(mp, mntflags, p)
int flags = 0;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_unmount(mp = %x)\n", mp);
+ printf("nullfs_unmount(mp = %p)\n", (void *)mp);
#endif
if (mntflags & MNT_FORCE)
@@ -287,10 +287,9 @@ nullfs_root(mp, vpp)
struct vnode *vp;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_root(mp = %x, vp = %x->%x)\n", mp,
- MOUNTTONULLMOUNT(mp)->nullm_rootvp,
- NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)
- );
+ printf("nullfs_root(mp = %p, vp = %p->%p)\n", (void *)mp,
+ (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
+ (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
#endif
/*
@@ -335,10 +334,9 @@ nullfs_statfs(mp, sbp, p)
struct statfs mstat;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_statfs(mp = %x, vp = %x->%x)\n", mp,
- MOUNTTONULLMOUNT(mp)->nullm_rootvp,
- NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)
- );
+ printf("nullfs_statfs(mp = %p, vp = %p->%p)\n", (void *)mp,
+ (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
+ (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
#endif
bzero(&mstat, sizeof(mstat));
diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c
index b90b351..a41a575 100644
--- a/sys/fs/umapfs/umap_vnops.c
+++ b/sys/fs/umapfs/umap_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95
- * $Id: umap_vnops.c,v 1.23 1998/02/07 01:36:24 kato Exp $
+ * $Id: umap_vnops.c,v 1.24 1998/07/04 20:45:34 julian Exp $
*/
/*
@@ -154,16 +154,16 @@ umap_bypass(ap)
credp = *credpp;
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user was %ld, group %ld\n",
- credp->cr_uid, credp->cr_gid);
+ printf("umap_bypass: user was %lu, group %lu\n",
+ (u_long)credp->cr_uid, (u_long)credp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp1->v_mount, credp);
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user now %ld, group %ld\n",
- credp->cr_uid, credp->cr_gid);
+ printf("umap_bypass: user now %lu, group %lu\n",
+ (u_long)credp->cr_uid, (u_long)credp->cr_gid);
}
/* BSD often keeps a credential in the componentname structure
@@ -182,16 +182,20 @@ umap_bypass(ap)
compcredp = (*compnamepp)->cn_cred;
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user was %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_bypass: component credit user was %lu, group %lu\n",
+ (u_long)compcredp->cr_uid,
+ (u_long)compcredp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp1->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user now %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_bypass: component credit user now %lu, group %lu\n",
+ (u_long)compcredp->cr_uid,
+ (u_long)compcredp->cr_gid);
}
/*
@@ -238,29 +242,32 @@ umap_bypass(ap)
*/
if (descp->vdesc_cred_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && credp && credp->cr_uid != 0)
- printf("umap_bypass: returning-user was %ld\n",
- credp->cr_uid);
+ printf("umap_bypass: returning-user was %lu\n",
+ (u_long)credp->cr_uid);
if (savecredp != NOCRED) {
crfree(credp);
(*credpp) = savecredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-user now %ld\n\n",
- (*credpp)->cr_uid);
+ printf(
+ "umap_bypass: returning-user now %lu\n\n",
+ (u_long)(*credpp)->cr_uid);
}
}
if (descp->vdesc_componentname_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && compcredp && compcredp->cr_uid != 0)
- printf("umap_bypass: returning-component-user was %ld\n",
- compcredp->cr_uid);
+ printf(
+ "umap_bypass: returning-component-user was %lu\n",
+ (u_long)compcredp->cr_uid);
if (savecompcredp != NOCRED) {
crfree(compcredp);
(*compnamepp)->cn_cred = savecompcredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-component-user now %ld\n",
- compcredp->cr_uid);
+ printf(
+ "umap_bypass: returning-component-user now %lu\n",
+ (u_long)compcredp->cr_uid);
}
}
@@ -510,16 +517,18 @@ umap_rename(ap)
compcredp = compnamep->cn_cred = crdup(savecompcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user was %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_rename: rename component credit user was %lu, group %lu\n",
+ (u_long)compcredp->cr_uid, (u_long)compcredp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user now %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_rename: rename component credit user now %lu, group %lu\n",
+ (u_long)compcredp->cr_uid, (u_long)compcredp->cr_gid);
error = umap_bypass((struct vop_generic_args *)ap);
diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c
index a916f9c..bc82ac0 100644
--- a/sys/miscfs/devfs/devfs_vnops.c
+++ b/sys/miscfs/devfs/devfs_vnops.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: devfs_vnops.c,v 1.56 1998/06/10 06:34:54 peter Exp $
+ * $Id: devfs_vnops.c,v 1.57 1998/07/05 23:10:21 julian Exp $
*/
@@ -2046,7 +2046,7 @@ devfs_getpages(struct vop_getpages_args *ap)
m = ap->a_m[ap->a_reqpage];
#ifndef MAX_PERF
printf("devfs_getpages: I/O read failure: (error code=%d)\n", error);
- printf(" size: %d, resid: %d, a_count: %d, valid: 0x%x\n",
+ printf(" size: %d, resid: %ld, a_count: %d, valid: 0x%x\n",
size, bp->b_resid, ap->a_count, m->valid);
printf(" nread: %d, reqpage: %d, pindex: %d, pcount: %d\n",
nread, ap->a_reqpage, m->pindex, pcount);
diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c
index 0b396de..4280ef1 100644
--- a/sys/miscfs/kernfs/kernfs_vnops.c
+++ b/sys/miscfs/kernfs/kernfs_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
- * $Id: kernfs_vnops.c,v 1.33 1998/06/14 12:34:42 bde Exp $
+ * $Id: kernfs_vnops.c,v 1.34 1998/06/25 16:54:18 dt Exp $
*/
/*
@@ -181,9 +181,9 @@ kernfs_xread(kt, buf, len, lenp)
}
case KTT_AVENRUN:
- sprintf(buf, "%ld %ld %ld %ld\n",
- averunnable.ldavg[0], averunnable.ldavg[1],
- averunnable.ldavg[2], averunnable.fscale);
+ sprintf(buf, "%lu %lu %lu %ld\n",
+ (u_long)averunnable.ldavg[0], (u_long)averunnable.ldavg[1],
+ (u_long)averunnable.ldavg[2], averunnable.fscale);
break;
default:
diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c
index e4d49b6..603f418 100644
--- a/sys/miscfs/nullfs/null_subr.c
+++ b/sys/miscfs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.17 1998/02/09 06:09:45 eivind Exp $
+ * $Id: null_subr.c,v 1.18 1998/07/15 02:32:18 bde Exp $
*/
#include "opt_debug_nullfs.h"
@@ -274,9 +274,9 @@ null_checkvp(vp, fil, lno)
if (a->null_lowervp == NULLVP) {
/* Should never happen */
int i; u_long *p;
- printf("vp = %x, ZERO ptr\n", vp);
+ printf("vp = %p, ZERO ptr\n", (void *)vp);
for (p = (u_long *) a, i = 0; i < 8; i++)
- printf(" %x", p[i]);
+ printf(" %lx", p[i]);
printf("\n");
/* wait for debugger */
while (null_checkvp_barrier) /*WAIT*/ ;
@@ -284,9 +284,9 @@ null_checkvp(vp, fil, lno)
}
if (a->null_lowervp->v_usecount < 1) {
int i; u_long *p;
- printf("vp = %x, unref'ed lowervp\n", vp);
+ printf("vp = %p, unref'ed lowervp\n", (void *)vp);
for (p = (u_long *) a, i = 0; i < 8; i++)
- printf(" %x", p[i]);
+ printf(" %lx", p[i]);
printf("\n");
/* wait for debugger */
while (null_checkvp_barrier) /*WAIT*/ ;
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c
index 67bad8a..2730d9f 100644
--- a/sys/miscfs/nullfs/null_vfsops.c
+++ b/sys/miscfs/nullfs/null_vfsops.c
@@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
- * $Id: null_vfsops.c,v 1.25 1998/03/01 22:46:18 msmith Exp $
+ * $Id: null_vfsops.c,v 1.26 1998/05/06 05:29:34 msmith Exp $
*/
/*
@@ -97,7 +97,7 @@ nullfs_mount(mp, path, data, ndp, p)
int isvnunlocked = 0;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_mount(mp = %x)\n", mp);
+ printf("nullfs_mount(mp = %p)\n", (void *)mp);
#endif
/*
@@ -237,7 +237,7 @@ nullfs_unmount(mp, mntflags, p)
int flags = 0;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_unmount(mp = %x)\n", mp);
+ printf("nullfs_unmount(mp = %p)\n", (void *)mp);
#endif
if (mntflags & MNT_FORCE)
@@ -287,10 +287,9 @@ nullfs_root(mp, vpp)
struct vnode *vp;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_root(mp = %x, vp = %x->%x)\n", mp,
- MOUNTTONULLMOUNT(mp)->nullm_rootvp,
- NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)
- );
+ printf("nullfs_root(mp = %p, vp = %p->%p)\n", (void *)mp,
+ (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
+ (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
#endif
/*
@@ -335,10 +334,9 @@ nullfs_statfs(mp, sbp, p)
struct statfs mstat;
#ifdef NULLFS_DIAGNOSTIC
- printf("nullfs_statfs(mp = %x, vp = %x->%x)\n", mp,
- MOUNTTONULLMOUNT(mp)->nullm_rootvp,
- NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)
- );
+ printf("nullfs_statfs(mp = %p, vp = %p->%p)\n", (void *)mp,
+ (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
+ (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
#endif
bzero(&mstat, sizeof(mstat));
diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c
index b90b351..a41a575 100644
--- a/sys/miscfs/umapfs/umap_vnops.c
+++ b/sys/miscfs/umapfs/umap_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95
- * $Id: umap_vnops.c,v 1.23 1998/02/07 01:36:24 kato Exp $
+ * $Id: umap_vnops.c,v 1.24 1998/07/04 20:45:34 julian Exp $
*/
/*
@@ -154,16 +154,16 @@ umap_bypass(ap)
credp = *credpp;
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user was %ld, group %ld\n",
- credp->cr_uid, credp->cr_gid);
+ printf("umap_bypass: user was %lu, group %lu\n",
+ (u_long)credp->cr_uid, (u_long)credp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp1->v_mount, credp);
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user now %ld, group %ld\n",
- credp->cr_uid, credp->cr_gid);
+ printf("umap_bypass: user now %lu, group %lu\n",
+ (u_long)credp->cr_uid, (u_long)credp->cr_gid);
}
/* BSD often keeps a credential in the componentname structure
@@ -182,16 +182,20 @@ umap_bypass(ap)
compcredp = (*compnamepp)->cn_cred;
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user was %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_bypass: component credit user was %lu, group %lu\n",
+ (u_long)compcredp->cr_uid,
+ (u_long)compcredp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp1->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user now %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_bypass: component credit user now %lu, group %lu\n",
+ (u_long)compcredp->cr_uid,
+ (u_long)compcredp->cr_gid);
}
/*
@@ -238,29 +242,32 @@ umap_bypass(ap)
*/
if (descp->vdesc_cred_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && credp && credp->cr_uid != 0)
- printf("umap_bypass: returning-user was %ld\n",
- credp->cr_uid);
+ printf("umap_bypass: returning-user was %lu\n",
+ (u_long)credp->cr_uid);
if (savecredp != NOCRED) {
crfree(credp);
(*credpp) = savecredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-user now %ld\n\n",
- (*credpp)->cr_uid);
+ printf(
+ "umap_bypass: returning-user now %lu\n\n",
+ (u_long)(*credpp)->cr_uid);
}
}
if (descp->vdesc_componentname_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && compcredp && compcredp->cr_uid != 0)
- printf("umap_bypass: returning-component-user was %ld\n",
- compcredp->cr_uid);
+ printf(
+ "umap_bypass: returning-component-user was %lu\n",
+ (u_long)compcredp->cr_uid);
if (savecompcredp != NOCRED) {
crfree(compcredp);
(*compnamepp)->cn_cred = savecompcredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-component-user now %ld\n",
- compcredp->cr_uid);
+ printf(
+ "umap_bypass: returning-component-user now %lu\n",
+ (u_long)compcredp->cr_uid);
}
}
@@ -510,16 +517,18 @@ umap_rename(ap)
compcredp = compnamep->cn_cred = crdup(savecompcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user was %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_rename: rename component credit user was %lu, group %lu\n",
+ (u_long)compcredp->cr_uid, (u_long)compcredp->cr_gid);
/* Map all ids in the credential structure. */
umap_mapids(vp->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user now %ld, group %ld\n",
- compcredp->cr_uid, compcredp->cr_gid);
+ printf(
+ "umap_rename: rename component credit user now %lu, group %lu\n",
+ (u_long)compcredp->cr_uid, (u_long)compcredp->cr_gid);
error = umap_bypass((struct vop_generic_args *)ap);
OpenPOWER on IntegriCloud