From: Jens Axboe Date: Thu, 1 Mar 2007 13:23:28 +0000 (+0100) Subject: Accept -foo as well as --foo for options X-Git-Tag: fio-1.13~12 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0be06ea2c87ecf1751a01ed528a2d3170bdca543 Accept -foo as well as --foo for options Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 19424243..2259edf5 100644 --- a/init.c +++ b/init.c @@ -1223,7 +1223,7 @@ static int parse_cmd_line(int argc, char *argv[]) struct thread_data *td = NULL; int c, ini_idx = 0, lidx, ret, dont_add_job = 0; - while ((c = getopt_long(argc, argv, "", long_options, &lidx)) != -1) { + while ((c = getopt_long_only(argc, argv, "", long_options, &lidx)) != -1) { switch (c) { case 't': def_timeout = atoi(optarg);