[Aggregator] Add -h option

This commit is contained in:
Matteo Cypriani 2010-07-12 16:57:32 +02:00
parent 417452a7ad
commit 4117e8dc14
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@
/* Arguments & program configuration */
#define OPTIONS "a:c:f:i:k:l:o:p:" // getopt string
#define OPTIONS "a:c:f:hi:k:l:o:p:" // getopt string
#define DEFAULT_CONFIG_FILE "/usr/local/etc/owlps/owlps-aggregator.conf"
#define DEFAULT_AGGREGATE_TIMEOUT 1500 // milliseconds
#define DEFAULT_KEEP_TIMEOUT 3000 // milliseconds

View File

@ -142,6 +142,9 @@ void parse_command_line(int argc, char **argv)
break ;
case 'f' : // Config file
break ; // (already parsed)
case 'h' :
print_usage() ;
exit(0) ;
case 'i' :
cfg_setstr(cfg, "positioner_ip", optarg) ;
break ;
@ -686,6 +689,7 @@ void print_usage()
" [-c check_interval] [-o output_file]\n"
"Main options:\n"
"\t-h\t\tPrint this help.\n"
"\t-f config_file\tUse 'config_file' instead of the default"
" configuration file.\n"