sysctl: exit with error message instead of usage()
Printing usage() output at error is too noisy. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
127c82763a
commit
7f99096ded
16
sysctl.c
16
sysctl.c
@ -690,14 +690,14 @@ int main(int argc, char *argv[])
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (argc < 1) {
|
||||
warnx(_("no variables specified"));
|
||||
Usage(stderr);
|
||||
}
|
||||
if (NameOnly && Quiet) {
|
||||
warnx(_("options -N and -q can not coexist"));
|
||||
Usage(stderr);
|
||||
}
|
||||
if (argc < 1)
|
||||
errx(EXIT_FAILURE, _("no variables specified\n"
|
||||
"Try `%s --help' for more information."),
|
||||
program_invocation_short_name);
|
||||
if (NameOnly && Quiet)
|
||||
errx(EXIT_FAILURE, _("options -N and -q cannot coexist\n"
|
||||
"Try `%s --help' for more information."),
|
||||
program_invocation_short_name);
|
||||
|
||||
if (WriteMode || index(*argv, '='))
|
||||
ReturnCode = WriteSetting(*argv);
|
||||
|
Loading…
Reference in New Issue
Block a user