summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2015-11-20 12:32:49 +0000
committerume <ume@FreeBSD.org>2015-11-20 12:32:49 +0000
commitbbdebe789d20de1b318c709211ce23aa4d276056 (patch)
treef51393636281901038e10afe24b816e3050fc6a1 /usr.bin
parent4abd0209099ccb065b3524684fc1980b04060b7a (diff)
downloadFreeBSD-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')
-rw-r--r--usr.bin/netstat/route.c6
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;
OpenPOWER on IntegriCloud