diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-25 18:11:20 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-29 09:33:56 -0500 |
commit | 2645c6dcaf6ea2a51a3b6dfa407dd203004e4d11 (patch) | |
tree | 97aad27411df34389fcdba33773a5e169862a45a | |
parent | 5f070c5fb768cc587b1a75379b7b17c3f841fd40 (diff) |
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>
-rw-r--r-- | vl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |