From: Jens Axboe Date: Wed, 27 Nov 2013 03:19:59 +0000 (-0700) Subject: init: allow FIO_OPT_STR_SET options to have an optional argument X-Git-Tag: fio-2.1.5~49 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ff52be3d9ff93cc5e823a75c41d48f62f842feb8 init: allow FIO_OPT_STR_SET options to have an optional argument Makes them work like a bool. Signed-off-by: Jens Axboe --- diff --git a/options.c b/options.c index 4b4c251b..a700e4da 100644 --- a/options.c +++ b/options.c @@ -3277,7 +3277,7 @@ static void add_to_lopt(struct option *lopt, struct fio_option *o, lopt->name = (char *) name; lopt->val = val; if (o->type == FIO_OPT_STR_SET) - lopt->has_arg = no_argument; + lopt->has_arg = optional_argument; else lopt->has_arg = required_argument; }