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 <kusumi.tomohiro@xxxxxxxxx> --- init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/init.c b/init.c index 0a6766e..fb07daa 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.5.5 -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html