Don't truncate an interface name when -W option is specified.

Spotted by:	Jim Thompson <jim__at__netgate.com>
MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2015-11-20 12:32:49 +00:00
parent b1a302a533
commit 857357b6c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291097

View File

@ -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;