From: Sage Weil Date: Tue, 27 Sep 2016 18:11:35 +0000 (-0400) Subject: ceph-dencoder: add hexdump command X-Git-Tag: v11.1.0~617^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d5c19958f44fa064aed6fbcb912aa2af56ae443;p=ceph.git ceph-dencoder: add hexdump command Signed-off-by: Sage Weil --- diff --git a/src/test/encoding/ceph_dencoder.cc b/src/test/encoding/ceph_dencoder.cc index 2115f2ae24ba..b7b35fa8b170 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()) {