keyval: introduce keyval_merge
commit9176e800dbcb2636a2f24411eafc3c800e3455bd
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Nov 2020 13:40:11 +0000 (12 08:40 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Jul 2021 06:33:51 +0000 (6 08:33 +0200)
treec2b8571cd17604f2811edbdb883a33c10eb9950b
parent3bb6944585aa6f28b21265c88d86264e8e9f7e53
keyval: introduce keyval_merge

This patch introduces a function that merges two keyval-produced
(or keyval-like) QDicts.  It can be used to emulate the behavior of
.merge_lists = true QemuOpts groups, merging -readconfig sections and
command-line options in a single QDict, and also to implement -set.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/option.h
tests/unit/test-keyval.c
util/keyval.c