[PATCH 2/2 v2][xfstests] fstrim: Use strtoull instead of strtoul
Lukas Czerner
lczerner at redhat.com
Wed Sep 7 10:48:43 CDT 2011
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 at redhat.com>
---
v2: nothing has changed
src/fstrim.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/fstrim.c b/src/fstrim.c
index f1f37ec..e23bcb3 100644
--- a/src/fstrim.c
+++ b/src/fstrim.c
@@ -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);
--
1.7.4.4
More information about the xfs
mailing list