aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-10-15 16:57:45 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-12-02 13:03:04 +0100
commit1442d3e6912d7ec88480099503cfa0aeaedf5634 (patch)
tree1ffca0d1cc56732c9abe2914f62239476ea24451
parentaeca6e8d8b7dba78c3d1622463e238b773d9df13 (diff)
downloadqemu-1442d3e6912d7ec88480099503cfa0aeaedf5634.zip
qemu-1442d3e6912d7ec88480099503cfa0aeaedf5634.tar.gz
qemu-1442d3e6912d7ec88480099503cfa0aeaedf5634.tar.bz2
add firmware to machine options
This patch adds firmware to the machine options. -bios <file> becomes a shortcut for -machine firmware=<file>. Advantage is that the firmware can be specified via config file as -machine is parsed using QemuOpts and it is also possible to use different defaults for different machine types (via QEMUMachine->default_machine_opts). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--vl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 8d5d874..27b09e5 100644
--- a/vl.c
+++ b/vl.c
@@ -428,6 +428,10 @@ static QemuOptsList qemu_machine_opts = {
.name = "usb",
.type = QEMU_OPT_BOOL,
.help = "Set on/off to enable/disable usb",
+ },{
+ .name = "firmware",
+ .type = QEMU_OPT_STRING,
+ .help = "firmware image",
},
{ /* End of list */ }
},
@@ -3229,7 +3233,7 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_bios:
- bios_name = optarg;
+ qemu_opts_set(qemu_find_opts("machine"), 0, "firmware", optarg);
break;
case QEMU_OPTION_singlestep:
singlestep = 1;
@@ -4050,6 +4054,7 @@ int main(int argc, char **argv, char **envp)
kernel_filename = qemu_opt_get(machine_opts, "kernel");
initrd_filename = qemu_opt_get(machine_opts, "initrd");
kernel_cmdline = qemu_opt_get(machine_opts, "append");
+ bios_name = qemu_opt_get(machine_opts, "firmware");
boot_order = machine->default_boot_order;
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);