peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0006-qemu-option-support-accept-any-QemuOptsList-in-qemu_.patch

Paolo Bonzini 169bee
From 941a4736d2b465be1d6429415f8b1f26e2167585 Mon Sep 17 00:00:00 2001
Paolo Bonzini 169bee
From: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 169bee
Date: Wed, 11 Nov 2020 08:42:27 -0500
Paolo Bonzini 169bee
Subject: [PATCH] qemu-option: support accept-any QemuOptsList in
Paolo Bonzini 169bee
 qemu_opts_absorb_qdict
Paolo Bonzini 169bee
Paolo Bonzini 169bee
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 169bee
---
Paolo Bonzini 169bee
 util/qemu-option.c | 3 ++-
Paolo Bonzini 169bee
 1 file changed, 2 insertions(+), 1 deletion(-)
Paolo Bonzini 169bee
Paolo Bonzini 169bee
diff --git a/util/qemu-option.c b/util/qemu-option.c
Paolo Bonzini 169bee
index 9678d5b682..4944015a25 100644
Paolo Bonzini 169bee
--- a/util/qemu-option.c
Paolo Bonzini 169bee
+++ b/util/qemu-option.c
Paolo Bonzini 169bee
@@ -1056,7 +1056,8 @@ bool qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp)
Paolo Bonzini 169bee
     while (entry != NULL) {
Paolo Bonzini 169bee
         next = qdict_next(qdict, entry);
Paolo Bonzini 169bee
 
Paolo Bonzini 169bee
-        if (find_desc_by_name(opts->list->desc, entry->key)) {
Paolo Bonzini 169bee
+        if (opts_accepts_any(opts->list) ||
Paolo Bonzini 169bee
+            find_desc_by_name(opts->list->desc, entry->key)) {
Paolo Bonzini 169bee
             if (!qemu_opts_from_qdict_entry(opts, entry, errp)) {
Paolo Bonzini 169bee
                 return false;
Paolo Bonzini 169bee
             }
Paolo Bonzini 169bee
-- 
Paolo Bonzini 169bee
2.31.1
Paolo Bonzini 169bee