summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-17 01:05:25 +0000
committerbde <bde@FreeBSD.org>1998-08-17 01:05:25 +0000
commit08a3400100457ad9f3c28fb818f0fb5e4b5de333 (patch)
treee5b4a79c7ec35eb71259210de3a6e8aec047fbae
parente36ab6ee5ec93ccb0453b9ff3f72ee9142db62a2 (diff)
downloadFreeBSD-src-08a3400100457ad9f3c28fb818f0fb5e4b5de333.zip
FreeBSD-src-08a3400100457ad9f3c28fb818f0fb5e4b5de333.tar.gz
Fixed printf format errors.
-rw-r--r--sys/dev/ppbus/if_plip.c4
-rw-r--r--sys/i386/isa/lpt.c4
-rw-r--r--sys/netatalk/at_rmx.c17
-rw-r--r--sys/netinet/ip_input.c5
-rw-r--r--sys/netinet/ip_mroute.c70
-rw-r--r--sys/netinet/tcp_debug.c13
-rw-r--r--sys/netipx/spx_debug.c4
-rw-r--r--sys/netkey/key_debug.c30
8 files changed, 77 insertions, 70 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 3308f5a..f7c1704 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*
* From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
- * $Id: if_plip.c,v 1.1 1998/08/03 19:14:31 msmith Exp $
+ * $Id: if_plip.c,v 1.2 1998/08/12 18:02:48 bde Exp $
*/
/*
@@ -394,7 +394,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- lprintf("LP:ioctl(0x%x)\n",cmd);
+ lprintf("LP:ioctl(0x%lx)\n", cmd);
return EINVAL;
}
return 0;
diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c
index b25e2e7..d9e1592 100644
--- a/sys/i386/isa/lpt.c
+++ b/sys/i386/isa/lpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: lpt.c,v 1.68 1998/04/15 17:45:34 bde Exp $
+ * $Id: lpt.c,v 1.69 1998/06/07 17:10:44 dfr Exp $
*/
/*
@@ -987,7 +987,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- lprintf("LP:ioctl(0x%x)\n",cmd);
+ lprintf("LP:ioctl(0x%lx)\n", cmd);
return EINVAL;
}
return 0;
diff --git a/sys/netatalk/at_rmx.c b/sys/netatalk/at_rmx.c
index 102276f..556c1c2 100644
--- a/sys/netatalk/at_rmx.c
+++ b/sys/netatalk/at_rmx.c
@@ -72,11 +72,12 @@ at_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
printf("at_addroute: v=%s\n", prsockaddr(v_arg));
printf("at_addroute: n=%s\n", prsockaddr(n_arg));
- printf("at_addroute: head=%x treenodes=%x\n", head, treenodes);
+ printf("at_addroute: head=%p treenodes=%p\n",
+ (void *)head, (void *)treenodes);
rn = rn_addroute(v_arg, n_arg, head, treenodes);
- printf("at_addroute: returns rn=%x\n", rn);
+ printf("at_addroute: returns rn=%p\n", (void *)rn);
return rn;
}
@@ -87,11 +88,11 @@ at_matroute(void *v_arg, struct radix_node_head *head)
struct radix_node *rn;
printf("at_matroute: v=%s\n", prsockaddr(v_arg));
- printf("at_matroute: head=%x\n", head);
+ printf("at_matroute: head=%p\n", (void *)head);
rn = rn_match(v_arg, head);
- printf("at_matroute: returns rn=%x\n", rn);
+ printf("at_matroute: returnr rn=%p\n", (void *)rn);
return rn;
}
@@ -103,11 +104,11 @@ at_lookup(void *v_arg, void *m_arg, struct radix_node_head *head)
printf("at_lookup: v=%s\n", prsockaddr(v_arg));
printf("at_lookup: n=%s\n", prsockaddr(m_arg));
- printf("at_lookup: head=%x\n", head);
+ printf("at_lookup: head=%p\n", (void *)head);
rn = rn_lookup(v_arg, m_arg, head);
- printf("at_lookup: returns rn=%x\n", rn);
+ printf("at_lookup: returns rn=%p\n", (void *)rn);
return rn;
}
@@ -119,11 +120,11 @@ at_delroute(void *v_arg, void *netmask_arg, struct radix_node_head *head)
printf("at_delroute: v=%s\n", prsockaddr(v_arg));
printf("at_delroute: n=%s\n", prsockaddr(netmask_arg));
- printf("at_delroute: head=%x\n", head);
+ printf("at_delroute: head=%p\n", (void *)head);
rn = rn_delete(v_arg, netmask_arg, head);
- printf("at_delroute: returns rn=%x\n", rn);
+ printf("at_delroute: returns rn=%p\n", (void *)rn);
return rn;
}
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 98dc551..16d1abd 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.96 1998/07/08 08:49:51 dg Exp $
+ * $Id: ip_input.c,v 1.97 1998/07/13 12:12:24 bde Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@@ -1357,7 +1357,8 @@ ip_forward(m, srcrt)
#ifdef DIAGNOSTIC
if (ipprintfs)
printf("forward: src %lx dst %lx ttl %x\n",
- ip->ip_src.s_addr, ip->ip_dst.s_addr, ip->ip_ttl);
+ (u_long)ip->ip_src.s_addr, (u_long)ip->ip_dst.s_addr,
+ ip->ip_ttl);
#endif
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 8fa636f..1e64bb3 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -9,7 +9,7 @@
* Modified by Bill Fenner, PARC, April 1995
*
* MROUTING Revision: 3.5
- * $Id: ip_mroute.c,v 1.46 1998/04/17 22:36:58 des Exp $
+ * $Id: ip_mroute.c,v 1.47 1998/06/30 10:56:31 phk Exp $
*/
#include "opt_mrouting.h"
@@ -762,11 +762,11 @@ add_vif(vifcp)
if (numvifs <= vifcp->vifc_vifi) numvifs = vifcp->vifc_vifi + 1;
if (mrtdebug)
- log(LOG_DEBUG, "add_vif #%d, lcladdr %x, %s %x, thresh %x, rate %d\n",
+ log(LOG_DEBUG, "add_vif #%d, lcladdr %lx, %s %lx, thresh %x, rate %d\n",
vifcp->vifc_vifi,
- ntohl(vifcp->vifc_lcl_addr.s_addr),
+ (u_long)ntohl(vifcp->vifc_lcl_addr.s_addr),
(vifcp->vifc_flags & VIFF_TUNNEL) ? "rmtaddr" : "mask",
- ntohl(vifcp->vifc_rmt_addr.s_addr),
+ (u_long)ntohl(vifcp->vifc_rmt_addr.s_addr),
vifcp->vifc_threshold,
vifcp->vifc_rate_limit);
@@ -850,9 +850,9 @@ add_mfc(mfccp)
/* If an entry already exists, just update the fields */
if (rt) {
if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc update o %x g %x p %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
+ log(LOG_DEBUG,"add_mfc update o %lx g %lx p %x\n",
+ (u_long)ntohl(mfccp->mfcc_origin.s_addr),
+ (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr),
mfccp->mfcc_parent);
s = splnet();
@@ -876,17 +876,17 @@ add_mfc(mfccp)
(mb_rt->m_act != NULL)) {
if (nstl++)
- log(LOG_ERR, "add_mfc %s o %x g %x p %x dbx %x\n",
+ log(LOG_ERR, "add_mfc %s o %lx g %lx p %x dbx %p\n",
"multiple kernel entries",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
+ (u_long)ntohl(mfccp->mfcc_origin.s_addr),
+ (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr),
+ mfccp->mfcc_parent, (void *)mb_rt->m_act);
if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc o %x g %x p %x dbg %x\n",
- ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
- mfccp->mfcc_parent, mb_rt->m_act);
+ log(LOG_DEBUG,"add_mfc o %lx g %lx p %x dbg %p\n",
+ (u_long)ntohl(mfccp->mfcc_origin.s_addr),
+ (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr),
+ mfccp->mfcc_parent, (void *)mb_rt->m_act);
rt->mfc_origin = mfccp->mfcc_origin;
rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
@@ -924,9 +924,9 @@ add_mfc(mfccp)
*/
if (nstl == 0) {
if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"add_mfc no upcall h %d o %x g %x p %x\n",
- hash, ntohl(mfccp->mfcc_origin.s_addr),
- ntohl(mfccp->mfcc_mcastgrp.s_addr),
+ log(LOG_DEBUG,"add_mfc no upcall h %lu o %lx g %lx p %x\n",
+ hash, (u_long)ntohl(mfccp->mfcc_origin.s_addr),
+ (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr),
mfccp->mfcc_parent);
for (mb_rt = mfctable[hash]; mb_rt; mb_rt = mb_rt->m_next) {
@@ -1029,8 +1029,8 @@ del_mfc(mfccp)
hash = MFCHASH(origin.s_addr, mcastgrp.s_addr);
if (mrtdebug & DEBUG_MFC)
- log(LOG_DEBUG,"del_mfc orig %x mcastgrp %x\n",
- ntohl(origin.s_addr), ntohl(mcastgrp.s_addr));
+ log(LOG_DEBUG,"del_mfc orig %lx mcastgrp %lx\n",
+ (u_long)ntohl(origin.s_addr), (u_long)ntohl(mcastgrp.s_addr));
s = splnet();
@@ -1108,8 +1108,9 @@ X_ip_mforward(ip, ifp, m, imo)
struct vif *vifp;
if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "ip_mforward: src %x, dst %x, ifp %x\n",
- ntohl(ip->ip_src.s_addr), ntohl(ip->ip_dst.s_addr), ifp);
+ log(LOG_DEBUG, "ip_mforward: src %lx, dst %lx, ifp %p\n",
+ (u_long)ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr),
+ (void *)ifp);
if (ip->ip_hl < (IP_HDR_LEN + TUNNEL_LEN) >> 2 ||
(ipoptions = (u_char *)(ip + 1))[1] != IPOPT_LSRR ) {
@@ -1123,8 +1124,9 @@ X_ip_mforward(ip, ifp, m, imo)
* Source-route tunnels are no longer supported.
*/
if ((srctun++ % 1000) == 0)
- log(LOG_ERR, "ip_mforward: received source-routed packet from %x\n",
- ntohl(ip->ip_src.s_addr));
+ log(LOG_ERR,
+ "ip_mforward: received source-routed packet from %lx\n",
+ (u_long)ntohl(ip->ip_src.s_addr));
return 1;
}
@@ -1189,9 +1191,9 @@ X_ip_mforward(ip, ifp, m, imo)
mrtstat.mrts_no_route++;
if (mrtdebug & (DEBUG_FORWARD | DEBUG_MFC))
- log(LOG_DEBUG, "ip_mforward: no rte s %x g %x\n",
- ntohl(ip->ip_src.s_addr),
- ntohl(ip->ip_dst.s_addr));
+ log(LOG_DEBUG, "ip_mforward: no rte s %lx g %lx\n",
+ (u_long)ntohl(ip->ip_src.s_addr),
+ (u_long)ntohl(ip->ip_dst.s_addr));
/*
* Allocate mbufs early so that we don't do extra work if we are
@@ -1349,9 +1351,9 @@ expire_upcalls(void *unused)
mfc->mfc_expire != 0 &&
--mfc->mfc_expire == 0) {
if (mrtdebug & DEBUG_EXPIRE)
- log(LOG_DEBUG, "expire_upcalls: expiring (%x %x)\n",
- ntohl(mfc->mfc_origin.s_addr),
- ntohl(mfc->mfc_mcastgrp.s_addr));
+ log(LOG_DEBUG, "expire_upcalls: expiring (%lx %lx)\n",
+ (u_long)ntohl(mfc->mfc_origin.s_addr),
+ (u_long)ntohl(mfc->mfc_mcastgrp.s_addr));
/*
* drop all the packets
* free the mbuf with the pkt, if, timing info
@@ -1421,8 +1423,8 @@ ip_mdq(m, ifp, rt, xmt_vif)
if ((vifi >= numvifs) || (viftable[vifi].v_ifp != ifp)) {
/* came in the wrong interface */
if (mrtdebug & DEBUG_FORWARD)
- log(LOG_DEBUG, "wrong if: ifp %x vifi %d vififp %x\n",
- ifp, vifi, viftable[vifi].v_ifp);
+ log(LOG_DEBUG, "wrong if: ifp %p vifi %d vififp %p\n",
+ (void *)ifp, vifi, (void *)viftable[vifi].v_ifp);
++mrtstat.mrts_wrong_if;
++rt->mfc_wrong_if;
/*
@@ -1674,8 +1676,8 @@ ipip_input(m, iphlen)
mrtstat.mrts_cant_tunnel++; /*XXX*/
m_freem(m);
if (mrtdebug)
- log(LOG_DEBUG, "ip_mforward: no tunnel with %x\n",
- ntohl(ip->ip_src.s_addr));
+ log(LOG_DEBUG, "ip_mforward: no tunnel with %lx\n",
+ (u_long)ntohl(ip->ip_src.s_addr));
return;
}
ifp = vifp->v_ifp;
diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c
index d7a1d4e..c82049e 100644
--- a/sys/netinet/tcp_debug.c
+++ b/sys/netinet/tcp_debug.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93
- * $Id: tcp_debug.c,v 1.11 1997/09/16 18:36:04 joerg Exp $
+ * $Id: tcp_debug.c,v 1.12 1998/01/08 23:41:53 eivind Exp $
*/
#include "opt_inet.h"
@@ -155,10 +155,11 @@ tcp_trace(act, ostate, tp, ti, req)
printf("\n");
if (tp == 0)
return;
- printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
- tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
- tp->snd_max);
- printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
- tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
+ printf(
+ "\trcv_(nxt,wnd,up) (%lx,%lx,%lx) snd_(una,nxt,max) (%lx,%lx,%lx)\n",
+ (u_long)tp->rcv_nxt, tp->rcv_wnd, (u_long)tp->rcv_up,
+ (u_long)tp->snd_una, (u_long)tp->snd_nxt, (u_long)tp->snd_max);
+ printf("\tsnd_(wl1,wl2,wnd) (%lx,%lx,%lx)\n",
+ (u_long)tp->snd_wl1, (u_long)tp->snd_wl2, tp->snd_wnd);
#endif /* TCPDEBUG */
}
diff --git a/sys/netipx/spx_debug.c b/sys/netipx/spx_debug.c
index 624ea3b..e9b26c3 100644
--- a/sys/netipx/spx_debug.c
+++ b/sys/netipx/spx_debug.c
@@ -33,7 +33,7 @@
*
* @(#)spx_debug.c
*
- * $Id: spx_debug.c,v 1.11 1997/10/28 12:24:26 bde Exp $
+ * $Id: spx_debug.c,v 1.12 1998/01/08 23:41:57 eivind Exp $
*/
#include "opt_inet.h"
@@ -99,7 +99,7 @@ spx_trace(act, ostate, sp, si, req)
if (act >= SA_DROP)
act = SA_DROP;
if (sp != NULL)
- printf("%x %s:", sp, tcpstates[ostate]);
+ printf("%p %s:", (void *)sp, tcpstates[ostate]);
else
printf("???????? ");
printf("%s ", spxnames[act]);
diff --git a/sys/netkey/key_debug.c b/sys/netkey/key_debug.c
index 8c3a9fd..31f14ca 100644
--- a/sys/netkey/key_debug.c
+++ b/sys/netkey/key_debug.c
@@ -387,16 +387,17 @@ void dump_mbuf_hdr(m)
return;
}
- printf("Single mbuf at %08x\n", m);
- printf("m_len = %d, m_data = 0x%x, m_type = %d\n",m->m_len,
- m->m_data, m->m_type);
+ printf("Single mbuf at %p\n", (void *)m);
+ printf("m_len = %d, m_data = %p, m_type = %d\n",m->m_len,
+ (void *)m->m_data, m->m_type);
printf("m_flags = 0x%x ",m->m_flags);
if (m->m_flags & M_PKTHDR)
- printf("m_pkthdr.len = %d, m_pkthdr.rcvif = 0x%x",m->m_pkthdr.len,
- m->m_pkthdr.rcvif);
+ printf("m_pkthdr.len = %d, m_pkthdr.rcvif = %p",m->m_pkthdr.len,
+ (void *)m->m_pkthdr.rcvif);
if (m->m_flags & M_EXT)
printf(" (IS CLUSTER MBUF)");
- printf("\nm_next = 0x%x m_nextpkt = 0x%x\n",m->m_next, m->m_nextpkt);
+ printf("\nm_next = %p m_nextpkt = %p\n",(void *)m->m_next,
+ (void *)m->m_nextpkt);
}
/*----------------------------------------------------------------------
@@ -505,7 +506,7 @@ void dump_ifp(ifp)
printf("Interface name: %s.\n",ifp->if_name);
printf("Interface type: %d. ",ifp->if_type);
- printf("MTU: %d.\n",ifp->if_mtu);
+ printf("MTU: %lu.\n",ifp->if_mtu);
}
/*----------------------------------------------------------------------
@@ -519,7 +520,7 @@ void dump_route(ro)
return;
}
- printf("ro_rt = 0x%x, ro_dst is:\n",ro->ro_rt);
+ printf("ro_rt = %p, ro_dst is:\n",(void *)ro->ro_rt);
dump_smart_sockaddr(&ro->ro_dst);
}
@@ -538,10 +539,10 @@ void dump_rtentry(rt)
dump_smart_sockaddr(rt_key(rt));
printf("rt_mask is:\n");
dump_smart_sockaddr(rt_mask(rt));
- printf("rt_llinfo = 0x%x ",rt->rt_llinfo);
- printf("rt_rmx.rmx_mtu = %d ",rt->rt_rmx.rmx_mtu);
+ printf("rt_llinfo = %p ",(void *)rt->rt_llinfo);
+ printf("rt_rmx.rmx_mtu = %lu ",rt->rt_rmx.rmx_mtu);
printf("rt_refcnt = %d ",rt->rt_refcnt);
- printf("rt_flags = 0x%x\n",rt->rt_flags);
+ printf("rt_flags = 0x%lx\n",rt->rt_flags);
printf("rt_ifp is:\n");
dump_ifp(rt->rt_ifp);
printf("rt_ifa is:\n");
@@ -563,7 +564,8 @@ void dump_inpcb(inp)
printf("inp_next = 0x%x, inp_prev = 0x%x, inp_head = 0x%x.\n",
inp->inp_next, inp->inp_prev, inp->inp_head);
#endif
- printf("inp_socket = 0x%x, inp_ppcb\n",inp->inp_socket,inp->inp_ppcb);
+ printf("inp_socket = %p, inp_ppcb = %p\n",
+ (void *)inp->inp_socket,(void *)inp->inp_ppcb);
printf("faddr:\n");
dump_in_addr(&inp->inp_faddr);
printf("laddr:\n");
@@ -572,8 +574,8 @@ void dump_inpcb(inp)
dump_route(&inp->inp_route);
printf("inp_ip:");
printf("<Coming soon.>\n");
- printf("inp_options = 0x%x, inp_moptions{6,} = 0x%x,\n",inp->inp_options,
- inp->inp_moptions);
+ printf("inp_options = %p, inp_moptions{6,} = %p,\n",
+ (void *)inp->inp_options, (void *)inp->inp_moptions);
printf("inp_flags = 0x%x, inp_fport = %d, inp_lport = %d.\n",
(unsigned)inp->inp_flags,inp->inp_fport, inp->inp_lport);
}
OpenPOWER on IntegriCloud