LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File net-tools-1.60-errors.patch of Package net-tools (Project home:pwieczorkiewicz:branches:openSUSE:Leap:42.1:Update)

--- net-tools-1.60/lib/interface.c.errors	2001-02-10 20:31:15.000000000 +0100
+++ net-tools-1.60/lib/interface.c	2004-05-24 14:24:14.000000000 +0200
@@ -239,7 +239,7 @@
     switch (procnetdev_vsn) {
     case 3:
 	sscanf(bp,
-	"%llu %llu %lu %lu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu %lu",
+	"%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
 	       &ife->stats.rx_bytes,
 	       &ife->stats.rx_packets,
 	       &ife->stats.rx_errors,
@@ -259,7 +259,7 @@
 	       &ife->stats.tx_compressed);
 	break;
     case 2:
-	sscanf(bp, "%llu %llu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu",
+	sscanf(bp, "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
 	       &ife->stats.rx_bytes,
 	       &ife->stats.rx_packets,
 	       &ife->stats.rx_errors,
@@ -277,7 +277,7 @@
 	ife->stats.rx_multicast = 0;
 	break;
     case 1:
-	sscanf(bp, "%llu %lu %lu %lu %lu %llu %lu %lu %lu %lu %lu",
+	sscanf(bp, "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
 	       &ife->stats.rx_packets,
 	       &ife->stats.rx_errors,
 	       &ife->stats.rx_dropped,
@@ -832,12 +832,12 @@
 	 */
 	printf("          ");
 
-	printf(_("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"),
+	printf(_("RX packets:%llu errors:%llu dropped:%llu overruns:%llu frame:%llu\n"),
 	       ptr->stats.rx_packets, ptr->stats.rx_errors,
 	       ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
 	       ptr->stats.rx_frame_errors);
 	if (can_compress)
-	    printf(_("             compressed:%lu\n"), ptr->stats.rx_compressed);
+	    printf(_("             compressed:%llu\n"), ptr->stats.rx_compressed);
 
 	rx = ptr->stats.rx_bytes;  
 	tx = ptr->stats.tx_bytes;
@@ -849,13 +849,13 @@
 	else if (tx > 1024) { short_tx /= 1024;  strcpy(Text, "Kb"); }
 
 	printf("          ");
-	printf(_("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"),
+	printf(_("TX packets:%llu errors:%llu dropped:%llu overruns:%llu carrier:%llu\n"),
 	       ptr->stats.tx_packets, ptr->stats.tx_errors,
 	       ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
 	       ptr->stats.tx_carrier_errors);
-	printf(_("          collisions:%lu "), ptr->stats.collisions);
+	printf(_("          collisions:%llu "), ptr->stats.collisions);
 	if (can_compress)
-	    printf(_("compressed:%lu "), ptr->stats.tx_compressed);
+	    printf(_("compressed:%llu "), ptr->stats.tx_compressed);
 	if (ptr->tx_queue_len != -1)
 	    printf(_("txqueuelen:%d "), ptr->tx_queue_len);
 	printf("\n          ");
--- net-tools-1.60/include/interface.h.errors	2001-02-10 20:24:25.000000000 +0100
+++ net-tools-1.60/include/interface.h	2004-05-24 14:22:33.000000000 +0200
@@ -3,28 +3,28 @@
     unsigned long long tx_packets;	/* total packets transmitted    */
     unsigned long long rx_bytes;	/* total bytes received         */
     unsigned long long tx_bytes;	/* total bytes transmitted      */
-    unsigned long rx_errors;	/* bad packets received         */
-    unsigned long tx_errors;	/* packet transmit problems     */
-    unsigned long rx_dropped;	/* no space in linux buffers    */
-    unsigned long tx_dropped;	/* no space available in linux  */
-    unsigned long rx_multicast;	/* multicast packets received   */
-    unsigned long rx_compressed;
-    unsigned long tx_compressed;
-    unsigned long collisions;
+    unsigned long long rx_errors;	/* bad packets received         */
+    unsigned long long tx_errors;	/* packet transmit problems     */
+    unsigned long long rx_dropped;	/* no space in linux buffers    */
+    unsigned long long tx_dropped;	/* no space available in linux  */
+    unsigned long long rx_multicast;	/* multicast packets received   */
+    unsigned long long rx_compressed;
+    unsigned long long tx_compressed;
+    unsigned long long collisions;
 
     /* detailed rx_errors: */
-    unsigned long rx_length_errors;
-    unsigned long rx_over_errors;	/* receiver ring buff overflow  */
-    unsigned long rx_crc_errors;	/* recved pkt with crc error    */
-    unsigned long rx_frame_errors;	/* recv'd frame alignment error */
-    unsigned long rx_fifo_errors;	/* recv'r fifo overrun          */
-    unsigned long rx_missed_errors;	/* receiver missed packet     */
+    unsigned long long rx_length_errors;
+    unsigned long long rx_over_errors;	/* receiver ring buff overflow  */
+    unsigned long long rx_crc_errors;	/* recved pkt with crc error    */
+    unsigned long long rx_frame_errors;	/* recv'd frame alignment error */
+    unsigned long long rx_fifo_errors;	/* recv'r fifo overrun          */
+    unsigned long long rx_missed_errors;	/* receiver missed packet     */
     /* detailed tx_errors */
-    unsigned long tx_aborted_errors;
-    unsigned long tx_carrier_errors;
-    unsigned long tx_fifo_errors;
-    unsigned long tx_heartbeat_errors;
-    unsigned long tx_window_errors;
+    unsigned long long tx_aborted_errors;
+    unsigned long long tx_carrier_errors;
+    unsigned long long tx_fifo_errors;
+    unsigned long long tx_heartbeat_errors;
+    unsigned long long tx_window_errors;
 };
 
 struct interface {