[PATCH] Change timeout to runtime and rearrange option entries
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 1e709ddbcb0dda56383ed557954e83d388aed3c1..886bde6b0c8b1130050234b40c7d047df602cba4 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -56,8 +56,8 @@ static int str_to_decimal(const char *str, long long *val, int kilo)
        if (!len)
                return 1;
 
-       *val = strtoul(str, NULL, 10);
-       if (*val == ULONG_MAX && errno == ERANGE)
+       *val = strtol(str, NULL, 10);
+       if (*val == LONG_MAX && errno == ERANGE)
                return 1;
 
        if (kilo)
@@ -132,6 +132,8 @@ static struct fio_option *find_option(struct fio_option *options,
        while (o->name) {
                if (!strcmp(o->name, opt))
                        return o;
+               else if (o->alias && !strcmp(o->alias, opt))
+                       return o;
 
                o++;
        }