]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Introduce unified chardev backend config generator
authorPeter Krempa <pkrempa@redhat.com>
Thu, 9 Dec 2021 08:29:37 +0000 (09:29 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 19 Sep 2024 08:30:14 +0000 (10:30 +0200)
commit36d06a5637ff59af74fce269f178ec0ac65d4182
treeb8c7747b0d8a1ceb6cc8ad9465094388ac1695c5
parent1bc023cae8e629b29a41afcaea17adb451e1f0d0
qemu: Introduce unified chardev backend config generator

Similarly to how we approach the generators for
-device/-object/-blockdev/-netdev rewrite the generator of -chardev to
be unified with the generator for the monitor.

Unfortunately with -chardev it will be a bit more quirky when compared
to the others as the generator itself will need to know whether it
generates command line output or not as a few field names change and data
is nested differently.

This first step adds the generator and uses it only for command line
generation. This was possible to achieve without changing any of the
output in tests.

In further patches the same generator will then be used also in the
monitor code replacing both.

As basis for the generator I took the monitor code but modified it to
have the same field order as the commandline code and extended it
further to support all backend types, even those which are not
hotpluggable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/meson.build
src/qemu/qemu_chardev.c [new file with mode: 0644]
src/qemu/qemu_chardev.h [new file with mode: 0644]
src/qemu/qemu_command.c