mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
machine: Conversion of QEMUMachineInitArgs to MachineState
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 <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
0380aef323
commit
3ef9622182
65 changed files with 545 additions and 549 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue