From: Jan Kiszka Date: Mon, 25 Jul 2011 16:11:20 +0000 (+0200) Subject: Allow to leave type on default in -machine X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2645c6dcaf6ea2a51a3b6dfa407dd203004e4d11;p=qemu.git 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 Signed-off-by: Anthony Liguori --- 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;