diff options
author | ru <ru@FreeBSD.org> | 2001-06-15 18:15:11 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-06-15 18:15:11 +0000 |
commit | dbd701e3cb80a1dfdf4e2ab22ff340b5993f4a8f (patch) | |
tree | 304c14390df123e94deda5da697580980b3685bb /usr.bin | |
parent | 153d116684785e90f70b156146c6034860998801 (diff) | |
download | FreeBSD-src-dbd701e3cb80a1dfdf4e2ab22ff340b5993f4a8f.zip FreeBSD-src-dbd701e3cb80a1dfdf4e2ab22ff340b5993f4a8f.tar.gz |
Line up `netstat -rl' display.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/route.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index da5b1f4..2a7a96f 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -250,16 +250,17 @@ pr_rthdr(int af) printf("%-8.8s ","Address"); if (af == AF_INET || lflag) if (lflag) - printf("%-*.*s %-*.*s %-6.6s %6.6s%8.8s %5.5s %*.*s %6s\n", + printf("%-*.*s %-*.*s %-6.6s %6.6s %8.8s %6.6s %*.*s %6s\n", WID_DST(af), WID_DST(af), "Destination", WID_GW(af), WID_GW(af), "Gateway", "Flags", "Refs", "Use", "Mtu", WID_IF(af), WID_IF(af), "Netif", "Expire"); else - printf("%-*.*s %-*.*s %-6.6s %6.6s%8.8s %8.8s %6s\n", + printf("%-*.*s %-*.*s %-6.6s %6.6s %8.8s %*.*s %6s\n", WID_DST(af), WID_DST(af), "Destination", WID_GW(af), WID_GW(af), "Gateway", - "Flags", "Refs", "Use", "Netif", "Expire"); + "Flags", "Refs", "Use", + WID_IF(af), WID_IF(af), "Netif", "Expire"); else printf("%-*.*s %-*.*s %-6.6s %8.8s %6s\n", WID_DST(af), WID_DST(af), "Destination", @@ -607,7 +608,7 @@ p_rtentry(struct rtentry *rt) WID_GW(addr.u_sa.sa_family)); p_flags(rt->rt_flags, "%-6.6s "); if (addr.u_sa.sa_family == AF_INET || lflag) { - printf("%6ld %8ld", rt->rt_refcnt, rt->rt_use); + printf("%6ld %8ld ", rt->rt_refcnt, rt->rt_use); if (lflag) { if (rt->rt_rmx.rmx_mtu != 0) printf("%6lu ", rt->rt_rmx.rmx_mtu); @@ -623,7 +624,8 @@ p_rtentry(struct rtentry *rt) snprintf(prettyname, sizeof prettyname, "%s%d", name, ifnet.if_unit); } - printf("%8.8s", prettyname); + printf("%*.*s", WID_IF(addr.u_sa.sa_family), + WID_IF(addr.u_sa.sa_family), prettyname); if (rt->rt_rmx.rmx_expire) { time_t expire_time; |