From: Russ Combs Date: Sat, 4 Oct 2014 02:26:39 +0000 (-0400) Subject: tweaked usage X-Git-Tag: 3.0.0-233~1397^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f24c4e8e6d0339261813803da10977dc99a2a2;p=thirdparty%2Fsnort3.git tweaked usage --- diff --git a/ChangeLog b/ChangeLog index 80909ae87..bb32f8f60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ -- changed max_ip6_options to max_ip6_extensions to avoid confusion -- disabled markup sanitizer() for correct asciidoc results -- tweaked snort.lua and snort_defaults.lua +-- updated usage 122 -- pulled thread pinning from Josh diff --git a/src/main/help.cc b/src/main/help.cc index 6f1289db3..2fc01aeec 100644 --- a/src/main/help.cc +++ b/src/main/help.cc @@ -123,12 +123,14 @@ void help_basic(SnortConfig*, const char*) exit(0); } -void help_usage(SnortConfig*, const char*) +void help_usage(SnortConfig*, const char* s) { fprintf(stdout, "usage:\n"); - fprintf(stdout, "%s [-options] -c conf [-T]: validate conf\n", "snort"); - fprintf(stdout, "%s [-options] -c conf -i iface: process live\n", "snort"); - fprintf(stdout, "%s [-options] -c conf -r pcap: process readback\n", "snort"); + fprintf(stdout, " %s -?: list options\n", s); + fprintf(stdout, " %s -V: output version\n", s); + fprintf(stdout, " %s [-options] -c conf [-T]: validate conf\n", s); + fprintf(stdout, " %s [-options] -c conf -i iface: process live\n", s); + fprintf(stdout, " %s [-options] -c conf -r pcap: process readback\n", s); exit(1); } diff --git a/src/parser/cmd_line.cc b/src/parser/cmd_line.cc index f22cb20c7..a347f1819 100644 --- a/src/parser/cmd_line.cc +++ b/src/parser/cmd_line.cc @@ -168,7 +168,7 @@ SnortConfig* parse_cmd_line(int argc, char* argv[]) } if ( !c ) - help_usage(sc, ""); + help_usage(sc, argv[0]); else check_flags(sc);