提交 f7550ecc 编写于 作者: P Peter Krempa

qemu: Decide whether to query schema in virQEMUCapsProbeQMPSchemaCapabilities

Move the check out of virQEMUCapsInitQMPMonitor similarly to other
functions.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 43a85277
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册