summaryrefslogtreecommitdiff
path: root/cmds-receive.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2014-02-13 11:16:35 +0800
committerChris Mason <clm@fb.com>2014-03-21 06:23:15 -0700
commitc3dcb083d95591204aacb8fcc261fd11bcc1511d (patch)
treeb3a64fdaf7489f8626ec14629095f1fc8798dc81 /cmds-receive.c
parent26b2f58d78e4fca92abbf7869f94d0938606d650 (diff)
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 <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'cmds-receive.c')
-rw-r--r--cmds-receive.c6
1 files changed, 2 insertions, 4 deletions
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];