mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemu: monitor: Use 'target' instead of 'arch' in reply of 'query-cpus-fast'
qemu changed the output field name for the architecture from 'arch' to 'target'. Note the change and fix the code so that the arch-specific extraction works. https://bugzilla.redhat.com/show_bug.cgi?id=1598829 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
1e65d35b04
commit
902f4bce09
@ -1624,6 +1624,9 @@ qemuMonitorJSONExtractCPUS390Info(virJSONValuePtr jsoncpu,
|
|||||||
* ...},
|
* ...},
|
||||||
* {...}
|
* {...}
|
||||||
* ]
|
* ]
|
||||||
|
*
|
||||||
|
* Note that since QEMU 2.13.0 the "arch" output member of the
|
||||||
|
* "query-cpus-fast" command is replaced by "target".
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
|
qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
|
||||||
@ -1659,6 +1662,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
|
|||||||
* The return data of query-cpus-fast has different field names
|
* The return data of query-cpus-fast has different field names
|
||||||
*/
|
*/
|
||||||
if (fast) {
|
if (fast) {
|
||||||
|
if (!(arch = virJSONValueObjectGetString(entry, "target")))
|
||||||
arch = virJSONValueObjectGetString(entry, "arch");
|
arch = virJSONValueObjectGetString(entry, "arch");
|
||||||
ignore_value(virJSONValueObjectGetNumberInt(entry, "cpu-index", &cpuid));
|
ignore_value(virJSONValueObjectGetNumberInt(entry, "cpu-index", &cpuid));
|
||||||
ignore_value(virJSONValueObjectGetNumberInt(entry, "thread-id", &thread));
|
ignore_value(virJSONValueObjectGetNumberInt(entry, "thread-id", &thread));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user