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>
This commit is contained in:
parent
5f070c5fb7
commit
2645c6dcaf
5
vl.c
5
vl.c
|
@ -2724,7 +2724,10 @@ int main(int argc, char **argv, char **envp)
|
||||||
fprintf(stderr, "parse error: %s\n", optarg);
|
fprintf(stderr, "parse error: %s\n", optarg);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
machine = machine_parse(qemu_opt_get(opts, "type"));
|
optarg = qemu_opt_get(opts, "type");
|
||||||
|
if (optarg) {
|
||||||
|
machine = machine_parse(optarg);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_usb:
|
case QEMU_OPTION_usb:
|
||||||
usb_enabled = 1;
|
usb_enabled = 1;
|
||||||
|
|
Loading…
Reference in New Issue