diff options
author | calvin <calvin@it13.HOLTDOM.COM> | 2015-01-26 09:05:31 -0500 |
---|---|---|
committer | calvin <calvin@it13.HOLTDOM.COM> | 2015-01-26 09:05:31 -0500 |
commit | 38787b9c3111712d92b5b388b71e44900142ffa4 (patch) | |
tree | 40ed27211779ef1979f699741aed90d5e650bf9f /fsbm.c | |
parent | e363f56cf5764ea424a0daf85baa2546e1b6ca94 (diff) |
fix interface name error
Diffstat (limited to 'fsbm.c')
-rw-r--r-- | fsbm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -32,7 +32,7 @@ void endHandler(int signum) { } void print_bps(double bytesPerSecond) { - const char* prefixes[] = { "", "k", "M", "G", "T", "P", "E", "Z", "Y" }; + const char* prefixes[] = { "b", "k", "M", "G", "T", "P", "E", "Z", "Y" }; double value; const char* unit; unsigned prefix = 0; @@ -98,7 +98,7 @@ void print_stats() { len = name - buf; // Parse the statistics, alls well, then get this shit going, otherwise f it. - if(sscanf(stats, "%Lu %*Lu %*Lu %*Lu %*Lu %*Lu %*Lu %*Lu %Lu", + if(sscanf(stats, "%Lu %*u %*u %*u %*u %*u %*u %*u %Lu", &rx_bytes, &tx_bytes) == 2) { size_t i = 0; @@ -108,7 +108,7 @@ void print_stats() { } for(i = 0; i < no_iface; i++) { // if it exists in our interfaces, great. reuse the iface struct - if(strncmp(name, interfaces[i].interface, len) == 0) { + if(strcmp(name, interfaces[i].interface) == 0) { found = true; break; } |