From ff523a66e5af357e67602caf33de1e2cd0521b08 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 25 Oct 2017 13:06:40 -0600 Subject: [PATCH] parse: minimum options values are signed Rebecca reports that using an invalid value for the nice parameter yields: min value out of range: 18446744073709551596 (4294967277 min) where it really should be: min value out of range: -20 (-19 min) Print the minimum values as signed, if we hit the out-of-range error. Signed-off-by: Jens Axboe --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.c b/parse.c index ecce8b89..68229d05 100644 --- a/parse.c +++ b/parse.c @@ -556,8 +556,8 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, return 1; } if (o->minval && ull < o->minval) { - log_err("min value out of range: %llu" - " (%u min)\n", ull, o->minval); + log_err("min value out of range: %lld" + " (%d min)\n", ull, o->minval); return 1; } if (o->posval[0].ival) { -- 2.25.1