parse: print option name for out-of-range settings
authorJens Axboe <axboe@kernel.dk>
Wed, 26 Sep 2018 01:14:22 +0000 (19:14 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Sep 2018 01:14:22 +0000 (19:14 -0600)
Right now we just say we're out of range:

max value out of range: 18446744073709551612 (4294967295 max)

but we don't actually say which option this is. Add that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
parse.c

diff --git a/parse.c b/parse.c
index 5d88d91..196de15 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -596,13 +596,13 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
                }
 
                if (o->maxval && ull > o->maxval) {
-                       log_err("max value out of range: %llu"
-                                       " (%llu max)\n", ull, o->maxval);
+                       log_err("%s: max value out of range: %llu"
+                               " (%llu max)\n", o->name, ull, o->maxval);
                        return 1;
                }
                if (o->minval && ull < o->minval) {
-                       log_err("min value out of range: %lld"
-                                       " (%d min)\n", ull, o->minval);
+                       log_err("%s: min value out of range: %lld"
+                               " (%d min)\n", o->name, ull, o->minval);
                        return 1;
                }
                if (o->posval[0].ival) {