make RX-OK and TX-OK col. in "netstat -i" 1 digit longer by left aligning
authorBernd Eckenfels <net-tools@lina.inka.de>
Sat, 23 Feb 2002 21:27:30 +0000 (21:27 +0000)
committerBernd Eckenfels <net-tools@lina.inka.de>
Sat, 23 Feb 2002 21:27:30 +0000 (21:27 +0000)
metric and TX-OVR and shorten max length of them.

lib/interface.c

index 44d18a7..c5f09de 100644 (file)
@@ -7,7 +7,7 @@
    8/2000  Andi Kleen make the list operations a bit more efficient.
    People are crazy enough to use thousands of aliases now.
 
-   $Id: interface.c,v 1.21 2001/11/25 06:48:51 ecki Exp $
+   $Id: interface.c,v 1.22 2002/02/23 21:27:30 ecki Exp $
  */
 
 #include "config.h"
@@ -580,13 +580,13 @@ int do_if_print(struct interface *ife, void *cookie)
 void ife_print_short(struct interface *ptr)
 {
     printf("%-5.5s ", ptr->name);
-    printf("%5d %3d", ptr->mtu, ptr->metric);
+    printf("%5d %-2d", ptr->mtu, ptr->metric);
     /* If needed, display the interface statistics. */
     if (ptr->statistics_valid) {
-       printf("%8llu %6lu %6lu %6lu",
+       printf("%9llu %6lu %6lu %-5lu",
               ptr->stats.rx_packets, ptr->stats.rx_errors,
               ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors);
-       printf("%8llu %6lu %6lu %6lu ",
+       printf("%9llu %6lu %6lu %6lu ",
               ptr->stats.tx_packets, ptr->stats.tx_errors,
               ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors);
     } else {