aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-image.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-02-20 09:30:51 +0800
committerChris Mason <clm@fb.com>2014-03-21 06:23:19 -0700
commit86da12ff869823f4dae20488f3bedeae4a55086d (patch)
tree66560bfd39e7a55ef613182f1abc6be10a1f21d5 /btrfs-image.c
parentaab2f48c189bb89b71851edbb57e9074405a6262 (diff)
downloadbtrfs-progs-86da12ff869823f4dae20488f3bedeae4a55086d.tar.gz
btrfs-progs-86da12ff869823f4dae20488f3bedeae4a55086d.tar.xz
btrfs-progs-86da12ff869823f4dae20488f3bedeae4a55086d.zip
Btrfs-progs: switch to arg_strtou64() part2
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r--btrfs-image.c12
1 files changed, 6 insertions, 6 deletions
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':