From c3dcb083d95591204aacb8fcc261fd11bcc1511d Mon Sep 17 00:00:00 2001 From: Gui Hecheng Date: Thu, 13 Feb 2014 11:16:35 +0800 Subject: btrfs-progs: use usage() to replace the warning msg on no-arg usage To be consistent with the other cmds, replace the warning msg with usage() when send/receive are used without any args. Signed-off-by: Gui Hecheng Signed-off-by: David Sterba Signed-off-by: Chris Mason --- cmds-receive.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmds-receive.c') diff --git a/cmds-receive.c b/cmds-receive.c index 2d55c539..d6cd3da4 100644 --- a/cmds-receive.c +++ b/cmds-receive.c @@ -951,10 +951,8 @@ int cmd_receive(int argc, char **argv) } } - if (optind + 1 != argc) { - fprintf(stderr, "ERROR: receive needs path to subvolume\n"); - return 1; - } + if (check_argc_exact(argc - optind, 1)) + usage(cmd_receive_usage); tomnt = argv[optind]; -- cgit v1.2.3