]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Create common code for JSON "query-block" call
authorJohn Ferlan <jferlan@redhat.com>
Tue, 27 Sep 2016 13:39:21 +0000 (09:39 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 5 Oct 2016 15:12:26 +0000 (11:12 -0400)
commitb0ab72bd436cd4e9880c14c7a0efa8f5b4a05fff
tree0e7ad4e33803a6fd199f185a79df41c40e02513e
parentebf8b783bfeeaeaa0fd99ab5ec864fd8d98f3a6d
qemu: Create common code for JSON "query-block" call

Reduce some cut-n-paste code by creating common helper. Make use of the
recently added virJSONValueObjectStealArray to grab the devices list as
part of the common code (we we can Free the reply) and return devices for
each of the callers to continue to parse.

NB: This also adds error checking to qemuMonitorJSONDiskNameLookup

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor_json.c