提交 722ef4ff 编写于 作者: J Jiri Denemark

cpu_x86: Move x86FeatureFind* to avoid forward prototypes

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 20664ec7
......@@ -240,6 +240,37 @@ x86cpuidAndBits(virCPUx86CPUID *cpuid,
cpuid->edx &= mask->edx;
}
static virCPUx86FeaturePtr
x86FeatureFind(virCPUx86MapPtr map,
const char *name)
{
size_t i;
for (i = 0; i < map->nfeatures; i++) {
if (STREQ(map->features[i]->name, name))
return map->features[i];
}
return NULL;
}
static virCPUx86FeaturePtr
x86FeatureFindInternal(const char *name)
{
size_t i;
size_t count = ARRAY_CARDINALITY(x86_kvm_features);
for (i = 0; i < count; i++) {
if (STREQ(x86_kvm_features[i].name, name))
return x86_kvm_features + i;
}
return NULL;
}
static int
virCPUx86CPUIDSorter(const void *a, const void *b)
{
......@@ -753,36 +784,6 @@ x86FeatureFree(virCPUx86FeaturePtr feature)
}
static virCPUx86FeaturePtr
x86FeatureFind(virCPUx86MapPtr map,
const char *name)
{
size_t i;
for (i = 0; i < map->nfeatures; i++) {
if (STREQ(map->features[i]->name, name))
return map->features[i];
}
return NULL;
}
static virCPUx86FeaturePtr
x86FeatureFindInternal(const char *name)
{
size_t i;
size_t count = ARRAY_CARDINALITY(x86_kvm_features);
for (i = 0; i < count; i++) {
if (STREQ(x86_kvm_features[i].name, name))
return x86_kvm_features + i;
}
return NULL;
}
static int
x86FeatureInData(const char *name,
const virCPUx86Data *data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册