From: John Ferlan Date: Wed, 17 Sep 2014 18:43:12 +0000 (-0400) Subject: qemu: Don't fail startup/attach for IOThreads if no JSON X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=15ee3c2511157a7dfd3516e633057ce26b9fbd62;p=libvirt.git qemu: Don't fail startup/attach for IOThreads if no JSON If the qemu being used doesn't support JSON, then querying for IOThread data would fail. In that case, ensure the *iothreads is NULL and return 0 as the count of iothreads available. --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 8927dbbab7..10f51c5c3a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4112,10 +4112,10 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon, return -1; } + /* Requires JSON to make the query */ if (!mon->json) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("JSON monitor is required")); - return -1; + *iothreads = NULL; + return 0; } return qemuMonitorJSONGetIOThreads(mon, iothreads);