summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-07-25 18:11:20 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-29 09:33:56 -0500
commit2645c6dcaf6ea2a51a3b6dfa407dd203004e4d11 (patch)
tree97aad27411df34389fcdba33773a5e169862a45a /vl.c
parent5f070c5fb768cc587b1a75379b7b17c3f841fd40 (diff)
downloadqemu-2645c6dcaf6ea2a51a3b6dfa407dd203004e4d11.tar.gz
Allow to leave type on default in -machine
This allows to specify -machine options without setting an explicit machine type. We will pick the default machine in this case. Requesting the list of available machines is still possible via '-machine ?' e.g. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index a3d8d77bf8..73316cf17e 100644
--- a/vl.c
+++ b/vl.c
@@ -2724,7 +2724,10 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "parse error: %s\n", optarg);
exit(1);
}
- machine = machine_parse(qemu_opt_get(opts, "type"));
+ optarg = qemu_opt_get(opts, "type");
+ if (optarg) {
+ machine = machine_parse(optarg);
+ }
break;
case QEMU_OPTION_usb:
usb_enabled = 1;