From: David Zafman Date: Wed, 11 Nov 2015 16:28:01 +0000 (-0800) Subject: rados: Minor output changes for consistency across operations X-Git-Tag: v0.94.7~28^2^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37be95996494f72d4fa3ecc62b54ee9478903c6e;p=ceph.git rados: Minor output changes for consistency across operations Signed-off-by: David Zafman (cherry picked from commit 016ed34ce85fa111f54857a8ca1002ae32b52b8e) --- diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 1a98aaa1251..01152df7f67 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -1821,11 +1821,11 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, } if (values.size() && values.begin()->first == key) { - cout << " (length " << values.begin()->second.length() << ") : "; if (!outfile.empty()) { cerr << "Writing to " << outfile << std::endl; dump_data(outfile, values.begin()->second); } else { + cout << "value (" << values.begin()->second.length() << " bytes) :\n"; values.begin()->second.hexdump(cout); cout << std::endl; } @@ -1875,7 +1875,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, // dump key in hex if it contains nonprintable characters if (std::count_if(it->first.begin(), it->first.end(), (int (*)(int))isprint) < (int)it->first.length()) { - cout << "key: (" << it->first.length() << " bytes):\n"; + cout << "key (" << it->first.length() << " bytes):\n"; bufferlist keybl; keybl.append(it->first); keybl.hexdump(cout); @@ -1883,7 +1883,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, cout << it->first; } cout << std::endl; - cout << "value: (" << it->second.length() << " bytes) :\n"; + cout << "value (" << it->second.length() << " bytes) :\n"; it->second.hexdump(cout); cout << std::endl; }