From: Joel Becker Date: Thu, 1 Mar 2007 07:22:42 +0000 (+0100) Subject: [PATCH] parse.c: Make FIO_OPT_STR explicitly one value X-Git-Tag: fio-1.13~22 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ad231bc4f41a9756871455c69d05ea91f1adf727;ds=sidebyside [PATCH] parse.c: Make FIO_OPT_STR explicitly one value The original change had __handle_option() check !first to avoid parsing an FIO_OPT_STR a second time. However, the caller handle_option() has a more explicit check. Excluding FIO_OPT_STR there is much cleaner. Signed-off-by: Joel Becker Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index 11d745f1..d13a6033 100644 --- a/parse.c +++ b/parse.c @@ -197,9 +197,6 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, const struct value_pair *vp; int i; - if (!first) - break; - ret = 1; for (i = 0; i < PARSE_MAX_VP; i++) { vp = &o->posval[i]; @@ -366,7 +363,9 @@ static int handle_option(struct fio_option *o, const char *ptr, void *data) * Do this before parsing the first round, to check if we should * copy set 1 options to set 2. */ - if (ptr && (o->type != FIO_OPT_STR_STORE)) { + if (ptr && + (o->type != FIO_OPT_STR_STORE) && + (o->type != FIO_OPT_STR)) { ptr2 = strchr(ptr, ','); if (!ptr2) ptr2 = strchr(ptr, ':');