Author: marek Date: 2010-06-21 15:20:09 +0200 (Mon, 21 Jun 2010) New Revision: 1716
Modified: trunk/batctl/functions.c trunk/batctl/functions.h Log: batctl: Remove dead code from old sysfs parsing
The old batman-adv sysfs files provided all their available options inside their output. This made it necessary to parse the output to analyse it before we accept an input given to batctl.
This functionality was removed as it wasn't the correct style according to the sysfs maintainer. Not all code related to that were removed right away when batctl was adopted to the new sysfs handling.
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batctl/functions.c =================================================================== --- trunk/batctl/functions.c 2010-06-20 21:13:24 UTC (rev 1715) +++ trunk/batctl/functions.c 2010-06-21 13:20:09 UTC (rev 1716) @@ -303,21 +303,3 @@ close(fd); return res; } - -char *strchr_anyof(const char *s, const char *n) -{ - char *cur, *first = NULL; - size_t i, len; - - if (s == NULL || n == NULL) - return first; - - len = strlen(n); - for (i = 0; i < len; i++) { - cur = strchr(s, n[i]); - if (cur != NULL && (cur < first || first == NULL)) - first = cur; - } - - return first; -}
Modified: trunk/batctl/functions.h =================================================================== --- trunk/batctl/functions.h 2010-06-20 21:13:24 UTC (rev 1715) +++ trunk/batctl/functions.h 2010-06-21 13:20:09 UTC (rev 1716) @@ -35,7 +35,6 @@ char *get_name_by_macstr(char *mac_str, int read_opt); int read_file(char *dir, char *path, int read_opt); int write_file(char *dir, char *fname, char *arg1, char *arg2); -char *strchr_anyof(const char *s, const char *n);
extern char *line_ptr;