[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 1/3] iov: Factor out hexdumper
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCH v9 1/3] iov: Factor out hexdumper |
Date: |
Fri, 08 Feb 2013 12:42:07 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
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).
> 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 <address@hidden>
> + * 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 <address@hidden>
> + * Amit Shah <address@hidden>
> + * Michael Tokarev <address@hidden>
My (c) was for other parts of iov, not this tiny hexdump
function, so it's okay to remove it from there :)
Thanks!
/mjt