From f1672e50c7f73cbdb1d9817e126c41a3db6d93ce Mon Sep 17 00:00:00 2001 From: Gui Hecheng Date: Wed, 16 Jul 2014 11:59:46 +0800 Subject: btrfs-progs: use check_argc_* to check arg number for all tools Since this patch: btrfs-progs: move the check_argc_* functions into utils.c All tools including the independent tools(e.g. btrfs-image, btrfs-convert) can share the convenience of the check_argc_* functions, so this patch adopt the argc check functions globally. Signed-off-by: Gui Hecheng Signed-off-by: David Sterba --- btrfs-debug-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'btrfs-debug-tree.c') diff --git a/btrfs-debug-tree.c b/btrfs-debug-tree.c index 36e1115c..e46500d8 100644 --- a/btrfs-debug-tree.c +++ b/btrfs-debug-tree.c @@ -174,8 +174,9 @@ int main(int ac, char **av) print_usage(); } } + set_argv0(av); ac = ac - optind; - if (ac != 1) + if (check_argc_exact(ac, 1)) print_usage(); info = open_ctree_fs_info(av[optind], 0, 0, OPEN_CTREE_PARTIAL); -- cgit v1.2.3