janitor: do not rely on indirect inclusions of or from qemu-char.h
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 25 Sep 2012 08:04:17 +0000 (10:04 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Dec 2012 07:29:52 +0000 (08:29 +0100)
Various header files rely on qemu-char.h including qemu-config.h or
main-loop.h, but they really do not need qemu-char.h at all (particularly
interesting is the case of the block layer!).  Clean this up, and also
add missing inclusions of qemu-char.h itself.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
26 files changed:
arch_init.c
audio/alsaaudio.c
audio/ossaudio.c
block/blkdebug.c
block/iscsi.c
bt-host.c
bt-vhci.c
event_notifier-posix.c
exec.c
hw/arm_boot.c
hw/dma.c
hw/fw_cfg.c
hw/jazz_led.c
hw/mac_dbdma.c
hw/ppc/e500.c
hw/puv3.c
hw/qdev-monitor.c
hw/qdev-properties.c
hw/s390x/sclpconsole.c
hw/spapr.c
hw/tcx.c
hw/usb/dev-network.c
net.c
qemu-config.h
spice-qemu-char.c
target-i386/kvm.c

index 1645f3079ad54634ea27a00b983f7e29e24fc29c..ef866cdea41a5248441d171bfa16d71984ff5987 100644 (file)
@@ -46,6 +46,7 @@
 #include "exec-memory.h"
 #include "hw/pcspk.h"
 #include "qemu/page_cache.h"
+#include "qemu-config.h"
 #include "qmp-commands.h"
 #include "trace.h"
 
index cb45b49c2ae44cbf5087c14da59bee64311bfab4..564d632d0cdea750b7b574b49869a1c629f99d8b 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include <alsa/asoundlib.h>
 #include "qemu-common.h"
+#include "main-loop.h"
 #include "qemu-char.h"
 #include "audio.h"
 
index df51b7cc5871ffeb2974362f352c390d9e298eec..45abe39a6d95752cdde45502a5ceb075a36e67b5 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/soundcard.h>
 #endif
 #include "qemu-common.h"
+#include "main-loop.h"
 #include "host-utils.h"
 #include "qemu-char.h"
 #include "audio.h"
index 294e98330602fc24ce4ac98d4c2cdf6862eccd1c..65556e73e58ace76e2a5a958dbc4ecdab6c04c18 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "qemu-common.h"
+#include "qemu-config.h"
 #include "block_int.h"
 #include "module.h"
 
index c0b70b3d3246db07fb146473ba96a97dc90e3f73..33b93d8000e98a31bbe8953f84f5f77218373a27 100644 (file)
@@ -27,6 +27,7 @@
 #include <poll.h>
 #include <arpa/inet.h>
 #include "qemu-common.h"
+#include "qemu-config.h"
 #include "qemu-error.h"
 #include "block_int.h"
 #include "trace.h"
index 0d3ad28e8c0c567eec70016e7acb00e4d641c3dc..8b47370b263ad822f09983cb38e99351f2b670e0 100644 (file)
--- a/bt-host.c
+++ b/bt-host.c
@@ -21,6 +21,7 @@
 #include "qemu-char.h"
 #include "net.h"
 #include "bt-host.h"
+#include "main-loop.h"
 
 #ifndef _WIN32
 # include <errno.h>
index bbc102985434e1ce217319e5e50ec612acfc39d1..878460aeb59c30719b54e8172cac44ee1349d376 100644 (file)
--- a/bt-vhci.c
+++ b/bt-vhci.c
@@ -21,6 +21,7 @@
 #include "qemu-char.h"
 #include "net.h"
 #include "hw/bt.h"
+#include "main-loop.h"
 
 #define VHCI_DEV       "/dev/vhci"
 #define VHCI_UDEV      "/dev/hci_vhci"
index 6f3239a3fcc399838f36a10b8ead8cd0a32fbcdb..f0bd839acd94022daec5f94d022fbab5bc9f68d4 100644 (file)
@@ -13,6 +13,7 @@
 #include "qemu-common.h"
 #include "event_notifier.h"
 #include "qemu-char.h"
+#include "main-loop.h"
 
 #ifdef CONFIG_EVENTFD
 #include <sys/eventfd.h>
diff --git a/exec.c b/exec.c
index 4c1246a9f94a4ee4536f3290f7c910c713fa14df..986084146ce602a2c8960ce76aedc1c406199029 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -33,6 +33,7 @@
 #include "kvm.h"
 #include "hw/xen.h"
 #include "qemu-timer.h"
+#include "qemu-config.h"
 #include "memory.h"
 #include "dma.h"
 #include "exec-memory.h"
index ec3b8d5d122c73c9e1d7d8d704902bd72332a343..63ff559cf725d34ac791a02e183e431b4f5eadd8 100644 (file)
@@ -15,6 +15,7 @@
 #include "loader.h"
 #include "elf.h"
 #include "device_tree.h"
+#include "qemu-config.h"
 
 #define KERNEL_ARGS_ADDR 0x100
 #define KERNEL_LOAD_ADDR 0x00010000
index c2d7b215624a10f55dd603e5f6e1907e85eba85c..364f54d2d7091640415aab7265e8128d34eb3ff2 100644 (file)
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -23,6 +23,7 @@
  */
 #include "hw.h"
 #include "isa.h"
+#include "main-loop.h"
 
 /* #define DEBUG_DMA */
 
index 2b92cda98aa60c3d76983d6dea1078942705a6d6..7b0e50f70db5cd0a73492e562cf0e2d88b33c022 100644 (file)
@@ -27,6 +27,7 @@
 #include "fw_cfg.h"
 #include "sysbus.h"
 #include "qemu-error.h"
+#include "qemu-config.h"
 
 /* debug firmware config */
 //#define DEBUG_FW_CFG
index 640e75ef2fe1f1ef0113e69ba8078f426baf0efd..09c77429e85364c27ba1740067ac3b932d215a6a 100644 (file)
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 
+#include "qemu-common.h"
 #include "console.h"
 #include "pixel_ops.h"
 #include "trace.h"
index e551156af922b9927c6dda640e24d6de8da65c1a..41eee50a35c3180cc224e6b6e26529462ec17886 100644 (file)
@@ -39,6 +39,7 @@
 #include "hw.h"
 #include "isa.h"
 #include "mac_dbdma.h"
+#include "main-loop.h"
 
 /* debug DBDMA */
 //#define DEBUG_DBDMA
index 8fab508c07b32f87157f4200f935ff7d397300e9..2b1558b16e073c79d98831a60946f4bd925b0ece 100644 (file)
@@ -19,6 +19,7 @@
 #include "e500.h"
 #include "e500-ccsr.h"
 #include "net.h"
+#include "qemu-config.h"
 #include "hw/hw.h"
 #include "hw/serial.h"
 #include "hw/pci/pci.h"
index 3d7734936b87ce9cbbfe61a75e9f6ced01dfba80..6f89c44e328635757270de28f34c86bb3c4e789d 100644 (file)
--- a/hw/puv3.c
+++ b/hw/puv3.c
@@ -8,6 +8,8 @@
  * published by the Free Software Foundation, or any later version.
  * See the COPYING file in the top-level directory.
  */
+
+#include "qemu-common.h"
 #include "console.h"
 #include "elf.h"
 #include "exec-memory.h"
index a1b4d6ae5feb01126b0e8299453232922b1c466b..5aaf74b98af7b387aba58e99952eb7262fbc110f 100644 (file)
@@ -21,6 +21,7 @@
 #include "monitor.h"
 #include "qmp-commands.h"
 #include "arch_init.h"
+#include "qemu-config.h"
 
 /*
  * Aliases were a bad idea from the start.  Let's keep them
index 81d901c6c410394f54879b6ad49ba0ecbc393754..b9cd3c007762cc85b028a2fde2c757423a5f3ad0 100644 (file)
@@ -5,6 +5,7 @@
 #include "hw/block-common.h"
 #include "net/hub.h"
 #include "qapi/qapi-visit-core.h"
+#include "qemu-char.h"
 
 void *qdev_get_prop_ptr(DeviceState *dev, Property *prop)
 {
index fece878e8830b7980b24201b1f888055ba3fa562..9ad297c9999367eec47c0f0f2b7e15d5d40360b6 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "sclp.h"
 #include "event-facility.h"
+#include "qemu-char.h"
 
 typedef struct ASCIIConsoleData {
     EventBufferHeader ebh;
index 9bd2fd5c8c5c5cbedf7591e72127e2d801e25dd5..7306ab368ab84198fa3d096ad3ea86faa16989a8 100644 (file)
@@ -49,6 +49,7 @@
 
 #include "exec-memory.h"
 #include "hw/usb.h"
+#include "qemu-config.h"
 
 #include <libfdt.h>
 
index 7aee2a9bd31b5b064e311656620719e9491fec30..a66fbeefdb13bbcebdf8166897bf87a5e1dd72ea 100644 (file)
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 
+#include "qemu-common.h"
 #include "console.h"
 #include "pixel_ops.h"
 #include "sysbus.h"
index 30cb03373e9d892225df343cb74eb5baa4cd5e31..0552e6f4380bd1f9d2ed5514c5514c71301f3b56 100644 (file)
@@ -28,6 +28,7 @@
 #include "hw/usb/desc.h"
 #include "net.h"
 #include "qemu-queue.h"
+#include "qemu-config.h"
 #include "sysemu.h"
 #include "iov.h"
 
diff --git a/net.c b/net.c
index e8ae13e2831dcd90f67a8499d313fd1d624181af..4f3d6424687950f378bdf5805e824f5b80a24c60 100644 (file)
--- a/net.c
+++ b/net.c
@@ -32,6 +32,7 @@
 #include "monitor.h"
 #include "qemu-common.h"
 #include "qemu_socket.h"
+#include "qemu-config.h"
 #include "qmp-commands.h"
 #include "hw/qdev.h"
 #include "iov.h"
index 812c4c5b10f0d6c9833b7c36f5c840c40e7efba7..eb50eca838a8cdccf675588f7ac70f6ab17c0539 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include "qemu-option.h"
 #include "error.h"
+#include "qemu-option.h"
 
 extern QemuOptsList qemu_fsdev_opts;
 extern QemuOptsList qemu_virtfs_opts;
index 09aa22d5668ac7456ac59050c3b6948586a21d7c..5f95c937f3368dd900ebb1417a67aa55f0552c62 100644 (file)
@@ -1,6 +1,7 @@
 #include "config-host.h"
 #include "trace.h"
 #include "ui/qemu-spice.h"
+#include "qemu-char.h"
 #include <spice.h>
 #include <spice-experimental.h>
 
index 0901589a8848aa7c1cce3968723f27b88d4c3255..824930c749ec16bf410425976050cdb7d0488801 100644 (file)
@@ -27,6 +27,7 @@
 #include "cpu.h"
 #include "gdbstub.h"
 #include "host-utils.h"
+#include "qemu-config.h"
 #include "hw/pc.h"
 #include "hw/apic.h"
 #include "ioport.h"