Commit a9c94277 authored by Markus Armbruster's avatar Markus Armbruster

Use #include "..." for our own headers, <...> for others

Tracked down with an ugly, brittle and probably buggy Perl script.

Also move includes converted to <...> up so they get included before
ours where that's obviously okay.
Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
Tested-by: 's avatarEric Blake <eblake@redhat.com>
Reviewed-by: 's avatarRichard Henderson <rth@twiddle.net>
parent b35399bb
......@@ -46,7 +46,6 @@
#ifdef __linux__
#include <scsi/sg.h>
#include <block/scsi.h>
#endif
typedef struct IscsiLun {
......
......@@ -19,9 +19,9 @@
*/
#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/hash.h"
#include "gcrypt.h"
static int qcrypto_hash_alg_map[QCRYPTO_HASH_ALG__MAX] = {
......
......@@ -19,9 +19,9 @@
*/
#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "gcrypt.h"
bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
{
......
......@@ -19,9 +19,9 @@
*/
#include "qemu/osdep.h"
#include <nettle/pbkdf2.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "nettle/pbkdf2.h"
bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
......
......@@ -36,7 +36,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
#include "qemu.h"
#else /* !CONFIG_USER_ONLY */
#include "hw/hw.h"
#include "exec/memory.h"
......
......@@ -21,10 +21,10 @@
*/
#include "qemu/osdep.h"
#include <hw/block/block.h>
#include <hw/hw.h>
#include <hw/pci/msix.h>
#include <hw/pci/pci.h>
#include "hw/block/block.h"
#include "hw/hw.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
......
......@@ -13,7 +13,7 @@
*/
#include "qemu/osdep.h"
#include <hw/qdev.h>
#include "hw/qdev.h"
#include "qemu/thread.h"
#include "qemu/error-report.h"
......
......@@ -24,7 +24,7 @@
#ifndef HW_VGA_INT_H
#define HW_VGA_INT_H 1
#include <hw/hw.h>
#include "hw/hw.h"
#include "exec/memory.h"
#define ST01_V_RETRACE 0x08
......
......@@ -21,7 +21,7 @@
#ifdef CONFIG_VIRGL
#include "virglrenderer.h"
#include <virglrenderer.h>
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
......
......@@ -28,7 +28,7 @@ static struct virtio_gpu_simple_resource*
virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id);
#ifdef CONFIG_VIRGL
#include "virglrenderer.h"
#include <virglrenderer.h>
#define VIRGL(_g, _virgl, _simple, ...) \
do { \
if (_g->use_virgl_renderer) { \
......
......@@ -22,14 +22,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "hw/timer/i8254.h"
#include "hw/timer/i8254_internal.h"
#include "sysemu/kvm.h"
#include "linux/kvm.h"
#define KVM_PIT_REINJECT_BIT 0
......
......@@ -20,7 +20,9 @@
* Copyright (C) 2008, Red Hat, Amit Shah (amit.shah@redhat.com)
* Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
*/
#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
......@@ -32,7 +34,6 @@
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
#include "linux/kvm.h"
#include "kvm_i386.h"
#include "hw/pci/pci-assign.h"
......
......@@ -22,17 +22,17 @@
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/pci/msi.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include <hw/ide/pci.h>
#include <hw/ide/ahci.h>
#include "hw/ide/internal.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"
#define DEBUG_AHCI 0
......
......@@ -23,15 +23,15 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include "hw/ide/pci.h"
/* CMD646 specific */
#define CFR 0x50
......
......@@ -23,10 +23,10 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
......@@ -35,7 +35,7 @@
#include "sysemu/block-backend.h"
#include "qemu/cutils.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
/* These values were based on a Seagate ST3500418AS but have been modified
to make more sense in QEMU */
......
......@@ -61,15 +61,15 @@
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/pci/msi.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include <hw/ide/ahci.h>
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"
#define ICH9_MSI_CAP_OFFSET 0x80
#define ICH9_SATA_CAP_OFFSET 0xA8
......
......@@ -23,13 +23,13 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
/***********************************************************/
/* ISA IDE definitions */
......
......@@ -29,7 +29,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
/* debug MACIO */
// #define DEBUG_MACIO
......
......@@ -23,13 +23,13 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pcmcia.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pcmcia.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
#define TYPE_MICRODRIVE "microdrive"
#define MICRODRIVE(obj) OBJECT_CHECK(MicroDriveState, (obj), TYPE_MICRODRIVE)
......
......@@ -28,7 +28,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
/***********************************************************/
/* MMIO based ide port
......
......@@ -23,14 +23,14 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include "qemu/error-report.h"
#include <hw/ide/pci.h>
#include "hw/ide/pci.h"
#define BMDMA_PAGE_SIZE 4096
......
......@@ -24,15 +24,15 @@
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include "hw/ide/pci.h"
static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size)
{
......
......@@ -17,11 +17,11 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include "hw/hw.h"
#include "sysemu/dma.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "hw/block/block.h"
......
......@@ -24,15 +24,15 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include "hw/ide/pci.h"
static uint64_t bmdma_read(void *opaque, hwaddr addr,
unsigned size)
......
......@@ -12,11 +12,11 @@
*/
#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "hw/hw.h"
#include "hw/qdev.h"
#include "hw/isa/isa.h"
#include "sysemu/kvm.h"
#include "linux/kvm.h"
#include "target-i386/hyperv.h"
#include "kvm_i386.h"
......
......@@ -12,11 +12,11 @@
#include "hw/ppc/spapr.h"
#include "hw/boards.h"
#include "qapi/error.h"
#include <sysemu/cpus.h>
#include "sysemu/cpus.h"
#include "target-ppc/kvm_ppc.h"
#include "hw/ppc/ppc.h"
#include "target-ppc/mmu-hash64.h"
#include <sysemu/numa.h>
#include "sysemu/numa.h"
static void spapr_cpu_reset(void *opaque)
{
......
......@@ -18,13 +18,13 @@
*/
#include "qemu/osdep.h"
#include <linux/vfio.h>
#include "qapi/error.h"
#include "qemu-common.h"
#include "cpu.h"
#include "hw/ppc/spapr.h"
#include "hw/pci-host/spapr.h"
#include "hw/pci/msix.h"
#include "linux/vfio.h"
#include "hw/vfio/vfio.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
......
......@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include <hw/qdev.h>
#include "hw/qdev.h"
#include "qemu/bitops.h"
#include "exec/address-spaces.h"
#include "cpu.h"
......
......@@ -18,9 +18,9 @@
#include "cpu.h"
#include "s390-pci-bus.h"
#include "s390-pci-inst.h"
#include <hw/pci/pci_bus.h>
#include <hw/pci/msi.h>
#include <qemu/error-report.h>
#include "hw/pci/pci_bus.h"
#include "hw/pci/msi.h"
#include "qemu/error-report.h"
/* #define DEBUG_S390PCI_BUS */
#ifdef DEBUG_S390PCI_BUS
......
......@@ -14,8 +14,8 @@
#ifndef HW_S390_PCI_BUS_H
#define HW_S390_PCI_BUS_H
#include <hw/pci/pci.h>
#include <hw/pci/pci_host.h>
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"
#include "hw/s390x/sclp.h"
#include "hw/s390x/s390_flic.h"
#include "hw/s390x/css.h"
......
......@@ -16,8 +16,8 @@
#include "cpu.h"
#include "s390-pci-inst.h"
#include "s390-pci-bus.h"
#include <exec/memory-internal.h>
#include <qemu/error-report.h>
#include "exec/memory-internal.h"
#include "qemu/error-report.h"
/* #define DEBUG_S390PCI_INST */
#ifdef DEBUG_S390PCI_INST
......
......@@ -15,7 +15,7 @@
#define HW_S390_PCI_INST_H
#include "s390-pci-bus.h"
#include <sysemu/dma.h>
#include "sysemu/dma.h"
/* CLP common request & response block size */
#define CLP_BLK_SIZE 4096
......
......@@ -12,7 +12,7 @@
*
*/
#include "qemu/osdep.h"
#include <hw/qdev.h>
#include "hw/qdev.h"
#include "sysemu/sysemu.h"
#include "hw/s390x/sclp.h"
#include "hw/s390x/event-facility.h"
......
......@@ -13,19 +13,19 @@
#ifndef HW_S390X_VIRTIO_CCW_H
#define HW_S390X_VIRTIO_CCW_H
#include <hw/virtio/virtio-blk.h>
#include <hw/virtio/virtio-net.h>
#include <hw/virtio/virtio-serial.h>
#include <hw/virtio/virtio-scsi.h>
#include "hw/virtio/virtio-blk.h"
#include "hw/virtio/virtio-net.h"
#include "hw/virtio/virtio-serial.h"
#include "hw/virtio/virtio-scsi.h"
#ifdef CONFIG_VHOST_SCSI
#include <hw/virtio/vhost-scsi.h>
#include "hw/virtio/vhost-scsi.h"
#endif
#include <hw/virtio/virtio-balloon.h>
#include <hw/virtio/virtio-rng.h>
#include <hw/virtio/virtio-bus.h>
#include "hw/virtio/virtio-balloon.h"
#include "hw/virtio/virtio-rng.h"
#include "hw/virtio/virtio-bus.h"
#include <hw/s390x/s390_flic.h>
#include <hw/s390x/css.h>
#include "hw/s390x/s390_flic.h"
#include "hw/s390x/css.h"
#include "ccw-device.h"
#include "hw/s390x/css-bridge.h"
......
......@@ -15,8 +15,9 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include <linux/vhost.h>
#include <sys/ioctl.h>
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/queue.h"
#include "monitor/monitor.h"
......@@ -27,7 +28,6 @@
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
#include "hw/fw-path-provider.h"
#include "linux/vhost.h"
#include "qemu/cutils.h"
/* Features supported by host kernel. */
......
......@@ -15,9 +15,9 @@
#include "hw/virtio/virtio-scsi.h"
#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include <hw/scsi/scsi.h>
#include <block/scsi.h>
#include <hw/virtio/virtio-bus.h>
#include "hw/scsi/scsi.h"
#include "block/scsi.h"
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
/* Context: QEMU global mutex held */
......
......@@ -20,9 +20,9 @@
#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "sysemu/block-backend.h"
#include <hw/scsi/scsi.h>
#include <block/scsi.h>
#include <hw/virtio/virtio-bus.h>
#include "hw/scsi/scsi.h"
#include "block/scsi.h"
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
static inline int virtio_scsi_get_lun(uint8_t *lun)
......
......@@ -28,7 +28,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/scsi/scsi.h"
#include <block/scsi.h>
#include "block/scsi.h"
#include "hw/pci/msi.h"
#include "vmw_pvscsi.h"
#include "trace.h"
......
......@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include <libusb.h>
#include <sys/user.h>
#include "qemu-common.h"
#include "qemu/config-file.h"
......@@ -31,7 +32,6 @@
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qstring.h"
#include "sys/user.h"
#include <xen/io/ring.h>
#include <xen/io/usbif.h>
......
......@@ -20,6 +20,9 @@
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#ifdef CONFIG_KVM
#include <linux/kvm.h>
#endif
#include <linux/vfio.h>
#include "hw/vfio/vfio-common.h"
......@@ -30,9 +33,6 @@
#include "qemu/error-report.h"
#include "qemu/range.h"
#include "sysemu/kvm.h"
#ifdef CONFIG_KVM
#include "linux/kvm.h"
#endif
#include "trace.h"
struct vfio_group_head vfio_group_list =
......
......@@ -9,12 +9,11 @@
*/
#include "qemu/osdep.h"
#include <linux/vhost.h>
#include <sys/ioctl.h>
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-backend.h"
#include "qemu/error-report.h"
#include "linux/vhost.h"
#include <sys/ioctl.h>
static int vhost_kernel_call(struct vhost_dev *dev, unsigned long int request,
void *arg)
......
......@@ -4,7 +4,7 @@
#ifndef HELPER_GEN_H
#define HELPER_GEN_H 1
#include <exec/helper-head.h>
#include "exec/helper-head.h"
#define DEF_HELPER_FLAGS_0(name, flags, ret) \
static inline void glue(gen_helper_, name)(dh_retvar_decl0(ret)) \
......
......@@ -4,7 +4,7 @@
#ifndef HELPER_PROTO_H
#define HELPER_PROTO_H 1
#include <exec/helper-head.h>
#include "exec/helper-head.h"
#define DEF_HELPER_FLAGS_0(name, flags, ret) \
dh_ctype(ret) HELPER(name) (void);
......
......@@ -4,7 +4,7 @@
#ifndef HELPER_TCG_H
#define HELPER_TCG_H 1
#include <exec/helper-head.h>
#include "exec/helper-head.h"
#define DEF_HELPER_FLAGS_0(NAME, FLAGS, ret) \
{ .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
......
......@@ -33,7 +33,7 @@
#ifndef EXEC_TB_HASH_XX
#define EXEC_TB_HASH_XX
#include <qemu/bitops.h>
#include "qemu/bitops.h"
#define PRIME32_1 2654435761U
#define PRIME32_2 2246822519U
......
......@@ -20,7 +20,7 @@
#ifndef __IMX_GPIO_H_
#define __IMX_GPIO_H_
#include <hw/sysbus.h>
#include "hw/sysbus.h"
#define TYPE_IMX_GPIO "imx.gpio"
#define IMX_GPIO(obj) OBJECT_CHECK(IMXGPIOState, (obj), TYPE_IMX_GPIO)
......
......@@ -21,7 +21,7 @@
#ifndef __IMX_I2C_H_
#define __IMX_I2C_H_
#include <hw/sysbus.h>
#include "hw/sysbus.h"
#define TYPE_IMX_I2C "imx.i2c"
#define IMX_I2C(obj) OBJECT_CHECK(IMXI2CState, (obj), TYPE_IMX_I2C)
......
......@@ -24,7 +24,7 @@
#ifndef HW_IDE_AHCI_H
#define HW_IDE_AHCI_H
#include <hw/sysbus.h>
#include "hw/sysbus.h"
#define AHCI_MEM_BAR_SIZE 0x1000
#define AHCI_MAX_PORTS 32
......
......@@ -6,8 +6,8 @@
* only files in hw/ide/ are supposed to include this file.
* non-internal declarations are in hw/ide.h
*/
#include <hw/ide.h>
#include <hw/isa/isa.h>
#include "hw/ide.h"
#include "hw/isa/isa.h"
#include "sysemu/dma.h"
#include "sysemu/sysemu.h"
#include "hw/block/block.h"
......
#ifndef HW_IDE_PCI_H
#define HW_IDE_PCI_H
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
#define BM_STATUS_DMAING 0x01
#define BM_STATUS_ERROR 0x02
......
......@@ -12,9 +12,9 @@
#if !defined(__HW_SPAPR_DRC_H__)
#define __HW_SPAPR_DRC_H__
#include <libfdt.h>
#include "qom/object.h"
#include "hw/qdev.h"
#include "libfdt.h"
#define TYPE_SPAPR_DR_CONNECTOR "spapr-dr-connector"
#define SPAPR_DR_CONNECTOR_GET_CLASS(obj) \
......
......@@ -15,7 +15,7 @@
#ifndef HW_S390_SCLP_EVENT_FACILITY_H
#define HW_S390_SCLP_EVENT_FACILITY_H
#include <hw/qdev.h>
#include "hw/qdev.h"
#include "qemu/thread.h"
#include "hw/s390x/sclp.h"
......
......@@ -14,8 +14,8 @@
#ifndef HW_S390_SCLP_H
#define HW_S390_SCLP_H
#include <hw/sysbus.h>
#include <hw/qdev.h>
#include "hw/sysbus.h"
#include "hw/qdev.h"