]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph_conf: do not "exit(1)" in usage()
authorKefu Chai <kchai@redhat.com>
Tue, 16 Jul 2019 03:52:47 +0000 (11:52 +0800)
committerBrad Hubbard <bhubbard@redhat.com>
Mon, 14 Dec 2020 02:08:05 +0000 (12:08 +1000)
we always return right after calling `usage()`, there is no need to
`exit(1)` in usage. and more importantly, we should not `exit(1)` if use
asks for `help` by using `ceph-conf <path> help`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ab74ea30279c866320c84d760e93c123b7a95557)

src/test/cli/ceph-conf/help.t
src/tools/ceph_conf.cc

index 83b3c9f53d8ce5845b239204c9f5d9dae0be6193..d96c4a8ea9c475686fb4897548dcf081dc689595 100644 (file)
@@ -37,4 +37,4 @@
   
   RETURN CODE
   Return code will be 0 on success; error code otherwise.
-  [1]
+
index dd96b525e7146c585fd33219276f1d2571d33358..1835317d60f78a535592d0959f3f593a693da3df 100644 (file)
@@ -64,7 +64,6 @@ List sections beginning with 'mon'.\n\
 RETURN CODE\n\
 Return code will be 0 on success; error code otherwise.\n\
 ";
-  exit(1);
 }
 
 static int list_sections(const std::string &prefix,