Hi Michael, On Fri, Feb 8, 2013 at 6:42 PM, Michael Tokarev <m...@tls.msk.ru> wrote: > 08.02.2013 07:42, Peter Crosthwaite wrote: >> Factor out the hexdumper functionality from iov for all to use. Useful for >> creating verbose debug printfery that dumps packet data. > > Two comments below. > >> diff --git a/include/qemu/hexdump.h b/include/qemu/hexdump.h >> new file mode 100644 >> index 0000000..87bccf4 >> --- /dev/null >> +++ b/include/qemu/hexdump.h >> @@ -0,0 +1,3 @@ >> +#include "qemu-common.h" >> + >> +void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); > > Do we really need this include, for just one function declaration? > I'd put it stright to qemu-common.h (lacking an "util" header). > >
Done >> diff --git a/util/hexdump.c b/util/hexdump.c >> new file mode 100644 >> index 0000000..74df358 >> --- /dev/null >> +++ b/util/hexdump.c >> @@ -0,0 +1,45 @@ >> +/* >> + * Helper to hexdump a buffer >> + * >> + * Copyright (c) 2013 Peter Crosthwaite <peter.crosthwa...@xilinx.com> >> + * Copyright (c) 2013 Xilinx, Inc >> + * >> + * Factored out from iov.c: >> + * Copyright IBM, Corp. 2007, 2008 >> + * Copyright (C) 2010 Red Hat, Inc. >> + * >> + * Author(s): >> + * Anthony Liguori <aligu...@us.ibm.com> >> + * Amit Shah <amit.s...@redhat.com> >> + * Michael Tokarev <m...@tls.msk.ru> > > My (c) was for other parts of iov, not this tiny hexdump > function, so it's okay to remove it from there :) > I ran git blame on it and its actually Gerds code. Gerd you want co-authorship and the (c) of this hexdump.c? commit 3a1dca94d6dba00fe0fd4c4a28449f57e01b9b6c Author: Gerd Hoffmann <kra...@redhat.com> Date: Tue Jul 12 13:35:10 2011 +0200 Add iov_hexdump() Useful for debugging purposes. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > Thanks! > > /mjt >