diff options
author | ume <ume@FreeBSD.org> | 2015-11-20 12:32:49 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2015-11-20 12:32:49 +0000 |
commit | bbdebe789d20de1b318c709211ce23aa4d276056 (patch) | |
tree | f51393636281901038e10afe24b816e3050fc6a1 /usr.bin/netstat | |
parent | 4abd0209099ccb065b3524684fc1980b04060b7a (diff) | |
download | FreeBSD-src-bbdebe789d20de1b318c709211ce23aa4d276056.zip FreeBSD-src-bbdebe789d20de1b318c709211ce23aa4d276056.tar.gz |
Don't truncate an interface name when -W option is specified.
Spotted by: Jim Thompson <jim__at__netgate.com>
MFC after: 1 week
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/route.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 3f6918c..aed3093 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -385,7 +385,11 @@ p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm) strlcpy(prettyname, "---", sizeof(prettyname)); } - xo_emit("{t:interface-name/%*.*s}", wid_if, wid_if, prettyname); + if (Wflag) + xo_emit("{t:interface-name/%*s}", wid_if, prettyname); + else + xo_emit("{t:interface-name/%*.*s}", wid_if, wid_if, + prettyname); if (rtm->rtm_rmx.rmx_expire) { time_t expire_time; |