Merge branch 'fio-docs-ci' of https://github.com/vincentkfu/fio
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 45f4f2d3dd6db800f4f8e11a168c8ef36e788d3b..d086ee488f956048ff654082e8717ed49f5347df 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -477,13 +477,17 @@ static int check_int(const char *p, int *val)
 
 static size_t opt_len(const char *str)
 {
+       char delimiter[] = {',', ':'};
        char *postfix;
+       unsigned int i;
 
-       postfix = strchr(str, ':');
-       if (!postfix)
-               return strlen(str);
+       for (i = 0; i < FIO_ARRAY_SIZE(delimiter); i++) {
+               postfix = strchr(str, delimiter[i]);
+               if (postfix)
+                       return (int)(postfix - str);
+       }
 
-       return (int)(postfix - str);
+       return strlen(str);
 }
 
 static int str_match_len(const struct value_pair *vp, const char *str)