From d2c87a78b4d73911982b8a691f8c07ff9afc5119 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 9 Aug 2016 02:27:27 +0900 Subject: [PATCH] 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 --- init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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; -- 2.25.1