An option need not include ->posval[] entries
authorJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 07:54:06 +0000 (08:54 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 07:54:06 +0000 (08:54 +0100)
So only fail if we actually looked over some entries.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
parse.c

diff --git a/parse.c b/parse.c
index 7956575..21fb3c2 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -197,11 +197,11 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                const struct value_pair *vp;
                int i;
 
-               ret = 1;
                for (i = 0; i < PARSE_MAX_VP; i++) {
                        vp = &o->posval[i];
                        if (!vp->ival || vp->ival[0] == '\0')
                                break;
+                       ret = 1;
                        if (!strncmp(vp->ival, ptr, strlen(vp->ival))) {
                                ret = 0;
                                if (!o->off1)