Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
811cf0aa
Commit
811cf0aa
authored
Nov 10, 2001
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sscanf pattern is %Lu not %llu for long long unsigned byte counters.
This fixes the 0 byte output of ifconfig/netstat -i
parent
017c996c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/interface.c
lib/interface.c
+4
-4
No files found.
lib/interface.c
View file @
811cf0aa
...
...
@@ -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.1
7 2001/08/09 15:52:39 ak
Exp $
$Id: interface.c,v 1.1
8 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 %ll
u %lu %lu %lu %lu %lu %lu"
,
"%
Lu %Lu %lu %lu %lu %lu %lu %lu %Lu %L
u %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 %ll
u %lu %lu %lu %lu %lu"
,
sscanf
(
bp
,
"%
Lu %Lu %lu %lu %lu %lu %Lu %L
u %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 %ll
u %lu %lu %lu %lu %lu"
,
sscanf
(
bp
,
"%
Lu %lu %lu %lu %lu %L
u %lu %lu %lu %lu %lu"
,
&
ife
->
stats
.
rx_packets
,
&
ife
->
stats
.
rx_errors
,
&
ife
->
stats
.
rx_dropped
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment