fstrim: Use strtoull instead of strtoul

When we are parsing input arguments we should really use stroull to get
unsigned long long numbers, since this is what we can specify on the
command line. With this fix it should parse long numbers on the 32 bit
architecture correctly.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Lukas Czerner
2011-09-07 15:48:43 +00:00
committed by Alex Elder
parent 314b221201
commit 2cede87d20
+1 -1
View File
@@ -97,7 +97,7 @@ static unsigned long long get_number(char **optarg)
}
errno = 0;
number = strtoul(opt, &end , 0);
number = strtoull(opt, &end , 0);
if (errno)
err_exit("%s: %s (%s)\n", program_name,
strerror(errno), *optarg);