Skip to content

Commit

Permalink
janitor: do not rely on indirect inclusions of or from qemu-char.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bonzini committed Dec 19, 2012
1 parent 8e98e2e commit 077805f
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions audio/alsaaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
#include <alsa/asoundlib.h>
#include "qemu-common.h"
#include "main-loop.h"
#include "qemu-char.h"
#include "audio.h"

Expand Down
1 change: 1 addition & 0 deletions audio/ossaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions block/blkdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "qemu-common.h"
#include "qemu-config.h"
#include "block_int.h"
#include "module.h"

Expand Down
1 change: 1 addition & 0 deletions block/iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions bt-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qemu-char.h"
#include "net.h"
#include "bt-host.h"
#include "main-loop.h"

#ifndef _WIN32
# include <errno.h>
Expand Down
1 change: 1 addition & 0 deletions bt-vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions event_notifier-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions hw/arm_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hw/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
#include "hw.h"
#include "isa.h"
#include "main-loop.h"

/* #define DEBUG_DMA */

Expand Down
1 change: 1 addition & 0 deletions hw/fw_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hw/jazz_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu-common.h"
#include "console.h"
#include "pixel_ops.h"
#include "trace.h"
Expand Down
1 change: 1 addition & 0 deletions hw/mac_dbdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "hw.h"
#include "isa.h"
#include "mac_dbdma.h"
#include "main-loop.h"

/* debug DBDMA */
//#define DEBUG_DBDMA
Expand Down
1 change: 1 addition & 0 deletions hw/ppc/e500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions hw/puv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions hw/qdev-monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hw/qdev-properties.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions hw/s390x/sclpconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "sclp.h"
#include "event-facility.h"
#include "qemu-char.h"

typedef struct ASCIIConsoleData {
EventBufferHeader ebh;
Expand Down
1 change: 1 addition & 0 deletions hw/spapr.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#include "exec-memory.h"
#include "hw/usb.h"
#include "qemu-config.h"

#include <libfdt.h>

Expand Down
1 change: 1 addition & 0 deletions hw/tcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* THE SOFTWARE.
*/

#include "qemu-common.h"
#include "console.h"
#include "pixel_ops.h"
#include "sysbus.h"
Expand Down
1 change: 1 addition & 0 deletions hw/usb/dev-network.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions qemu-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions spice-qemu-char.c
Original file line number Diff line number Diff line change
@@ -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>

Expand Down
1 change: 1 addition & 0 deletions target-i386/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 077805f

Please sign in to comment.