Unify gauss and zipf/pareto input values
[fio.git] / options.c
index 1857d4115f9a80234ec8aec2bb4a591405448a70..95e0e0c92f4c4df6fac94b97be9c9034187c3c03 100644 (file)
--- a/options.c
+++ b/options.c
@@ -744,8 +744,13 @@ static int str_random_distribution_cb(void *data, const char *str)
                        return 1;
                }
                td->o.pareto_h.u.f = val;
-       } else
-               td->o.gauss_dev = val;
+       } else {
+               if (val <= 0.00 || val >= 100.0) {
+                       log_err("fio: normal deviation out of range (0 < input < 100.0)\n");
+                       return 1;
+               }
+               td->o.gauss_dev.u.f = val;
+       }
 
        return 0;
 }