Commit b0ae5b53 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

ioping: don't print 'unknown option' twice, show usage

getopt() already emits warning about unknown option, so if we do that, too,
the result will look like this:

	$ ./ioping -z
	./ioping: invalid option -- 'z'
	ioping: unknown option: -z

Don't warn about unknown option, instead show usage().
Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
parent 70a194b7
...@@ -248,7 +248,7 @@ void parse_options(int argc, char **argv) ...@@ -248,7 +248,7 @@ void parse_options(int argc, char **argv)
path = optarg; path = optarg;
break; break;
case '?': case '?':
errx(1, "unknown option: -%c", optopt); usage();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment