aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2015-11-20 12:32:49 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2015-11-20 12:32:49 +0000
commit857357b6c94cd8000702c0950371b9904510bfd0 (patch)
treef51393636281901038e10afe24b816e3050fc6a1
parentb1a302a533c40314c1e1712c4de7309206467f34 (diff)
downloadsrc-857357b6c94cd8000702c0950371b9904510bfd0.tar.gz
src-857357b6c94cd8000702c0950371b9904510bfd0.zip
Don't truncate an interface name when -W option is specified.
Spotted by: Jim Thompson <jim__at__netgate.com> MFC after: 1 week
Notes
Notes: svn path=/head/; revision=291097
-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 3f6918cc160a..aed3093cfa4a 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;