]> xenbits.xensource.com Git - libvirt.git/commit
qemu: require qmp on new enough qemu
authorEric Blake <eblake@redhat.com>
Thu, 26 Jan 2012 04:57:38 +0000 (21:57 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 27 Jan 2012 15:45:50 +0000 (08:45 -0700)
commit6e769ebadb44a034e80aefc3c5fa35092d623069
tree8ee6c116c45d1751c505d7385624a501194f0a61
parentff88cd590572277f10ecee4ebb1174d9b70fc0d7
qemu: require qmp on new enough qemu

The qemu developers have made it clear that modern qemu will no
longer guarantee human monitor command stability; furthermore,
some features, such as async events, are only supported via qmp.
If we are compiled without support for handling JSON, we cannot
expect to sanely interact with modern qemu.

However, things must continue to build on RHEL 5, where qemu
is stuck at 0.10, and where yajl is not available.

Another benefit of this patch: future additions of new monitor
commands need only focus on qemu_monitor_json.c, instead of
also wasting time with qemu_monitor_text.c.

* src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Report
error if yajl is missing but qemu requires qmp.
(qemuCapsParseHelpStr): Propagate error.
(qemuCapsExtractVersionInfo): Update caller.
* tests/qemuhelptest.c (testHelpStrParsing): Likewise.
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemuhelptest.c