Author: simon Date: 2010-06-18 22:23:01 +0200 (Fri, 18 Jun 2010) New Revision: 1703
Modified: tags/batctl-2010.0.0/functions.c tags/batctl-2010.0.0/functions.h tags/batctl-2010.0.0/vis.c Log: batctl-2010.0.0: use check_sys_dir() for sys files
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
Modified: tags/batctl-2010.0.0/functions.c =================================================================== --- tags/batctl-2010.0.0/functions.c 2010-06-18 20:09:51 UTC (rev 1702) +++ tags/batctl-2010.0.0/functions.c 2010-06-18 20:23:01 UTC (rev 1703) @@ -117,7 +117,7 @@ return EXIT_FAILURE; }
-static int check_sys_dir(char *dir) +int check_sys_dir(char *dir) { struct stat st;
Modified: tags/batctl-2010.0.0/functions.h =================================================================== --- tags/batctl-2010.0.0/functions.h 2010-06-18 20:09:51 UTC (rev 1702) +++ tags/batctl-2010.0.0/functions.h 2010-06-18 20:23:01 UTC (rev 1703) @@ -37,6 +37,7 @@ int read_file(char *dir, char *path, int read_opt); int write_file(char *dir, char *fname, char *arg1, char *arg2); int check_proc_dir(char *dir); +int check_sys_dir(char *dir); char *strchr_anyof(const char *s, const char *n);
extern char *line_ptr;
Modified: tags/batctl-2010.0.0/vis.c =================================================================== --- tags/batctl-2010.0.0/vis.c 2010-06-18 20:09:51 UTC (rev 1702) +++ tags/batctl-2010.0.0/vis.c 2010-06-18 20:23:01 UTC (rev 1703) @@ -167,7 +167,7 @@ { char full_path[500];
- if (check_proc_dir("/proc") != EXIT_SUCCESS) + if (check_sys_dir("/sys") != EXIT_SUCCESS) return NULL;
strncpy(full_path, SYS_BATIF_PATH, strlen(SYS_BATIF_PATH));