diff --git a/util/qemu-option.c b/util/qemu-option.c index 2715f27e410cd1af7f45a04574cdc9f1d4906c23..e0ef426daa009a95180b8ec0c743c53ecf77d3f9 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -914,15 +914,7 @@ static QemuOpts *opts_parse(QemuOptsList *list, const char *params, get_opt_value(value, sizeof(value), p+4); id = value; } - if (defaults) { - if (!id && !QTAILQ_EMPTY(&list->head)) { - opts = qemu_opts_find(list, NULL); - } else { - opts = qemu_opts_create(list, id, 0, &local_err); - } - } else { - opts = qemu_opts_create(list, id, 1, &local_err); - } + opts = qemu_opts_create(list, id, !defaults, &local_err); if (opts == NULL) { if (error_is_set(&local_err)) { qerror_report_err(local_err);