commit | 798827c895a585f284842f6b99378be19c821263 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Wed Jan 23 18:11:48 2013 -0700 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Jan 23 18:11:48 2013 -0700 |
tree | ab51eb28635cb49cb77787d7c2342fe451b668f7 | |
parent | 1f81991ed356dd7257aef2c715ba9a24d9af93a5 [diff] [blame] |
init: complain on unrecognized option with builtin getopt_long_only() It returns '?' for a bad option, whereas the glibc one does not. Catch that so we behave identically. Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/init.c b/init.c index d22ed5f..fca74fe 100644 --- a/init.c +++ b/init.c
@@ -1641,6 +1641,9 @@ do_exit++; exit_val = fio_monotonic_clocktest(); break; + case '?': + log_err("%s: unrecognized option '%s'\n", argv[0], + argv[optind - 1]); default: do_exit++; exit_val = 1;