mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Minor tweaks to single-character command line option handling
- Use of "-B" now triggers usage output and errors out when Zeek wasn't built with debugging support. - Always keep the perftools options (-m, -M) in the optparse string, for consistency with other flags dependent on configuration. We still fall through to usage and erroring out as before. - Minor indentation fix.
This commit is contained in:
parent
b04c611058
commit
a2e5251796
1 changed files with 7 additions and 7 deletions
|
@ -350,13 +350,9 @@ Options parse_cmdline(int argc, char** argv)
|
|||
};
|
||||
|
||||
char opts[256];
|
||||
util::safe_strncpy(opts, "B:e:f:G:H:I:i:j::n:O:o:p:r:s:T:t:U:w:X:CDFNPQSWabdhuv",
|
||||
util::safe_strncpy(opts, "B:e:f:G:H:I:i:j::n:O:o:p:r:s:T:t:U:w:X:CDFMNPQSWabdhmuv",
|
||||
sizeof(opts));
|
||||
|
||||
#ifdef USE_PERFTOOLS_DEBUG
|
||||
strncat(opts, "mM", 2);
|
||||
#endif
|
||||
|
||||
int op;
|
||||
int long_optsind;
|
||||
opterr = 0;
|
||||
|
@ -444,9 +440,13 @@ Options parse_cmdline(int argc, char** argv)
|
|||
case 'w':
|
||||
rval.pcap_output_file = optarg;
|
||||
break;
|
||||
|
||||
#ifdef DEBUG
|
||||
case 'B':
|
||||
rval.debug_log_streams = optarg;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 'C':
|
||||
rval.ignore_checksums = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue