From: Sage Weil Date: Tue, 1 Oct 2013 22:27:38 +0000 (-0700) Subject: rados: do not dump usage on invalid command X-Git-Tag: v0.71~45^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e33d331e3ad3ea24a4853cc9e286e5056ccfbb9;p=ceph.git rados: do not dump usage on invalid command I hate this; it makes it impossible to see that there was an error message. We made this same change a while back with rbd. Signed-off-by: Sage Weil --- diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index e8386959349c..fdf7e61d41e0 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -2235,8 +2235,9 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, } } else { - cerr << "unrecognized command " << nargs[0] << std::endl; - usage_exit(); + cerr << "unrecognized command " << nargs[0] << "; -h or --help for usage" << std::endl; + ret = -EINVAL; + goto out; } if (ret < 0)