]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados: do not dump usage on invalid command
authorSage Weil <sage@inktank.com>
Tue, 1 Oct 2013 22:27:38 +0000 (15:27 -0700)
committerSage Weil <sage@inktank.com>
Tue, 1 Oct 2013 22:29:52 +0000 (15:29 -0700)
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 <sage@inktank.com>
src/tools/rados/rados.cc

index e8386959349ce541da602a4a59f0f4eb2481b311..fdf7e61d41e0a0e3cbb572b1b118d9ac1ec26fad 100644 (file)
@@ -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)