summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-08-22 20:09:50 +0200
committerLaurent Vivier2020-09-11 21:25:59 +0200
commitb42581f5bb40489cb172829e9ab0d6d6dfa37026 (patch)
tree53386cbc9808337c4bcc4d902f16f86942254271 /hw
parentutil/hexdump: Convert to take a void pointer argument (diff)
downloadqemu-b42581f5bb40489cb172829e9ab0d6d6dfa37026.tar.gz
qemu-b42581f5bb40489cb172829e9ab0d6d6dfa37026.tar.xz
qemu-b42581f5bb40489cb172829e9ab0d6d6dfa37026.zip
util/hexdump: Reorder qemu_hexdump() arguments
qemu_hexdump()'s pointer to the buffer and length of the buffer are closely related arguments but are widely separated in the argument list order (also, the format of <stdio.h> function prototypes is usually to have the FILE* argument coming first). Reorder the arguments as "fp, prefix, buf, size" which is more logical. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20200822180950.1343963-3-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw')
-rw-r--r--hw/dma/xlnx_dpdma.c2
-rw-r--r--hw/net/fsl_etsec/etsec.c2
-rw-r--r--hw/net/fsl_etsec/rings.c2
-rw-r--r--hw/sd/sd.c2
-rw-r--r--hw/usb/redirect.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/hw/dma/xlnx_dpdma.c b/hw/dma/xlnx_dpdma.c
index d75a806942..967548abd3 100644
--- a/hw/dma/xlnx_dpdma.c
+++ b/hw/dma/xlnx_dpdma.c
@@ -388,7 +388,7 @@ static void xlnx_dpdma_dump_descriptor(DPDMADescriptor *desc)
{
if (DEBUG_DPDMA) {
qemu_log("DUMP DESCRIPTOR:\n");
- qemu_hexdump(desc, stdout, "", sizeof(DPDMADescriptor));
+ qemu_hexdump(stdout, "", desc, sizeof(DPDMADescriptor));
}
}
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index 5c40303f93..93886bba60 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -357,7 +357,7 @@ static ssize_t etsec_receive(NetClientState *nc,
#if defined(HEX_DUMP)
fprintf(stderr, "%s receive size:%zd\n", nc->name, size);
- qemu_hexdump(buf, stderr, "", size);
+ qemu_hexdump(stderr, "", buf, size);
#endif
/* Flush is unnecessary as are already in receiving path */
etsec->need_flush = false;
diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c
index 337a55fc95..628648a9c3 100644
--- a/hw/net/fsl_etsec/rings.c
+++ b/hw/net/fsl_etsec/rings.c
@@ -269,7 +269,7 @@ static void process_tx_bd(eTSEC *etsec,
#if defined(HEX_DUMP)
qemu_log("eTSEC Send packet size:%d\n", etsec->tx_buffer_len);
- qemu_hexdump(etsec->tx_buffer, stderr, "", etsec->tx_buffer_len);
+ qemu_hexdump(stderr, "", etsec->tx_buffer, etsec->tx_buffer_len);
#endif /* ETSEC_RING_DEBUG */
if (etsec->first_bd.flags & BD_TX_TOEUN) {
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 1c8f8529ea..0012882222 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1785,7 +1785,7 @@ send_response:
}
#ifdef DEBUG_SD
- qemu_hexdump(response, stderr, "Response", rsplen);
+ qemu_hexdump(stderr, "Response", response, rsplen);
#endif
return rsplen;
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 09edb0d81c..48f38d3391 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -240,7 +240,7 @@ static void usbredir_log_data(USBRedirDevice *dev, const char *desc,
if (dev->debug < usbredirparser_debug_data) {
return;
}
- qemu_hexdump(data, stderr, desc, len);
+ qemu_hexdump(stderr, desc, data, len);
}
/*