From 6ff66f50f0999c3455c39de68fc2d2949963c796 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Fri, 15 Mar 2013 16:41:58 +0000 Subject: iov: Factor out hexdumper Factor out the hexdumper functionality from iov for all to use. Useful for creating verbose debug printfery that dumps packet data. Signed-off-by: Peter Crosthwaite Message-id: faaac219c55ea586d3f748befaf5a2788fd271b8.1361853677.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell --- include/qemu-common.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/qemu-common.h b/include/qemu-common.h index 5e13708..7754ee2 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -442,4 +442,10 @@ int64_t pow2floor(int64_t value); int uleb128_encode_small(uint8_t *out, uint32_t n); int uleb128_decode_small(const uint8_t *in, uint32_t *n); +/* + * Hexdump a buffer to a file. An optional string prefix is added to every line + */ + +void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); + #endif -- cgit v1.1