int
virCPUTranslate(virArch arch,
virCPUDefPtr cpu,
- char **models,
+ const char **models,
unsigned int nmodels)
{
struct cpuArchDriver *driver;
cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
return 0;
- if (virCPUModelIsAllowed(cpu->model, (const char **) models, nmodels))
+ if (virCPUModelIsAllowed(cpu->model, models, nmodels))
return 0;
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
return -1;
}
- if (driver->translate(cpu, (const char **) models, nmodels) < 0)
+ if (driver->translate(cpu, models, nmodels) < 0)
return -1;
VIR_DEBUG("model=%s", NULLSTR(cpu->model));
goto cleanup;
if (virQEMUCapsGetCPUDefinitions(qemuCaps, &models, &nmodels) < 0 ||
- virCPUTranslate(def->os.arch, def->cpu, models, nmodels) < 0)
+ virCPUTranslate(def->os.arch, def->cpu,
+ (const char **) models, nmodels) < 0)
goto cleanup;
def->cpu->fallback = VIR_CPU_FALLBACK_FORBID;