Commit bfadda82 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

ioping -h should exit with 0

-h is a valid option, so...
Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
parent 1d1118a7
...@@ -58,7 +58,6 @@ void usage(void) ...@@ -58,7 +58,6 @@ void usage(void)
" -q suppress human-readable output\n" " -q suppress human-readable output\n"
"\n" "\n"
); );
exit(1);
} }
struct suffix { struct suffix {
...@@ -196,13 +195,16 @@ void parse_options(int argc, char **argv) ...@@ -196,13 +195,16 @@ void parse_options(int argc, char **argv)
{ {
int opt; int opt;
if (argc < 2) if (argc < 2) {
usage(); usage();
exit(1);
}
while ((opt = getopt(argc, argv, "-hLDCqi:w:s:S:c:o:p:")) != -1) { while ((opt = getopt(argc, argv, "-hLDCqi:w:s:S:c:o:p:")) != -1) {
switch (opt) { switch (opt) {
case 'h': case 'h':
usage(); usage();
exit(0);
case 'L': case 'L':
randomize = 0; randomize = 0;
break; break;
...@@ -246,6 +248,7 @@ void parse_options(int argc, char **argv) ...@@ -246,6 +248,7 @@ void parse_options(int argc, char **argv)
break; break;
case '?': case '?':
usage(); usage();
exit(1);
} }
} }
......
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