mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix a JSON CPU information bug.
When using the JSON monitor, qemuMonitorJSONExtractCPUInfo was returning 0 on success. Unfortunately, higher levels of the cpuinfo code expect that it returns the number of CPUs it found on success. This one-line patch fixes it so that it returns the correct number. This makes "virsh vcpuinfo <domain>" work when using the JSON monitor. Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
e29439bd14
commit
ed3d86c9a9
@ -648,7 +648,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
|
|||||||
|
|
||||||
*pids = threads;
|
*pids = threads;
|
||||||
threads = NULL;
|
threads = NULL;
|
||||||
ret = 0;
|
ret = ncpus;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(threads);
|
VIR_FREE(threads);
|
||||||
|
Loading…
Reference in New Issue
Block a user