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>
This commit is contained in:
Marc-André Lureau 2022-03-23 19:57:32 +04:00 committed by Paolo Bonzini
parent 544803c7a1
commit 415b732751
10 changed files with 28 additions and 28 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"
/*

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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)