From 86da12ff869823f4dae20488f3bedeae4a55086d Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Thu, 20 Feb 2014 09:30:51 +0800 Subject: Btrfs-progs: switch to arg_strtou64() part2 Signed-off-by: Wang Shilong Signed-off-by: David Sterba Signed-off-by: Chris Mason --- btrfs-image.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'btrfs-image.c') diff --git a/btrfs-image.c b/btrfs-image.c index 1b2831a..1fc641f 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -2463,8 +2463,8 @@ int main(int argc, char *argv[]) { char *source; char *target; - int num_threads = 0; - int compress_level = 0; + u64 num_threads = 0; + u64 compress_level = 0; int create = 1; int old_restore = 0; int walk_trees = 0; @@ -2483,13 +2483,13 @@ int main(int argc, char *argv[]) create = 0; break; case 't': - num_threads = atoi(optarg); - if (num_threads <= 0 || num_threads > 32) + num_threads = arg_strtou64(optarg); + if (num_threads > 32) print_usage(); break; case 'c': - compress_level = atoi(optarg); - if (compress_level < 0 || compress_level > 9) + compress_level = arg_strtou64(optarg); + if (compress_level > 9) print_usage(); break; case 'o': -- cgit v1.2.1