On a Wednesday in 2024, Peter Krempa wrote:
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(a)redhat.com>
---
src/qemu/qemu_block.c | 9 ++++++++-
src/qemu/qemu_hotplug.c | 22 +++++++++++++++++++++-
src/qemu/qemu_monitor.c | 8 +++-----
src/qemu/qemu_monitor.h | 4 ++--
src/qemu/qemu_monitor_json.c | 32 ++++++++++----------------------
src/qemu/qemu_monitor_json.h | 4 ++--
tests/qemumonitorjsontest.c | 17 +++++++++++------
7 files changed, 57 insertions(+), 39 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano