Author: marek Date: 2010-04-05 22:50:36 +0200 (Mon, 05 Apr 2010) New Revision: 1620
Modified: trunk/batctl/main.c trunk/batctl/proc.c trunk/batctl/proc.h trunk/batctl/sys.c trunk/batctl/sys.h Log: batctl: follow the orig_interval move to /sys
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
Modified: trunk/batctl/main.c =================================================================== --- trunk/batctl/main.c 2010-04-05 20:50:32 UTC (rev 1619) +++ trunk/batctl/main.c 2010-04-05 20:50:36 UTC (rev 1620) @@ -43,7 +43,7 @@ printf("commands:\n"); printf(" \tinterface|if [none|interface] \tdisplay or modify the interface settings\n"); printf(" \toriginators|o \tdisplay the originator table\n"); - printf(" \tinterval|it [orig_interval] \tdisplay or modify the originator interval in ms\n"); + printf(" \tinterval|it [orig_interval] \tdisplay or modify the originator interval (in ms)\n"); printf(" \tloglevel|ll [level] \tdisplay or modify the log level\n"); printf(" \tlog|l \tread the log produced by the kernel module\n"); printf(" \tgw_mode|gw [mode] \tdisplay or modify the gateway mode\n"); @@ -123,7 +123,7 @@
} else if ((strcmp(argv[1], "interval") == 0) || (strcmp(argv[1], "it") == 0)) {
- ret = handle_proc_setting(argc - 1, argv + 1, PROC_ORIG_INTERVAL, orig_interval_usage); + ret = handle_sys_setting(argc - 1, argv + 1, SYS_ORIG_INTERVAL, orig_interval_usage);
} else if ((strcmp(argv[1], "vis_mode") == 0) || (strcmp(argv[1], "vm") == 0)) {
Modified: trunk/batctl/proc.c =================================================================== --- trunk/batctl/proc.c 2010-04-05 20:50:32 UTC (rev 1619) +++ trunk/batctl/proc.c 2010-04-05 20:50:36 UTC (rev 1620) @@ -68,13 +68,6 @@ return EXIT_SUCCESS; }
-void orig_interval_usage(void) -{ - printf("Usage: batctl [options] interval \n"); - printf("options:\n"); - printf(" \t -h print this help\n"); -} - int handle_table(int argc, char **argv, char *file_path, void table_usage(void)) { int optchar, read_opt = USE_BAT_HOSTS;
Modified: trunk/batctl/proc.h =================================================================== --- trunk/batctl/proc.h 2010-04-05 20:50:32 UTC (rev 1619) +++ trunk/batctl/proc.h 2010-04-05 20:50:36 UTC (rev 1620) @@ -21,10 +21,8 @@
#define PROC_ROOT_PATH "/proc/net/batman-adv/" #define PROC_INTERFACES "interfaces" -#define PROC_ORIG_INTERVAL "orig_interval"
int interface(int argc, char **argv);
-void orig_interval_usage(void); int handle_table(int argc, char **argv, char *file_path, void table_usage(void)); int handle_proc_setting(int argc, char **argv, char *file_path, void setting_usage(void));
Modified: trunk/batctl/sys.c =================================================================== --- trunk/batctl/sys.c 2010-04-05 20:50:32 UTC (rev 1619) +++ trunk/batctl/sys.c 2010-04-05 20:50:36 UTC (rev 1620) @@ -207,6 +207,13 @@ printf(" \t -h print this help\n"); }
+void orig_interval_usage(void) +{ + printf("Usage: batctl [options] interval \n"); + printf("options:\n"); + printf(" \t -h print this help\n"); +} + int handle_sys_setting(int argc, char **argv, char *file_path, void setting_usage(void)) { int optchar, res;
Modified: trunk/batctl/sys.h =================================================================== --- trunk/batctl/sys.h 2010-04-05 20:50:32 UTC (rev 1619) +++ trunk/batctl/sys.h 2010-04-05 20:50:36 UTC (rev 1620) @@ -33,6 +33,7 @@ #define SYS_GATEWAYS "gateways" #define SYS_VIS_MODE "vis_mode" #define SYS_VIS_DATA "vis_data" +#define SYS_ORIG_INTERVAL "orig_interval"
void originators_usage(void); void trans_local_usage(void); @@ -42,6 +43,7 @@ void gw_mode_usage(void); void gateways_usage(void); void vis_mode_usage(void); +void orig_interval_usage(void); int log_print(int argc, char **argv); int handle_loglevel(int argc, char **argv); int handle_sys_table(int argc, char **argv, char *file_path, void table_usage(void));