From 41dfd4089d014c1bf7e71fc18b866d049b8aea6f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 17 Dec 2008 16:48:38 -0800 Subject: [PATCH] ceph: terminate dumped output --- src/ceph.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ceph.cc b/src/ceph.cc index 70a10aada8d2e..1b0a520454446 100644 --- a/src/ceph.cc +++ b/src/ceph.cc @@ -462,7 +462,9 @@ int do_cli() continue; if (cmd.size() == 1 && cmd[0] == "print") { - cout << "----\n" << in.c_str() << "---- (" << in.length() << " bytes)" << std::endl; + cout << "----" << std::endl; + write(1, in.c_str(), in.length()); + cout << "---- (" << in.length() << " bytes)" << std::endl; continue; } @@ -485,7 +487,9 @@ int do_cli() if (in.length()) { if (outfile) { if (strcmp(outfile, "-") == 0) { - cout << "----\n" << in.c_str() << "---- (" << in.length() << " bytes)" << std::endl; + cout << "----" << std::endl; + write(1, in.c_str(), in.length()); + cout << "---- (" << in.length() << " bytes)" << std::endl; } else { in.write_file(outfile); cout << "wrote " << in.length() << " to " << outfile << std::endl; -- 2.39.5