]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Use the new chardev backend JSON props generator also in the monitor
authorPeter Krempa <pkrempa@redhat.com>
Fri, 13 Sep 2024 08:33:47 +0000 (10:33 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 19 Sep 2024 08:30:15 +0000 (10:30 +0200)
commite352a692a7129ef5ef40f0c98e496c61f563edc5
treee686c954c7d6e52abc3a1782e5f0286d3e38108c
parentd897ad2b8944b8ea251572e778fbd889a1ea8a19
qemu: Use the new chardev backend JSON props generator also in the monitor

Now that we have a unified generator of chardev backend which is also
validated against the QMP schema we can replace the old generator with
it.

This patch modifies the monitor code to take virJSONValue 'props'
instead of the chardev definition and adds the conversion from the
chardev definition to JSON on higher levels.

The monitor code now also attempts to extract the returned 'pty' if
returned from qemu, so higher level code needs to report the error if
the path is needed and missing.

The current monitor generator is for now abandoned in place and will be
removed later.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
tests/qemumonitorjsontest.c