From 3ef9622182e598392855931e7a0437d3855cef5e Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 7 May 2014 17:42:57 +0300 Subject: machine: Conversion of QEMUMachineInitArgs to MachineState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum Acked-by: Cornelia Huck (s390) Reviewed-by: Michael S. Tsirkin (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber --- include/hw/boards.h | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'include/hw') diff --git a/include/hw/boards.h b/include/hw/boards.h index 4345bd0..b62de4a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -8,17 +8,10 @@ #include "hw/qdev.h" #include "qom/object.h" -typedef struct QEMUMachineInitArgs { - const MachineClass *machine; - ram_addr_t ram_size; - const char *boot_order; - const char *kernel_filename; - const char *kernel_cmdline; - const char *initrd_filename; - const char *cpu_model; -} QEMUMachineInitArgs; -typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args); +typedef struct MachineState MachineState; + +typedef void QEMUMachineInitFunc(MachineState *ms); typedef void QEMUMachineResetFunc(void); @@ -62,8 +55,6 @@ int qemu_register_machine(QEMUMachine *m); #define MACHINE_CLASS(klass) \ OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE) -typedef struct MachineState MachineState; - MachineClass *find_default_machine(void); extern MachineState *current_machine; @@ -80,7 +71,7 @@ struct MachineClass { const char *alias; const char *desc; - void (*init)(QEMUMachineInitArgs *args); + void (*init)(MachineState *state); void (*reset)(void); void (*hot_add_cpu)(const int64_t id, Error **errp); int (*kvm_type)(const char *arg); @@ -112,9 +103,6 @@ struct MachineState { char *accel; bool kernel_irqchip; int kvm_shadow_mem; - char *kernel; - char *initrd; - char *append; char *dtb; char *dumpdtb; int phandle_start; @@ -124,7 +112,12 @@ struct MachineState { bool usb; char *firmware; - QEMUMachineInitArgs init_args; + ram_addr_t ram_size; + const char *boot_order; + const char *kernel_filename; + const char *kernel_cmdline; + const char *initrd_filename; + const char *cpu_model; }; #endif -- cgit v1.1