]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados: Minor output changes for consistency across operations
authorDavid Zafman <dzafman@redhat.com>
Wed, 11 Nov 2015 16:28:01 +0000 (08:28 -0800)
committerDavid Zafman <dzafman@redhat.com>
Thu, 25 Feb 2016 20:50:26 +0000 (12:50 -0800)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 016ed34ce85fa111f54857a8ca1002ae32b52b8e)

src/tools/rados/rados.cc

index 1a98aaa12515710a6d9c24a862bd92668de73863..01152df7f67fe640013cfc051db70cdf72c04d12 100644 (file)
@@ -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;
       }