
On 03/21/2011 06:52 AM, Jiri Denemark wrote:
Avoids calling text monitor methods when it is know they will not succeed and also results in nicer error messages. --- Notes: Version 2: - new patch
- if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { + if (qemuMonitorJSONHasError(reply, "CommandNotFound") && + qemuMonitorCheckHMP(mon, "cpu_set")) { VIR_DEBUG0("cpu_set command not found, trying HMP");
So either we get a debug message about trying HMP, or we get a debug message about skipping HMP. Looks nice.
@@ -2466,6 +2470,12 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon, int ret = -1;
if (hmp) { + if (!qemuMonitorCheckHMP(mon, NULL)) { + qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("HMP passthrough is not supported by qemu" + " process; only QMP commands can be used"));
And this is the one place where it becomes a user-visible effect. ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org