From: Jens Axboe Date: Thu, 19 Apr 2007 07:53:28 +0000 (+0200) Subject: Fix command line parsing bug X-Git-Tag: fio-1.16~3 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=3106f220e1710d7e53cb7bd0dbc7dac4584af463 Fix command line parsing bug The first parameters are for the global job, if no --name section has been seen yet. We don't require a --name=global section to appear first. Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index da2595c7..b62c3972 100644 --- a/init.c +++ b/init.c @@ -790,7 +790,11 @@ static int parse_cmd_line(int argc, char *argv[]) td = NULL; } if (!td) { - int global = !strncmp(val, "global", 6); + int global = 0; + + if (strncmp(opt, "name", 4) || + !strncmp(val, "global", 6)) + global = 1; td = get_new_job(global, &def_thread); if (!td)