From 67263b33af9506d78558b1edfa5a9bf976dc7b3d Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sat, 22 Aug 2020 20:09:49 +0200 Subject: util/hexdump: Convert to take a void pointer argument Most uses of qemu_hexdump() do not take an array of char as input, forcing use of cast. Since we can use this helper to dump any kind of buffer, use a pointer to void argument instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Li Qiang Reviewed-by: Stefano Garzarella Message-Id: <20200822180950.1343963-2-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- include/qemu-common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qemu-common.h b/include/qemu-common.h index bb9496bd80..6834883822 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -138,7 +138,8 @@ int os_parse_cmd_args(int index, const char *optarg); * Hexdump a buffer to a file. An optional string prefix is added to every line */ -void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); +void qemu_hexdump(const void *bufptr, FILE *fp, + const char *prefix, size_t size); /* * helper to parse debug environment variables -- cgit v1.2.3-55-g7522