[PATCH] Size parse should use strtoll()
authorJens Axboe <jens.axboe@oracle.com>
Sat, 10 Feb 2007 18:01:07 +0000 (19:01 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 10 Feb 2007 18:01:07 +0000 (19:01 +0100)
It's a 64-bit quantity, found out when the size= option quit too early
for large non-postfixed values.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
parse.c

diff --git a/parse.c b/parse.c
index cab6ca727d37005641afd36f83835dccf82101f5..b09f20d714d4a8475dcaac682dbcf4ba0e385b36 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -56,7 +56,7 @@ static int str_to_decimal(const char *str, long long *val, int kilo)
        if (!len)
                return 1;
 
-       *val = strtol(str, NULL, 10);
+       *val = strtoll(str, NULL, 10);
        if (*val == LONG_MAX && errno == ERANGE)
                return 1;