mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Ignore error from query-cpu-definitions
Some architectures provide the query-cpu-definitions command, but are set to always return a "GenericError" from it :-( Catch this & treat it as if there was an empty list of CPUs returned Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
89563efc02
commit
295bda40da
@ -3957,6 +3957,18 @@ int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = qemuMonitorJSONCommand(mon, cmd, &reply);
|
ret = qemuMonitorJSONCommand(mon, cmd, &reply);
|
||||||
|
|
||||||
|
if (ret == 0) {
|
||||||
|
/* Urgh, some QEMU architectures have the query-cpu-definitions
|
||||||
|
* command, but return 'GenericError' with string "Not supported",
|
||||||
|
* instead of simply omitting the command entirely :-(
|
||||||
|
*/
|
||||||
|
if (qemuMonitorJSONHasError(reply, "GenericError")) {
|
||||||
|
ret = 0;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user