Browse Source

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>
pull/211/head
Marc-André Lureau 4 years ago
committed by Paolo Bonzini
parent
commit
415b732751
  1. 2
      hw/dma/xlnx_dpdma.c
  2. 2
      hw/usb/ccid-card-passthru.c
  3. 2
      hw/usb/dev-smartcard-reader.c
  4. 2
      hw/usb/redirect.c
  5. 2
      hw/virtio/vhost-vdpa.c
  6. 20
      include/qemu-common.h
  7. 20
      include/qemu/cutils.h
  8. 2
      net/announce.c
  9. 2
      tests/qtest/npcm7xx_rng-test.c
  10. 2
      util/hexdump.c

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

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

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

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

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

20
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

20
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

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

2
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

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

Loading…
Cancel
Save