From: Jens Axboe Date: Wed, 25 Oct 2017 19:06:40 +0000 (-0600) Subject: parse: minimum options values are signed X-Git-Tag: fio-3.2~24 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ff523a66e5af357e67602caf33de1e2cd0521b08 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 --- 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) {