]> git.proxmox.com Git - qemu.git/blobdiff - qemu-option.c
coroutine: Fix setup of sigaltstack coroutines
[qemu.git] / qemu-option.c
index 4626ccfe54d303af314498cd60cd57a70212b93e..35cd609f75988e8382516f224e4a109a525f8837 100644 (file)
@@ -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) {