Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2002 01:50:02 -0700 (PDT)
From:      =?iso-8859-1?Q?=D8yvind?= Kolbu <oyvind@kebab.gaffel.nu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/34874 Netstat output to small
Message-ID:  <200205160850.g4G8o2i13141@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/34874; it has been noted by GNATS.

From: =?iso-8859-1?Q?=D8yvind?= Kolbu <oyvind@kebab.gaffel.nu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/34874 Netstat output to small
Date: Thu, 16 May 2002 10:42:14 +0200

 The width should be 18, not 20 as first described in the pr.
 Apply this patch to src/usr.bin/netstat/if.c 
 
 ---- Begin patch ----
 --- if.c.orig   Thu May 16 10:28:55 2002
 +++ if.c        Thu May 16 10:29:26 2002
 @@ -203,7 +203,7 @@
                 return;
 
         if (!pfunc) {
 -               printf("%-5.5s %-5.5s %-13.13s %-15.15s %8.8s %5.5s",
 +               printf("%-5.5s %-5.5s %-18.18s %-15.15s %8.8s %5.5s",
                        "Name", "Mtu", "Network", "Address", "Ipkts", "Ierrs");
                 if (bflag)
                         printf(" %10.10s","Ibytes");
 @@ -269,7 +269,7 @@
 
                 if (ifaddraddr == 0) {
                         printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
 -                       printf("%-13.13s ", "none");
 +                       printf("%-18.18s ", "none");
                         printf("%-15.15s ", "none");
                 } else {
                         if (kread(ifaddraddr, (char *)&ifaddr, sizeof ifaddr)) {
 @@ -288,7 +288,7 @@
                         printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
                         switch (sa->sa_family) {
                         case AF_UNSPEC:
 -                               printf("%-13.13s ", "none");
 +                               printf("%-18.18s ", "none");
                                 printf("%-15.15s ", "none");
                                 break;
                         case AF_INET:
 @@ -299,10 +299,10 @@
                                  */
                                 in = inet_makeaddr(ifaddr.in.ia_subnet,
                                         INADDR_ANY);
 -                               printf("%-13.13s ", netname(in.s_addr,
 +                               printf("%-18.18s ", netname(in.s_addr,
                                     ifaddr.in.ia_subnetmask));
  #else
 -                               printf("%-13.13s ",
 +                               printf("%-18.18s ",
                                     netname(htonl(ifaddr.in.ia_subnet),
                                     ifaddr.in.ia_subnetmask));
  #endif
 ---- End patch ----
 
 Øyvind Kolbu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205160850.g4G8o2i13141>