From 09a5974fd34f7280f7d0307cd9e255bc6aa7e7a8 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Thu, 17 Jul 2014 23:19:27 +0200 Subject: [PATCH] crushtool: Send output to stdout instead of stderr 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/crushtool.cc b/src/tools/crushtool.cc index 8dcd79c3873..08818c477cf 100644 --- a/src/tools/crushtool.cc +++ b/src/tools/crushtool.cc @@ -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())) { -- 2.47.3