parse: don't print min/max option ranges if posval[] is set
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index dddcb8e51cc007634c60050de0a812f7518ca8c1..f00a66b72ae7f38371694816e33b82b7533e43f3 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -50,7 +50,7 @@ static void posval_sort(struct fio_option *o, struct value_pair *vpmap)
 static void show_option_range(struct fio_option *o,
                                int (*logger)(const char *format, ...))
 {
-       if (o->type == FIO_OPT_FLOAT_LIST){
+       if (o->type == FIO_OPT_FLOAT_LIST) {
                if (o->minfp == DBL_MIN && o->maxfp == DBL_MAX)
                        return;
 
@@ -58,7 +58,7 @@ static void show_option_range(struct fio_option *o,
                if (o->maxfp != DBL_MAX)
                        logger(", max=%f", o->maxfp);
                logger("\n");
-       } else {
+       } else if (!o->posval[0].ival) {
                if (!o->minval && !o->maxval)
                        return;
 
@@ -479,7 +479,8 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                                }
                        }
                        if (ret) {
-                               log_err("value %d not in allowed range\n",ull);
+                               log_err("fio: value %llu not allowed:\n", ull);
+                               show_option_values(o);
                                return 1;
                        }
                }