diff options
Diffstat (limited to 'qemu-option.c')
-rw-r--r-- | qemu-option.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qemu-option.c b/qemu-option.c index 4626ccfe54..35cd609f75 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -741,13 +741,18 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exist } 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) { |