From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PULL 26/53] include: move C/util-related declarations to cutils.h
Date: Tue, 19 Apr 2022 07:50:42 +0200 [thread overview]
Message-ID: <20220419055109.142788-27-pbonzini@redhat.com> (raw)
In-Reply-To: <20220419055109.142788-1-pbonzini@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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>
---
hw/dma/xlnx_dpdma.c | 2 +-
hw/usb/ccid-card-passthru.c | 2 +-
hw/usb/dev-smartcard-reader.c | 2 +-
hw/usb/redirect.c | 2 +-
hw/virtio/vhost-vdpa.c | 2 +-
include/qemu-common.h | 20 --------------------
include/qemu/cutils.h | 20 ++++++++++++++++++++
net/announce.c | 2 +-
tests/qtest/npcm7xx_rng-test.c | 2 +-
util/hexdump.c | 2 +-
10 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/hw/dma/xlnx_dpdma.c b/hw/dma/xlnx_dpdma.c
index 2d7eae72cd..dd66be5265 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 fa3040fb71..f530ab2565 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 91ffd9f8ae..28164d89be 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 8692ea2561..3bc4dee7fe 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 bc54f9fc44..b57be529c7 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 5f53a0e112..08f40a9d1e 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 320543950c..2137e65260 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 3b9e2f1f14..62c60192a3 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 797f832e53..35b1c1f5f6 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 2c105a8846..9921114b3c 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)
--
2.35.1
next prev parent reply other threads:[~2022-04-19 6:30 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 5:50 [PULL for-7.1 00/53] Misc pull request for QEMU 7.1 Paolo Bonzini
2022-04-19 5:50 ` [PULL 01/53] qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities Paolo Bonzini
2022-04-19 7:16 ` Dov Murik
2022-04-20 19:06 ` Dov Murik
2022-04-19 5:50 ` [PULL 02/53] qtest: replace gettimeofday with GTimer Paolo Bonzini
2022-04-19 5:50 ` [PULL 03/53] qga: replace qemu_gettimeofday() with g_get_real_time() Paolo Bonzini
2022-04-19 5:50 ` [PULL 04/53] Replace " Paolo Bonzini
2022-04-19 5:50 ` [PULL 05/53] oslib: drop qemu_gettimeofday() Paolo Bonzini
2022-04-19 5:50 ` [PULL 06/53] meson: use chardev_ss dependencies Paolo Bonzini
2022-04-19 5:50 ` [PULL 07/53] meson: add util dependency for oslib-posix on freebsd Paolo Bonzini
2022-04-19 5:50 ` [PULL 08/53] meson: remove unneeded py3 Paolo Bonzini
2022-04-19 5:50 ` [PULL 09/53] meson: remove test-qdev-global-props dependency on testqapi Paolo Bonzini
2022-04-19 5:50 ` [PULL 10/53] char: move qemu_openpty_raw from util/ to char/ Paolo Bonzini
2022-04-19 5:50 ` [PULL 11/53] Replace config-time define HOST_WORDS_BIGENDIAN Paolo Bonzini
2022-04-19 5:50 ` [PULL 12/53] Replace TARGET_WORDS_BIGENDIAN Paolo Bonzini
2022-04-19 5:50 ` [PULL 13/53] osdep: poison {HOST,TARGET}_WORDS_BIGENDIAN Paolo Bonzini
2022-04-19 5:50 ` [PULL 14/53] include/qapi: add g_autoptr support for qobject types Paolo Bonzini
2022-04-19 5:50 ` [PULL 15/53] tests: replace free_all() usage with g_auto Paolo Bonzini
2022-04-19 5:50 ` [PULL 16/53] Replace qemu_real_host_page variables with inlined functions Paolo Bonzini
2022-04-19 5:50 ` [PULL 17/53] qga: replace deprecated g_get_current_time() Paolo Bonzini
2022-04-19 5:50 ` [PULL 18/53] error-report: replace deprecated g_get_current_time() with glib >= 2.62 Paolo Bonzini
2022-04-19 5:50 ` [PULL 19/53] util: rename qemu-error.c to match its header name Paolo Bonzini
2022-04-19 5:50 ` [PULL 20/53] error-report: use error_printf() for program prefix Paolo Bonzini
2022-04-19 5:50 ` [PULL 21/53] include: move TFR to osdep.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 22/53] include: move qemu_write_full() declaration " Paolo Bonzini
2022-04-19 5:50 ` [PULL 23/53] include: move qemu_pipe() " Paolo Bonzini
2022-04-19 5:50 ` [PULL 24/53] include: move coroutine IO functions to coroutine.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 25/53] include: move dump_in_progress() to runstate.h Paolo Bonzini
2022-04-19 5:50 ` Paolo Bonzini [this message]
2022-04-19 5:50 ` [PULL 27/53] include: move cpu_exec* declarations to cpu-common.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 28/53] include: move target page bits declaration to page-vary.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 29/53] include: move progress API to qemu-progress.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 30/53] include: move qemu_get_vm_name() to sysemu.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 31/53] include: move os_*() to os-foo.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 32/53] include: move page_size_init() to include/hw/core/cpu.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 33/53] Move CPU softfloat unions to cpu-float.h Paolo Bonzini
2022-04-19 5:50 ` [PULL 34/53] Move fcntl_setfl() to oslib-posix Paolo Bonzini
2022-04-19 5:50 ` [PULL 35/53] qga: remove explicit environ argument from exec/spawn Paolo Bonzini
2022-04-19 5:50 ` [PULL 36/53] Remove qemu-common.h include from most units Paolo Bonzini
2022-04-19 5:50 ` [PULL 37/53] build-sys: drop ntddscsi.h check Paolo Bonzini
2022-04-19 5:50 ` [PULL 38/53] build-sys: simplify AF_VSOCK check Paolo Bonzini
2022-04-19 5:50 ` [PULL 39/53] whpx: Added support for breakpoints and stepping Paolo Bonzini
2022-04-19 5:50 ` [PULL 40/53] thread-posix: remove the posix semaphore support Paolo Bonzini
2022-04-19 5:50 ` [PULL 41/53] thread-posix: use monotonic clock for QemuCond and QemuSemaphore Paolo Bonzini
2022-04-19 5:50 ` [PULL 42/53] thread-posix: implement Semaphore with QemuCond and QemuMutex Paolo Bonzini
2022-04-19 5:50 ` [PULL 43/53] thread-posix: optimize qemu_sem_timedwait with zero timeout Paolo Bonzini
2022-04-19 5:51 ` [PULL 44/53] hyperv: SControl is optional to enable SynIc Paolo Bonzini
2022-04-19 5:51 ` [PULL 45/53] hyperv: Add definitions for syndbg Paolo Bonzini
2022-04-19 5:51 ` [PULL 46/53] hyperv: Add support to process syndbg commands Paolo Bonzini
2022-04-19 5:51 ` [PULL 47/53] hw: hyperv: Initial commit for Synthetic Debugging device Paolo Bonzini
2022-04-19 5:51 ` [PULL 48/53] s390x: follow qdev tree to detect SCSI device on a CCW bus Paolo Bonzini
2022-04-19 5:51 ` [PULL 49/53] virtio-ccw: move vhost_ccw_scsi to a separate file Paolo Bonzini
2022-04-19 5:51 ` [PULL 50/53] virtio-ccw: move device type declarations to .c files Paolo Bonzini
2022-04-19 5:51 ` [PULL 51/53] virtio-ccw: do not include headers for all virtio devices Paolo Bonzini
2022-04-19 5:51 ` [PULL 52/53] target/i386: do not access beyond the low 128 bits of SSE registers Paolo Bonzini
2022-04-19 5:51 ` [PULL 53/53] target/i386: Remove unused XMMReg, YMMReg types and CPUState fields Paolo Bonzini
2022-04-19 9:32 ` [PULL for-7.1 00/53] Misc pull request for QEMU 7.1 Peter Maydell
2022-04-20 3:57 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220419055109.142788-27-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).