提交 25de5935 编写于 作者: J Jan Kiszka 提交者: Anthony Liguori

Improve default machine options usability

So far we overwrite the machine options completely with defaults if no
accel=value is provided. More user friendly is to fill in only
unspecified options. The new qemu_opts_set_defaults enables this.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 433acf0d
......@@ -3153,21 +3153,8 @@ int main(int argc, char **argv, char **envp)
* specified either by the configuration file or by the command line.
*/
if (machine->default_machine_opts) {
QemuOptsList *list = qemu_find_opts("machine");
const char *p = NULL;
if (!QTAILQ_EMPTY(&list->head)) {
p = qemu_opt_get(QTAILQ_FIRST(&list->head), "accel");
}
if (p == NULL) {
qemu_opts_reset(list);
opts = qemu_opts_parse(list, machine->default_machine_opts, 0);
if (!opts) {
fprintf(stderr, "parse error for machine %s: %s\n",
machine->name, machine->default_machine_opts);
exit(1);
}
}
qemu_opts_set_defaults(qemu_find_opts("machine"),
machine->default_machine_opts, 0);
}
qemu_opts_foreach(qemu_find_opts("device"), default_driver_check, NULL, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册