From 64fddab8ac0ad7970cf713cfecba5ab6ae90b09c Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Thu, 20 Feb 2014 09:30:52 +0800 Subject: Btrfs-progs: switch to arg_strtou64() part3 Switch to new helper arg_strtou64(), also check if user assign a valid super copy. Signed-off-by: Wang Shilong Signed-off-by: David Sterba Signed-off-by: Chris Mason --- cmds-replace.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'cmds-replace.c') diff --git a/cmds-replace.c b/cmds-replace.c index c683d6c4..01ab77c9 100644 --- a/cmds-replace.c +++ b/cmds-replace.c @@ -210,12 +210,7 @@ static int cmd_start_replace(int argc, char **argv) struct btrfs_ioctl_fs_info_args fi_args; struct btrfs_ioctl_dev_info_args *di_args = NULL; - if (atoi(srcdev) == 0) { - fprintf(stderr, "Error: Failed to parse the numerical devid value '%s'\n", - srcdev); - goto leave_with_error; - } - start_args.start.srcdevid = (__u64)atoi(srcdev); + start_args.start.srcdevid = arg_strtou64(srcdev); ret = get_fs_info(path, &fi_args, &di_args); if (ret) { -- cgit v1.2.3