]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crushtool: Send output to stdout instead of stderr
authorWido den Hollander <wido@42on.com>
Thu, 17 Jul 2014 21:19:27 +0000 (23:19 +0200)
committerWido den Hollander <wido@42on.com>
Fri, 18 Jul 2014 18:18:18 +0000 (20:18 +0200)
A lot of output was send to stderr instead of stdout and vise versa.

Error messages should go to stderr, but all other output to stdout

src/tools/crushtool.cc

index 8dcd79c387361e7c659510578347cb91b672573e..08818c477cf4b5a484dc8b7b6242701c28d3eb88 100644 (file)
@@ -193,7 +193,7 @@ int main(int argc, const char **argv)
 
   CrushWrapper crush;
 
-  CrushTester tester(crush, cerr);
+  CrushTester tester(crush, cout);
 
   // we use -c, don't confuse the generic arg parsing
   // only parse arguments from CEPH_ARGS, if in the environment
@@ -427,13 +427,13 @@ int main(int argc, const char **argv)
   }
 
   if (decompile + compile + build > 1) {
-    cout << "cannot specify more than one of compile, decompile, and build" << std::endl;
+    cerr << "cannot specify more than one of compile, decompile, and build" << std::endl;
     exit(EXIT_FAILURE);
   }
   if (!compile && !decompile && !build && !test && !reweight && !adjust &&
       add_item < 0 &&
       remove_name.empty() && reweight_name.empty()) {
-    cout << "no action specified; -h for help" << std::endl;
+    cerr << "no action specified; -h for help" << std::endl;
     exit(EXIT_FAILURE);
   }
   if ((!build) && (!args.empty())) {