mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
79a78c13ec
commit
4f23862f46
@ -1061,20 +1061,16 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static virCPUDefPtr
|
||||||
virQEMUCapsInitCPU(virCapsPtr caps,
|
virQEMUCapsProbeHostCPU(virCapsPtr caps)
|
||||||
virArch arch)
|
|
||||||
{
|
{
|
||||||
virNodeInfo nodeinfo;
|
virNodeInfo nodeinfo;
|
||||||
|
|
||||||
if (nodeGetInfo(&nodeinfo))
|
if (nodeGetInfo(&nodeinfo))
|
||||||
return -1;
|
return NULL;
|
||||||
|
|
||||||
if (!(caps->host.cpu = virCPUGetHost(arch, VIR_CPU_TYPE_HOST,
|
return virCPUGetHost(caps->host.arch, VIR_CPU_TYPE_HOST,
|
||||||
&nodeinfo, NULL, 0)))
|
&nodeinfo, NULL, 0);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1120,7 +1116,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
|
|||||||
VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
|
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");
|
VIR_WARN("Failed to get host CPU");
|
||||||
|
|
||||||
/* Add the power management features of the host */
|
/* Add the power management features of the host */
|
||||||
|
Loading…
Reference in New Issue
Block a user