diff options
author | Marcel Apfelbaum <marcel.a@redhat.com> | 2014-05-26 15:40:58 +0300 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-05-28 17:36:13 +0200 |
commit | 6b1b1440199c1a910b91bc9e029974f44746633d (patch) | |
tree | 43e0eb34214716f1b581707d9df2b86db9b367fa /vl.c | |
parent | a199b2b6a5b9dd50cfe96349778458d1b39899b5 (diff) | |
download | qemu-6b1b1440199c1a910b91bc9e029974f44746633d.zip qemu-6b1b1440199c1a910b91bc9e029974f44746633d.tar.gz qemu-6b1b1440199c1a910b91bc9e029974f44746633d.tar.bz2 |
machine: Make -machine opts properties of MachineState
Make machine's QemuOpts QOM properties of /machine. The properties
are automatically filled in. This opens the possibility to create
opts per machine rather than global.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -4220,6 +4220,13 @@ int main(int argc, char **argv, char **envp) exit(0); } + machine_opts = qemu_get_machine_opts(); + if (qemu_opt_foreach(machine_opts, object_set_property, current_machine, + 1) < 0) { + object_unref(OBJECT(current_machine)); + exit(1); + } + configure_accelerator(machine_class); if (qtest_chrdev) { @@ -4264,6 +4271,7 @@ int main(int argc, char **argv, char **envp) if (!kernel_cmdline) { kernel_cmdline = ""; + current_machine->kernel_cmdline = (char *)kernel_cmdline; } linux_boot = (kernel_filename != NULL); @@ -4428,9 +4436,6 @@ int main(int argc, char **argv, char **envp) current_machine->ram_size = ram_size; current_machine->boot_order = boot_order; - current_machine->kernel_filename = kernel_filename; - current_machine->kernel_cmdline = kernel_cmdline; - current_machine->initrd_filename = initrd_filename; current_machine->cpu_model = cpu_model; machine_class->init(current_machine); |