diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2014-02-13 11:16:35 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-03-21 06:23:15 -0700 |
commit | c3dcb083d95591204aacb8fcc261fd11bcc1511d (patch) | |
tree | b3a64fdaf7489f8626ec14629095f1fc8798dc81 /cmds-receive.c | |
parent | 26b2f58d78e4fca92abbf7869f94d0938606d650 (diff) | |
download | btrfs-progs-c3dcb083d95591204aacb8fcc261fd11bcc1511d.tar.gz btrfs-progs-c3dcb083d95591204aacb8fcc261fd11bcc1511d.tar.bz2 btrfs-progs-c3dcb083d95591204aacb8fcc261fd11bcc1511d.zip |
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.c | 6 |
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]; |