]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
tweaked usage
authorRuss Combs <rucombs@cisco.com>
Sat, 4 Oct 2014 02:26:39 +0000 (22:26 -0400)
committerRuss Combs <rucombs@cisco.com>
Sat, 4 Oct 2014 02:26:39 +0000 (22:26 -0400)
ChangeLog
src/main/help.cc
src/parser/cmd_line.cc

index 80909ae87f79aeda4ac6dca3a1f85b265265da91..bb32f8f60d78fb4c064b3cd97bc4fb23cb4edd07 100644 (file)
--- 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
index 6f1289db36876b9ed5f90acbdd7dcd1e038a12b9..2fc01aeec90932b6df49e32d5598973d5515f038 100644 (file)
@@ -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);
 }
 
index f22cb20c7a9dfa266b6d8bc61b36b09217a949fa..a347f1819e436320764825ab244489d5fdff44e4 100644 (file)
@@ -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);