summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-02-08 05:41:38 +0000
committerAndrzej Zaborowski <balrogg@gmail.com>2012-02-17 09:10:13 +0100
commit9de36b1a7cf61aa8be365f13c81668b3e19fbc7f (patch)
tree18f07ab85fab832f67274616e533cdc05a12d8be /vl.c
parentda93318a9f0ff83e4a93e8755fa92291f9b8cc1b (diff)
downloadqemu-9de36b1a7cf61aa8be365f13c81668b3e19fbc7f.tar.gz
Make -machine/-enable-kvm options merge into a single list
Make the "machine" option list use list merging, so that multiple -machine arguments (and the -enable-kvm argument) all merge together into a single list. Drop the calls to qemu_opts_reset() which meant that only the last -machine or -enable-kvm option had any effect. This fixes the bug where "-enable-kvm -machine foo" would ignore the '-enable-kvm' option, and "-machine foo -enable-kvm" would ignore the '-machine foo' option. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 0e8425e35e..37f2f96928 100644
--- a/vl.c
+++ b/vl.c
@@ -2882,12 +2882,10 @@ int main(int argc, char **argv, char **envp)
break;
case QEMU_OPTION_enable_kvm:
olist = qemu_find_opts("machine");
- qemu_opts_reset(olist);
qemu_opts_parse(olist, "accel=kvm", 0);
break;
case QEMU_OPTION_machine:
olist = qemu_find_opts("machine");
- qemu_opts_reset(olist);
opts = qemu_opts_parse(olist, optarg, 1);
if (!opts) {
fprintf(stderr, "parse error: %s\n", optarg);