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.
This commit is contained in:
John Ferlan 2014-09-17 14:43:12 -04:00
parent e29d28e7f2
commit 15ee3c2511

View File

@ -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);