Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu.c | 40 +++++++++++++-------------
src/cpu/cpu_arm.c | 23 ++++++++-------
src/cpu/cpu_map.c | 6 ++--
src/cpu/cpu_ppc64.c | 33 ++++++++++------------
src/cpu/cpu_s390.c | 5 ++--
src/cpu/cpu_x86.c | 68 +++++++++++++++++++++------------------------
6 files changed, 83 insertions(+), 92 deletions(-)
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
index 26f41272a7..bb5737e938 100644
--- a/src/cpu/cpu.c
+++ b/src/cpu/cpu.c
@@ -64,7 +64,7 @@ cpuGetSubDriver(virArch arch)
}
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;
}
@@ -81,7 +81,7 @@ cpuGetSubDriverByName(const char *name)
}
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU driver '%s' does not exist"),
+ _("CPU driver '%1$s' does not exist"),
name);
return NULL;
}
@@ -156,7 +156,7 @@ virCPUCompare(virArch arch,
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;
}
@@ -210,7 +210,7 @@ cpuDecode(virCPUDef *cpu,
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;
}
@@ -266,7 +266,7 @@ cpuEncode(virArch arch,
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;
}
@@ -417,7 +417,7 @@ virCPUGetHost(virArch arch,
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;
}
@@ -427,7 +427,7 @@ virCPUGetHost(virArch arch,
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;
}
@@ -450,7 +450,7 @@ virCPUGetHost(virArch arch,
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;
}
@@ -524,12 +524,12 @@ virCPUBaseline(virArch arch,
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;
}
}
@@ -542,7 +542,7 @@ virCPUBaseline(virArch arch,
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;
}
@@ -614,7 +614,7 @@ virCPUUpdate(virArch arch,
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;
}
@@ -701,7 +701,7 @@ virCPUCheckFeature(virArch arch,
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;
}
@@ -738,7 +738,7 @@ virCPUCheckForbiddenFeatures(virCPUDef *guest, const virCPUDef *host)
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;
}
@@ -772,7 +772,7 @@ virCPUDataCheckFeature(const virCPUData *data,
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;
}
@@ -802,7 +802,7 @@ virCPUDataFormat(const virCPUData *data)
if (!driver->dataFormat) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("cannot format %s CPU data"),
+ _("cannot format %1$s CPU data"),
virArchToString(data->arch));
return NULL;
}
@@ -862,7 +862,7 @@ virCPUData *virCPUDataParseNode(xmlNodePtr node)
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;
}
@@ -988,14 +988,14 @@ virCPUTranslate(virArch arch,
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;
}
@@ -1177,7 +1177,7 @@ virCPUDataAddFeature(virCPUData *cpuData,
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;
}
diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index 8e562bd7a3..324c701e81 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -252,7 +252,7 @@ virCPUarmMapFeatureParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED,
if (virCPUarmMapFeatureFind(map, name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU feature %s already defined"), name);
+ _("CPU feature %1$s already defined"), name);
return -1;
}
@@ -307,7 +307,7 @@ virCPUarmVendorParse(xmlXPathContextPtr ctxt,
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;
}
@@ -318,7 +318,7 @@ virCPUarmVendorParse(xmlXPathContextPtr ctxt,
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;
}
@@ -373,7 +373,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -386,7 +386,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -394,7 +394,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -520,8 +520,7 @@ virCPUarmCompare(virCPUDef *host,
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;
}
@@ -546,7 +545,7 @@ virCPUarmValidateFeatures(virCPUDef *cpu)
if (!virCPUarmMapFeatureFind(map, feature->name)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown CPU feature: %s"),
+ _("unknown CPU feature: %1$s"),
feature->name);
return -1;
}
@@ -635,14 +634,14 @@ virCPUarmDecode(virCPUDef *cpu,
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;
}
@@ -652,7 +651,7 @@ virCPUarmDecode(virCPUDef *cpu,
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;
}
diff --git a/src/cpu/cpu_map.c b/src/cpu/cpu_map.c
index 1d8051a13b..16795a9a0a 100644
--- a/src/cpu/cpu_map.c
+++ b/src/cpu/cpu_map.c
@@ -47,7 +47,7 @@ loadData(const char *mapfile,
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;
}
@@ -56,7 +56,7 @@ loadData(const char *mapfile,
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);
@@ -173,7 +173,7 @@ int cpuMapLoad(const char *arch,
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;
}
diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c
index a33e4da9a9..e13cdbdf6b 100644
--- a/src/cpu/cpu_ppc64.c
+++ b/src/cpu/cpu_ppc64.c
@@ -110,7 +110,7 @@ ppc64CheckCompatibilityMode(const char *host_model,
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;
}
@@ -246,7 +246,7 @@ ppc64ModelFromCPU(const virCPUDef *cpu,
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;
}
@@ -286,7 +286,7 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED,
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;
}
@@ -313,7 +313,7 @@ ppc64ModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -321,14 +321,14 @@ ppc64ModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -336,7 +336,7 @@ ppc64ModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -428,7 +428,7 @@ ppc64Compute(virCPUDef *host,
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;
@@ -440,8 +440,7 @@ ppc64Compute(virCPUDef *host,
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);
}
@@ -497,8 +496,7 @@ ppc64Compute(virCPUDef *host,
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);
}
@@ -554,14 +552,14 @@ ppc64DriverDecode(virCPUDef *cpu,
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;
}
@@ -687,7 +685,7 @@ virCPUppc64Baseline(virCPUDef **cpus,
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;
}
@@ -716,15 +714,14 @@ virCPUppc64Baseline(virCPUDef **cpus,
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;
diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c
index 1de5251974..ffb1a2cf7b 100644
--- a/src/cpu/cpu_s390.c
+++ b/src/cpu/cpu_s390.c
@@ -53,7 +53,7 @@ virCPUs390Update(virCPUDef *guest,
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",
@@ -94,8 +94,7 @@ virCPUs390ValidateFeatures(virCPUDef *cpu)
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;
}
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index a8a537cbb6..8d371d5501 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -681,7 +681,7 @@ virCPUx86VendorToData(const char *vendor,
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;
}
@@ -946,14 +946,14 @@ x86VendorParse(xmlXPathContextPtr ctxt,
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;
}
@@ -990,7 +990,7 @@ x86FeatureInData(const char *name,
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;
}
@@ -1113,13 +1113,13 @@ x86ParseDataItemList(virCPUx86Data *cpudata,
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;
}
}
@@ -1149,7 +1149,7 @@ x86FeatureParse(xmlXPathContextPtr ctxt,
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;
}
@@ -1348,7 +1348,7 @@ x86ModelFromCPU(const virCPUDef *cpu,
(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;
}
@@ -1372,7 +1372,7 @@ x86ModelFromCPU(const virCPUDef *cpu,
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;
}
@@ -1460,7 +1460,7 @@ x86ModelParseDecode(virCPUx86Model *model,
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;
}
@@ -1496,14 +1496,14 @@ x86ModelParseAncestor(virCPUx86Model *model,
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;
}
@@ -1543,7 +1543,7 @@ x86ModelParseSignatures(virCPUx86Model *model,
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;
}
@@ -1551,7 +1551,7 @@ x86ModelParseSignatures(virCPUx86Model *model,
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;
}
@@ -1580,14 +1580,14 @@ x86ModelParseVendor(virCPUx86Model *model,
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;
}
@@ -1618,14 +1618,14 @@ x86ModelParseFeatures(virCPUx86Model *model,
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;
}
@@ -1660,7 +1660,7 @@ x86ModelParse(xmlXPathContextPtr ctxt,
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;
}
@@ -1857,7 +1857,7 @@ x86Compute(virCPUDef *host,
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;
@@ -1869,8 +1869,7 @@ x86Compute(virCPUDef *host,
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);
}
@@ -2196,7 +2195,7 @@ x86Decode(virCPUDef *cpu,
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 {
@@ -2379,7 +2378,7 @@ x86Encode(virArch arch,
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;
}
@@ -2840,7 +2839,7 @@ virCPUx86Baseline(virCPUDef **cpus,
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;
}
@@ -2862,7 +2861,7 @@ virCPUx86Baseline(virCPUDef **cpus,
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;
}
@@ -2879,7 +2878,7 @@ virCPUx86Baseline(virCPUDef **cpus,
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)) {
@@ -3008,7 +3007,7 @@ virCPUx86Update(virCPUDef *guest,
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;
}
@@ -3097,18 +3096,15 @@ virCPUx86UpdateLive(virCPUDef *cpu,
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;
}
@@ -3218,7 +3214,7 @@ virCPUx86ExpandFeatures(virCPUDef *cpu)
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;
}
@@ -3293,7 +3289,7 @@ virCPUx86ValidateFeatures(virCPUDef *cpu)
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;
}
--
2.39.2