Author: marek Date: 2010-04-07 13:15:23 +0200 (Wed, 07 Apr 2010) New Revision: 1628
Modified: branches/batctl-0.2.x/main.c branches/batctl-0.2.x/proc.c branches/batctl-0.2.x/proc.h branches/batctl-0.2.x/sys.c branches/batctl-0.2.x/sys.h Log: batctl: follow the orig_interval move to /sys
Signed-off-by: Marek Lindner lindner_marek@yahoo.de
Modified: branches/batctl-0.2.x/main.c =================================================================== --- branches/batctl-0.2.x/main.c 2010-04-07 11:15:20 UTC (rev 1627) +++ branches/batctl-0.2.x/main.c 2010-04-07 11:15:23 UTC (rev 1628) @@ -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(" \ttranslocal|tl \tdisplay the local translation table\n"); @@ -120,7 +120,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: branches/batctl-0.2.x/proc.c =================================================================== --- branches/batctl-0.2.x/proc.c 2010-04-07 11:15:20 UTC (rev 1627) +++ branches/batctl-0.2.x/proc.c 2010-04-07 11:15:23 UTC (rev 1628) @@ -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: branches/batctl-0.2.x/proc.h =================================================================== --- branches/batctl-0.2.x/proc.h 2010-04-07 11:15:20 UTC (rev 1627) +++ branches/batctl-0.2.x/proc.h 2010-04-07 11:15:23 UTC (rev 1628) @@ -23,10 +23,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: branches/batctl-0.2.x/sys.c =================================================================== --- branches/batctl-0.2.x/sys.c 2010-04-07 11:15:20 UTC (rev 1627) +++ branches/batctl-0.2.x/sys.c 2010-04-07 11:15:23 UTC (rev 1628) @@ -184,6 +184,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: branches/batctl-0.2.x/sys.h =================================================================== --- branches/batctl-0.2.x/sys.h 2010-04-07 11:15:20 UTC (rev 1627) +++ branches/batctl-0.2.x/sys.h 2010-04-07 11:15:23 UTC (rev 1628) @@ -30,12 +30,14 @@ #define SYS_AGGR "aggregate_ogm" #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); void trans_global_usage(void); void aggregation_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));