diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-27 21:07:05 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-28 03:22:59 +0000 |
commit | 7ddfee9aead225465cbcdd5a29d7af5332bdccb7 (patch) | |
tree | 042f49b16765b003a44a741a301ad461dceeac7a | |
parent | 7c9ec1d13cdb29725c6d093b7cb21357fd43b5f9 (diff) |
tshark: Use -G help instead of -G ?
Not all platforms handle ? or -? *predictably* at the command line.
As long as "?" isn't replaced with a file name, it works, but if it
gets replaced by a file name...
Bug: 13984
Change-Id: I4496bb27fdef121967e7baf7b7f4a1bb0a44b00a
Reviewed-on: https://code.wireshark.org/review/24125
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | tshark.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -466,7 +466,7 @@ print_usage(FILE *output) fprintf(output, " -K <keytab> keytab file to use for kerberos decryption\n"); fprintf(output, " -G [report] dump one of several available reports and exit\n"); fprintf(output, " default report=\"fields\"\n"); - fprintf(output, " use \"-G ?\" for more help\n"); + fprintf(output, " use \"-G help\" for more help\n"); #ifdef __linux__ fprintf(output, "\n"); fprintf(output, "WARNING: dumpcap will enable kernel BPF JIT compiler if available.\n"); @@ -1005,12 +1005,18 @@ main(int argc, char *argv[]) proto_registrar_dump_protocols(); else if (strcmp(argv[2], "values") == 0) proto_registrar_dump_values(); + else if (strcmp(argv[2], "help") == 0) + glossary_option_help(); + /* These are supported only for backwards compatibility and may or may not work + * for a given user in a given directory on a given operating system with a given + * command-line interpreter. + */ else if (strcmp(argv[2], "?") == 0) glossary_option_help(); else if (strcmp(argv[2], "-?") == 0) glossary_option_help(); else { - cmdarg_err("Invalid \"%s\" option for -G flag, enter -G ? for more help.", argv[2]); + cmdarg_err("Invalid \"%s\" option for -G flag, enter -G help for more help.", argv[2]); exit_status = INVALID_OPTION; goto clean_exit; } |