mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Replace use of virCPUReportError with virReportError
Update the CPU helper APIs to use virReportError instead of the virCPUReportError custom macor Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
3de99600b1
commit
e578bc2683
1
cfg.mk
1
cfg.mk
@ -524,7 +524,6 @@ msg_gen_function += streamsReportError
|
||||
msg_gen_function += vah_error
|
||||
msg_gen_function += vah_warning
|
||||
msg_gen_function += virConfError
|
||||
msg_gen_function += virCPUReportError
|
||||
msg_gen_function += virGenericReportError
|
||||
msg_gen_function += virLibConnError
|
||||
msg_gen_function += virLibDomainError
|
||||
|
@ -54,7 +54,7 @@ cpuGetSubDriver(const char *arch)
|
||||
unsigned int j;
|
||||
|
||||
if (arch == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("undefined hardware architecture"));
|
||||
return NULL;
|
||||
}
|
||||
@ -90,7 +90,7 @@ cpuCompareXML(virCPUDefPtr host,
|
||||
goto cleanup;
|
||||
|
||||
if (!cpu->model) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_INVALID,
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("no CPU model specified"));
|
||||
goto cleanup;
|
||||
}
|
||||
@ -118,7 +118,7 @@ cpuCompare(virCPUDefPtr host,
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
|
||||
if (driver->compare == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot compare CPUs of %s architecture"),
|
||||
host->arch);
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
@ -146,13 +146,13 @@ cpuDecode(virCPUDefPtr cpu,
|
||||
}
|
||||
|
||||
if (models == NULL && nmodels != 0) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("nonzero nmodels doesn't match with NULL models"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cpu == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("invalid CPU definition"));
|
||||
return -1;
|
||||
}
|
||||
@ -161,7 +161,7 @@ cpuDecode(virCPUDefPtr cpu,
|
||||
return -1;
|
||||
|
||||
if (driver->decode == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot decode CPU data for %s architecture"),
|
||||
cpu->arch);
|
||||
return -1;
|
||||
@ -192,7 +192,7 @@ cpuEncode(const char *arch,
|
||||
return -1;
|
||||
|
||||
if (driver->encode == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot encode CPU data for %s architecture"),
|
||||
arch);
|
||||
return -1;
|
||||
@ -218,7 +218,7 @@ cpuDataFree(const char *arch,
|
||||
return;
|
||||
|
||||
if (driver->free == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot free CPU data for %s architecture"),
|
||||
arch);
|
||||
return;
|
||||
@ -239,7 +239,7 @@ cpuNodeData(const char *arch)
|
||||
return NULL;
|
||||
|
||||
if (driver->nodeData == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot get node CPU data for %s architecture"),
|
||||
arch);
|
||||
return NULL;
|
||||
@ -263,7 +263,7 @@ cpuGuestData(virCPUDefPtr host,
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
|
||||
if (driver->guestData == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot compute guest CPU data for %s architecture"),
|
||||
host->arch);
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
@ -297,13 +297,13 @@ cpuBaselineXML(const char **xmlCPUs,
|
||||
}
|
||||
|
||||
if (xmlCPUs == NULL && ncpus != 0) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("nonzero ncpus doesn't match with NULL xmlCPUs"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ncpus < 1) {
|
||||
virCPUReportError(VIR_ERR_INVALID_ARG, "%s", _("No CPUs given"));
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s", _("No CPUs given"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -369,18 +369,18 @@ cpuBaseline(virCPUDefPtr *cpus,
|
||||
}
|
||||
|
||||
if (cpus == NULL && ncpus != 0) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("nonzero ncpus doesn't match with NULL cpus"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ncpus < 1) {
|
||||
virCPUReportError(VIR_ERR_INVALID_ARG, "%s", _("No CPUs given"));
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s", _("No CPUs given"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (models == NULL && nmodels != 0) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("nonzero nmodels doesn't match with NULL models"));
|
||||
return NULL;
|
||||
}
|
||||
@ -389,7 +389,7 @@ cpuBaseline(virCPUDefPtr *cpus,
|
||||
return NULL;
|
||||
|
||||
if (driver->baseline == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot compute baseline CPU of %s architecture"),
|
||||
cpus[0]->arch);
|
||||
return NULL;
|
||||
@ -411,7 +411,7 @@ cpuUpdate(virCPUDefPtr guest,
|
||||
return -1;
|
||||
|
||||
if (driver->update == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot update guest CPU data for %s architecture"),
|
||||
host->arch);
|
||||
return -1;
|
||||
@ -434,7 +434,7 @@ cpuHasFeature(const char *arch,
|
||||
return -1;
|
||||
|
||||
if (driver->hasFeature == NULL) {
|
||||
virCPUReportError(VIR_ERR_NO_SUPPORT,
|
||||
virReportError(VIR_ERR_NO_SUPPORT,
|
||||
_("cannot check guest CPU data for %s architecture"),
|
||||
arch);
|
||||
return -1;
|
||||
|
@ -30,11 +30,6 @@
|
||||
# include "cpu_x86_data.h"
|
||||
|
||||
|
||||
# define virCPUReportError(code, ...) \
|
||||
virReportErrorHelper(VIR_FROM_CPU, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
union cpuData {
|
||||
struct cpuX86Data x86;
|
||||
/* generic driver needs no data */
|
||||
|
@ -131,7 +131,7 @@ genericBaseline(virCPUDefPtr *cpus,
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("CPU model '%s' is not support by hypervisor"),
|
||||
cpus[0]->model);
|
||||
goto error;
|
||||
@ -154,14 +154,14 @@ genericBaseline(virCPUDefPtr *cpus,
|
||||
virHashTablePtr hash;
|
||||
|
||||
if (STRNEQ(cpu->arch, cpus[i]->arch)) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("CPUs have incompatible architectures: '%s' != '%s'"),
|
||||
cpu->arch, cpus[i]->arch);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (STRNEQ(cpu->model, cpus[i]->model)) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("CPU models don't match: '%s' != '%s'"),
|
||||
cpu->model, cpus[i]->model);
|
||||
goto error;
|
||||
|
@ -86,19 +86,19 @@ int cpuMapLoad(const char *arch,
|
||||
const char *mapfile = (cpumap ? cpumap : CPUMAPFILE);
|
||||
|
||||
if (arch == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("undefined hardware architecture"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cb == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("no callback provided"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((xml = xmlParseFile(mapfile)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot parse CPU map file: %s"),
|
||||
mapfile);
|
||||
goto cleanup;
|
||||
@ -116,14 +116,14 @@ int cpuMapLoad(const char *arch,
|
||||
ctxt->node = xmlDocGetRootElement(xml);
|
||||
|
||||
if ((ctxt->node = virXPathNode(xpath, ctxt)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot find CPU map for %s architecture"), arch);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
for (element = 0; element < CPU_MAP_ELEMENT_LAST; element++) {
|
||||
if (load(ctxt, element, cb, data) < 0) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot parse CPU map for %s architecture"), arch);
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -524,25 +524,25 @@ x86VendorLoad(xmlXPathContextPtr ctxt,
|
||||
|
||||
vendor->name = virXPathString("string(@name)", ctxt);
|
||||
if (!vendor->name) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Missing CPU vendor name"));
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
if (x86VendorFind(map, vendor->name)) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("CPU vendor %s already defined"), vendor->name);
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
string = virXPathString("string(@string)", ctxt);
|
||||
if (!string) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Missing vendor string for CPU vendor %s"), vendor->name);
|
||||
goto ignore;
|
||||
}
|
||||
if (strlen(string) != VENDOR_STRING_LENGTH) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid CPU vendor string '%s'"), string);
|
||||
goto ignore;
|
||||
}
|
||||
@ -673,13 +673,13 @@ x86FeatureLoad(xmlXPathContextPtr ctxt,
|
||||
|
||||
feature->name = virXPathString("string(@name)", ctxt);
|
||||
if (feature->name == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Missing CPU feature name"));
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
if (x86FeatureFind(map, feature->name)) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("CPU feature %s already defined"), feature->name);
|
||||
goto ignore;
|
||||
}
|
||||
@ -703,7 +703,7 @@ x86FeatureLoad(xmlXPathContextPtr ctxt,
|
||||
|
||||
if (ret_fun < 0 || ret_eax == -2 || ret_ebx == -2
|
||||
|| ret_ecx == -2 || ret_edx == -2) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid cpuid[%d] in %s feature"), i, feature->name);
|
||||
goto ignore;
|
||||
}
|
||||
@ -816,7 +816,7 @@ x86ModelFromCPU(const virCPUDefPtr cpu,
|
||||
|
||||
if (policy == VIR_CPU_FEATURE_REQUIRE) {
|
||||
if ((model = x86ModelFind(map, cpu->model)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU model %s"), cpu->model);
|
||||
goto error;
|
||||
}
|
||||
@ -837,7 +837,7 @@ x86ModelFromCPU(const virCPUDefPtr cpu,
|
||||
continue;
|
||||
|
||||
if ((feature = x86FeatureFind(map, cpu->features[i].name)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU feature %s"), cpu->features[i].name);
|
||||
goto error;
|
||||
}
|
||||
@ -866,7 +866,7 @@ x86ModelSubtractCPU(struct x86_model *model,
|
||||
unsigned int i;
|
||||
|
||||
if (!(cpu_model = x86ModelFind(map, cpu->model))) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU model %s"),
|
||||
cpu->model);
|
||||
return -1;
|
||||
@ -878,7 +878,7 @@ x86ModelSubtractCPU(struct x86_model *model,
|
||||
const struct x86_feature *feature;
|
||||
|
||||
if (!(feature = x86FeatureFind(map, cpu->features[i].name))) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU feature %s"),
|
||||
cpu->features[i].name);
|
||||
return -1;
|
||||
@ -953,7 +953,7 @@ x86ModelLoad(xmlXPathContextPtr ctxt,
|
||||
|
||||
model->name = virXPathString("string(@name)", ctxt);
|
||||
if (model->name == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Missing CPU model name"));
|
||||
goto ignore;
|
||||
}
|
||||
@ -964,14 +964,14 @@ x86ModelLoad(xmlXPathContextPtr ctxt,
|
||||
|
||||
name = virXPathString("string(./model/@name)", ctxt);
|
||||
if (name == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Missing ancestor's name in CPU model %s"),
|
||||
model->name);
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
if ((ancestor = x86ModelFind(map, name)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Ancestor model %s not found for CPU model %s"),
|
||||
name, model->name);
|
||||
VIR_FREE(name);
|
||||
@ -989,14 +989,14 @@ x86ModelLoad(xmlXPathContextPtr ctxt,
|
||||
if (virXPathBoolean("boolean(./vendor)", ctxt)) {
|
||||
vendor = virXPathString("string(./vendor/@name)", ctxt);
|
||||
if (!vendor) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid vendor element in CPU model %s"),
|
||||
model->name);
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
if (!(model->vendor = x86VendorFind(map, vendor))) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown vendor %s referenced by CPU model %s"),
|
||||
vendor, model->name);
|
||||
goto ignore;
|
||||
@ -1012,13 +1012,13 @@ x86ModelLoad(xmlXPathContextPtr ctxt,
|
||||
char *name;
|
||||
|
||||
if ((name = virXMLPropString(nodes[i], "name")) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Missing feature name for CPU model %s"), model->name);
|
||||
goto ignore;
|
||||
}
|
||||
|
||||
if ((feature = x86FeatureFind(map, name)) == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Feature %s required by CPU model %s not found"),
|
||||
name, model->name);
|
||||
VIR_FREE(name);
|
||||
@ -1336,7 +1336,7 @@ x86Decode(virCPUDefPtr cpu,
|
||||
if (!allowed) {
|
||||
if (preferred && STREQ(candidate->name, preferred)) {
|
||||
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
|
||||
virCPUReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("CPU model %s is not supported by hypervisor"),
|
||||
preferred);
|
||||
goto out;
|
||||
@ -1395,7 +1395,7 @@ x86Decode(virCPUDefPtr cpu,
|
||||
}
|
||||
|
||||
if (cpuModel == NULL) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Cannot find suitable CPU model for given data"));
|
||||
goto out;
|
||||
}
|
||||
@ -1490,7 +1490,7 @@ x86Encode(const virCPUDefPtr cpu,
|
||||
const struct x86_vendor *v = NULL;
|
||||
|
||||
if (cpu->vendor && !(v = x86VendorFind(map, cpu->vendor))) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("CPU vendor %s not found"), cpu->vendor);
|
||||
goto error;
|
||||
}
|
||||
@ -1646,7 +1646,7 @@ x86Baseline(virCPUDefPtr *cpus,
|
||||
if (!cpus[0]->vendor)
|
||||
outputVendor = false;
|
||||
else if (!(vendor = x86VendorFind(map, cpus[0]->vendor))) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("Unknown CPU vendor %s"), cpus[0]->vendor);
|
||||
goto error;
|
||||
}
|
||||
@ -1659,7 +1659,7 @@ x86Baseline(virCPUDefPtr *cpus,
|
||||
|
||||
if (cpus[i]->vendor && model->vendor &&
|
||||
STRNEQ(cpus[i]->vendor, model->vendor->name)) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("CPU vendor %s of model %s differs from vendor %s"),
|
||||
model->vendor->name, model->name, cpus[i]->vendor);
|
||||
goto error;
|
||||
@ -1676,12 +1676,12 @@ x86Baseline(virCPUDefPtr *cpus,
|
||||
if (vn) {
|
||||
if (!vendor) {
|
||||
if (!(vendor = x86VendorFind(map, vn))) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("Unknown CPU vendor %s"), vn);
|
||||
goto error;
|
||||
}
|
||||
} else if (STRNEQ(vendor->name, vn)) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
"%s", _("CPU vendors do not match"));
|
||||
goto error;
|
||||
}
|
||||
@ -1693,7 +1693,7 @@ x86Baseline(virCPUDefPtr *cpus,
|
||||
}
|
||||
|
||||
if (x86DataIsEmpty(base_model->data)) {
|
||||
virCPUReportError(VIR_ERR_OPERATION_FAILED,
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
"%s", _("CPUs are incompatible"));
|
||||
goto error;
|
||||
}
|
||||
@ -1742,7 +1742,7 @@ x86UpdateCustom(virCPUDefPtr guest,
|
||||
if (guest->features[i].policy == VIR_CPU_FEATURE_OPTIONAL) {
|
||||
const struct x86_feature *feature;
|
||||
if (!(feature = x86FeatureFind(map, guest->features[i].name))) {
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown CPU feature %s"),
|
||||
guest->features[i].name);
|
||||
goto cleanup;
|
||||
@ -1792,7 +1792,7 @@ x86Update(virCPUDefPtr guest,
|
||||
break;
|
||||
}
|
||||
|
||||
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unexpected CPU mode: %d"), guest->mode);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user