Properly align the header and the data columns for netstat -r with and
without the -W flag.
This commit is contained in:
parent
7b24b050e0
commit
1947004980
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user