Message ID | 1396257993-4036-6-git-send-email-marcel.a@redhat.com |
---|---|
State | New |
Headers | show |
Am 31.03.2014 11:26, schrieb Marcel Apfelbaum: > All the references of QEMUMachine are already > replaced by MachineClass. > > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> > --- > include/hw/boards.h | 7 +++---- > vl.c | 3 +-- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 7cf1f07..66ee98a 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -7,8 +7,10 @@ > #include "hw/qdev.h" > #include "qom/object.h" > > +typedef struct MachineClass MachineClass; > + > typedef struct QEMUMachineInitArgs { > - const QEMUMachine *machine; > + const MachineClass *machine; > ram_addr_t ram_size; > const char *boot_order; > const char *kernel_filename; > @@ -46,7 +48,6 @@ struct QEMUMachine { > const char *default_machine_opts; > const char *default_boot_order; > GlobalProperty *compat_props; > - struct QEMUMachine *next; This field shouldn't be used in qemu.git any more since you adopted the QOM way of iterating over the types. Could you drop this field as a very first patch, pointing to the commit which obsoleted it? Regards, Andreas > const char *hw_version; > }; > > @@ -63,7 +64,6 @@ int qemu_register_machine(QEMUMachine *m); > OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE) > > typedef struct MachineState MachineState; > -typedef struct MachineClass MachineClass; > > MachineClass *find_default_machine(void); > extern MachineState *current_machine; > @@ -77,7 +77,6 @@ struct MachineClass { > ObjectClass parent_class; > /*< public >*/ > > - QEMUMachine *qemu_machine; > const char *name; > const char *alias; > const char *desc; > diff --git a/vl.c b/vl.c > index a4f8a6b..190bd5d 100644 > --- a/vl.c > +++ b/vl.c > @@ -2961,7 +2961,6 @@ int main(int argc, char **argv, char **envp) > const char *optarg; > const char *loadvm = NULL; > MachineClass *machine_class; > - QEMUMachine *machine = NULL; > const char *cpu_model; > const char *vga_model = NULL; > const char *qtest_chrdev = NULL; > @@ -4388,7 +4387,7 @@ int main(int argc, char **argv, char **envp) > > qdev_machine_init(); > > - QEMUMachineInitArgs args = { .machine = machine, > + QEMUMachineInitArgs args = { .machine = machine_class, > .ram_size = ram_size, > .boot_order = boot_order, > .kernel_filename = kernel_filename, >
On Thu, 2014-04-03 at 19:09 +0200, Andreas Färber wrote: > Am 31.03.2014 11:26, schrieb Marcel Apfelbaum: > > All the references of QEMUMachine are already > > replaced by MachineClass. > > > > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> > > --- > > include/hw/boards.h | 7 +++---- > > vl.c | 3 +-- > > 2 files changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/include/hw/boards.h b/include/hw/boards.h > > index 7cf1f07..66ee98a 100644 > > --- a/include/hw/boards.h > > +++ b/include/hw/boards.h > > @@ -7,8 +7,10 @@ > > #include "hw/qdev.h" > > #include "qom/object.h" > > > > +typedef struct MachineClass MachineClass; > > + > > typedef struct QEMUMachineInitArgs { > > - const QEMUMachine *machine; > > + const MachineClass *machine; > > ram_addr_t ram_size; > > const char *boot_order; > > const char *kernel_filename; > > @@ -46,7 +48,6 @@ struct QEMUMachine { > > const char *default_machine_opts; > > const char *default_boot_order; > > GlobalProperty *compat_props; > > - struct QEMUMachine *next; > > This field shouldn't be used in qemu.git any more since you adopted the > QOM way of iterating over the types. Could you drop this field as a very > first patch, pointing to the commit which obsoleted it? Sure, Thanks, Marcel > > Regards, > Andreas > > > const char *hw_version; > > }; > > > > @@ -63,7 +64,6 @@ int qemu_register_machine(QEMUMachine *m); > > OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE) > > > > typedef struct MachineState MachineState; > > -typedef struct MachineClass MachineClass; > > > > MachineClass *find_default_machine(void); > > extern MachineState *current_machine; > > @@ -77,7 +77,6 @@ struct MachineClass { > > ObjectClass parent_class; > > /*< public >*/ > > > > - QEMUMachine *qemu_machine; > > const char *name; > > const char *alias; > > const char *desc; > > diff --git a/vl.c b/vl.c > > index a4f8a6b..190bd5d 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -2961,7 +2961,6 @@ int main(int argc, char **argv, char **envp) > > const char *optarg; > > const char *loadvm = NULL; > > MachineClass *machine_class; > > - QEMUMachine *machine = NULL; > > const char *cpu_model; > > const char *vga_model = NULL; > > const char *qtest_chrdev = NULL; > > @@ -4388,7 +4387,7 @@ int main(int argc, char **argv, char **envp) > > > > qdev_machine_init(); > > > > - QEMUMachineInitArgs args = { .machine = machine, > > + QEMUMachineInitArgs args = { .machine = machine_class, > > .ram_size = ram_size, > > .boot_order = boot_order, > > .kernel_filename = kernel_filename, > > > >
diff --git a/include/hw/boards.h b/include/hw/boards.h index 7cf1f07..66ee98a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -7,8 +7,10 @@ #include "hw/qdev.h" #include "qom/object.h" +typedef struct MachineClass MachineClass; + typedef struct QEMUMachineInitArgs { - const QEMUMachine *machine; + const MachineClass *machine; ram_addr_t ram_size; const char *boot_order; const char *kernel_filename; @@ -46,7 +48,6 @@ struct QEMUMachine { const char *default_machine_opts; const char *default_boot_order; GlobalProperty *compat_props; - struct QEMUMachine *next; const char *hw_version; }; @@ -63,7 +64,6 @@ int qemu_register_machine(QEMUMachine *m); OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE) typedef struct MachineState MachineState; -typedef struct MachineClass MachineClass; MachineClass *find_default_machine(void); extern MachineState *current_machine; @@ -77,7 +77,6 @@ struct MachineClass { ObjectClass parent_class; /*< public >*/ - QEMUMachine *qemu_machine; const char *name; const char *alias; const char *desc; diff --git a/vl.c b/vl.c index a4f8a6b..190bd5d 100644 --- a/vl.c +++ b/vl.c @@ -2961,7 +2961,6 @@ int main(int argc, char **argv, char **envp) const char *optarg; const char *loadvm = NULL; MachineClass *machine_class; - QEMUMachine *machine = NULL; const char *cpu_model; const char *vga_model = NULL; const char *qtest_chrdev = NULL; @@ -4388,7 +4387,7 @@ int main(int argc, char **argv, char **envp) qdev_machine_init(); - QEMUMachineInitArgs args = { .machine = machine, + QEMUMachineInitArgs args = { .machine = machine_class, .ram_size = ram_size, .boot_order = boot_order, .kernel_filename = kernel_filename,
All the references of QEMUMachine are already replaced by MachineClass. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> --- include/hw/boards.h | 7 +++---- vl.c | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-)