From 3d5c19958f44fa064aed6fbcb912aa2af56ae443 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 27 Sep 2016 14:11:35 -0400 Subject: [PATCH] ceph-dencoder: add hexdump command Signed-off-by: Sage Weil --- src/test/encoding/ceph_dencoder.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/encoding/ceph_dencoder.cc b/src/test/encoding/ceph_dencoder.cc index 2115f2ae24bad..b7b35fa8b1708 100644 --- a/src/test/encoding/ceph_dencoder.cc +++ b/src/test/encoding/ceph_dencoder.cc @@ -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()) { -- 2.39.5