Skip to content

Commit

Permalink
Include qapi/qmp/qerror.h exactly where needed
Browse files Browse the repository at this point in the history
In particular, don't include it into headers.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
  • Loading branch information
Markus Armbruster committed Jun 22, 2015
1 parent d49b683 commit cc7a8ea
Show file tree
Hide file tree
Showing 46 changed files with 25 additions and 21 deletions.
1 change: 0 additions & 1 deletion backends/hostmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "qapi/visitor.h"
#include "qapi-types.h"
#include "qapi-visit.h"
#include "qapi/qmp/qerror.h"
#include "qemu/config-file.h"
#include "qom/object_interfaces.h"

Expand Down
1 change: 1 addition & 0 deletions balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "sysemu/balloon.h"
#include "trace.h"
#include "qmp-commands.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qjson.h"

static QEMUBalloonEvent *balloon_event_fn;
Expand Down
1 change: 1 addition & 0 deletions block.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "block/blockjob.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qjson.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions block/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "block/block.h"
#include "block/block_int.h"
#include "block/blockjob.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"

#define BACKUP_CLUSTER_BITS 16
Expand Down
1 change: 1 addition & 0 deletions block/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"

enum {
Expand Down
1 change: 1 addition & 0 deletions block/mirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "trace.h"
#include "block/blockjob.h"
#include "block/block_int.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "qemu/bitmap.h"

Expand Down
1 change: 1 addition & 0 deletions block/qcow.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "block/block_int.h"
#include "qemu/module.h"
#include <zlib.h>
#include "qapi/qmp/qerror.h"
#include "qemu/aes.h"
#include "migration/migration.h"

Expand Down
1 change: 1 addition & 0 deletions block/quorum.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "block/block_int.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qlist.h"
Expand Down
1 change: 1 addition & 0 deletions block/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "block/snapshot.h"
#include "block/block_int.h"
#include "qapi/qmp/qerror.h"

QemuOptsList internal_snapshot_opts = {
.name = "snapshot",
Expand Down
1 change: 1 addition & 0 deletions block/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"

enum {
Expand Down
1 change: 1 addition & 0 deletions block/vmdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "qemu-common.h"
#include "block/block_int.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "migration/migration.h"
Expand Down
1 change: 1 addition & 0 deletions blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "qemu/config-file.h"
#include "qapi/qmp/types.h"
#include "qapi-visit.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp-output-visitor.h"
#include "qapi/util.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions blockjob.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "block/block.h"
#include "block/blockjob.h"
#include "block/block_int.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qjson.h"
#include "block/coroutine.h"
#include "qmp-commands.h"
Expand Down
1 change: 1 addition & 0 deletions dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "sysemu/memory_mapping.h"
#include "sysemu/cpus.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qmp-commands.h"

#include <zlib.h>
Expand Down
1 change: 1 addition & 0 deletions hmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "monitor/monitor.h"
#include "monitor/qdev.h"
#include "qapi/opts-visitor.h"
#include "qapi/qmp/qerror.h"
#include "qapi/string-output-visitor.h"
#include "qapi-visit.h"
#include "ui/console.h"
Expand Down
1 change: 0 additions & 1 deletion hw/char/serial-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include "hw/char/serial.h"
#include "hw/pci/pci.h"
#include "qapi/qmp/qerror.h"

#define PCI_SERIAL_MAX_PORTS 4

Expand Down
1 change: 0 additions & 1 deletion hw/dma/xilinx_axidma.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "qemu/log.h"
#include "qapi/qmp/qerror.h"
#include "qemu/main-loop.h"

#include "hw/stream.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "hw/pci/msix.h"
#include "sysemu/kvm.h"
#include "migration/migration.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/event_notifier.h"
#include "qemu/fifo8.h"
Expand Down
1 change: 0 additions & 1 deletion hw/net/xilinx_axienet.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "qemu/log.h"
#include "net/net.h"
#include "net/checksum.h"
#include "qapi/qmp/qerror.h"

#include "hw/stream.h"

Expand Down
1 change: 1 addition & 0 deletions hw/pci/pci-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "qapi/qmp/qerror.h"
#include "hw/pci/pci.h"
#include "qmp-commands.h"

Expand Down
1 change: 0 additions & 1 deletion hw/pci/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "hw/pci/pci_bus.h"
#include "hw/pci/pcie_regs.h"
#include "qemu/range.h"
#include "qapi/qmp/qerror.h"

//#define DEBUG_PCIE
#ifdef DEBUG_PCIE
Expand Down
1 change: 0 additions & 1 deletion hw/pci/shpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
#include "hw/pci/msi.h"
#include "qapi/qmp/qerror.h"

/* TODO: model power only and disabled slot states. */
/* TODO: handle SERR and wakeups */
Expand Down
1 change: 0 additions & 1 deletion hw/ppc/virtex_ml507.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "ppc405.h"

#include "sysemu/block-backend.h"
#include "qapi/qmp/qerror.h"

#define EPAPR_MAGIC (0x45504150)
#define FLASH_SIZE (16 * 1024 * 1024)
Expand Down
1 change: 1 addition & 0 deletions hw/s390x/s390-virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include "hw/hw.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/usb/redirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "qemu/timer.h"
#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "sysemu/char.h"
Expand Down
1 change: 0 additions & 1 deletion hw/virtio/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "qemu/iov.h"
#include "hw/qdev.h"
#include "qapi/qmp/qerror.h"
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-rng.h"
#include "sysemu/rng.h"
Expand Down
1 change: 0 additions & 1 deletion include/block/block_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "block/coroutine.h"
#include "qemu/timer.h"
#include "qapi-types.h"
#include "qapi/qmp/qerror.h"
#include "monitor/monitor.h"
#include "qemu/hbitmap.h"
#include "block/snapshot.h"
Expand Down
1 change: 0 additions & 1 deletion include/monitor/monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define MONITOR_H

#include "qemu-common.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qdict.h"
#include "block/block.h"
#include "qemu/readline.h"
Expand Down
1 change: 0 additions & 1 deletion include/qemu/sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ int inet_aton(const char *cp, struct in_addr *ia);

#include "qemu/option.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi-types.h"

extern QemuOptsList socket_optslist;
Expand Down
1 change: 1 addition & 0 deletions migration/migration.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "migration/qemu-file.h"
#include "sysemu/sysemu.h"
#include "block/block.h"
#include "qapi/qmp/qerror.h"
#include "qemu/sockets.h"
#include "migration/block.h"
#include "qemu/thread.h"
Expand Down
1 change: 1 addition & 0 deletions migration/savevm.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "qemu/timer.h"
#include "audio/audio.h"
#include "migration/migration.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "qemu/queue.h"
Expand Down
1 change: 1 addition & 0 deletions monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "sysemu/kvm.h"
#include "qemu/acl.h"
#include "sysemu/tpm.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qfloat.h"
#include "qapi/qmp/qlist.h"
Expand Down
1 change: 1 addition & 0 deletions net/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include "monitor/monitor.h"
#include "qemu-common.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "qemu/config-file.h"
Expand Down
1 change: 0 additions & 1 deletion numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "qapi-visit.h"
#include "qapi/opts-visitor.h"
#include "qapi/dealloc-visitor.h"
#include "qapi/qmp/qerror.h"
#include "hw/boards.h"
#include "sysemu/hostmem.h"
#include "qmp-commands.h"
Expand Down
1 change: 0 additions & 1 deletion qapi/qmp-output-visitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "qemu/queue.h"
#include "qemu-common.h"
#include "qapi/qmp/types.h"
#include "qapi/qmp/qerror.h"

typedef struct QStackEntry
{
Expand Down
1 change: 0 additions & 1 deletion qapi/string-output-visitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "qemu-common.h"
#include "qapi/string-output-visitor.h"
#include "qapi/visitor-impl.h"
#include "qapi/qmp/qerror.h"
#include "qemu/host-utils.h"
#include <math.h>
#include "qemu/range.h"
Expand Down
1 change: 1 addition & 0 deletions qdev-monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "monitor/qdev.h"
#include "qmp-commands.h"
#include "sysemu/arch_init.h"
#include "qapi/qmp/qerror.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"

Expand Down
1 change: 1 addition & 0 deletions qemu-img.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
#include "qapi-visit.h"
#include "qapi/qmp-output-visitor.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qjson.h"
#include "qemu-common.h"
#include "qemu/option.h"
Expand Down
1 change: 1 addition & 0 deletions qmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "hw/qdev.h"
#include "sysemu/blockdev.h"
#include "qom/qom-qobject.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qobject.h"
#include "qapi/qmp-input-visitor.h"
#include "hw/boards.h"
Expand Down
1 change: 0 additions & 1 deletion qobject/json-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/json-parser.h"
#include "qapi/qmp/json-lexer.h"
#include "qapi/qmp/qerror.h"

typedef struct JSONParserContext
{
Expand Down
1 change: 0 additions & 1 deletion scripts/qapi-commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ def gen_registry(commands):
fdef.write(mcgen('''
#include "qemu-common.h"
#include "qemu/module.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/types.h"
#include "qapi/qmp/dispatch.h"
#include "qapi/visitor.h"
Expand Down
1 change: 0 additions & 1 deletion stubs/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include "qemu-common.h"
#include "sysemu/dump-arch.h"
#include "qapi/qmp/qerror.h"
#include "qmp-commands.h"

int cpu_get_dump_info(ArchDumpInfo *info,
Expand Down
1 change: 0 additions & 1 deletion target-arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "internals.h"
#include "qemu-common.h"
#include "hw/qdev-properties.h"
#include "qapi/qmp/qerror.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/loader.h"
#endif
Expand Down
1 change: 0 additions & 1 deletion target-i386/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <asm/hyperv.h>
#include "hw/pci/pci.h"
#include "migration/migration.h"
#include "qapi/qmp/qerror.h"
#include "exec/memattrs.h"

//#define DEBUG_KVM
Expand Down
1 change: 1 addition & 0 deletions ui/vnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "qemu/timer.h"
#include "qemu/acl.h"
#include "qemu/config-file.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/types.h"
#include "qmp-commands.h"
#include "qemu/osdep.h"
Expand Down
1 change: 0 additions & 1 deletion util/qemu-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qmp/qerror.h"
#include "qapi/error.h"
#include "qmp-commands.h"

Expand Down

0 comments on commit cc7a8ea

Please sign in to comment.