]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virqemu: Don't strip the requested key from nested objects
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Dec 2022 16:00:26 +0000 (17:00 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 4 Jan 2023 13:01:16 +0000 (14:01 +0100)
commit3bac06b2787fef2ba49267fbc4c7ff93b69f1c1d
tree40b185b4d30b7d9fd63576702dd07f93c3712456
parent9193bac260620fbeec580d709699b3e0f97b9bd7
virqemu: Don't strip the requested key from nested objects

Skipping of a specific key is needed only for the top level object to
specially handle the object type. We must not pass it to any recursed
printing of nested objects as skipping keys there might be surprising
and also is unhandlable later when formatting the commandline.

Until now this did not pose a problem but was discovered when adding a
new netdev backend which has a nested config object which also has the
'type' key which was being skipped.

Modern usage will prefer JSON directly but fix the commandline generator
to prevent surprises.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virqemu.c