gceph: add -h argument

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
This commit is contained in:
Colin Patrick McCabe 2010-12-10 20:15:25 -08:00
parent b4ceb19472
commit 1a201f85e4

View File

@ -34,6 +34,16 @@ static void usage()
generic_client_usage(); // Will exit()
}
static void parse_gceph_args(const vector<const char*> &args)
{
DEFINE_CONF_VARS(usage);
FOR_EACH_ARG(args) {
if (CONF_ARG_EQ("help", 'h')) {
usage();
}
}
}
static int cephtool_run_gui()
{
g.log = &gss;
@ -63,6 +73,8 @@ int main(int argc, const char **argv)
vec_to_argv(args, argc, argv);
parse_gceph_args(args);
if (cephtool_common_init(CEPH_TOOL_MODE_GUI)) {
cerr << "cephtool_common_init failed." << std::endl;
return 1;