summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-03-10 08:57:34 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-03-10 08:57:34 +0100
commit903dc3f6f7a44b17f09152a4fd9a2e2d767cc2cc (patch)
tree200599ea7e722d5e77993e9932a08a8d09967199
parent6b7f68516d785163bf76565c1635012f66b9f51f (diff)
downloadfio-903dc3f6f7a44b17f09152a4fd9a2e2d767cc2cc.tar.gz
fio-903dc3f6f7a44b17f09152a4fd9a2e2d767cc2cc.tar.bz2
Fix integer store bug in parser
With commit f7fa2653589f9ecf0d3d106286f17620bcf32de0 I forgot to check the type, so we would mis-store on platforms where sizeof(int) is different from sizeof(long). Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index a8f42e1d..7dc5fcc8 100644
--- a/parse.c
+++ b/parse.c
@@ -304,7 +304,8 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
if (fn)
ret = fn(data, &ull);
else {
- if (o->type == FIO_OPT_STR_VAL_INT) {
+ if (o->type == FIO_OPT_STR_VAL_INT ||
+ o->type == FIO_OPT_INT) {
if (first)
val_store(ilp, ull, o->off1, data);
if (!more && o->off2)