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@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
},
{
.name = (char *) "output-format",
},
{
.name = (char *) "output-format",
- .has_arg = optional_argument,
+ .has_arg = required_argument,
.val = 'F' | FIO_CLIENT_FLAG,
},
{
.val = 'F' | FIO_CLIENT_FLAG,
},
{
output_format = FIO_OUTPUT_TERSE;
break;
case 'F':
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;
if (parse_output_format(optarg)) {
log_err("fio: failed parsing output-format\n");
exit_val = 1;