From: Jens Axboe Date: Wed, 10 Apr 2013 11:05:23 +0000 (+0200) Subject: parse: catch all options without a group/category set X-Git-Tag: fio-2.1~57^2~5 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=22754746e5dc2552f0c7b995a2095b5723119784;ds=sidebyside parse: catch all options without a group/category set Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index e8ad0a51..927f78bd 100644 --- a/parse.c +++ b/parse.c @@ -1168,6 +1168,10 @@ void option_init(struct fio_option *o) } if (!o->cb && (!o->off1 && !o->roff1)) log_err("Option %s: neither cb nor offset given\n", o->name); + if (!o->category) { + log_info("Options %s: no category defined. Setting to misc\n", o->name); + o->category = FIO_OPT_C_GENERAL; + } if (o->type == FIO_OPT_STR || o->type == FIO_OPT_STR_STORE || o->type == FIO_OPT_STR_MULTI) return; @@ -1175,10 +1179,6 @@ void option_init(struct fio_option *o) (o->roff1 || o->roff2 || o->roff3 || o->roff4))) { log_err("Option %s: both cb and offset given\n", o->name); } - if (!o->category) { - log_info("Options %s: no category defined. Setting to misc\n", o->name); - o->category = FIO_OPT_C_GENERAL; - } } /*