mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Merge remote branch 'helmut/if_err_suggest'
This commit is contained in:
commit
fcc3a6f8be
1 changed files with 9 additions and 11 deletions
|
@ -37,20 +37,18 @@ int if_err_(int argc, char **argv) {
|
||||||
for(s=buff;*s == ' ';++s)
|
for(s=buff;*s == ' ';++s)
|
||||||
;
|
;
|
||||||
i = 0;
|
i = 0;
|
||||||
if(!strncmp(s, "eth", 3))
|
if(!strncmp(s, "lo:", 3))
|
||||||
i = 3;
|
|
||||||
else if(!strncmp(s, "wlan", 4))
|
|
||||||
i = 4;
|
|
||||||
else if(!strncmp(s, "ath", 3))
|
|
||||||
i = 3;
|
|
||||||
else if(!strncmp(s, "ra", 2))
|
|
||||||
i = 2;
|
|
||||||
if(i == 0)
|
|
||||||
continue;
|
continue;
|
||||||
while(isdigit(s[i]))
|
if(!strncmp(s, "sit", 3)) {
|
||||||
|
for(i=3; isdigit(s[i]); ++i)
|
||||||
|
;
|
||||||
|
if(s[i] == ':')
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
while(s[i] != ':' && s[i] != '\0')
|
||||||
++i;
|
++i;
|
||||||
if(s[i] != ':')
|
if(s[i] != ':')
|
||||||
continue;
|
continue; /* a header line */
|
||||||
s[i] = '\0';
|
s[i] = '\0';
|
||||||
puts(s);
|
puts(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue