aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-23 19:57:32 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-06 14:31:43 +0200
commit415b732751daeccfff681898a716180ceb34dc4e (patch)
tree4e0c8c154a6c3f801b982ab7b274bf413031cc5f
parent544803c7a19bd2359ee3a0b3607ead71bf1f9394 (diff)
downloadqemu-415b732751daeccfff681898a716180ceb34dc4e.zip
qemu-415b732751daeccfff681898a716180ceb34dc4e.tar.gz
qemu-415b732751daeccfff681898a716180ceb34dc4e.tar.bz2
include: move C/util-related declarations to cutils.h
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-22-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/dma/xlnx_dpdma.c2
-rw-r--r--hw/usb/ccid-card-passthru.c2
-rw-r--r--hw/usb/dev-smartcard-reader.c2
-rw-r--r--hw/usb/redirect.c2
-rw-r--r--hw/virtio/vhost-vdpa.c2
-rw-r--r--include/qemu-common.h20
-rw-r--r--include/qemu/cutils.h20
-rw-r--r--net/announce.c2
-rw-r--r--tests/qtest/npcm7xx_rng-test.c2
-rw-r--r--util/hexdump.c2
10 files changed, 28 insertions, 28 deletions
diff --git a/hw/dma/xlnx_dpdma.c b/hw/dma/xlnx_dpdma.c
index 2d7eae7..dd66be5 100644
--- a/hw/dma/xlnx_dpdma.c
+++ b/hw/dma/xlnx_dpdma.c
@@ -23,7 +23,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "hw/dma/xlnx_dpdma.h"
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index fa3040f..f530ab2 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -9,7 +9,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#include "qemu/units.h"
#include <libcacard.h>
#include "chardev/char-fe.h"
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 91ffd9f..28164d8 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -37,7 +37,7 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qapi/error.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "hw/qdev-properties.h"
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 8692ea2..3bc4dee 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -26,7 +26,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/timer.h"
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index bc54f9f..b57be52 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -20,10 +20,10 @@
#include "hw/virtio/vhost-shadow-virtqueue.h"
#include "hw/virtio/vhost-vdpa.h"
#include "exec/address-spaces.h"
+#include "qemu/cutils.h"
#include "qemu/main-loop.h"
#include "cpu.h"
#include "trace.h"
-#include "qemu-common.h"
#include "qapi/error.h"
/*
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 5f53a0e..08f40a9 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -54,26 +54,6 @@ const char *qemu_get_vm_name(void);
void os_setup_early_signal_handling(void);
int os_parse_cmd_args(int index, const char *optarg);
-/*
- * Hexdump a line of a byte buffer into a hexadecimal/ASCII buffer
- */
-#define QEMU_HEXDUMP_LINE_BYTES 16 /* Number of bytes to dump */
-#define QEMU_HEXDUMP_LINE_LEN 75 /* Number of characters in line */
-void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr,
- unsigned int len, bool ascii);
-
-/*
- * Hexdump a buffer to a file. An optional string prefix is added to every line
- */
-
-void qemu_hexdump(FILE *fp, const char *prefix,
- const void *bufptr, size_t size);
-
-/*
- * helper to parse debug environment variables
- */
-int parse_debug_env(const char *name, int max, int initial);
-
void page_size_init(void);
#endif
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h
index 3205439..2137e65 100644
--- a/include/qemu/cutils.h
+++ b/include/qemu/cutils.h
@@ -214,4 +214,24 @@ static inline const char *yes_no(bool b)
return b ? "yes" : "no";
}
+/*
+ * helper to parse debug environment variables
+ */
+int parse_debug_env(const char *name, int max, int initial);
+
+/*
+ * Hexdump a line of a byte buffer into a hexadecimal/ASCII buffer
+ */
+#define QEMU_HEXDUMP_LINE_BYTES 16 /* Number of bytes to dump */
+#define QEMU_HEXDUMP_LINE_LEN 75 /* Number of characters in line */
+void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr,
+ unsigned int len, bool ascii);
+
+/*
+ * Hexdump a buffer to a file. An optional string prefix is added to every line
+ */
+
+void qemu_hexdump(FILE *fp, const char *prefix,
+ const void *bufptr, size_t size);
+
#endif
diff --git a/net/announce.c b/net/announce.c
index 3b9e2f1..62c6019 100644
--- a/net/announce.c
+++ b/net/announce.c
@@ -7,7 +7,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#include "net/announce.h"
#include "net/net.h"
#include "qapi/clone-visitor.h"
diff --git a/tests/qtest/npcm7xx_rng-test.c b/tests/qtest/npcm7xx_rng-test.c
index 797f832..35b1c1f 100644
--- a/tests/qtest/npcm7xx_rng-test.c
+++ b/tests/qtest/npcm7xx_rng-test.c
@@ -20,7 +20,7 @@
#include "libqtest-single.h"
#include "qemu/bitops.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
#define RNG_BASE_ADDR 0xf000b000
diff --git a/util/hexdump.c b/util/hexdump.c
index 2c105a8..9921114 100644
--- a/util/hexdump.c
+++ b/util/hexdump.c
@@ -14,7 +14,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/cutils.h"
void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr,
unsigned int len, bool ascii)