Other code directly related to the board init function may be moved
there.
Signed-off-by: Eduardo Habkost <ehabkost(a)redhat.com>
---
hw/boards.h | 7 +++++++
vl.c | 14 +++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/hw/boards.h b/hw/boards.h
index 59c01d0..f20f5ab 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -34,6 +34,13 @@ typedef struct QEMUMachine {
int qemu_register_machine(QEMUMachine *m);
QEMUMachine *find_default_machine(void);
+void qemu_machine_init(QEMUMachine *machine,
+ ram_addr_t ram_size,
+ const char *boot_devices,
+ const char *kernel_filename,
+ const char *kernel_cmdline,
+ const char *initrd_filename,
+ const char *cpu_model);
extern QEMUMachine *current_machine;
diff --git a/vl.c b/vl.c
index 8904db1..34cc145 100644
--- a/vl.c
+++ b/vl.c
@@ -1209,6 +1209,18 @@ QEMUMachine *find_default_machine(void)
return NULL;
}
+void qemu_machine_init(QEMUMachine *machine,
+ ram_addr_t ram_size,
+ const char *boot_devices,
+ const char *kernel_filename,
+ const char *kernel_cmdline,
+ const char *initrd_filename,
+ const char *cpu_model)
+{
+ machine->init(ram_size, boot_devices,
+ kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
+}
+
/***********************************************************/
/* main execution loop */
@@ -3517,7 +3529,7 @@ int main(int argc, char **argv, char **envp)
qdev_machine_init();
- machine->init(ram_size, boot_devices,
+ qemu_machine_init(machine, ram_size, boot_devices,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
cpu_synchronize_all_post_init();
--
1.7.10.4