qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 2/8] make machine_class_init() accessible outside


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [RFC 2/8] make machine_class_init() accessible outside of vl.c
Date: Sun, 23 Mar 2014 18:22:10 +0200

On Sun, 2014-03-23 at 17:27 +0200, Marcel Apfelbaum wrote:
> On Thu, 2014-03-20 at 16:01 +0100, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> >  hw/core/machine.c   |    7 +++++++
> >  include/hw/boards.h |    2 ++
> >  vl.c                |    7 -------
> >  3 files changed, 9 insertions(+), 7 deletions(-)
> > 
> > diff --git a/hw/core/machine.c b/hw/core/machine.c
> > index d3ffef7..ae308f4 100644
> > --- a/hw/core/machine.c
> > +++ b/hw/core/machine.c
> > @@ -12,6 +12,13 @@
> >  
> >  #include "hw/boards.h"
> >  
> > +void machine_class_init(ObjectClass *oc, void *data)
> As I said in 3/8 review, if we *need* to move the above method,
> I would hide it in hw/core/machine.c.
Just to make it more clear, I was talking about not making
it visible in "hw/boards.h", because you *did* move it to
hw/core/machine.c :)

Thanks,
Marcel

> 
> Please have a look on 3/8 review for details.
> Thanks,
> Marcel
> 
> > +{
> > +    MachineClass *mc = MACHINE_CLASS(oc);
> > +
> > +    mc->qemu_machine = data;
> > +}
> > +
> >  static const TypeInfo machine_info = {
> >      .name = TYPE_MACHINE,
> >      .parent = TYPE_OBJECT,
> > diff --git a/include/hw/boards.h b/include/hw/boards.h
> > index 22d9496..e1f1938 100644
> > --- a/include/hw/boards.h
> > +++ b/include/hw/boards.h
> > @@ -81,6 +81,8 @@ struct MachineClass {
> >      QEMUMachine *qemu_machine;
> >  };
> >  
> > +void machine_class_init(ObjectClass *oc, void *data);
> > +
> >  /**
> >   * MachineState:
> >   */
> > diff --git a/vl.c b/vl.c
> > index 7bae6fe..05b1158 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -1588,13 +1588,6 @@ void pcmcia_info(Monitor *mon, const QDict *qdict)
> >  
> >  MachineState *current_machine;
> >  
> > -static void machine_class_init(ObjectClass *oc, void *data)
> > -{
> > -    MachineClass *mc = MACHINE_CLASS(oc);
> > -
> > -    mc->qemu_machine = data;
> > -}
> > -
> >  int qemu_register_machine(QEMUMachine *m)
> >  {
> >      TypeInfo ti = {
> 
> 
> 
> 






reply via email to

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