[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineC
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration |
Date: |
Fri, 25 Apr 2014 22:03:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Am 09.04.2014 19:34, schrieb Marcel Apfelbaum:
> This minimizes QEMUMachine usage, as part of machine QOM-ification.
>
> Signed-off-by: Marcel Apfelbaum <address@hidden>
> ---
> include/hw/xen/xen.h | 2 +-
> include/qemu/typedefs.h | 1 +
> include/sysemu/kvm.h | 2 +-
> include/sysemu/qtest.h | 2 +-
> kvm-all.c | 6 +++---
> kvm-stub.c | 2 +-
> qtest.c | 2 +-
> vl.c | 10 +++++-----
> xen-all.c | 2 +-
> xen-stub.c | 2 +-
> 10 files changed, 16 insertions(+), 15 deletions(-)
[...]
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index bf8daac..86bab12 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -31,6 +31,7 @@ typedef struct MemoryListener MemoryListener;
> typedef struct MemoryMappingList MemoryMappingList;
>
> typedef struct QEMUMachine QEMUMachine;
> +typedef struct MachineClass MachineClass;
> typedef struct NICInfo NICInfo;
> typedef struct HCIInfo HCIInfo;
> typedef struct AudioState AudioState;
[snip]
You're adding this typedef in a central file, but keep the typedef in
include/hw/boards.h around. Chances are, some file will include both
qemu/typedefs.h and hw/boards.h. Older GCCs will complain about that.
Fixing as follows:
diff --git a/include/hw/boards.h b/include/hw/boards.h
index be2e432..8f53334 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -3,12 +3,11 @@
#ifndef HW_BOARDS_H
#define HW_BOARDS_H
+#include "qemu/typedefs.h"
#include "sysemu/blockdev.h"
#include "hw/qdev.h"
#include "qom/object.h"
-typedef struct MachineClass MachineClass;
-
typedef struct QEMUMachineInitArgs {
const MachineClass *machine;
ram_addr_t ram_size;
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass, Marcel Apfelbaum, 2014/04/09
- [Qemu-devel] [PATCH V3 2/5] vl.c: copy QEMUMachine's fields to MachineClass, Marcel Apfelbaum, 2014/04/09
- [Qemu-devel] [PATCH V3 1/5] hw/boards.h: remove obsoleted field from QEMUMachine, Marcel Apfelbaum, 2014/04/09
- [Qemu-devel] [PATCH V3 3/5] vl.c: Replace QEMUMachine with MachineClass in QEMUMachineInitArgs, Marcel Apfelbaum, 2014/04/09
- [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration, Marcel Apfelbaum, 2014/04/09
- Re: [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration,
Andreas Färber <=
- [Qemu-devel] [PATCH V3 5/5] machine: remove QEMUMachine indirection from MachineClass, Marcel Apfelbaum, 2014/04/09
- Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass, Marcel Apfelbaum, 2014/04/23
- Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass, Andreas Färber, 2014/04/25