From: Eric Leblond Date: Wed, 10 Feb 2021 16:28:18 +0000 (+0100) Subject: suricata: return error value of custom run modes X-Git-Tag: suricata-7.0.0-beta1~1815 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e4af5a0913af70996dab30224461a4843cc99e1;p=thirdparty%2Fsuricata.git suricata: return error value of custom run modes --- diff --git a/src/suricata.c b/src/suricata.c index 4fc13d3b18..5b80e974a0 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2085,15 +2085,13 @@ static int StartInternalRunMode(SCInstance *suri, int argc, char **argv) /* Treat internal running mode */ switch(suri->run_mode) { case RUNMODE_LIST_KEYWORDS: - ListKeywords(suri->keyword_info); - return TM_ECODE_DONE; + return ListKeywords(suri->keyword_info); case RUNMODE_LIST_APP_LAYERS: if (suri->conf_filename != NULL) { - ListAppLayerProtocols(suri->conf_filename); + return ListAppLayerProtocols(suri->conf_filename); } else { - ListAppLayerProtocols(DEFAULT_CONF_FILE); + return ListAppLayerProtocols(DEFAULT_CONF_FILE); } - return TM_ECODE_DONE; case RUNMODE_PRINT_VERSION: PrintVersion(); return TM_ECODE_DONE;