}
virReportError(VIR_ERR_NO_SUPPORT,
- _("'%s' architecture is not supported by CPU driver"),
+ _("'%1$s' architecture is not supported by CPU driver"),
virArchToString(arch));
return NULL;
}
}
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU driver '%s' does not exist"),
+ _("CPU driver '%1$s' does not exist"),
name);
return NULL;
}
if (!driver->compare) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot compare CPUs of %s architecture"),
+ _("cannot compare CPUs of %1$s architecture"),
virArchToString(arch));
return VIR_CPU_COMPARE_ERROR;
}
if (driver->decode == NULL) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot decode CPU data for %s architecture"),
+ _("cannot decode CPU data for %1$s architecture"),
virArchToString(cpu->arch));
return -1;
}
if (driver->encode == NULL) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot encode CPU data for %s architecture"),
+ _("cannot encode CPU data for %1$s architecture"),
virArchToString(arch));
return -1;
}
case VIR_CPU_TYPE_GUEST:
if (nodeInfo) {
virReportError(VIR_ERR_INVALID_ARG,
- _("cannot set topology for CPU type '%s'"),
+ _("cannot set topology for CPU type '%1$s'"),
virCPUTypeToString(type));
return NULL;
}
case VIR_CPU_TYPE_AUTO:
case VIR_CPU_TYPE_LAST:
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported CPU type: %s"),
+ _("unsupported CPU type: %1$s"),
virCPUTypeToString(type));
return NULL;
}
virArchToString(arch));
} else {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot detect host CPU model for %s architecture"),
+ _("cannot detect host CPU model for %1$s architecture"),
virArchToString(arch));
return NULL;
}
for (i = 0; i < ncpus; i++) {
if (!cpus[i]) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid CPU definition at index %zu"), i);
+ _("invalid CPU definition at index %1$zu"), i);
return NULL;
}
if (!cpus[i]->model) {
virReportError(VIR_ERR_INVALID_ARG,
- _("no CPU model specified at index %zu"), i);
+ _("no CPU model specified at index %1$zu"), i);
return NULL;
}
}
if (!driver->baseline) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot compute baseline CPU of %s architecture"),
+ _("cannot compute baseline CPU of %1$s architecture"),
virArchToString(arch));
return NULL;
}
if (!driver->update) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot update guest CPU for %s architecture"),
+ _("cannot update guest CPU for %1$s architecture"),
virArchToString(arch));
return -1;
}
if (!driver->checkFeature) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot check guest CPU feature for %s architecture"),
+ _("cannot check guest CPU feature for %1$s architecture"),
virArchToString(arch));
return -1;
}
continue;
virReportError(VIR_ERR_CPU_INCOMPATIBLE,
- _("Host CPU provides forbidden feature '%s'"),
+ _("Host CPU provides forbidden feature '%1$s'"),
guest->features[i].name);
return -1;
}
if (!driver->dataCheckFeature) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot check guest CPU feature for %s architecture"),
+ _("cannot check guest CPU feature for %1$s architecture"),
virArchToString(data->arch));
return -1;
}
if (!driver->dataFormat) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot format %s CPU data"),
+ _("cannot format %1$s CPU data"),
virArchToString(data->arch));
return NULL;
}
return NULL;
if (!driver->dataParse) {
- virReportError(VIR_ERR_NO_SUPPORT, _("cannot parse %s CPU data"), arch);
+ virReportError(VIR_ERR_NO_SUPPORT, _("cannot parse %1$s CPU data"), arch);
return NULL;
}
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("CPU model %s is not supported by hypervisor"),
+ _("CPU model %1$s is not supported by hypervisor"),
cpu->model);
return -1;
}
if (!driver->translate) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot translate CPU model %s to a supported model"),
+ _("cannot translate CPU model %1$s to a supported model"),
cpu->model);
return -1;
}
if (!driver->dataAddFeature) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot add guest CPU feature for %s architecture"),
+ _("cannot add guest CPU feature for %1$s architecture"),
virArchToString(cpuData->arch));
return -1;
}
if (virCPUarmMapFeatureFind(map, name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU feature %s already defined"), name);
+ _("CPU feature %1$s already defined"), name);
return -1;
}
if (virCPUarmVendorFindByName(map, vendor->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU vendor %s already defined"),
+ _("CPU vendor %1$s already defined"),
vendor->name);
return -1;
}
if (virCPUarmVendorFindByID(map, vendor->value)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU vendor value 0x%2llx already defined"),
+ _("CPU vendor value 0x%1$2llx already defined"),
vendor->value);
return -1;
}
if (virCPUarmModelFind(map, model->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU model %s already defined"),
+ _("CPU model %1$s already defined"),
model->name);
return -1;
}
if (!(model->vendor = virCPUarmVendorFindByName(map, vendor))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown vendor %s referenced by CPU model %s"),
+ _("Unknown vendor %1$s referenced by CPU model %2$s"),
vendor, model->name);
return -1;
}
if (!(pvrNode = virXPathNode("./pvr", ctxt))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing PVR information for CPU model %s"),
+ _("Missing PVR information for CPU model %1$s"),
model->name);
return -1;
}
if (failIncompatible) {
virReportError(VIR_ERR_CPU_INCOMPATIBLE,
- _("Host CPU model does not match required CPU "
- "vendor %s or(and) model %s"),
+ _("Host CPU model does not match required CPU vendor %1$s or(and) model %2$s"),
NULLSTR(cpu->vendor), NULLSTR(cpu->model));
return VIR_CPU_COMPARE_ERROR;
}
if (!virCPUarmMapFeatureFind(map, feature->name)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown CPU feature: %s"),
+ _("unknown CPU feature: %1$s"),
feature->name);
return -1;
}
if (!(model = virCPUarmModelFindByPVR(map, cpuData->pvr))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Cannot find CPU model with PVR 0x%03llx"),
+ _("Cannot find CPU model with PVR 0x%1$03llx"),
cpuData->pvr);
return -1;
}
if (!virCPUModelIsAllowed(model->name, models)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("CPU model %s is not supported by hypervisor"),
+ _("CPU model %1$s is not supported by hypervisor"),
model->name);
return -1;
}
if (cpuData->vendor_id &&
!(vendor = virCPUarmVendorFindByID(map, cpuData->vendor_id))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Cannot find CPU vendor with vendor id 0x%02llx"),
+ _("Cannot find CPU vendor with vendor id 0x%1$02llx"),
cpuData->vendor_id);
return -1;
}
if (n > 0 && !callback) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected element '%s' in CPU map '%s'"), element, mapfile);
+ _("Unexpected element '%1$s' in CPU map '%2$s'"), element, mapfile);
return -1;
}
if (!(name = virXMLPropString(nodes[i], "name"))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find %s name in CPU map '%s'"), element, mapfile);
+ _("cannot find %1$s name in CPU map '%2$s'"), element, mapfile);
return -1;
}
VIR_DEBUG("Load %s name %s", element, name);
if ((ctxt->node = virXPathNode(xpath, ctxt)) == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find CPU map for %s architecture"), arch);
+ _("cannot find CPU map for %1$s architecture"), arch);
return -1;
}
virStrToLong_i(tmp, NULL, 10, &compat) < 0 ||
compat < 6 || compat > 10) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown compatibility mode %s"),
+ _("Unknown compatibility mode %1$s"),
compat_mode);
return VIR_CPU_COMPARE_ERROR;
}
if (!(model = ppc64ModelFind(map, cpu->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown CPU model %s"), cpu->model);
+ _("Unknown CPU model %1$s"), cpu->model);
return NULL;
}
if (ppc64VendorFind(map, vendor->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU vendor %s already defined"), vendor->name);
+ _("CPU vendor %1$s already defined"), vendor->name);
return -1;
}
if (ppc64ModelFind(map, model->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU model %s already defined"), model->name);
+ _("CPU model %1$s already defined"), model->name);
return -1;
}
vendor = virXPathString("string(./vendor/@name)", ctxt);
if (!vendor) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid vendor element in CPU model %s"),
+ _("Invalid vendor element in CPU model %1$s"),
model->name);
return -1;
}
if (!(model->vendor = ppc64VendorFind(map, vendor))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown vendor %s referenced by CPU model %s"),
+ _("Unknown vendor %1$s referenced by CPU model %2$s"),
vendor, model->name);
return -1;
}
if ((n = virXPathNodeSet("./pvr", ctxt, &nodes)) <= 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing PVR information for CPU model %s"),
+ _("Missing PVR information for CPU model %1$s"),
model->name);
return -1;
}
VIR_DEBUG("CPU arch %s does not match host arch",
virArchToString(cpu->arch));
if (message)
- *message = g_strdup_printf(_("CPU arch %s does not match host arch"),
+ *message = g_strdup_printf(_("CPU arch %1$s does not match host arch"),
virArchToString(cpu->arch));
return VIR_CPU_COMPARE_INCOMPATIBLE;
VIR_DEBUG("host CPU vendor does not match required CPU vendor %s",
cpu->vendor);
if (message) {
- *message = g_strdup_printf(_("host CPU vendor does not match required "
- "CPU vendor %s"),
+ *message = g_strdup_printf(_("host CPU vendor does not match required CPU vendor %1$s"),
cpu->vendor);
}
VIR_DEBUG("host CPU model does not match required CPU model %s",
guest_model->name);
if (message) {
- *message = g_strdup_printf(_("host CPU model does not match required "
- "CPU model %s"),
+ *message = g_strdup_printf(_("host CPU model does not match required CPU model %1$s"),
guest_model->name);
}
if (!(model = ppc64ModelFindPVR(map, data->data.ppc64.pvr[0].value))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Cannot find CPU model with PVR 0x%08x"),
+ _("Cannot find CPU model with PVR 0x%1$08x"),
data->data.ppc64.pvr[0].value);
return -1;
}
if (!virCPUModelIsAllowed(model->name, models)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("CPU model %s is not supported by hypervisor"),
+ _("CPU model %1$s is not supported by hypervisor"),
model->name);
return -1;
}
if (!(model = ppc64ModelFind(map, cpus[0]->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown CPU model %s"), cpus[0]->model);
+ _("Unknown CPU model %1$s"), cpus[0]->model);
return NULL;
}
if (!(vnd = ppc64VendorFind(map, cpus[i]->vendor))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Unknown CPU vendor %s"), cpus[i]->vendor);
+ _("Unknown CPU vendor %1$s"), cpus[i]->vendor);
return NULL;
}
if (model->vendor) {
if (model->vendor != vnd) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("CPU vendor %s of model %s differs from "
- "vendor %s"),
+ _("CPU vendor %1$s of model %2$s differs from vendor %3$s"),
model->vendor->name, model->name,
vnd->name);
return NULL;
if (guest->mode == VIR_CPU_MODE_CUSTOM) {
if (guest->match == VIR_CPU_MATCH_MINIMUM) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("match mode %s not supported"),
+ _("match mode %1$s not supported"),
virCPUMatchTypeToString(guest->match));
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
for (i = 0; i < cpu->nfeatures; i++) {
if (cpu->features[i].policy == VIR_CPU_FEATURE_OPTIONAL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("only cpu feature policies 'require' and "
- "'disable' are supported for %s"),
+ _("only cpu feature policies 'require' and 'disable' are supported for %1$s"),
cpu->features[i].name);
return -1;
}
if (strlen(vendor) != VENDOR_STRING_LENGTH) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid CPU vendor string '%s'"), vendor);
+ _("Invalid CPU vendor string '%1$s'"), vendor);
return -1;
}
if (x86VendorFind(map, vendor->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU vendor %s already defined"), vendor->name);
+ _("CPU vendor %1$s already defined"), vendor->name);
return -1;
}
string = virXPathString("string(@string)", ctxt);
if (!string) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing vendor string for CPU vendor %s"),
+ _("Missing vendor string for CPU vendor %1$s"),
vendor->name);
return -1;
}
if (!(feature = x86FeatureFind(map, name)) &&
!(feature = x86FeatureFindInternal(name))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unknown CPU feature %s"), name);
+ _("unknown CPU feature %1$s"), name);
return -1;
}
if (virXMLNodeNameEqual(node, "cpuid")) {
if (x86ParseCPUID(node, &item) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid cpuid[%zu]"), i);
+ _("Invalid cpuid[%1$zu]"), i);
return -1;
}
} else {
if (x86ParseMSR(node, &item) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid msr[%zu]"), i);
+ _("Invalid msr[%1$zu]"), i);
return -1;
}
}
if (x86FeatureFind(map, feature->name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU feature %s already defined"), feature->name);
+ _("CPU feature %1$s already defined"), feature->name);
return -1;
}
(policy == VIR_CPU_FEATURE_REQUIRE || policy == -1)) {
if (!(model = x86ModelFind(map, cpu->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown CPU model %s"), cpu->model);
+ _("Unknown CPU model %1$s"), cpu->model);
return NULL;
}
if (!(feature = x86FeatureFind(map, cpu->features[i].name))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown CPU feature %s"), cpu->features[i].name);
+ _("Unknown CPU feature %1$s"), cpu->features[i].name);
return NULL;
}
if (!(decode_node = virXPathNode("./decode", ctxt))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing decode element in CPU model %s"),
+ _("missing decode element in CPU model %1$s"),
model->name);
return -1;
}
name = virXPathString("string(./model/@name)", ctxt);
if (!name) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing ancestor's name in CPU model %s"),
+ _("Missing ancestor's name in CPU model %1$s"),
model->name);
return -1;
}
if (!(ancestor = x86ModelFind(map, name))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Ancestor model %s not found for CPU model %s"),
+ _("Ancestor model %1$s not found for CPU model %2$s"),
name, model->name);
return -1;
}
rc = virXPathUInt("string(@family)", ctxt, &sig->family);
if (rc < 0 || sig->family == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid CPU signature family in model %s"),
+ _("Invalid CPU signature family in model %1$s"),
model->name);
return -1;
}
rc = virXPathUInt("string(@model)", ctxt, &sig->model);
if (rc < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid CPU signature model in model %s"),
+ _("Invalid CPU signature model in model %1$s"),
model->name);
return -1;
}
vendor = virXPathString("string(./vendor/@name)", ctxt);
if (!vendor) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid vendor element in CPU model %s"),
+ _("Invalid vendor element in CPU model %1$s"),
model->name);
return -1;
}
if (!(model->vendor = x86VendorFind(map, vendor))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown vendor %s referenced by CPU model %s"),
+ _("Unknown vendor %1$s referenced by CPU model %2$s"),
vendor, model->name);
return -1;
}
if (!(ftname = virXMLPropString(nodes[i], "name"))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing feature name for CPU model %s"),
+ _("Missing feature name for CPU model %1$s"),
model->name);
return -1;
}
if (!(feature = x86FeatureFind(map, ftname))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Feature %s required by CPU model %s not found"),
+ _("Feature %1$s required by CPU model %2$s not found"),
ftname, model->name);
return -1;
}
if (x86ModelFind(map, name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Multiple definitions of CPU model '%s'"), name);
+ _("Multiple definitions of CPU model '%1$s'"), name);
return -1;
}
VIR_DEBUG("CPU arch %s does not match host arch",
virArchToString(cpu->arch));
if (message) {
- *message = g_strdup_printf(_("CPU arch %s does not match host arch"),
+ *message = g_strdup_printf(_("CPU arch %1$s does not match host arch"),
virArchToString(cpu->arch));
}
return VIR_CPU_COMPARE_INCOMPATIBLE;
VIR_DEBUG("host CPU vendor does not match required CPU vendor %s",
cpu->vendor);
if (message) {
- *message = g_strdup_printf(_("host CPU vendor does not match required "
- "CPU vendor %s"),
+ *message = g_strdup_printf(_("host CPU vendor does not match required CPU vendor %1$s"),
cpu->vendor);
}
STREQ(candidate->name, preferred[0])) {
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("CPU model %s is not supported by hypervisor"),
+ _("CPU model %1$s is not supported by hypervisor"),
preferred[0]);
return -1;
} else {
if (cpu->vendor && !(v = x86VendorFind(map, cpu->vendor))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("CPU vendor %s not found"), cpu->vendor);
+ _("CPU vendor %1$s not found"), cpu->vendor);
return -1;
}
outputVendor = false;
} else if (!(vendor = x86VendorFind(map, cpus[0]->vendor))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Unknown CPU vendor %s"), cpus[0]->vendor);
+ _("Unknown CPU vendor %1$s"), cpus[0]->vendor);
return NULL;
}
if (cpus[i]->vendor && model->vendor &&
STRNEQ(cpus[i]->vendor, model->vendor->name)) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("CPU vendor %s of model %s differs from vendor %s"),
+ _("CPU vendor %1$s of model %2$s differs from vendor %3$s"),
model->vendor->name, model->name, cpus[i]->vendor);
return NULL;
}
if (!vendor) {
if (!(vendor = x86VendorFind(map, vn))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Unknown CPU vendor %s"), vn);
+ _("Unknown CPU vendor %1$s"), vn);
return NULL;
}
} else if (STRNEQ(vendor->name, vn)) {
if (!(guestModel = x86ModelFind(map, guest->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown CPU model %s"), guest->model);
+ _("Unknown CPU model %1$s"), guest->model);
return -1;
}
if (added || removed) {
if (added && removed)
virReportError(VIR_ERR_OPERATION_FAILED,
- _("guest CPU doesn't match specification: "
- "extra features: %s, missing features: %s"),
+ _("guest CPU doesn't match specification: extra features: %1$s, missing features: %2$s"),
added, removed);
else if (added)
virReportError(VIR_ERR_OPERATION_FAILED,
- _("guest CPU doesn't match specification: "
- "extra features: %s"),
+ _("guest CPU doesn't match specification: extra features: %1$s"),
added);
else
virReportError(VIR_ERR_OPERATION_FAILED,
- _("guest CPU doesn't match specification: "
- "missing features: %s"),
+ _("guest CPU doesn't match specification: missing features: %1$s"),
removed);
return -1;
}
if (!(model = x86ModelFind(map, cpu->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unknown CPU model %s"), cpu->model);
+ _("unknown CPU model %1$s"), cpu->model);
return -1;
}
for (i = 0; i < cpu->nfeatures; i++) {
if (!x86FeatureFind(map, cpu->features[i].name)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown CPU feature: %s"),
+ _("unknown CPU feature: %1$s"),
cpu->features[i].name);
return -1;
}