]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-dencoder: add hexdump command
authorSage Weil <sage@redhat.com>
Tue, 27 Sep 2016 18:11:35 +0000 (14:11 -0400)
committerSage Weil <sage@redhat.com>
Sun, 16 Oct 2016 14:32:51 +0000 (10:32 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/encoding/ceph_dencoder.cc

index 2115f2ae24bad635503c9d53d73ba8c55ca0289c..b7b35fa8b170808cd4feea3c5aa228b9ff7b4f51 100644 (file)
@@ -64,6 +64,7 @@ void usage(ostream &out)
   out << "  decode              decode into in-memory object\n";
   out << "  encode              encode in-memory object\n";
   out << "  dump_json           dump in-memory object as json (to stdout)\n";
+  out << "  hexdump             print encoded data in hex\n";
   out << "\n";
   out << "  copy                copy object (via operator=)\n";
   out << "  copy_ctor           copy object (via copy ctor)\n";
@@ -412,6 +413,8 @@ int main(int argc, const char **argv)
       jf.flush(cout);
       cout << std::endl;
 
+    } else if (*i == string("hexdump")) {
+      encbl.hexdump(cout);
     } else if (*i == string("import")) {
       ++i;
       if (i == args.end()) {