summaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-05-07 17:42:57 +0300
committerAndreas Färber <afaerber@suse.de>2014-05-28 17:35:01 +0200
commit3ef9622182e598392855931e7a0437d3855cef5e (patch)
tree87765046f480836eb65ecbcd293cade13518c62f /include/hw
parent0380aef323154205a7d838fb9953423621290d41 (diff)
downloadqemu-3ef9622182e598392855931e7a0437d3855cef5e.tar.gz
qemu-3ef9622182e598392855931e7a0437d3855cef5e.tar.bz2
qemu-3ef9622182e598392855931e7a0437d3855cef5e.zip
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>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/boards.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 4345bd04fa..b62de4ab7a 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