Commit 811cf0aa authored by Bernd Eckenfels's avatar Bernd Eckenfels

sscanf pattern is %Lu not %llu for long long unsigned byte counters.

This fixes the 0 byte output of ifconfig/netstat -i
parent 017c996c
......@@ -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.17 2001/08/09 15:52:39 ak Exp $
$Id: interface.c,v 1.18 2001/11/10 17:10:01 ecki Exp $
*/
#include "config.h"
......@@ -239,7 +239,7 @@ static int get_dev_fields(char *bp, struct interface *ife)
switch (procnetdev_vsn) {
case 3:
sscanf(bp,
"%llu %llu %lu %lu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu %lu",
"%Lu %Lu %lu %lu %lu %lu %lu %lu %Lu %Lu %lu %lu %lu %lu %lu %lu",
&ife->stats.rx_bytes,
&ife->stats.rx_packets,
&ife->stats.rx_errors,
......@@ -259,7 +259,7 @@ static int get_dev_fields(char *bp, struct interface *ife)
&ife->stats.tx_compressed);
break;
case 2:
sscanf(bp, "%llu %llu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu",
sscanf(bp, "%Lu %Lu %lu %lu %lu %lu %Lu %Lu %lu %lu %lu %lu %lu",
&ife->stats.rx_bytes,
&ife->stats.rx_packets,
&ife->stats.rx_errors,
......@@ -277,7 +277,7 @@ static int get_dev_fields(char *bp, struct interface *ife)
ife->stats.rx_multicast = 0;
break;
case 1:
sscanf(bp, "%llu %lu %lu %lu %lu %llu %lu %lu %lu %lu %lu",
sscanf(bp, "%Lu %lu %lu %lu %lu %Lu %lu %lu %lu %lu %lu",
&ife->stats.rx_packets,
&ife->stats.rx_errors,
&ife->stats.rx_dropped,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment