Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runmodes: clear hint when runmode is not indicated v4 #9743

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/suricata.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,12 +2358,11 @@ 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 "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the output of --list-runmodes to be pretty much useless right now, so I think that needs to be fixed first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add more context to this comment: the contributions in this PR are important, but before we can move on with them, we'll have to rethink what we want the --list-runmodes output to look like. We'll try to tackle that in the next couple days, then we'll get back to this task. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add more context to this comment: the contributions in this PR are important, but before we can move on with them, we'll have to rethink what we want the --list-runmodes output to look like. We'll try to tackle that in the next couple days, then we'll get back to this task. :)

Okay

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jufajardini is there another redmine ticket to link to https://redmine.openinfosecfoundation.org/issues/5711 (as it is blocking 5711) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@catenacyber Do you mean a ticket to refactor --list-runmodes? There is, now: https://redmine.openinfosecfoundation.org/issues/6572

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the ticket to add a suggestion.

"--list-runmodes.");
PrintUsage(argv[0]);
return TM_ECODE_FAILED;
}
/* Set the global run mode and offline flag. */
run_mode = suri->run_mode;
Expand Down