Date: Thu, 23 Feb 2012 11:00:29 GMT From: Pershin Vladimir <pershin87@yandex.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/161986: [patch] netstat(1): Interface auto-width in Message-ID: <201202231100.q1NB0Twf097373@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/161986; it has been noted by GNATS. From: Pershin Vladimir <pershin87@yandex.ru> To: bug-followup@freebsd.org,dyr@smartspb.net Cc: Subject: Re: bin/161986: [patch] netstat(1): Interface auto-width in Date: Thu, 23 Feb 2012 14:53:06 +0400 I wrote small patch. By default the width equal 10, if you use -W then width equal 16. --- if_old.c 2010-12-21 23:09:25.000000000 +0600 +++ if.c 2012-02-23 16:47:58.000000000 +0600 @@ -223,9 +223,9 @@ if (!pfunc) { if (Wflag) - printf("%-7.7s", "Name"); + printf("%-16.16s", "Name"); else - printf("%-5.5s", "Name"); + printf("%-10.10s", "Name"); printf(" %5.5s %-13.13s %-17.17s %8.8s %5.5s %5.5s", "Mtu", "Network", "Address", "Ipkts", "Ierrs", "Idrop"); if (bflag) @@ -293,9 +293,9 @@ if (ifaddraddr == 0) { if (Wflag) - printf("%-7.7s", name); + printf("%-16.16s", name); else - printf("%-5.5s", name); + printf("%-10.10s", name); printf(" %5lu ", ifnet.if_mtu); printf("%-13.13s ", "none"); printf("%-17.17s ", "none"); @@ -315,9 +315,9 @@ continue; } if (Wflag) - printf("%-7.7s", name); + printf("%-16.16s", name); else - printf("%-5.5s", name); + printf("%-10.10s", name); printf(" %5lu ", ifnet.if_mtu); switch (sa->sa_family) { case AF_UNSPEC:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202231100.q1NB0Twf097373>