X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=init.c;h=442dab427365b2d74d19b12ef495124a56579782;hb=ebd9b4dd690808f720712b9c1a1288ae0742f361;hp=f7d702f849c7c39797912c8d7774b0fc6dccf908;hpb=c49cfc76551bab92d7fd0cd936ffcc901e59fb61;p=fio.git diff --git a/init.c b/init.c index f7d702f8..442dab42 100644 --- a/init.c +++ b/init.c @@ -916,12 +916,6 @@ static int fixup_options(struct thread_data *td) ret |= 1; } - /* - * O_ATOMIC implies O_DIRECT - */ - if (o->oatomic) - o->odirect = 1; - /* * If randseed is set, that overrides randrepeat */ @@ -1411,15 +1405,14 @@ static void gen_log_name(char *name, size_t size, const char *logtype, static int check_waitees(char *waitee) { - struct thread_data *td; - int i, ret = 0; + int ret = 0; - for_each_td(td, i) { + for_each_td(td) { if (td->subjob_number) continue; ret += !strcmp(td->o.name, waitee); - } + } end_for_each(); return ret; } @@ -1454,10 +1447,7 @@ static bool wait_for_ok(const char *jobname, struct thread_options *o) static int verify_per_group_options(struct thread_data *td, const char *jobname) { - struct thread_data *td2; - int i; - - for_each_td(td2, i) { + for_each_td(td2) { if (td->groupid != td2->groupid) continue; @@ -1467,7 +1457,7 @@ static int verify_per_group_options(struct thread_data *td, const char *jobname) jobname); return 1; } - } + } end_for_each(); return 0; } @@ -2269,7 +2259,7 @@ static void usage(const char *name) printf(" --minimal\t\tMinimal (terse) output\n"); printf(" --output-format=type\tOutput format (terse,json,json+,normal)\n"); printf(" --terse-version=type\tSet terse version output format" - " (default 3, or 2 or 4)\n"); + " (default 3, or 2 or 4 or 5)\n"); printf(" --version\t\tPrint version info and exit\n"); printf(" --help\t\tPrint this page\n"); printf(" --cpuclock-test\tPerform test/validation of CPU clock\n"); @@ -2810,6 +2800,15 @@ int parse_cmd_line(int argc, char *argv[], int client_type) break; ret = fio_cmd_ioengine_option_parse(td, opt, val); + + if (ret) { + if (td) { + put_job(td); + td = NULL; + } + do_exit++; + exit_val = 1; + } break; } case 'w':