提交 4f23862f 编写于 作者: J Jiri Denemark

qemu: Refactor virQEMUCapsInitCPU

The function is now called virQEMUCapsProbeHostCPU. Both the refactoring
and the change of the name is done for consistency with a new function
which will be introduced in the following commit.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 79a78c13
......@@ -1061,20 +1061,16 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
}
static int
virQEMUCapsInitCPU(virCapsPtr caps,
virArch arch)
static virCPUDefPtr
virQEMUCapsProbeHostCPU(virCapsPtr caps)
{
virNodeInfo nodeinfo;
if (nodeGetInfo(&nodeinfo))
return -1;
if (!(caps->host.cpu = virCPUGetHost(arch, VIR_CPU_TYPE_HOST,
&nodeinfo, NULL, 0)))
return -1;
return NULL;
return 0;
return virCPUGetHost(caps->host.arch, VIR_CPU_TYPE_HOST,
&nodeinfo, NULL, 0);
}
......@@ -1120,7 +1116,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (virQEMUCapsInitCPU(caps, hostarch) < 0)
if (!(caps->host.cpu = virQEMUCapsProbeHostCPU(caps)))
VIR_WARN("Failed to get host CPU");
/* Add the power management features of the host */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册