mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: monitor: Fix error message and comment when getting cpu info
In qemuMonitorJSONExtractCPUInfo an error message hinted on missing character device data which is wrong. Also a comment states that only qemu-kvm tree includes the thread_id field. This is no longer true.
This commit is contained in:
parent
d410e6f19d
commit
a31bd18f43
@ -1220,13 +1220,13 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
|
|||||||
int thread;
|
int thread;
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("character device information was missing array element"));
|
_("cpu information was missing an array element"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
|
if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
|
||||||
/* Only qemu-kvm tree includs thread_id, so treat this as
|
/* Some older qemu versions don't report the thread_id,
|
||||||
non-fatal, simply returning no data */
|
* so treat this as non-fatal, simply returning no data */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user