qemu-devel
[Top][All Lists]
Advanced

[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: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration
Date: Sun, 27 Apr 2014 11:42:24 +0300

On Fri, 2014-04-25 at 22:03 +0200, Andreas Färber wrote:
> 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.

Good catch! Thanks!
Marcel

> 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
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]