summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2015-05-18 18:03:47 +0000
committerloos <loos@FreeBSD.org>2015-05-18 18:03:47 +0000
commitd9cd8beca4033e1aad09328a4d81101f6a6c675c (patch)
tree422cc3039af1716088921ae4691d445b0ec1caa2 /usr.bin/netstat
parent4ecae4b4dd584a63d1542c4211314301f10ac5fe (diff)
downloadFreeBSD-src-d9cd8beca4033e1aad09328a4d81101f6a6c675c.zip
FreeBSD-src-d9cd8beca4033e1aad09328a4d81101f6a6c675c.tar.gz
Properly align the header and the data columns for netstat -r with and
without the -W flag.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 675d379..ab5a3ed 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -245,7 +245,7 @@ pr_rthdr(int af1)
wid_if, wid_if, "Netif",
wid_expire, "Expire");
} else {
- xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} "
+ xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} "
"{T:/%*s}\n",
wid_dst, wid_dst, "Destination",
wid_gw, wid_gw, "Gateway",
@@ -389,7 +389,7 @@ p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm)
p_sockaddr("destination", &addr.u_sa, &mask.u_sa, rtm->rtm_flags,
wid_dst);
p_sockaddr("gateway", &gw.u_sa, NULL, RTF_HOST, wid_gw);
- snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:}",
+ snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ",
wid_flags);
p_flags(rtm->rtm_flags, buffer);
if (Wflag) {
OpenPOWER on IntegriCloud