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;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1)
|
||||||
warnx(_("no variables specified"));
|
errx(EXIT_FAILURE, _("no variables specified\n"
|
||||||
Usage(stderr);
|
"Try `%s --help' for more information."),
|
||||||
}
|
program_invocation_short_name);
|
||||||
if (NameOnly && Quiet) {
|
if (NameOnly && Quiet)
|
||||||
warnx(_("options -N and -q can not coexist"));
|
errx(EXIT_FAILURE, _("options -N and -q cannot coexist\n"
|
||||||
Usage(stderr);
|
"Try `%s --help' for more information."),
|
||||||
}
|
program_invocation_short_name);
|
||||||
|
|
||||||
if (WriteMode || index(*argv, '='))
|
if (WriteMode || index(*argv, '='))
|
||||||
ReturnCode = WriteSetting(*argv);
|
ReturnCode = WriteSetting(*argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user