parse: catch all options without a group/category set
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Apr 2013 11:05:23 +0000 (13:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Apr 2013 11:05:23 +0000 (13:05 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
parse.c

diff --git a/parse.c b/parse.c
index e8ad0a5183162bcf37edec496e4781c5c79344e0..927f78bd97bf3d8db4953781bc60b158a11fe731 100644 (file)
--- 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;
-       }
 }
 
 /*