[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 <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/parse.c b/parse.c
index 11d745f..d13a603 100644
--- a/parse.c
+++ b/parse.c
@@ -197,9 +197,6 @@
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 @@
* 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, ':');