From: Wido den Hollander Date: Thu, 17 Jul 2014 21:19:27 +0000 (+0200) Subject: crushtool: Send output to stdout instead of stderr X-Git-Tag: v0.84~86 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09a5974fd34f7280f7d0307cd9e255bc6aa7e7a8;p=ceph.git 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 --- diff --git a/src/tools/crushtool.cc b/src/tools/crushtool.cc index 8dcd79c38736..08818c477cf4 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())) {