aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-02-01 12:18:35 +0100
committerMarkus Armbruster <armbru@redhat.com>2018-02-09 13:52:15 +0100
commit6b67395762a4c8b6ca94364e0a0f616a6470c46a (patch)
tree6ca3237d7c98a02499507f9c3c01ed09a764be7c
parent9f5c734d591e26186a71f9e36d752f4798df3672 (diff)
Eliminate qapi/qmp/types.h
qapi/qmp/types.h is a convenience header to include a number of qapi/qmp/ headers. Since we rarely need all of the headers qapi/qmp/types.h includes, we bypass it most of the time. Most of the places that use it don't need all the headers, either. Include the necessary headers directly, and drop qapi/qmp/types.h. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-9-armbru@redhat.com>
-rw-r--r--block/qapi.c3
-rw-r--r--block/qcow2.c3
-rw-r--r--blockdev.c2
-rw-r--r--hw/pci/pcie_aer.c1
-rw-r--r--hw/watchdog/watchdog.c1
-rw-r--r--include/qapi/qmp/types.h24
-rw-r--r--monitor.c2
-rw-r--r--qapi/qapi-dealloc-visitor.c1
-rw-r--r--qapi/qmp-dispatch.c1
-rw-r--r--qapi/qobject-input-visitor.c2
-rw-r--r--qapi/qobject-output-visitor.c3
-rw-r--r--qobject/json-parser.c3
-rw-r--r--qobject/qjson.c2
-rw-r--r--qobject/qlit.c4
-rw-r--r--qobject/qobject.c4
-rw-r--r--scripts/qapi-commands.py1
-rw-r--r--target/i386/cpu.c1
-rw-r--r--tests/check-qjson.c2
-rw-r--r--tests/check-qobject.c3
-rw-r--r--tests/cpu-plug-test.c1
-rw-r--r--tests/qom-test.c1
-rw-r--r--tests/test-clone-visitor.c1
-rw-r--r--tests/test-qmp-commands.c3
-rw-r--r--tests/test-qmp-event.c3
-rw-r--r--tests/test-qobject-input-visitor.c2
-rw-r--r--tests/test-qobject-output-visitor.c2
-rw-r--r--tests/test-string-input-visitor.c1
-rw-r--r--tests/test-string-output-visitor.c1
-rw-r--r--tests/test-visitor-serialization.c1
-rw-r--r--ui/vnc.c1
-rw-r--r--util/qemu-option.c4
31 files changed, 30 insertions, 54 deletions
diff --git a/block/qapi.c b/block/qapi.c
index 4fc9fd8082..1ab4372519 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -31,7 +31,8 @@
#include "qapi-visit.h"
#include "qapi/error.h"
#include "qapi/qobject-output-visitor.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qstring.h"
#include "sysemu/block-backend.h"
#include "qemu/cutils.h"
diff --git a/block/qcow2.c b/block/qcow2.c
index 7645b3c6ae..700c06245b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -32,7 +32,8 @@
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qstring.h"
#include "qapi-event.h"
#include "trace.h"
#include "qemu/option_int.h"
diff --git a/blockdev.c b/blockdev.c
index ad82dbbeee..8a47459937 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -40,7 +40,7 @@
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qstring.h"
#include "qapi-visit.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index b009be7f17..071e5e9bbb 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
-#include "qapi/qmp/types.h"
#include "qapi/qmp/qjson.h"
#include "monitor/monitor.h"
#include "hw/pci/pci_bridge.h"
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index 25dcb25ff1..98a5dd6689 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -24,7 +24,6 @@
#include "qemu/config-file.h"
#include "qemu/queue.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
#include "sysemu/sysemu.h"
#include "sysemu/watchdog.h"
#include "qapi-event.h"
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/monitor.c b/monitor.c
index 2de69f648f..f38640c1e4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -53,7 +53,7 @@
#include "qemu/acl.h"
#include "sysemu/tpm.h"
#include "qapi/qmp/qerror.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/json-streamer.h"
#include "qapi/qmp/json-parser.h"
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index ed70a0158b..c7d5f80302 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -16,7 +16,6 @@
#include "qapi/dealloc-visitor.h"
#include "qemu/queue.h"
#include "qemu-common.h"
-#include "qapi/qmp/types.h"
#include "qapi/visitor-impl.h"
struct QapiDeallocVisitor
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 8829c4a45a..92f957f40e 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -13,7 +13,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
#include "qapi/qmp/dispatch.h"
#include "qapi/qmp/json-parser.h"
#include "qapi/qmp/qjson.h"
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c
index ee9e47d911..8fb34c472e 100644
--- a/qapi/qobject-input-visitor.c
+++ b/qapi/qobject-input-visitor.c
@@ -20,7 +20,7 @@
#include "qemu/queue.h"
#include "qemu-common.h"
#include "qapi/qmp/qjson.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qerror.h"
#include "qemu/cutils.h"
#include "qemu/option.h"
diff --git a/qapi/qobject-output-visitor.c b/qapi/qobject-output-visitor.c
index d325163e55..60398765df 100644
--- a/qapi/qobject-output-visitor.c
+++ b/qapi/qobject-output-visitor.c
@@ -17,7 +17,8 @@
#include "qapi/visitor-impl.h"
#include "qemu/queue.h"
#include "qemu-common.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qstring.h"
typedef struct QStackEntry {
QObject *value;
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 724ca240e4..30dfb9dc41 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -15,7 +15,8 @@
#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qemu-common.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qstring.h"
#include "qapi/qmp/json-parser.h"
#include "qapi/qmp/json-lexer.h"
#include "qapi/qmp/json-streamer.h"
diff --git a/qobject/qjson.c b/qobject/qjson.c
index 2e0930884e..fe89213247 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -17,7 +17,7 @@
#include "qapi/qmp/json-parser.h"
#include "qapi/qmp/json-streamer.h"
#include "qapi/qmp/qjson.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qemu/unicode.h"
typedef struct JSONParsingState
diff --git a/qobject/qlit.c b/qobject/qlit.c
index 3c4882c784..dbf19225c8 100644
--- a/qobject/qlit.c
+++ b/qobject/qlit.c
@@ -16,7 +16,9 @@
#include "qemu/osdep.h"
#include "qapi/qmp/qlit.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qstring.h"
static bool qlit_equal_qdict(const QLitObject *lhs, const QDict *qdict)
{
diff --git a/qobject/qobject.c b/qobject/qobject.c
index b2a536041d..9b61ece06b 100644
--- a/qobject/qobject.c
+++ b/qobject/qobject.c
@@ -9,7 +9,9 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qstring.h"
static void (*qdestroy[QTYPE__MAX])(QObject *) = {
[QTYPE_NONE] = NULL, /* No such object exists */
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index dc7c418923..26c56c5062 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -293,7 +293,6 @@ fdef.write(mcgen('''
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/module.h"
-#include "qapi/qmp/types.h"
#include "qapi/visitor.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qobject-input-visitor.h"
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 0378193828..5cb63eae41 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -32,7 +32,6 @@
#include "qemu/config-file.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
-#include "qapi/qmp/types.h"
#include "qapi-visit.h"
#include "qapi/visitor.h"
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 59227934ce..7881009f1c 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -14,7 +14,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qlit.h"
#include "qemu-common.h"
diff --git a/tests/check-qobject.c b/tests/check-qobject.c
index 710f9e6b0a..06b9c6ec34 100644
--- a/tests/check-qobject.c
+++ b/tests/check-qobject.c
@@ -8,7 +8,8 @@
*/
#include "qemu/osdep.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qstring.h"
#include "qemu-common.h"
#include <math.h>
diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
index 05d82f76c4..65456c9e37 100644
--- a/tests/cpu-plug-test.c
+++ b/tests/cpu-plug-test.c
@@ -11,7 +11,6 @@
#include "qemu-common.h"
#include "libqtest.h"
-#include "qapi/qmp/types.h"
struct PlugTestData {
char *machine;
diff --git a/tests/qom-test.c b/tests/qom-test.c
index ab0595dc75..0ee990710c 100644
--- a/tests/qom-test.c
+++ b/tests/qom-test.c
@@ -12,7 +12,6 @@
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "libqtest.h"
-#include "qapi/qmp/types.h"
static const char *blacklist_x86[] = {
"xenfv", "xenpv", NULL
diff --git a/tests/test-clone-visitor.c b/tests/test-clone-visitor.c
index 6b6d4aaeba..9aeaf86a07 100644
--- a/tests/test-clone-visitor.c
+++ b/tests/test-clone-visitor.c
@@ -12,7 +12,6 @@
#include "qemu-common.h"
#include "qapi/clone-visitor.h"
#include "test-qapi-visit.h"
-#include "qapi/qmp/types.h"
static void test_clone_struct(void)
{
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index 52c1802eaf..4794d1a9d8 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -1,6 +1,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qstring.h"
#include "test-qmp-commands.h"
#include "qapi/error.h"
#include "qapi/qmp/dispatch.h"
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index 5be2d8efcf..b197dff453 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -17,8 +17,9 @@
#include "test-qapi-visit.h"
#include "test-qapi-event.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qobject.h"
+#include "qapi/qmp/qstring.h"
#include "qapi/qmp-event.h"
typedef struct TestEventData {
diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c
index ade6062e2c..96405991bb 100644
--- a/tests/test-qobject-input-visitor.c
+++ b/tests/test-qobject-input-visitor.c
@@ -17,7 +17,7 @@
#include "qapi/error.h"
#include "qapi/qobject-input-visitor.h"
#include "test-qapi-visit.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qjson.h"
#include "test-qmp-introspect.h"
#include "qmp-introspect.h"
diff --git a/tests/test-qobject-output-visitor.c b/tests/test-qobject-output-visitor.c
index 1cff769b15..a0b7fe6add 100644
--- a/tests/test-qobject-output-visitor.c
+++ b/tests/test-qobject-output-visitor.c
@@ -16,7 +16,7 @@
#include "qapi/error.h"
#include "qapi/qobject-output-visitor.h"
#include "test-qapi-visit.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qjson.h"
typedef struct TestOutputVisitorData {
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 4473944f3f..88e0e1aa9a 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -16,7 +16,6 @@
#include "qapi/error.h"
#include "qapi/string-input-visitor.h"
#include "test-qapi-visit.h"
-#include "qapi/qmp/types.h"
typedef struct TestInputVisitorData {
Visitor *v;
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c
index facb76ffc3..fa4b4ca288 100644
--- a/tests/test-string-output-visitor.c
+++ b/tests/test-string-output-visitor.c
@@ -16,7 +16,6 @@
#include "qapi/error.h"
#include "qapi/string-output-visitor.h"
#include "test-qapi-visit.h"
-#include "qapi/qmp/types.h"
typedef struct TestOutputVisitorData {
Visitor *ov;
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index a3407d205d..928a82b2e6 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -17,7 +17,6 @@
#include "qemu-common.h"
#include "test-qapi-visit.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/qobject-output-visitor.h"
diff --git a/ui/vnc.c b/ui/vnc.c
index 0f12799f38..a34b128193 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -35,7 +35,6 @@
#include "qemu/acl.h"
#include "qemu/config-file.h"
#include "qapi/error.h"
-#include "qapi/qmp/types.h"
#include "qmp-commands.h"
#include "ui/input.h"
#include "qapi-event.h"
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 553d3dc552..d790c1b85a 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -28,7 +28,9 @@
#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
-#include "qapi/qmp/types.h"
+#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/qstring.h"
#include "qapi/qmp/qerror.h"
#include "qemu/option_int.h"
#include "qemu/cutils.h"