diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-09-05 20:30:22 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-09-05 20:30:22 +0000 |
commit | 343c56e3bb20d8059dcf5094546acb185144a359 (patch) | |
tree | 580ca0c9eda4235fa570e66301bf88eb21c0ec61 /sbin | |
parent | 4d31f03eb95a72ce43a873d36ccaf76ae60e4c4b (diff) |
Correct the format strings after the recent rt_metrics changes.
rmx_pksent is not u_int64_t all others are just u_int.
This is almost the same as in usr.bin/netstat.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 12 | ||||
-rw-r--r-- | sbin/route/show.c | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 2cfdbb05bbb..3eacd272cc5 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.110 2007/06/04 12:23:43 henning Exp $ */ +/* $OpenBSD: route.c,v 1.111 2007/09/05 20:30:21 claudio Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -302,7 +302,7 @@ void set_metric(char *value, int key) { int flag = 0; - u_long noval, *valp = &noval; + u_int noval, *valp = &noval; switch (key) { case K_MTU: @@ -1236,12 +1236,12 @@ print_getmsg(struct rt_msghdr *rtm, int msglen) #define msec(u) (((u) + 500) / 1000) /* usec to msec */ printf("%s\n", " use hopcount mtu expire"); - printf("%8lu ", rtm->rtm_rmx.rmx_pksent); - printf("%8lu%c ", rtm->rtm_rmx.rmx_hopcount, lock(HOPCOUNT)); - printf("%8lu%c ", rtm->rtm_rmx.rmx_mtu, lock(MTU)); + printf("%8llu ", rtm->rtm_rmx.rmx_pksent); + printf("%8u%c ", rtm->rtm_rmx.rmx_hopcount, lock(HOPCOUNT)); + printf("%8u%c ", rtm->rtm_rmx.rmx_mtu, lock(MTU)); if (rtm->rtm_rmx.rmx_expire) rtm->rtm_rmx.rmx_expire -= time(NULL); - printf("%8ld%c\n", rtm->rtm_rmx.rmx_expire, lock(EXPIRE)); + printf("%8d%c\n", rtm->rtm_rmx.rmx_expire, lock(EXPIRE)); #undef lock #undef msec #define RTA_IGN (RTA_DST|RTA_GATEWAY|RTA_NETMASK|RTA_IFP|RTA_IFA|RTA_BRD) diff --git a/sbin/route/show.c b/sbin/route/show.c index 52722e85da5..4bcdff24736 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.60 2007/07/24 20:22:23 claudio Exp $ */ +/* $OpenBSD: show.c,v 1.61 2007/09/05 20:30:21 claudio Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -269,10 +269,10 @@ p_rtentry(struct rt_msghdr *rtm) p_sockaddr(rti_info[RTAX_GATEWAY], NULL, RTF_HOST, WID_GW(sa->sa_family)); p_flags(rtm->rtm_flags, "%-6.6s "); - printf("%6d %8ld ", (int)rtm->rtm_rmx.rmx_refcnt, + printf("%6u %8llu ", rtm->rtm_rmx.rmx_refcnt, rtm->rtm_rmx.rmx_pksent); if (rtm->rtm_rmx.rmx_mtu) - printf("%6ld ", rtm->rtm_rmx.rmx_mtu); + printf("%6u ", rtm->rtm_rmx.rmx_mtu); else printf("%6s ", "-"); putchar((rtm->rtm_rmx.rmx_locks & RTV_MTU) ? 'L' : ' '); |