parse: catch all options without a group/category set
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/parse.c b/parse.c
index e8ad0a5..927f78b 100644
--- a/parse.c
+++ b/parse.c
@@ -1168,6 +1168,10 @@
}
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 @@
(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;
- }
}
/*