aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-09 14:39:09 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-09 14:39:09 +0000
commit7e0019a7196ebed177c95824875cf852e1a6f667 (patch)
tree0a4e5a411c80a56737354700bb15bf4f7262831d /include
parentf31cd9e4e2172a4807f390194978c61e717791d2 (diff)
parent922a01a013d2270682a188258cbccacfecf8129c (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-02-07-v4' into staging
Miscellaneous patches for 2018-02-07 # gpg: Signature made Fri 09 Feb 2018 12:52:51 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2018-02-07-v4: Move include qemu/option.h from qemu-common.h to actual users Drop superfluous includes of qapi/qmp/qjson.h Drop superfluous includes of qapi/qmp/dispatch.h Include qapi/qmp/qnull.h exactly where needed Include qapi/qmp/qnum.h exactly where needed Include qapi/qmp/qbool.h exactly where needed Include qapi/qmp/qstring.h exactly where needed Include qapi/qmp/qdict.h exactly where needed Include qapi/qmp/qlist.h exactly where needed Include qapi/qmp/qobject.h exactly where needed qdict qlist: Make most helper macros functions Eliminate qapi/qmp/types.h Typedef the subtypes of QObject in qemu/typedefs.h, too Include qmp-commands.h exactly where needed Drop superfluous includes of qapi/qmp/qerror.h Include qapi/error.h exactly where needed Drop superfluous includes of qapi-types.h and test-qapi-types.h Clean up includes Use #include "..." for our own headers, <...> for others vnc: use stubs for CONFIG_VNC=n dummy functions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h4
-rw-r--r--include/block/block_int.h2
-rw-r--r--include/block/dirty-bitmap.h1
-rw-r--r--include/block/nbd.h2
-rw-r--r--include/block/qapi.h1
-rw-r--r--include/block/snapshot.h2
-rw-r--r--include/chardev/char.h2
-rw-r--r--include/crypto/random.h2
-rw-r--r--include/crypto/xts.h2
-rw-r--r--include/exec/tb-lookup.h2
-rw-r--r--include/hw/acpi/acpi.h1
-rw-r--r--include/hw/acpi/acpi_dev_interface.h1
-rw-r--r--include/hw/block/block.h1
-rw-r--r--include/hw/block/fdc.h1
-rw-r--r--include/hw/ide/internal.h1
-rw-r--r--include/hw/intc/xlnx-pmu-iomod-intc.h1
-rw-r--r--include/hw/intc/xlnx-zynqmp-ipi.h1
-rw-r--r--include/hw/loader-fit.h2
-rw-r--r--include/hw/loader.h1
-rw-r--r--include/hw/nvram/fw_cfg.h1
-rw-r--r--include/hw/pci-bridge/simba.h1
-rw-r--r--include/hw/qdev-core.h1
-rw-r--r--include/hw/registerfields.h2
-rw-r--r--include/hw/s390x/storage-attributes.h2
-rw-r--r--include/hw/smbios/smbios.h1
-rw-r--r--include/hw/xtensa/xtensa-isa.h2
-rw-r--r--include/migration/colo.h1
-rw-r--r--include/monitor/monitor.h1
-rw-r--r--include/net/net.h5
-rw-r--r--include/net/slirp.h4
-rw-r--r--include/net/tap.h1
-rw-r--r--include/qapi/clone-visitor.h1
-rw-r--r--include/qapi/opts-visitor.h1
-rw-r--r--include/qapi/qmp-event.h1
-rw-r--r--include/qapi/qmp/dispatch.h3
-rw-r--r--include/qapi/qmp/json-parser.h1
-rw-r--r--include/qapi/qmp/qbool.h4
-rw-r--r--include/qapi/qmp/qdict.h21
-rw-r--r--include/qapi/qmp/qjson.h3
-rw-r--r--include/qapi/qmp/qlist.h19
-rw-r--r--include/qapi/qmp/qlit.h1
-rw-r--r--include/qapi/qmp/qnum.h4
-rw-r--r--include/qapi/qmp/qstring.h4
-rw-r--r--include/qapi/qmp/types.h24
-rw-r--r--include/qapi/qobject-input-visitor.h1
-rw-r--r--include/qapi/qobject-output-visitor.h1
-rw-r--r--include/qapi/visitor.h2
-rw-r--r--include/qemu-common.h2
-rw-r--r--include/qemu/config-file.h2
-rw-r--r--include/qemu/option.h1
-rw-r--r--include/qemu/throttle.h1
-rw-r--r--include/qemu/typedefs.h7
-rw-r--r--include/qom/object_interfaces.h1
-rw-r--r--include/scsi/pr-manager.h1
-rw-r--r--include/sysemu/arch_init.h3
-rw-r--r--include/sysemu/dump.h1
-rw-r--r--include/sysemu/hostmem.h1
-rw-r--r--include/sysemu/hvf.h2
-rw-r--r--include/sysemu/numa.h1
-rw-r--r--include/sysemu/replay.h1
-rw-r--r--include/sysemu/sysemu.h2
-rw-r--r--include/sysemu/tpm.h1
-rw-r--r--include/sysemu/tpm_backend.h1
-rw-r--r--include/ui/console.h25
-rw-r--r--include/ui/qemu-spice.h1
65 files changed, 37 insertions, 160 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 2025d7ed19..24ef816960 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -2,14 +2,12 @@
#define BLOCK_H
#include "block/aio.h"
+#include "qapi-types.h"
#include "qemu/iov.h"
-#include "qemu/option.h"
#include "qemu/coroutine.h"
#include "block/accounting.h"
#include "block/dirty-bitmap.h"
#include "block/blockjob.h"
-#include "qapi/qmp/qobject.h"
-#include "qapi-types.h"
#include "qemu/hbitmap.h"
/* block.c */
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 99b9190627..5ea63f8fa8 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -26,12 +26,10 @@
#include "block/accounting.h"
#include "block/block.h"
-#include "qemu/option.h"
#include "qemu/queue.h"
#include "qemu/coroutine.h"
#include "qemu/stats64.h"
#include "qemu/timer.h"
-#include "qapi-types.h"
#include "qemu/hbitmap.h"
#include "block/snapshot.h"
#include "qemu/main-loop.h"
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index a591c27213..3da8486ab1 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -2,6 +2,7 @@
#define BLOCK_DIRTY_BITMAP_H
#include "qemu-common.h"
+#include "qapi-types.h"
#include "qemu/hbitmap.h"
BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
diff --git a/include/block/nbd.h b/include/block/nbd.h
index ee74ec391a..fc50003003 100644
--- a/include/block/nbd.h
+++ b/include/block/nbd.h
@@ -21,8 +21,6 @@
#define NBD_H
-#include "qemu-common.h"
-#include "qemu/option.h"
#include "io/channel-socket.h"
#include "crypto/tlscreds.h"
diff --git a/include/block/qapi.h b/include/block/qapi.h
index 82ba4b63a0..83bdb098bd 100644
--- a/include/block/qapi.h
+++ b/include/block/qapi.h
@@ -25,7 +25,6 @@
#ifndef BLOCK_QAPI_H
#define BLOCK_QAPI_H
-#include "qapi-types.h"
#include "block/block.h"
#include "block/snapshot.h"
diff --git a/include/block/snapshot.h b/include/block/snapshot.h
index 9407799941..f73d1094af 100644
--- a/include/block/snapshot.h
+++ b/include/block/snapshot.h
@@ -25,8 +25,6 @@
#ifndef SNAPSHOT_H
#define SNAPSHOT_H
-#include "qemu-common.h"
-#include "qemu/option.h"
#define SNAPSHOT_OPT_BASE "snapshot."
diff --git a/include/chardev/char.h b/include/chardev/char.h
index d8941fcbb1..a381dc3df8 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -1,8 +1,6 @@
#ifndef QEMU_CHAR_H
#define QEMU_CHAR_H
-#include "qemu-common.h"
-#include "qemu/option.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
#include "qom/object.h"
diff --git a/include/crypto/random.h b/include/crypto/random.h
index a07229ce96..8764ca0562 100644
--- a/include/crypto/random.h
+++ b/include/crypto/random.h
@@ -22,8 +22,6 @@
#define QCRYPTO_RANDOM_H
#include "qemu-common.h"
-#include "qapi/error.h"
-
/**
* qcrypto_random_bytes:
diff --git a/include/crypto/xts.h b/include/crypto/xts.h
index da32ab82b6..3c8967ac6c 100644
--- a/include/crypto/xts.h
+++ b/include/crypto/xts.h
@@ -27,8 +27,6 @@
#define QCRYPTO_XTS_H
#include "qemu-common.h"
-#include "qapi/error.h"
-
#define XTS_BLOCK_SIZE 16
diff --git a/include/exec/tb-lookup.h b/include/exec/tb-lookup.h
index 296138591a..492cb68289 100644
--- a/include/exec/tb-lookup.h
+++ b/include/exec/tb-lookup.h
@@ -7,8 +7,6 @@
#ifndef EXEC_TB_LOOKUP_H
#define EXEC_TB_LOOKUP_H
-#include "qemu/osdep.h"
-
#ifdef NEED_CPU_H
#include "cpu.h"
#else
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index 39ff512129..c20ace0d0b 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -21,7 +21,6 @@
*/
#include "qemu/notify.h"
-#include "qemu/option.h"
#include "exec/memory.h"
#include "hw/irq.h"
#include "hw/acpi/acpi_dev_interface.h"
diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
index 3c2e4e95a5..dabf4c4fc9 100644
--- a/include/hw/acpi/acpi_dev_interface.h
+++ b/include/hw/acpi/acpi_dev_interface.h
@@ -2,7 +2,6 @@
#define ACPI_DEV_INTERFACE_H
#include "qom/object.h"
-#include "qapi-types.h"
#include "hw/boards.h"
/* These values are part of guest ABI, and can not be changed */
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index 64b9298829..f532d10e35 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -12,6 +12,7 @@
#define HW_BLOCK_H
#include "qemu-common.h"
+#include "qapi-types.h"
/* Configuration */
diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
index 1749dabf25..68a0c904ea 100644
--- a/include/hw/block/fdc.h
+++ b/include/hw/block/fdc.h
@@ -2,6 +2,7 @@
#define HW_FDC_H
#include "qemu-common.h"
+#include "qapi-types.h"
/* fdc.c */
#define MAX_FD 2
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 31851b44d1..88212f59df 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -12,7 +12,6 @@
#include "sysemu/sysemu.h"
#include "hw/block/block.h"
#include "scsi/constants.h"
-#include "qapi/error.h"
/* debug IDE devices */
#define USE_DMA_CDROM
diff --git a/include/hw/intc/xlnx-pmu-iomod-intc.h b/include/hw/intc/xlnx-pmu-iomod-intc.h
index 1fdba73b9f..01c9d040b8 100644
--- a/include/hw/intc/xlnx-pmu-iomod-intc.h
+++ b/include/hw/intc/xlnx-pmu-iomod-intc.h
@@ -25,7 +25,6 @@
#ifndef XLNX_PMU_IO_INTC_H
#define XLNX_PMU_IO_INTC_H
-#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "hw/register.h"
diff --git a/include/hw/intc/xlnx-zynqmp-ipi.h b/include/hw/intc/xlnx-zynqmp-ipi.h
index 4afa4ff313..866c719c6f 100644
--- a/include/hw/intc/xlnx-zynqmp-ipi.h
+++ b/include/hw/intc/xlnx-zynqmp-ipi.h
@@ -25,7 +25,6 @@
#ifndef XLNX_ZYNQMP_IPI_H
#define XLNX_ZYNQMP_IPI_H
-#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "hw/register.h"
diff --git a/include/hw/loader-fit.h b/include/hw/loader-fit.h
index 9e2a068a20..0284c3e02c 100644
--- a/include/hw/loader-fit.h
+++ b/include/hw/loader-fit.h
@@ -20,7 +20,7 @@
#ifndef HW_LOADER_FIT_H
#define HW_LOADER_FIT_H
-#include <exec/hwaddr.h>
+#include "exec/hwaddr.h"
struct fit_loader_match {
const char *compatible;
diff --git a/include/hw/loader.h b/include/hw/loader.h
index 355fe0f5a2..5edbe02b1c 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -1,6 +1,5 @@
#ifndef LOADER_H
#define LOADER_H
-#include "qapi/qmp/qdict.h"
#include "hw/nvram/fw_cfg.h"
/* loader.c */
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 7ccbae5fba..b2259cc4a3 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -1,7 +1,6 @@
#ifndef FW_CFG_H
#define FW_CFG_H
-#include "qemu/typedefs.h"
#include "exec/hwaddr.h"
#include "hw/nvram/fw_cfg_keys.h"
#include "hw/sysbus.h"
diff --git a/include/hw/pci-bridge/simba.h b/include/hw/pci-bridge/simba.h
index fac56ab1cf..e13ba27d0b 100644
--- a/include/hw/pci-bridge/simba.h
+++ b/include/hw/pci-bridge/simba.h
@@ -24,7 +24,6 @@
* THE SOFTWARE.
*/
-#include "qemu/osdep.h"
#include "hw/pci/pci_bridge.h"
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 18c0251b40..fc9d617a76 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -2,7 +2,6 @@
#define QDEV_CORE_H
#include "qemu/queue.h"
-#include "qemu/option.h"
#include "qemu/bitmap.h"
#include "qom/object.h"
#include "hw/irq.h"
diff --git a/include/hw/registerfields.h b/include/hw/registerfields.h
index 44e0b94edf..2659a58737 100644
--- a/include/hw/registerfields.h
+++ b/include/hw/registerfields.h
@@ -11,7 +11,7 @@
#ifndef REGISTERFIELDS_H
#define REGISTERFIELDS_H
-#include <qemu/bitops.h>
+#include "qemu/bitops.h"
/* Define constants for a 32 bit register */
diff --git a/include/hw/s390x/storage-attributes.h b/include/hw/s390x/storage-attributes.h
index 9be954d163..d6403a0a7e 100644
--- a/include/hw/s390x/storage-attributes.h
+++ b/include/hw/s390x/storage-attributes.h
@@ -12,7 +12,7 @@
#ifndef S390_STORAGE_ATTRIBUTES_H
#define S390_STORAGE_ATTRIBUTES_H
-#include <hw/qdev.h>
+#include "hw/qdev.h"
#include "monitor/monitor.h"
#define TYPE_S390_STATTRIB "s390-storage_attributes"
diff --git a/include/hw/smbios/smbios.h b/include/hw/smbios/smbios.h
index a83adb93d7..eeb5a4d7b6 100644
--- a/include/hw/smbios/smbios.h
+++ b/include/hw/smbios/smbios.h
@@ -14,7 +14,6 @@
*
*/
-#include "qemu/option.h"
#define SMBIOS_MAX_TYPE 127
diff --git a/include/hw/xtensa/xtensa-isa.h b/include/hw/xtensa/xtensa-isa.h
index 353f82ba25..bd68ada640 100644
--- a/include/hw/xtensa/xtensa-isa.h
+++ b/include/hw/xtensa/xtensa-isa.h
@@ -25,8 +25,6 @@
#ifndef XTENSA_LIBISA_H
#define XTENSA_LIBISA_H
-#include <stdint.h>
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/migration/colo.h b/include/migration/colo.h
index ff9874ea16..50ace16205 100644
--- a/include/migration/colo.h
+++ b/include/migration/colo.h
@@ -14,6 +14,7 @@
#define QEMU_COLO_H
#include "qemu-common.h"
+#include "qapi-types.h"
void colo_info_init(void);
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 83ea4a1aaf..ad64ad8e68 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -2,7 +2,6 @@
#define MONITOR_H
#include "qemu-common.h"
-#include "qapi/qmp/qdict.h"
#include "block/block.h"
#include "qemu/readline.h"
diff --git a/include/net/net.h b/include/net/net.h
index 4afac1a9dd..3fc48e4f51 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -2,12 +2,9 @@
#define QEMU_NET_H
#include "qemu/queue.h"
-#include "qemu-common.h"
-#include "qapi/qmp/qdict.h"
-#include "qemu/option.h"
+#include "qapi-types.h"
#include "net/queue.h"
#include "migration/vmstate.h"
-#include "qapi-types.h"
#define MAC_FMT "%02X:%02X:%02X:%02X:%02X:%02X"
#define MAC_ARG(x) ((uint8_t *)(x))[0], ((uint8_t *)(x))[1], \
diff --git a/include/net/slirp.h b/include/net/slirp.h
index 0c98e463db..4d63d74da4 100644
--- a/include/net/slirp.h
+++ b/include/net/slirp.h
@@ -24,10 +24,6 @@
#ifndef QEMU_NET_SLIRP_H
#define QEMU_NET_SLIRP_H
-#include "qemu-common.h"
-#include "qapi/qmp/qdict.h"
-#include "qemu/option.h"
-#include "qapi-types.h"
#ifdef CONFIG_SLIRP
diff --git a/include/net/tap.h b/include/net/tap.h
index 5da4edc692..ce6f8418ac 100644
--- a/include/net/tap.h
+++ b/include/net/tap.h
@@ -27,7 +27,6 @@
#define QEMU_NET_TAP_H
#include "qemu-common.h"
-#include "qapi-types.h"
#include "standard-headers/linux/virtio_net.h"
int tap_enable(NetClientState *nc);
diff --git a/include/qapi/clone-visitor.h b/include/qapi/clone-visitor.h
index a4915c7d57..b119d3daa9 100644
--- a/include/qapi/clone-visitor.h
+++ b/include/qapi/clone-visitor.h
@@ -11,7 +11,6 @@
#ifndef QAPI_CLONE_VISITOR_H
#define QAPI_CLONE_VISITOR_H
-#include "qemu/typedefs.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
diff --git a/include/qapi/opts-visitor.h b/include/qapi/opts-visitor.h
index 6462c96c29..9b989e7e08 100644
--- a/include/qapi/opts-visitor.h
+++ b/include/qapi/opts-visitor.h
@@ -14,7 +14,6 @@
#define OPTS_VISITOR_H
#include "qapi/visitor.h"
-#include "qemu/option.h"
/* Inclusive upper bound on the size of any flattened range. This is a safety
* (= anti-annoyance) measure; wrong ranges should not cause long startup
diff --git a/include/qapi/qmp-event.h b/include/qapi/qmp-event.h
index 40fe3cbc12..0c87ad833e 100644
--- a/include/qapi/qmp-event.h
+++ b/include/qapi/qmp-event.h
@@ -14,7 +14,6 @@
#ifndef QMP_EVENT_H
#define QMP_EVENT_H
-#include "qapi/qmp/qdict.h"
typedef void (*QMPEventFuncEmit)(unsigned event, QDict *dict, Error **errp);
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h
index 20578dcd48..1e694b5ecf 100644
--- a/include/qapi/qmp/dispatch.h
+++ b/include/qapi/qmp/dispatch.h
@@ -14,8 +14,7 @@
#ifndef QAPI_QMP_DISPATCH_H
#define QAPI_QMP_DISPATCH_H
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qdict.h"
+#include "qemu/queue.h"
typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);
diff --git a/include/qapi/qmp/json-parser.h b/include/qapi/qmp/json-parser.h
index 9987f8ca85..102f5c0068 100644
--- a/include/qapi/qmp/json-parser.h
+++ b/include/qapi/qmp/json-parser.h
@@ -15,7 +15,6 @@
#define QEMU_JSON_PARSER_H
#include "qemu-common.h"
-#include "qapi/qmp/qlist.h"
QObject *json_parser_parse(GQueue *tokens, va_list *ap);
QObject *json_parser_parse_err(GQueue *tokens, va_list *ap, Error **errp);
diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h
index f77ea86c4e..629c508d34 100644
--- a/include/qapi/qmp/qbool.h
+++ b/include/qapi/qmp/qbool.h
@@ -16,10 +16,10 @@
#include "qapi/qmp/qobject.h"
-typedef struct QBool {
+struct QBool {
QObject base;
bool value;
-} QBool;
+};
QBool *qbool_from_bool(bool value);
bool qbool_get_bool(const QBool *qb);
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index fc218e7be6..ff6f7842c3 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -14,9 +14,6 @@
#define QDICT_H
#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qnull.h"
-#include "qapi/qmp/qnum.h"
#include "qemu/queue.h"
#define QDICT_BUCKET_MAX 512
@@ -27,11 +24,11 @@ typedef struct QDictEntry {
QLIST_ENTRY(QDictEntry) next;
} QDictEntry;
-typedef struct QDict {
+struct QDict {
QObject base;
size_t size;
QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
-} QDict;
+};
/* Object API */
QDict *qdict_new(void);
@@ -55,17 +52,11 @@ void qdict_destroy_obj(QObject *obj);
#define qdict_put(qdict, key, obj) \
qdict_put_obj(qdict, key, QOBJECT(obj))
-/* Helpers for int, bool, null, and string */
-#define qdict_put_int(qdict, key, value) \
- qdict_put(qdict, key, qnum_from_int(value))
-#define qdict_put_bool(qdict, key, value) \
- qdict_put(qdict, key, qbool_from_bool(value))
-#define qdict_put_str(qdict, key, value) \
- qdict_put(qdict, key, qstring_from_str(value))
-#define qdict_put_null(qdict, key) \
- qdict_put(qdict, key, qnull())
+void qdict_put_bool(QDict *qdict, const char *key, bool value);
+void qdict_put_int(QDict *qdict, const char *key, int64_t value);
+void qdict_put_null(QDict *qdict, const char *key);
+void qdict_put_str(QDict *qdict, const char *key, const char *value);
-/* High level helpers */
double qdict_get_double(const QDict *qdict, const char *key);
int64_t qdict_get_int(const QDict *qdict, const char *key);
bool qdict_get_bool(const QDict *qdict, const char *key);
diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h
index 6e84082d5f..b274ac3a86 100644
--- a/include/qapi/qmp/qjson.h
+++ b/include/qapi/qmp/qjson.h
@@ -14,9 +14,6 @@
#ifndef QJSON_H
#define QJSON_H
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qstring.h"
-
QObject *qobject_from_json(const char *string, Error **errp);
QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2);
QObject *qobject_from_jsonv(const char *string, va_list *ap, Error **errp)
diff --git a/include/qapi/qmp/qlist.h b/include/qapi/qmp/qlist.h
index ec3fcc1a4c..5fd976a398 100644
--- a/include/qapi/qmp/qlist.h
+++ b/include/qapi/qmp/qlist.h
@@ -14,8 +14,6 @@
#define QLIST_H
#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qnum.h"
-#include "qapi/qmp/qnull.h"
#include "qemu/queue.h"
typedef struct QListEntry {
@@ -23,23 +21,18 @@ typedef struct QListEntry {
QTAILQ_ENTRY(QListEntry) next;
} QListEntry;
-typedef struct QList {
+struct QList {
QObject base;
QTAILQ_HEAD(,QListEntry) head;
-} QList;
+};
#define qlist_append(qlist, obj) \
qlist_append_obj(qlist, QOBJECT(obj))
-/* Helpers for int, bool, and string */
-#define qlist_append_int(qlist, value) \
- qlist_append(qlist, qnum_from_int(value))
-#define qlist_append_bool(qlist, value) \
- qlist_append(qlist, qbool_from_bool(value))
-#define qlist_append_str(qlist, value) \
- qlist_append(qlist, qstring_from_str(value))
-#define qlist_append_null(qlist) \
- qlist_append(qlist, qnull())
+void qlist_append_bool(QList *qlist, bool value);
+void qlist_append_int(QList *qlist, int64_t value);
+void qlist_append_null(QList *qlist);
+void qlist_append_str(QList *qlist, const char *value);
#define QLIST_FOREACH_ENTRY(qlist, var) \
for ((var) = ((qlist)->head.tqh_first); \
diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h
index b18406bce9..56f9d97bd9 100644
--- a/include/qapi/qmp/qlit.h
+++ b/include/qapi/qmp/qlit.h
@@ -14,7 +14,6 @@
#ifndef QLIT_H
#define QLIT_H
-#include "qapi-types.h"
#include "qobject.h"
typedef struct QLitDictEntry QLitDictEntry;
diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h
index c3d86794bb..15e3971c7f 100644
--- a/include/qapi/qmp/qnum.h
+++ b/include/qapi/qmp/qnum.h
@@ -44,7 +44,7 @@ typedef enum {
* in range: qnum_get_try_int() / qnum_get_try_uint() check range and
* convert under the hood.
*/
-typedef struct QNum {
+struct QNum {
QObject base;
QNumKind kind;
union {
@@ -52,7 +52,7 @@ typedef struct QNum {
uint64_t u64;
double dbl;
} u;
-} QNum;
+};
QNum *qnum_from_int(int64_t value);
QNum *qnum_from_uint(uint64_t value);
diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h
index 65c05a9be5..98070ef3d6 100644
--- a/include/qapi/qmp/qstring.h
+++ b/include/qapi/qmp/qstring.h
@@ -15,12 +15,12 @@
#include "qapi/qmp/qobject.h"
-typedef struct QString {
+struct QString {
QObject base;
char *string;
size_t length;
size_t capacity;
-} QString;
+};
QString *qstring_new(void);
QString *qstring_from_str(const char *str);
diff --git a/include/qapi/qmp/types.h b/include/qapi/qmp/types.h
deleted file mode 100644
index 749ac44dcb..0000000000
--- a/include/qapi/qmp/types.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Include all QEMU objects.
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QAPI_QMP_TYPES_H
-#define QAPI_QMP_TYPES_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qnum.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qnull.h"
-
-#endif /* QAPI_QMP_TYPES_H */
diff --git a/include/qapi/qobject-input-visitor.h b/include/qapi/qobject-input-visitor.h
index daee18c6ac..95985e25e5 100644
--- a/include/qapi/qobject-input-visitor.h
+++ b/include/qapi/qobject-input-visitor.h
@@ -16,7 +16,6 @@
#define QOBJECT_INPUT_VISITOR_H
#include "qapi/visitor.h"
-#include "qapi/qmp/qobject.h"
typedef struct QObjectInputVisitor QObjectInputVisitor;
diff --git a/include/qapi/qobject-output-visitor.h b/include/qapi/qobject-output-visitor.h
index e5a3490812..2b1726baf5 100644
--- a/include/qapi/qobject-output-visitor.h
+++ b/include/qapi/qobject-output-visitor.h
@@ -15,7 +15,6 @@
#define QOBJECT_OUTPUT_VISITOR_H
#include "qapi/visitor.h"
-#include "qapi/qmp/qobject.h"
typedef struct QObjectOutputVisitor QObjectOutputVisitor;
diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
index 62a51a54cb..ecff296c11 100644
--- a/include/qapi/visitor.h
+++ b/include/qapi/visitor.h
@@ -15,7 +15,7 @@
#ifndef QAPI_VISITOR_H
#define QAPI_VISITOR_H
-#include "qapi/qmp/qobject.h"
+#include "qapi-types.h"
/*
* The QAPI schema defines both a set of C data types, and a QMP wire
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 05319b9ddc..8a4f63c9de 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -16,8 +16,6 @@
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
-#include "qemu/option.h"
-
/* Copyright string for -version arguments, About dialogs, etc */
#define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \
"Fabrice Bellard and the QEMU Project developers"
diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h
index c80d5c8a33..d74f920152 100644
--- a/include/qemu/config-file.h
+++ b/include/qemu/config-file.h
@@ -1,8 +1,6 @@
#ifndef QEMU_CONFIG_FILE_H
#define QEMU_CONFIG_FILE_H
-#include "qemu/option.h"
-#include "qapi/qmp/qdict.h"
QemuOptsList *qemu_find_opts(const char *group);
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
diff --git a/include/qemu/option.h b/include/qemu/option.h
index a88c5f02b1..b127fb6db6 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -27,7 +27,6 @@
#define QEMU_OPTION_H
#include "qemu/queue.h"
-#include "qapi/qmp/qdict.h"
const char *get_opt_name(char *buf, int buf_size, const char *p, char delim);
const char *get_opt_value(char *buf, int buf_size, const char *p);
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index 8c93237866..03d45f44f8 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -26,6 +26,7 @@
#define THROTTLE_H
#include "qemu-common.h"
+#include "qapi-types.h"
#include "qemu/timer.h"
#define THROTTLE_VALUE_MAX 1000000000000000LL
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 5923849cdd..a46b0b347b 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -96,8 +96,13 @@ typedef struct QemuSpin QemuSpin;
typedef struct QEMUSGList QEMUSGList;
typedef struct QEMUTimer QEMUTimer;
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
-typedef struct QObject QObject;
+typedef struct QBool QBool;
+typedef struct QDict QDict;
+typedef struct QList QList;
typedef struct QNull QNull;
+typedef struct QNum QNum;
+typedef struct QObject QObject;
+typedef struct QString QString;
typedef struct RAMBlock RAMBlock;
typedef struct Range Range;
typedef struct SerialState SerialState;
diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h
index d23e11bc53..4d513fb329 100644
--- a/include/qom/object_interfaces.h
+++ b/include/qom/object_interfaces.h
@@ -2,7 +2,6 @@
#define OBJECT_INTERFACES_H
#include "qom/object.h"
-#include "qapi/qmp/qdict.h"
#include "qapi/visitor.h"
#define TYPE_USER_CREATABLE "user-creatable"
diff --git a/include/scsi/pr-manager.h b/include/scsi/pr-manager.h
index b2b37d63bc..5d2f13a5e4 100644
--- a/include/scsi/pr-manager.h
+++ b/include/scsi/pr-manager.h
@@ -2,7 +2,6 @@
#define PR_MANAGER_H
#include "qom/object.h"
-#include "qapi/qmp/qdict.h"
#include "qapi/visitor.h"
#include "qom/object_interfaces.h"
#include "block/aio.h"
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index f999bfd3be..d40d882e38 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -1,8 +1,7 @@
#ifndef QEMU_ARCH_INIT_H
#define QEMU_ARCH_INIT_H
-#include "qmp-commands.h"
-#include "qemu/option.h"
+#include "qapi-types.h"
enum {
QEMU_ARCH_ALL = -1,
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index df43bd0e07..c14bcfe8c6 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -38,7 +38,6 @@
#include "sysemu/dump-arch.h"
#include "sysemu/memory_mapping.h"
-#include "qapi-types.h"
typedef struct QEMU_PACKED MakedumpfileHeader {
char signature[16]; /* = "makedumpfile" */
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index ed6a437f4d..621a3f9d42 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -16,7 +16,6 @@
#include "sysemu/sysemu.h" /* for MAX_NODES */
#include "qom/object.h"
#include "exec/memory.h"
-#include "qemu/option.h"
#include "qemu/bitmap.h"
#define TYPE_MEMORY_BACKEND "memory-backend"
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index e4e43f6468..241118845c 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -12,8 +12,6 @@
#ifndef _HVF_H
#define _HVF_H
-#include "config-host.h"
-#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/bitops.h"
#include "exec/memory.h"
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
index b3545215f6..d99e5474b4 100644
--- a/include/sysemu/numa.h
+++ b/include/sysemu/numa.h
@@ -2,7 +2,6 @@
#define SYSEMU_NUMA_H
#include "qemu/bitmap.h"
-#include "qemu/option.h"
#include "sysemu/sysemu.h"
#include "sysemu/hostmem.h"
#include "hw/boards.h"
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index fa14d0ec0b..dc8ae7b6b1 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -12,7 +12,6 @@
*
*/
-#include "qapi-types.h"
#include "sysemu.h"
/* replay clock kinds */
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 1c925309e3..77bb3da582 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -2,10 +2,8 @@
#define SYSEMU_H
/* Misc. things related to the system emulator. */
-#include "qemu/option.h"
#include "qemu/queue.h"
#include "qemu/timer.h"
-#include "qapi-types.h"
#include "qemu/notify.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 233b1a3fc3..32b753d4f3 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -13,7 +13,6 @@
#define QEMU_TPM_H
#include "qom/object.h"
-#include "qapi-types.h"
int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
int tpm_init(void);
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 7e166ef954..14488820f6 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -15,7 +15,6 @@
#include "qom/object.h"
#include "qemu-common.h"
-#include "qapi-types.h"
#include "qemu/option.h"
#include "sysemu/tpm.h"
#include "qapi/error.h"
diff --git a/include/ui/console.h b/include/ui/console.h
index 7b35778444..12fef80923 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -3,12 +3,8 @@
#include "ui/qemu-pixman.h"
#include "qom/object.h"
-#include "qapi/qmp/qdict.h"
#include "qemu/notify.h"
-#include "qemu/typedefs.h"
-#include "qapi-types.h"
#include "qemu/error-report.h"
-#include "qapi/error.h"
#ifdef CONFIG_OPENGL
# include <epoxy/gl.h>
@@ -468,31 +464,10 @@ static inline void cocoa_display_init(DisplayState *ds, int full_screen)
void vnc_display_init(const char *id);
void vnc_display_open(const char *id, Error **errp);
void vnc_display_add_client(const char *id, int csock, bool skipauth);
-#ifdef CONFIG_VNC
int vnc_display_password(const char *id, const char *password);
int vnc_display_pw_expire(const char *id, time_t expires);
QemuOpts *vnc_parse(const char *str, Error **errp);
int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp);
-#else
-static inline int vnc_display_password(const char *id, const char *password)
-{
- return -ENODEV;
-}
-static inline int vnc_display_pw_expire(const char *id, time_t expires)
-{
- return -ENODEV;
-};
-static inline QemuOpts *vnc_parse(const char *str, Error **errp)
-{
- error_setg(errp, "VNC support is disabled");
- return NULL;
-}
-static inline int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp)
-{
- error_setg(errp, "VNC support is disabled");
- return -1;
-}
-#endif
/* curses.c */
#ifdef CONFIG_CURSES
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 52a9f8808b..c6d50eb87a 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -23,7 +23,6 @@
#ifdef CONFIG_SPICE
#include <spice.h>
-#include "qemu/option.h"
#include "qemu/config-file.h"
extern int using_spice;