summaryrefslogtreecommitdiff
path: root/src/rbd.cc
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2011-06-21 20:34:42 -0700
committerSage Weil <sage@newdream.net>2011-06-22 09:34:38 -0700
commita422d1a5b17bf6c606ef3df903e58533b0652564 (patch)
tree97f7c31138f795d2ac4f2596923d7a2eb2bf93a8 /src/rbd.cc
parentbfe0d55c8f734e985046a02fb2126bf601b1a353 (diff)
downloadceph-a422d1a5b17bf6c606ef3df903e58533b0652564.tar.gz
rbd: --help/-h
Diffstat (limited to 'src/rbd.cc')
-rw-r--r--src/rbd.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rbd.cc b/src/rbd.cc
index 94f8e7b1894..cde5b60ae74 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -833,7 +833,10 @@ int main(int argc, const char **argv)
const char *imgname = NULL, *snapname = NULL, *destname = NULL, *dest_poolname = NULL, *path = NULL, *secretfile = NULL, *user = NULL, *devpath = NULL;
bool is_snap_cmd = false;
FOR_EACH_ARG(args) {
- if (CEPH_ARGPARSE_EQ("pool", 'p')) {
+ if (CEPH_ARGPARSE_EQ("help", 'h')) {
+ usage();
+ exit(0);
+ } else if (CEPH_ARGPARSE_EQ("pool", 'p')) {
CEPH_ARGPARSE_SET_ARG_VAL(&poolname, OPT_STR);
} else if (CEPH_ARGPARSE_EQ("dest-pool", '\0')) {
CEPH_ARGPARSE_SET_ARG_VAL(&dest_poolname, OPT_STR);