[PATCH 00/12] JSON monitor handling cleanups and spurious error bug fix

Peter Krempa pkrempa at redhat.com
Thu Dec 1 16:31:04 UTC 2022


First half introduces qemuMonitorJSONGetReply and uses it in our code
base, second half introduces virJSONValueArrayToStringList, uses it to
fix a bug and refactor the rest of the usage.

Peter Krempa (12):
  qemu: monitor: Introduce qemuMonitorJSONGetReply, a better
    qemuMonitorJSONCheckReply
  qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_OBJECT
  qemu: monitor: Use qemuMonitorJSONGetReply for VIR_JSON_TYPE_ARRAY
  qemu: monitor: Use qemuMonitorJSONGetReply when the value is extracted
    directly
  qemu: monitor: Unify and refactor 'PTY' case in
    qemuMonitorJSONAttachCharDev
  util: json: Split out array->strinlist conversion from
    virJSONValueObjectGetStringArray
  qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray for
    optional data
  qemuMonitorJSONGetCPUDefinitions: Rework lookup of
    'unavailable-features'
  qemuMonitorJSONGetCPUDefinitions: Avoid double lookup of object
  qemu: monitor: Use qemuMonitorJSONGetReply in conjunction with
    virJSONValueArrayToStringList
  qemuAgentSSHGetAuthorizedKeys: Convert last use
    ofvirJSONValueObjectGetStringArray
  util: json: Remove unused virJSONValueObjectGetStringArray wrapper

 src/libvirt_private.syms     |   2 +-
 src/qemu/qemu_agent.c        |  13 ++-
 src/qemu/qemu_monitor_json.c | 189 +++++++++++++++--------------------
 src/util/virjson.c           |  44 +++-----
 src/util/virjson.h           |   3 +-
 5 files changed, 106 insertions(+), 145 deletions(-)

-- 
2.38.1



More information about the libvir-list mailing list