Skip to content

Commit

Permalink
runmodes: clear hint when runmode is not indicated
Browse files Browse the repository at this point in the history
Ticket: OISF#5711
  • Loading branch information
comfort619 committed Nov 4, 2023
1 parent c8a7204 commit 52aed8f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/suricata.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,13 +2358,12 @@ static int StartInternalRunMode(SCInstance *suri, int argc, char **argv)

static int FinalizeRunMode(SCInstance *suri, char **argv)
{
switch (suri->run_mode) {
case RUNMODE_UNKNOWN:
PrintUsage(argv[0]);
return TM_ECODE_FAILED;
default:
break;
if (suri->run_mode == RUNMODE_UNKNOWN) {
SCLogError("No capture mode specified as a command-line argument, specify one from the --list-runmodes.");
PrintUsage(argv[0]);
return TM_ECODE_FAILED;
}

/* Set the global run mode and offline flag. */
run_mode = suri->run_mode;

Expand Down

0 comments on commit 52aed8f

Please sign in to comment.