}
opts = qemu_opts_find(list, id);
if (opts != NULL) {
- if (fail_if_exists) {
+ if (fail_if_exists && !list->merge_lists) {
qerror_report(QERR_DUPLICATE_ID, id, list->name);
return NULL;
} else {
return opts;
}
}
+ } else if (list->merge_lists) {
+ opts = qemu_opts_find(list, NULL);
+ if (opts) {
+ return opts;
+ }
}
opts = g_malloc0(sizeof(*opts));
if (id) {