]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tool: make the use of parameters unambiguous 32265/head
authorsimon gao <simon29rock@gmail.com>
Tue, 16 Jul 2019 03:08:21 +0000 (23:08 -0400)
committersimon gao <simon29rock@gmail.com>
Mon, 16 Dec 2019 03:13:42 +0000 (22:13 -0500)
  changed the usage of parameter, readable:
    --readable=0    ==> --readable
Signed-off-by: simon gao <simon29rock@gmail.com>
src/tools/ceph_monstore_tool.cc

index ae3e151b2b427d01ecaa22fbce9117c147ff1a97..5918cfde444846e242708dd630595b108ab1d4af 100644 (file)
@@ -792,7 +792,6 @@ int main(int argc, char **argv) {
   } else if (cmd == "get") {
     unsigned v = 0;
     string outpath;
-    bool readable = false;
     string map_type;
     // visible options for this command
     po::options_description op_desc("Allowed 'get' options");
@@ -802,8 +801,7 @@ int main(int argc, char **argv) {
        "output file (default: stdout)")
       ("version,v", po::value<unsigned>(&v),
        "map version to obtain")
-      ("readable,r", po::value<bool>(&readable)->default_value(false),
-       "print the map information in human readable format")
+      ("readable,r", "print the map information in human readable format")
       ;
     // this is going to be a positional argument; we don't want to show
     // it as an option during --help, but we do want to have it captured
@@ -877,7 +875,7 @@ int main(int argc, char **argv) {
       goto done;
     }
 
-    if (readable) {
+    if (op_vm.count("readable")) {
       stringstream ss;
       bufferlist out;
       try {