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-send.c | |
parent | 26b2f58d78e4fca92abbf7869f94d0938606d650 (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-send.c')
-rw-r--r-- | cmds-send.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmds-send.c b/cmds-send.c index 9d49ce9f..dcb66076 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -524,11 +524,8 @@ int cmd_send(int argc, char **argv) } } - if (optind == argc) { - fprintf(stderr, "ERROR: send needs path to snapshot\n"); - ret = 1; - goto out; - } + if (optind == argc) + usage(cmd_send_usage); if (outname != NULL) { send.dump_fd = creat(outname, 0600); |