parse: warn if option is missing a long option variant
authorJens Axboe <axboe@fb.com>
Mon, 23 May 2016 16:39:16 +0000 (10:39 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 23 May 2016 16:39:16 +0000 (10:39 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
parse.c

diff --git a/parse.c b/parse.c
index ec0f8707344191e51d03860f35345456e4717272..963f1f8cdc1f25f26a77a4471aa04a7c617fa43f 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -1234,6 +1234,8 @@ void option_init(struct fio_option *o)
 {
        if (o->type == FIO_OPT_DEPRECATED)
                return;
 {
        if (o->type == FIO_OPT_DEPRECATED)
                return;
+       if (o->name && !o->lname)
+               log_err("Option %s: missing long option name\n", o->name);
        if (o->type == FIO_OPT_BOOL) {
                o->minval = 0;
                o->maxval = 1;
        if (o->type == FIO_OPT_BOOL) {
                o->minval = 0;
                o->maxval = 1;