From: Kefu Chai Date: Tue, 16 Jul 2019 03:52:47 +0000 (+0800) Subject: tools/ceph_conf: do not "exit(1)" in usage() X-Git-Tag: v14.2.17~90^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d10f380204f10b83a4efddfe792b54f1115d791a;p=ceph.git tools/ceph_conf: do not "exit(1)" in usage() 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 help`. Signed-off-by: Kefu Chai (cherry picked from commit ab74ea30279c866320c84d760e93c123b7a95557) --- diff --git a/src/test/cli/ceph-conf/help.t b/src/test/cli/ceph-conf/help.t index 83b3c9f53d8c..d96c4a8ea9c4 100644 --- a/src/test/cli/ceph-conf/help.t +++ b/src/test/cli/ceph-conf/help.t @@ -37,4 +37,4 @@ RETURN CODE Return code will be 0 on success; error code otherwise. - [1] + diff --git a/src/tools/ceph_conf.cc b/src/tools/ceph_conf.cc index dd96b525e714..1835317d60f7 100644 --- a/src/tools/ceph_conf.cc +++ b/src/tools/ceph_conf.cc @@ -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,