From: Gui Hecheng Date: Thu, 4 Sep 2014 03:09:24 +0000 (+0800) Subject: btrfs-progs: remove wrong set_argv0 for restore X-Git-Tag: upstream/4.16.1~2707 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2a97ca131e77bc600e67a857e9efbc5d646f461;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: remove wrong set_argv0 for restore Before this patch, you could see the following after exec restore # :too few arguments The tool name "btrfs restore" is missing. The @set_argv0() function is introduced by: commit a184abc70f7b1468e6036ab576f1587ee0574668 btrfs-progs: move the check_argc_* functions into utils.c ... Also add a new function "set_argv0" to set the correct tool name: *btrfs-image*: too few arguments But @set_argv0() only applies to the independent tools with the name pattern btrfs-***. Since restore is now is subcommand under "btrfs", there is no need to use @set_argv0() before check_argc_* to repair the prompt tool name before "too few arguments". Signed-off-by: Gui Hecheng Signed-off-by: David Sterba --- diff --git a/cmds-restore.c b/cmds-restore.c index f909429..38a131e 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -1229,7 +1229,6 @@ int cmd_restore(int argc, char **argv) } } - set_argv0(argv); if (!list_roots && check_argc_min(argc - optind, 2)) usage(cmd_restore_usage); else if (list_roots && check_argc_min(argc - optind, 1))