[Listener] Add -h option

This commit is contained in:
Matteo Cypriani 2010-07-13 14:42:33 +02:00
parent 5eb11af87f
commit 7aa0b65f72
2 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,7 @@
/* Arguments & program configuration */
#define OPTIONS "d:f:kl:m:p:qr:vw:" // getopt string
#define OPTIONS "d:f:hkl:m:p:qr:vw:" // getopt string
#define DEFAULT_CONFIG_FILE "/usr/local/etc/owlps/owlps-listener.conf"
enum {MODE_ACTIVE = 'a', MODE_PASSIVE = 'p', MODE_MIXED = 'm'} ;

View File

@ -140,6 +140,9 @@ int main(int argc, char *argv[])
break ;
case 'f' : // Config file
break ; // (already parsed)
case 'h' :
print_usage(argv[0]) ;
exit(0) ;
case 'k' :
#ifdef USE_PTHREAD
SET_KEEP_MONITOR() ;
@ -692,6 +695,7 @@ void print_usage(char *prog)
" [-w wifi_iface] [-k] [-v | -q]\n"
"Main options:\n"
"\t-h\t\tPrint this help.\n"
"\t-f config_file\tUse 'config_file' instead of the default"
" configuration file (%s). Available only if program was"
" compiled with libconfuse.\n"