Remove SetupResult::parse_only field

For parity with other setup() behavior to simply call exit() directly.
This commit is contained in:
Jon Siwek 2020-12-13 13:33:50 -08:00
parent 2219a03344
commit 09d12c3716
3 changed files with 1 additions and 5 deletions

View file

@ -15,9 +15,6 @@ int main(int argc, char** argv)
if ( setup_result.code ) if ( setup_result.code )
return setup_result.code; return setup_result.code;
if ( setup_result.parse_only )
return 0;
auto& options = setup_result.options; auto& options = setup_result.options;
auto do_net_run = zeek::iosource_mgr->Size() > 0 || auto do_net_run = zeek::iosource_mgr->Size() > 0 ||
zeek::run_state::detail::have_pending_timers || zeek::run_state::detail::have_pending_timers ||

View file

@ -787,7 +787,7 @@ SetupResult setup(int argc, char** argv, Options* zopts)
if ( analysis_options.report_recursive ) if ( analysis_options.report_recursive )
// This option is report-and-exit. // This option is report-and-exit.
return {0, std::move(options), true}; exit(0);
if ( dns_type != DNS_PRIME ) if ( dns_type != DNS_PRIME )
run_state::detail::init_run(options.interface, options.pcap_file, options.pcap_output_file, options.use_watchdog); run_state::detail::init_run(options.interface, options.pcap_file, options.pcap_output_file, options.use_watchdog);

View file

@ -9,7 +9,6 @@ namespace zeek::detail {
struct SetupResult { struct SetupResult {
int code = 0; int code = 0;
Options options; Options options;
bool parse_only = false;
}; };
/** /**