mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: Decide whether to query schema in virQEMUCapsProbeQMPSchemaCapabilities
Move the check out of virQEMUCapsInitQMPMonitor similarly to other functions. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
43a8527762
commit
f7550ecce8
@ -4283,6 +4283,9 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr qemuCaps,
|
||||
virHashTablePtr schema = NULL;
|
||||
size_t i;
|
||||
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA))
|
||||
return 0;
|
||||
|
||||
if (!(schemareply = qemuMonitorQueryQMPSchema(mon)))
|
||||
return -1;
|
||||
|
||||
@ -4376,8 +4379,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
||||
goto cleanup;
|
||||
if (virQEMUCapsProbeQMPMigrationCapabilities(qemuCaps, mon) < 0)
|
||||
goto cleanup;
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA) &&
|
||||
virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0)
|
||||
if (virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0)
|
||||
goto cleanup;
|
||||
if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, false) < 0)
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user