mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-01 17:35:33 +01:00
Remove get_stats_from_ifconfig_command function
This function was only used to query interface statistics, which are now read direclty from sysfs. Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
This commit is contained in:
parent
a3f395926f
commit
b135d0b5ae
2 changed files with 0 additions and 24 deletions
|
|
@ -1517,29 +1517,6 @@ int get_shift_time_shift(char *local_time, char *shift)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int get_stats_from_ifconfig_command(const char *device, char *direction, char *option)
|
||||
{
|
||||
char buf[1024], *pch, *pchr, *ret;
|
||||
int pp, r, stats = 0;
|
||||
|
||||
pp = dmcmd("ifconfig", 1, device);
|
||||
if (pp) {
|
||||
r = dmcmd_read(pp, buf, 1024);
|
||||
for(pch = strtok_r(buf, "\n", &pchr); pch != NULL; pch = strtok_r(NULL, "\n", &pchr)) {
|
||||
if(!strstr(pch, direction))
|
||||
continue;
|
||||
ret = strstr(pch, option);
|
||||
if(ret) {
|
||||
strtok_r(ret, ":", &ret);
|
||||
sscanf(ret, "%d", &stats);
|
||||
break;
|
||||
}
|
||||
}
|
||||
close(pp);
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
int command_exec_output_to_array(char *cmd, char **output, int *length)
|
||||
{
|
||||
FILE *fp;
|
||||
|
|
|
|||
|
|
@ -248,7 +248,6 @@ struct uci_section *get_dup_section_in_dmmap_eq(char *dmmap_package, char* secti
|
|||
int is_array_elt_exist(char **str_array, char *str, int length);
|
||||
int get_shift_time_time(int shift_time, char *local_time, int size);
|
||||
int get_shift_time_shift(char *local_time, char *shift);
|
||||
int get_stats_from_ifconfig_command(const char *device, char *direction, char *option);
|
||||
int command_exec_output_to_array(char *cmd, char **output, int *length);
|
||||
char* int_period_to_date_time_format(int time);
|
||||
int copy_temporary_file_to_original_file(char *f1, char *f2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue