On 10/20/2016 10:24 AM, Peter Krempa wrote: > Call 'query-qmp-schema' and store the returned types in a hash table > keyed by the 'name' field so that the capabilities code can traverse it. > --- > src/qemu/qemu_monitor.c | 11 ++++++++ > src/qemu/qemu_monitor.h | 2 ++ > src/qemu/qemu_monitor_json.c | 67 ++++++++++++++++++++++++++++++++++++++++++++ > src/qemu/qemu_monitor_json.h | 3 ++ > 4 files changed, 83 insertions(+) > > + > +virHashTablePtr > +qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon) > +{ > + > + if (!(schema = virHashCreate(512, qemuMonitorJSONFreeSchemaEntry))) > + goto cleanup; > + > + if (virJSONValueArrayForeachSteal(arr, qemuMonitorJSONFillQMPSchema, > + schema) < 0) For this usage, order indeed did not matter, but that may not be true for all JSON arrays. Hence my comments on 1/15. However, this patch looks fine. ACK -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list