[libvirt] [PATCH v3 12/20] Add a qemuMonitorGetCommands() method for QMP query-commands command
Eric Blake
eblake at redhat.com
Wed Sep 26 19:29:19 UTC 2012
On 09/25/2012 12:00 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Add a new qemuMonitorGetCPUCommands() method to support invocation
> of the 'query-cpu-definitions' JSON monitor command. No HMP equivalent
s/cpu-definitions/commands/
> is required, since this will only be used when JSON is available
>
> The existing qemuMonitorJSONCheckCommands() method is refactored
> to use this new method
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/qemu/qemu_monitor.c | 22 +++++++++
> src/qemu/qemu_monitor.h | 3 ++
> src/qemu/qemu_monitor_json.c | 114 +++++++++++++++++++++++++++++++------------
> src/qemu/qemu_monitor_json.h | 4 ++
> tests/qemumonitorjsontest.c | 62 +++++++++++++++++++++++
> 5 files changed, 175 insertions(+), 30 deletions(-)
As qemu gains more and more commands, is it worth qsort()ing the list
before returning it, so later users can bsearch() for O(logN) instead of
O(N) searching for a particular command? But that can be a later patch.
ACK once you fix this syntax check failure:
prohibit_empty_lines_at_EOF
src/qemu/qemu_monitor_json.c
maint.mk: empty line(s) or no newline at EOF
make: *** [sc_prohibit_empty_lines_at_EOF] Error 1
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120926/3b5df571/attachment-0001.sig>
More information about the libvir-list
mailing list