You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:47:17 UTC

svn commit: r1131905 - /incubator/mesos/trunk/src/configurator.cpp

Author: benh
Date: Sun Jun  5 05:47:17 2011
New Revision: 1131905

URL: http://svn.apache.org/viewvc?rev=1131905&view=rev
Log:
bools are printed as false/true in usage() and a typo was fixed

Modified:
    incubator/mesos/trunk/src/configurator.cpp

Modified: incubator/mesos/trunk/src/configurator.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/configurator.cpp?rev=1131905&r1=1131904&r2=1131905&view=diff
==============================================================================
--- incubator/mesos/trunk/src/configurator.cpp (original)
+++ incubator/mesos/trunk/src/configurator.cpp Sun Jun  5 05:47:17 2011
@@ -238,7 +238,7 @@ string Configurator::getUsage() const 
   foreachpair (const string& key, const Option& opt, options) {
     string val = "--" + key;
     if (!opt.validator->isBool())
-      val += " VAL";
+      val += "=VAL";
 
     if (opt.hasShortName) {
       if (opt.validator->isBool()) 
@@ -265,6 +265,8 @@ string Configurator::getUsage() const 
         helpStr += " ";
       }
       string defval = opt.defaultValue;
+      if (opt.validator->isBool())
+        defval = opt.defaultValue == "0" ? "false" : "true";
 
       helpStr += "(default: " + defval + ")";
     }