mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
cpu: Rework virCPUDataCheckFeature
To match our coding style and to provide better debug and error messages. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
46c49a3004
commit
351931e539
@ -650,7 +650,7 @@ virCPUUpdate(virArch arch,
|
|||||||
/**
|
/**
|
||||||
* virCPUDataCheckFeature:
|
* virCPUDataCheckFeature:
|
||||||
*
|
*
|
||||||
* @data: internal CPU representation
|
* @data: CPU data
|
||||||
* @feature: feature to be checked for
|
* @feature: feature to be checked for
|
||||||
*
|
*
|
||||||
* Checks whether @feature is supported by the CPU described by @data.
|
* Checks whether @feature is supported by the CPU described by @data.
|
||||||
@ -664,14 +664,15 @@ virCPUDataCheckFeature(const virCPUData *data,
|
|||||||
{
|
{
|
||||||
struct cpuArchDriver *driver;
|
struct cpuArchDriver *driver;
|
||||||
|
|
||||||
VIR_DEBUG("data=%p, feature=%s", data, feature);
|
VIR_DEBUG("arch=%s, data=%p, feature=%s",
|
||||||
|
virArchToString(data->arch), data, feature);
|
||||||
|
|
||||||
if ((driver = cpuGetSubDriver(data->arch)) == NULL)
|
if (!(driver = cpuGetSubDriver(data->arch)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!driver->dataCheckFeature) {
|
if (!driver->dataCheckFeature) {
|
||||||
virReportError(VIR_ERR_NO_SUPPORT,
|
virReportError(VIR_ERR_NO_SUPPORT,
|
||||||
_("cannot check guest CPU data for %s architecture"),
|
_("cannot check guest CPU feature for %s architecture"),
|
||||||
virArchToString(data->arch));
|
virArchToString(data->arch));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user