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-send.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cmds-send.c') 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); -- cgit v1.2.3