From: Tomohiro Kusumi Date: Mon, 8 Aug 2016 17:27:27 +0000 (+0900) Subject: Change --output-format argument from optional to required X-Git-Tag: fio-2.14~48 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d2c87a78b4d73911982b8a691f8c07ff9afc5119;ds=inline Change --output-format argument from optional to required Not sure if there were any reason d10983d7 chose to add if(!optarg) conditional, but this is what other fio options (or in general) do. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 0a6766e3..fb07daad 100644 --- a/init.c +++ b/init.c @@ -114,7 +114,7 @@ static struct option l_opts[FIO_NR_OPTIONS] = { }, { .name = (char *) "output-format", - .has_arg = optional_argument, + .has_arg = required_argument, .val = 'F' | FIO_CLIENT_FLAG, }, { @@ -2352,12 +2352,6 @@ int parse_cmd_line(int argc, char *argv[], int client_type) output_format = FIO_OUTPUT_TERSE; break; case 'F': - if (!optarg) { - log_err("fio: missing --output-format argument\n"); - exit_val = 1; - do_exit++; - break; - } if (parse_output_format(optarg)) { log_err("fio: failed parsing output-format\n"); exit_val = 1;