Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/conf/backup_conf.c | 16 +++--- src/conf/capabilities.c | 21 ++++---- src/conf/checkpoint_conf.c | 8 +-- src/conf/cpu_conf.c | 46 ++++++++-------- src/conf/device_conf.c | 2 +- src/conf/domain_addr.c | 79 ++++++++++++---------------- src/conf/domain_capabilities.c | 3 +- src/conf/domain_event.c | 4 +- src/conf/domain_postparse.c | 30 +++++------ src/conf/interface_conf.c | 17 +++--- src/conf/netdev_bandwidth_conf.c | 10 ++-- src/conf/netdev_vlan_conf.c | 10 ++-- src/conf/netdev_vport_profile_conf.c | 2 +- src/conf/networkcommon_conf.c | 64 +++++++--------------- src/conf/node_device_util.c | 6 +-- src/conf/numa_conf.c | 67 ++++++++++------------- src/conf/nwfilter_conf.c | 23 ++++---- src/conf/nwfilter_params.c | 25 +++++---- src/conf/object_event.c | 10 ++-- src/conf/secret_conf.c | 8 +-- src/conf/snapshot_conf.c | 45 +++++++--------- src/conf/storage_adapter_conf.c | 6 +-- src/conf/storage_conf.c | 26 ++++----- src/conf/storage_encryption_conf.c | 4 +- src/conf/storage_source_conf.c | 15 +++--- src/conf/virchrdev.c | 13 ++--- src/conf/virdomainjob.c | 25 +++------ src/conf/virdomainmomentobjlist.c | 8 +-- src/conf/virdomainobjlist.c | 18 +++---- src/conf/virnetworkobj.c | 24 ++++----- src/conf/virnetworkportdef.c | 14 ++--- src/conf/virnodedeviceobj.c | 9 ++-- src/conf/virnwfilterbindingdef.c | 4 +- src/conf/virnwfilterbindingobj.c | 4 +- src/conf/virnwfilterbindingobjlist.c | 8 +-- src/conf/virnwfilterobj.c | 12 ++--- src/conf/virsecretobj.c | 22 ++++---- src/conf/virstorageobj.c | 22 ++++---- 38 files changed, 323 insertions(+), 407 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index ad5633388d..4a8c05dca9 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -159,7 +159,7 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node, if (def->store->type != VIR_STORAGE_TYPE_FILE && def->store->type != VIR_STORAGE_TYPE_BLOCK) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported disk backup type '%s'"), type); + _("unsupported disk backup type '%1$s'"), type); return -1; } @@ -210,7 +210,7 @@ virDomainBackupDefParseXML(xmlXPathContextPtr ctxt, if ((mode = virXMLPropString(ctxt->node, "mode"))) { if ((def->type = virDomainBackupTypeFromString(mode)) <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown backup mode '%s'"), mode); + _("unknown backup mode '%1$s'"), mode); return NULL; } } @@ -240,7 +240,7 @@ virDomainBackupDefParseXML(xmlXPathContextPtr ctxt, if (def->server->transport == VIR_STORAGE_NET_HOST_TRANS_UNIX && !g_path_is_absolute(def->server->socket)) { virReportError(VIR_ERR_XML_ERROR, - _("backup socket path '%s' must be absolute"), + _("backup socket path '%1$s' must be absolute"), def->server->socket); return NULL; } @@ -419,7 +419,7 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDef *disk, if (virStorageSourceIsEmpty(src)) { if (disk->store) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' has no media"), disk->name); + _("disk '%1$s' has no media"), disk->name); return -1; } } else if (!disk->store) { @@ -429,7 +429,7 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDef *disk, disk->store->path = g_strdup_printf("%s.%s", src->path, suffix); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("refusing to generate file name for disk '%s'"), + _("refusing to generate file name for disk '%1$s'"), disk->name); return -1; } @@ -463,13 +463,13 @@ virDomainBackupAlignDisks(virDomainBackupDef *def, if (!(domdisk = virDomainDiskByTarget(dom, backupdisk->name))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), backupdisk->name); + _("no disk named '%1$s'"), backupdisk->name); return -1; } if (virHashAddEntry(disks, backupdisk->name, NULL) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), backupdisk->name); return -1; } @@ -478,7 +478,7 @@ virDomainBackupAlignDisks(virDomainBackupDef *def, !backupdisk->incremental && !def->incremental) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'incremental' backup mode of disk '%s' requires setting 'incremental' field for disk or backup"), + _("'incremental' backup mode of disk '%1$s' requires setting 'incremental' field for disk or backup"), backupdisk->name); return -1; } diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 34770fc416..a3588abcc0 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -713,7 +713,7 @@ virCapabilitiesDomainDataLookupInternal(virCaps *caps, virBufferAsprintf(&buf, "%s", _("any configuration")); virReportError(VIR_ERR_INVALID_ARG, - _("could not find capabilities for %s"), + _("could not find capabilities for %1$s"), virBufferCurrentContent(&buf)); return ret; } @@ -1398,8 +1398,7 @@ virCapabilitiesHostNUMAGetCellCpus(virCapsHostNUMA *caps, for (cpu = 0; cell && cpu < cell->ncpus; cpu++) { if (virBitmapSetBit(cpumask, cell->cpus[cpu].id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cpu '%u' in node '%zu' is out of range " - "of the provided bitmap"), + _("Cpu '%1$u' in node '%2$zu' is out of range of the provided bitmap"), cell->cpus[cpu].id, node); return -1; } @@ -1560,7 +1559,7 @@ virCapabilitiesGetNodeCacheReadFileUint(const char *prefix, if (rv < 0) { if (rv == -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s' does not exist"), + _("File '%1$s' does not exist"), path); } return -1; @@ -1582,7 +1581,7 @@ virCapabilitiesGetNodeCacheReadFileUllong(const char *prefix, if (rv < 0) { if (rv == -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s' does not exist"), + _("File '%1$s' does not exist"), path); } return -1; @@ -1629,7 +1628,7 @@ virCapabilitiesGetNodeCache(int node, if (virStrToLong_ui(dname, NULL, 10, &cache.level) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -1655,7 +1654,7 @@ virCapabilitiesGetNodeCache(int node, case 2: cache.associativity = VIR_NUMA_CACHE_ASSOCIATIVITY_NONE; break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown indexing value '%u'"), + _("unknown indexing value '%1$u'"), indexing); return -1; } @@ -1671,7 +1670,7 @@ virCapabilitiesGetNodeCache(int node, case 2: cache.policy = VIR_NUMA_CACHE_POLICY_NONE; break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown write_policy value '%u'"), + _("unknown write_policy value '%1$u'"), write_policy); return -1; } @@ -1851,7 +1850,7 @@ virCapabilitiesHostNUMAInitInterconnectsNode(GArray *interconnects, if (virStrToLong_ui(dname, NULL, 10, &initNode) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -1915,7 +1914,7 @@ virCapabilitiesHostNUMAInitInterconnects(virCapsHostNUMA *caps) if (virStrToLong_ui(dname, NULL, 10, &node) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -2260,7 +2259,7 @@ virCapabilitiesInitCaches(virCaps *caps) kernel_type = virCacheKernelTypeFromString(type); if (kernel_type < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown cache type '%s'"), type); + _("Unknown cache type '%1$s'"), type); return -1; } diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 6656089457..89f8675235 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -283,13 +283,13 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *chkdef) if (!domdisk) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), chkdisk->name); + _("no disk named '%1$s'"), chkdisk->name); return -1; } if (virHashHasEntry(map, domdisk->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), chkdisk->name); return -1; } @@ -301,7 +301,7 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *chkdef) domdisk->src->readonly) && chkdisk->type != VIR_DOMAIN_CHECKPOINT_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' is empty or readonly"), + _("disk '%1$s' is empty or readonly"), chkdisk->name); return -1; } @@ -471,7 +471,7 @@ virDomainCheckpointRedefinePrep(virDomainObj *vm, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_INVALID_ARG, - _("definition for checkpoint %s must use uuid %s"), + _("definition for checkpoint %1$s must use uuid %2$s"), def->parent.name, uuidstr); return -1; } diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index ba7428bc93..2b361d2c68 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -416,7 +416,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, if (def->mode < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid mode attribute '%s'"), + _("Invalid mode attribute '%1$s'"), cpuMode); return -1; } @@ -465,7 +465,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, } if ((def->arch = virArchFromString(arch)) == VIR_ARCH_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown architecture %s"), arch); + _("Unknown architecture %1$s"), arch); return -1; } @@ -537,7 +537,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, ctxt))) { if (strlen(vendor_id) != VIR_CPU_VENDOR_ID_LENGTH) { virReportError(VIR_ERR_XML_ERROR, - _("vendor_id must be exactly %d characters long"), + _("vendor_id must be exactly %1$d characters long"), VIR_CPU_VENDOR_ID_LENGTH); return -1; } @@ -634,7 +634,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, for (j = 0; j < i; j++) { if (STREQ(name, def->features[j].name)) { virReportError(VIR_ERR_XML_ERROR, - _("CPU feature '%s' specified more than once"), + _("CPU feature '%1$s' specified more than once"), name); return -1; } @@ -707,7 +707,7 @@ virCPUDefFormatBufFull(virBuffer *buf, if (!(tmp = virCPUModeTypeToString(def->mode))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU mode %d"), def->mode); + _("Unexpected CPU mode %1$d"), def->mode); return -1; } virBufferAsprintf(&attributeBuf, " mode='%s'", tmp); @@ -715,7 +715,7 @@ virCPUDefFormatBufFull(virBuffer *buf, if (def->mode == VIR_CPU_MODE_CUSTOM) { if (!(tmp = virCPUMatchTypeToString(def->match))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU match policy %d"), + _("Unexpected CPU match policy %1$d"), def->match); return -1; } @@ -778,7 +778,7 @@ virCPUDefFormatBuf(virBuffer *buf, fallback = virCPUFallbackTypeToString(def->fallback); if (!fallback) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU fallback value: %d"), + _("Unexpected CPU fallback value: %1$d"), def->fallback); return -1; } @@ -861,7 +861,7 @@ virCPUDefFormatBuf(virBuffer *buf, policy = virCPUFeaturePolicyTypeToString(feature->policy); if (!policy) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU feature policy %d"), + _("Unexpected CPU feature policy %1$d"), feature->policy); return -1; } @@ -906,7 +906,7 @@ virCPUDefAddFeatureInternal(virCPUDef *def, case VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU feature '%s' specified more than once"), + _("CPU feature '%1$s' specified more than once"), name); return -1; } @@ -1039,71 +1039,71 @@ virCPUDefIsEqual(virCPUDef *src, } if (src->type != dst->type) { - MISMATCH(_("Target CPU type %s does not match source %s"), + MISMATCH(_("Target CPU type %1$s does not match source %2$s"), virCPUTypeToString(dst->type), virCPUTypeToString(src->type)); return false; } if (src->mode != dst->mode) { - MISMATCH(_("Target CPU mode %s does not match source %s"), + MISMATCH(_("Target CPU mode %1$s does not match source %2$s"), virCPUModeTypeToString(dst->mode), virCPUModeTypeToString(src->mode)); return false; } if (src->check != dst->check) { - MISMATCH(_("Target CPU check %s does not match source %s"), + MISMATCH(_("Target CPU check %1$s does not match source %2$s"), virCPUCheckTypeToString(dst->check), virCPUCheckTypeToString(src->check)); return false; } if (src->arch != dst->arch) { - MISMATCH(_("Target CPU arch %s does not match source %s"), + MISMATCH(_("Target CPU arch %1$s does not match source %2$s"), virArchToString(dst->arch), virArchToString(src->arch)); return false; } if (STRNEQ_NULLABLE(src->model, dst->model)) { - MISMATCH(_("Target CPU model %s does not match source %s"), + MISMATCH(_("Target CPU model %1$s does not match source %2$s"), NULLSTR(dst->model), NULLSTR(src->model)); return false; } if (STRNEQ_NULLABLE(src->vendor, dst->vendor)) { - MISMATCH(_("Target CPU vendor %s does not match source %s"), + MISMATCH(_("Target CPU vendor %1$s does not match source %2$s"), NULLSTR(dst->vendor), NULLSTR(src->vendor)); return false; } if (STRNEQ_NULLABLE(src->vendor_id, dst->vendor_id)) { - MISMATCH(_("Target CPU vendor id %s does not match source %s"), + MISMATCH(_("Target CPU vendor id %1$s does not match source %2$s"), NULLSTR(dst->vendor_id), NULLSTR(src->vendor_id)); return false; } if (src->sockets != dst->sockets) { - MISMATCH(_("Target CPU sockets %d does not match source %d"), + MISMATCH(_("Target CPU sockets %1$d does not match source %2$d"), dst->sockets, src->sockets); return false; } if (src->dies != dst->dies) { - MISMATCH(_("Target CPU dies %d does not match source %d"), + MISMATCH(_("Target CPU dies %1$d does not match source %2$d"), dst->dies, src->dies); return false; } if (src->cores != dst->cores) { - MISMATCH(_("Target CPU cores %d does not match source %d"), + MISMATCH(_("Target CPU cores %1$d does not match source %2$d"), dst->cores, src->cores); return false; } if (src->threads != dst->threads) { - MISMATCH(_("Target CPU threads %d does not match source %d"), + MISMATCH(_("Target CPU threads %1$d does not match source %2$d"), dst->threads, src->threads); return false; } @@ -1118,20 +1118,20 @@ virCPUDefIsEqual(virCPUDef *src, } if (src->nfeatures != dst->nfeatures) { - MISMATCH(_("Target CPU feature count %zu does not match source %zu"), + MISMATCH(_("Target CPU feature count %1$zu does not match source %2$zu"), dst->nfeatures, src->nfeatures); return false; } for (i = 0; i < src->nfeatures; i++) { if (STRNEQ(src->features[i].name, dst->features[i].name)) { - MISMATCH(_("Target CPU feature %s does not match source %s"), + MISMATCH(_("Target CPU feature %1$s does not match source %2$s"), dst->features[i].name, src->features[i].name); return false; } if (src->features[i].policy != dst->features[i].policy) { - MISMATCH(_("Target CPU feature policy %s does not match source %s"), + MISMATCH(_("Target CPU feature policy %1$s does not match source %2$s"), virCPUFeaturePolicyTypeToString(dst->features[i].policy), virCPUFeaturePolicyTypeToString(src->features[i].policy)); return false; diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index a116e39c75..aa0cc8945c 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -272,7 +272,7 @@ virCCWDeviceAddressParseXML(xmlNodePtr node, if (!virCCWDeviceAddressIsValid(addr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid specification for virtio ccw address: cssid='0x%x' ssid='0x%x' devno='0x%04x'"), + _("Invalid specification for virtio ccw address: cssid='0x%1$x' ssid='0x%2$x' devno='0x%3$04x'"), addr->cssid, addr->ssid, addr->devno); return -1; } diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index b6534f502c..27ce4a61ca 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -38,14 +38,14 @@ virDomainZPCIAddressReserveId(GHashTable *set, if (!id->isSet) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No zPCI %s to reserve"), + _("No zPCI %1$s to reserve"), name); return -1; } if (g_hash_table_lookup(set, &id->value)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("zPCI %s %o is already reserved"), + _("zPCI %1$s %2$o is already reserved"), name, id->value); return -1; } @@ -88,7 +88,7 @@ virDomainZPCIAddressAssignId(GHashTable *set, while (g_hash_table_lookup(set, &min)) { if (min == max) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("There is no more free %s."), + _("There is no more free %1$s."), name); return -1; } @@ -314,8 +314,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress *addr, } else { if (reportError) { virReportError(errType, - _("The device at PCI address %s needs to be " - "an integrated device (bus=0)"), + _("The device at PCI address %1$s needs to be an integrated device (bus=0)"), addrStr); } return false; @@ -341,9 +340,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress *addr, !(busFlags & VIR_PCI_CONNECT_AUTOASSIGN)) { if (reportError) { virReportError(errType, - _("The device at PCI address %s was auto-assigned " - "this address, but the PCI controller " - "with index='%d' doesn't allow auto-assignment"), + _("The device at PCI address %1$s was auto-assigned this address, but the PCI controller with index='%2$d' doesn't allow auto-assignment"), addrStr, addr->bus); } return false; @@ -353,9 +350,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress *addr, !(busFlags & VIR_PCI_CONNECT_HOTPLUGGABLE)) { if (reportError) { virReportError(errType, - _("The device at PCI address %s requires " - "hotplug capability, but the PCI controller " - "with index='%d' doesn't support hotplug"), + _("The device at PCI address %1$s requires hotplug capability, but the PCI controller with index='%2$d' doesn't support hotplug"), addrStr, addr->bus); } return false; @@ -396,15 +391,12 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress *addr, * bug in the code that sets the flag bits for devices. */ virReportError(errType, - _("The device at PCI address %s has " - "unrecognized connection type flags 0x%.2x"), + _("The device at PCI address %1$s has unrecognized connection type flags 0x%2$.2x"), addrStr, devFlags & VIR_PCI_CONNECT_TYPES_MASK); return false; } virReportError(errType, - _("The device at PCI address %s cannot be " - "plugged into the PCI controller with index='%d'. " - "It requires a controller that accepts a %s."), + _("The device at PCI address %1$s cannot be plugged into the PCI controller with index='%2$d'. It requires a controller that accepts a %3$s."), addrStr, addr->bus, connectStr); return false; } @@ -433,15 +425,13 @@ virDomainPCIAddressValidate(virDomainPCIAddressSet *addrs, } if (addr->domain != 0) { virReportError(errType, - _("Invalid PCI address %s. " - "Only PCI domain 0 is available"), + _("Invalid PCI address %1$s. Only PCI domain 0 is available"), addrStr); return false; } if (addr->bus >= addrs->nbuses) { virReportError(errType, - _("Invalid PCI address %s. " - "Only PCI buses up to %zu are available"), + _("Invalid PCI address %1$s. Only PCI buses up to %2$zu are available"), addrStr, addrs->nbuses - 1); return false; } @@ -458,19 +448,19 @@ virDomainPCIAddressValidate(virDomainPCIAddressSet *addrs, /* some "buses" are really just a single port */ if (bus->minSlot && addr->slot < bus->minSlot) { virReportError(errType, - _("Invalid PCI address %s. slot must be >= %zu"), + _("Invalid PCI address %1$s. slot must be >= %2$zu"), addrStr, bus->minSlot); return false; } if (addr->slot > bus->maxSlot) { virReportError(errType, - _("Invalid PCI address %s. slot must be <= %zu"), + _("Invalid PCI address %1$s. slot must be <= %2$zu"), addrStr, bus->maxSlot); return false; } if (addr->function > VIR_PCI_ADDRESS_FUNCTION_LAST) { virReportError(errType, - _("Invalid PCI address %s. function must be <= %u"), + _("Invalid PCI address %1$s. function must be <= %2$u"), addrStr, VIR_PCI_ADDRESS_FUNCTION_LAST); return false; } @@ -733,14 +723,12 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSet *addrs, if (existingContModel >= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("a PCI slot is needed to connect a PCI controller " - "model='%s', but none is available, and it " - "cannot be automatically added"), + _("a PCI slot is needed to connect a PCI controller model='%1$s', but none is available, and it cannot be automatically added"), virDomainControllerModelPCITypeToString(existingContModel)); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot automatically add a new PCI bus for a " - "device with connect flags %.2x"), flags); + _("Cannot automatically add a new PCI bus for a device with connect flags %1$.2x"), + flags); } return -1; } @@ -838,7 +826,7 @@ virDomainPCIAddressReserveAddrInternal(virDomainPCIAddressSet *addrs, if (bus->slot[addr->slot].functions & (1 << addr->function)) { virReportError(errType, - _("Attempted double use of PCI Address %s"), addrStr); + _("Attempted double use of PCI Address %1$s"), addrStr); return -1; } @@ -1321,7 +1309,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, if (virHashLookup(addrs->defined, addr)) { virReportError(VIR_ERR_XML_ERROR, - _("The CCW devno '%s' is in use already"), + _("The CCW devno '%1$s' is in use already"), addr); return -1; } @@ -1457,8 +1445,7 @@ virDomainVirtioSerialAddrPlaceController(virDomainVirtioSerialAddrSet *addrs, for (i = 0; i < addrs->ncontrollers; i++) { if (addrs->controllers[i]->idx == cont->idx) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virtio serial controller with index %u already exists" - " in the address set"), + _("virtio serial controller with index %1$u already exists in the address set"), cont->idx); return -2; } @@ -1583,7 +1570,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_GNUC_UNUSED, i = virDomainVirtioSerialAddrFindController(addrs, info->addr.vioserial.controller); if (i < 0) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial controller %u is missing"), + _("virtio serial controller %1$u is missing"), info->addr.vioserial.controller); return -1; } @@ -1591,7 +1578,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_GNUC_UNUSED, map = addrs->controllers[i]->ports; if (virBitmapGetBit(map, info->addr.vioserial.port, &b) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial controller %u does not have port %u"), + _("virtio serial controller %1$u does not have port %2$u"), info->addr.vioserial.controller, info->addr.vioserial.port); return -1; @@ -1599,7 +1586,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_GNUC_UNUSED, if (b) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial port %u on controller %u is already occupied"), + _("virtio serial port %1$u on controller %2$u is already occupied"), info->addr.vioserial.port, info->addr.vioserial.controller); return -1; @@ -1726,7 +1713,7 @@ virDomainVirtioSerialAddrNextFromController(virDomainVirtioSerialAddrSet *addrs, i = virDomainVirtioSerialAddrFindController(addrs, addr->controller); if (i < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virtio-serial controller %u not available"), + _("virtio-serial controller %1$u not available"), addr->controller); return -1; } @@ -1734,7 +1721,7 @@ virDomainVirtioSerialAddrNextFromController(virDomainVirtioSerialAddrSet *addrs, map = addrs->controllers[i]->ports; if ((port = virBitmapNextClearBit(map, 0)) <= 0) { virReportError(VIR_ERR_XML_ERROR, - _("Unable to find a free port on virtio-serial controller %u"), + _("Unable to find a free port on virtio-serial controller %1$u"), addr->controller); return -1; } @@ -1977,7 +1964,7 @@ virDomainUSBAddressSetAddController(virDomainUSBAddressSet *addrs, VIR_EXPAND_N(addrs->buses, addrs->nbuses, cont->idx - addrs->nbuses + 1); } else if (addrs->buses[cont->idx]) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB controllers with index %u"), + _("Duplicate USB controllers with index %1$u"), cont->idx); goto cleanup; } @@ -2021,7 +2008,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *addrs, if (info->addr.usb.bus >= addrs->nbuses || !addrs->buses[info->addr.usb.bus]) { - virReportError(VIR_ERR_XML_ERROR, _("Missing USB bus %u"), + virReportError(VIR_ERR_XML_ERROR, _("Missing USB bus %1$u"), info->addr.usb.bus); return NULL; } @@ -2035,7 +2022,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *addrs, if (hub->nports <= portIdx) { virReportError(VIR_ERR_XML_ERROR, - _("port %u out of range in USB address bus: %u port: %s"), + _("port %1$u out of range in USB address bus: %2$u port: %3$s"), info->addr.usb.port[i], info->addr.usb.bus, portStr); @@ -2044,7 +2031,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *addrs, hub = hub->ports[portIdx]; if (!hub) { virReportError(VIR_ERR_XML_ERROR, - _("there is no hub at port %u in USB address bus: %u port: %s"), + _("there is no hub at port %1$u in USB address bus: %2$u port: %3$s"), info->addr.usb.port[i], info->addr.usb.bus, portStr); @@ -2055,7 +2042,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *addrs, targetPort = info->addr.usb.port[lastIdx] - 1; if (targetPort >= virBitmapSize(hub->portmap)) { virReportError(VIR_ERR_XML_ERROR, - _("requested USB port %s not present on USB bus %u"), + _("requested USB port %1$s not present on USB bus %2$u"), portStr, info->addr.usb.bus); return NULL; } @@ -2096,7 +2083,7 @@ virDomainUSBAddressSetAddHub(virDomainUSBAddressSet *addrs, if (targetHub->ports[targetPort]) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB hub on bus %u port %s"), + _("Duplicate USB hub on bus %1$u port %2$s"), hub->info.addr.usb.bus, portStr); goto cleanup; } @@ -2248,8 +2235,8 @@ virDomainUSBAddressAssign(virDomainUSBAddressSet *addrs, if (info->addr.usb.bus >= addrs->nbuses || !addrs->buses[info->addr.usb.bus]) { virReportError(VIR_ERR_XML_ERROR, - _("USB bus %u requested but no controller " - "with that index is present"), info->addr.usb.bus); + _("USB bus %1$u requested but no controller with that index is present"), + info->addr.usb.bus); return -1; } rc = virDomainUSBAddressAssignFromBus(addrs, info, info->addr.usb.bus); @@ -2307,7 +2294,7 @@ virDomainUSBAddressReserve(virDomainDeviceInfo *info, if (virBitmapIsBitSet(targetHub->portmap, targetPort)) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB address bus %u port %s"), + _("Duplicate USB address bus %1$u port %2$s"), info->addr.usb.bus, portStr); return -1; } diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index d8915bd2d2..c076af7808 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -244,8 +244,7 @@ virDomainCapsEnumSet(virDomainCapsEnum *capsEnum, if (!val) { /* Integer overflow */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("integer overflow on %s. Please contact the " - "libvirt development team at libvir-list@xxxxxxxxxx"), + _("integer overflow on %1$s. Please contact the libvirt development team at libvir-list@xxxxxxxxxx"), capsEnumName); return -1; } diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 7e9bd08381..94b7335e56 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -575,7 +575,7 @@ virDomainEventNew(virClass *klass, if (!virClassIsDerivedFrom(klass, virDomainEventClass)) { virReportInvalidArg(klass, - _("Class %s must derive from virDomainEvent"), + _("Class %1$s must derive from virDomainEvent"), virClassName(klass)); return NULL; } @@ -2395,7 +2395,7 @@ virDomainQemuMonitorEventStateRegisterID(virConnectPtr conn, data->regex = g_regex_new(event, cflags, 0, &err); if (!data->regex) { virReportError(VIR_ERR_INVALID_ARG, - _("failed to compile regex '%s': %s"), + _("failed to compile regex '%1$s': %2$s"), event, err->message); VIR_FREE(data); return -1; diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c index 22eb603b3b..56759ae613 100644 --- a/src/conf/domain_postparse.c +++ b/src/conf/domain_postparse.c @@ -160,7 +160,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name == VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK) { if (timer->tickpolicy) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of timer tickpolicy"), + _("timer %1$s doesn't support setting of timer tickpolicy"), virDomainTimerNameTypeToString(timer->name)); return -1; } @@ -178,14 +178,14 @@ virDomainDefPostParseTimer(virDomainDef *def) if (timer->name != VIR_DOMAIN_TIMER_NAME_TSC) { if (timer->frequency != 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of timer frequency"), + _("timer %1$s doesn't support setting of timer frequency"), virDomainTimerNameTypeToString(timer->name)); return -1; } if (timer->mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of timer mode"), + _("timer %1$s doesn't support setting of timer mode"), virDomainTimerNameTypeToString(timer->name)); return -1; } @@ -195,7 +195,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name != VIR_DOMAIN_TIMER_NAME_RTC) { if (timer->track != VIR_DOMAIN_TIMER_TRACK_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of timer track"), + _("timer %1$s doesn't support setting of timer track"), virDomainTimerNameTypeToString(timer->name)); return -1; } @@ -341,7 +341,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, VIR_DOMAIN_DISK_BUS_SCSI, addr)) { virReportError(VIR_ERR_XML_ERROR, - _("SCSI host address controller='%u' bus='%u' target='%u' unit='%u' in use by a SCSI disk"), + _("SCSI host address controller='%1$u' bus='%2$u' target='%3$u' unit='%4$u' in use by a SCSI disk"), addr->controller, addr->bus, addr->target, addr->unit); return -1; @@ -358,7 +358,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, (model == VIR_MDEV_MODEL_TYPE_VFIO_CCW && dev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)) { virReportError(VIR_ERR_XML_ERROR, - _("Unsupported address type '%s' with mediated device model '%s'"), + _("Unsupported address type '%1$s' with mediated device model '%2$s'"), virDomainDeviceAddressTypeToString(dev->info->type), virMediatedDeviceModelTypeToString(model)); return -1; @@ -391,7 +391,7 @@ virDomainChrIsaSerialDefPostParse(virDomainDef *def) if (isa_serial_count++ >= VIR_MAX_ISA_SERIAL_PORTS || def->serials[i]->target.port >= VIR_MAX_ISA_SERIAL_PORTS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Maximum supported number of ISA serial ports is '%d'"), + _("Maximum supported number of ISA serial ports is '%1$d'"), VIR_MAX_ISA_SERIAL_PORTS); return -1; } @@ -399,7 +399,7 @@ virDomainChrIsaSerialDefPostParse(virDomainDef *def) if (def->serials[i]->target.port != -1) { if (used_serial_port[def->serials[i]->target.port]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("target port '%d' already allocated"), + _("target port '%1$d' already allocated"), def->serials[i]->target.port); return -1; } @@ -842,7 +842,7 @@ virDomainDefPostParseCheckFeatures(virDomainDef *def, if (UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_NAME_SLASH)) { if (def->name && strchr(def->name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), def->name); + _("name %1$s cannot contain '/'"), def->name); return -1; } } @@ -881,7 +881,7 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDeviceDef *dev, dev->type == VIR_DOMAIN_DEVICE_NET && dev->data.net->modelstr) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("driver does not support net model '%s'"), + _("driver does not support net model '%1$s'"), dev->data.net->modelstr); return -1; } @@ -890,7 +890,7 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDeviceDef *dev, dev->data.disk->src->fdgroup && UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_DISK_FD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("driver does not support FD passing for disk '%s'"), + _("driver does not support FD passing for disk '%1$s'"), dev->data.disk->dst); return -1; } @@ -999,7 +999,7 @@ virDomainVcpuDefPostParse(virDomainDef *def) case VIR_TRISTATE_BOOL_NO: if (!vcpu->online) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu '%zu' is both offline and not hotpluggable"), i); + _("vcpu '%1$zu' is both offline and not hotpluggable"), i); return -1; } break; @@ -1056,7 +1056,7 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNUC_UNUSED, if (virHashLookup(bootHash, order)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("boot order '%s' used for more than one device"), + _("boot order '%1$s' used for more than one device"), order); return -1; } @@ -1166,7 +1166,7 @@ virDomainDefRejectDuplicateControllers(virDomainDef *def) if (virBitmapIsBitSet(bitmaps[cont->type], cont->idx)) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple '%s' controllers with index '%d'"), + _("Multiple '%1$s' controllers with index '%2$d'"), virDomainControllerTypeToString(cont->type), cont->idx); goto cleanup; @@ -1195,7 +1195,7 @@ virDomainDefRejectDuplicatePanics(virDomainDef *def) virDomainPanicModel model = def->panics[i]->model; if (exists[model]) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple panic devices with model '%s'"), + _("Multiple panic devices with model '%1$s'"), virDomainPanicModelTypeToString(model)); return -1; } diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 671b8b088f..3dce82983d 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -142,7 +142,7 @@ virInterfaceDefParseStartMode(virInterfaceDef *def, def->startmode = VIR_INTERFACE_START_NONE; } else { virReportError(VIR_ERR_XML_ERROR, - _("unknown interface startmode %s"), tmp); + _("unknown interface startmode %1$s"), tmp); return -1; } return 0; @@ -172,7 +172,7 @@ virInterfaceDefParseBondMode(xmlXPathContextPtr ctxt) return VIR_INTERFACE_BOND_BALALB; } - virReportError(VIR_ERR_XML_ERROR, _("unknown bonding mode %s"), tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown bonding mode %1$s"), tmp); return -1; } @@ -190,7 +190,7 @@ virInterfaceDefParseBondMiiCarrier(xmlXPathContextPtr ctxt) return VIR_INTERFACE_BOND_MII_NETIF; } - virReportError(VIR_ERR_XML_ERROR, _("unknown mii bonding carrier %s"), tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown mii bonding carrier %1$s"), tmp); return -1; } @@ -210,7 +210,7 @@ virInterfaceDefParseBondArpValid(xmlXPathContextPtr ctxt) return VIR_INTERFACE_BOND_ARP_ALL; } - virReportError(VIR_ERR_XML_ERROR, _("unknown arp bonding validate %s"), tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown arp bonding validate %1$s"), tmp); return -1; } @@ -370,7 +370,8 @@ virInterfaceDefParseIfAdressing(virInterfaceDef *def, return -1; } else { virReportError(VIR_ERR_XML_ERROR, - _("unsupported protocol family '%s'"), proto->family); + _("unsupported protocol family '%1$s'"), + proto->family); return -1; } def->protos[def->nprotos++] = g_steal_pointer(&proto); @@ -399,7 +400,7 @@ virInterfaceDefParseBridge(virInterfaceDef *def, def->data.bridge.stp = 0; } else { virReportError(VIR_ERR_XML_ERROR, - _("bridge interface stp should be on or off got %s"), + _("bridge interface stp should be on or off got %1$s"), tmp); return 0; } @@ -585,7 +586,7 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, || (parentIfType == VIR_INTERFACE_TYPE_VLAN)) { virReportError(VIR_ERR_XML_ERROR, - _("interface has unsupported type '%s'"), + _("interface has unsupported type '%1$s'"), virInterfaceTypeToString(type)); return NULL; } @@ -895,7 +896,7 @@ virInterfaceDefDevFormat(virBuffer *buf, if (!(type = virInterfaceTypeToString(def->type))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected interface type %d"), def->type); + _("unexpected interface type %1$d"), def->type); return -1; } diff --git a/src/conf/netdev_bandwidth_conf.c b/src/conf/netdev_bandwidth_conf.c index f7d27fb5af..1609b14784 100644 --- a/src/conf/netdev_bandwidth_conf.c +++ b/src/conf/netdev_bandwidth_conf.c @@ -46,7 +46,7 @@ virNetDevBandwidthParseRate(xmlNodePtr node, virNetDevBandwidthRate *rate) if (average) { if (virStrToLong_ullp(average, NULL, 10, &rate->average) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth average value '%s'"), + _("could not convert bandwidth average value '%1$s'"), average); return -1; } @@ -64,21 +64,21 @@ virNetDevBandwidthParseRate(xmlNodePtr node, virNetDevBandwidthRate *rate) if (peak && virStrToLong_ullp(peak, NULL, 10, &rate->peak) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth peak value '%s'"), + _("could not convert bandwidth peak value '%1$s'"), peak); return -1; } if (burst && virStrToLong_ullp(burst, NULL, 10, &rate->burst) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth burst value '%s'"), + _("could not convert bandwidth burst value '%1$s'"), burst); return -1; } if (floor && virStrToLong_ullp(floor, NULL, 10, &rate->floor) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth floor value '%s'"), + _("could not convert bandwidth floor value '%1$s'"), floor); return -1; } @@ -128,7 +128,7 @@ virNetDevBandwidthParse(virNetDevBandwidth **bandwidth, } if (virStrToLong_ui(class_id_prop, NULL, 10, class_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse class id '%s'"), + _("Unable to parse class id '%1$s'"), class_id_prop); return -1; } diff --git a/src/conf/netdev_vlan_conf.c b/src/conf/netdev_vlan_conf.c index 28a818ad85..96ac7f3428 100644 --- a/src/conf/netdev_vlan_conf.c +++ b/src/conf/netdev_vlan_conf.c @@ -65,7 +65,7 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def) if (def->tag[i] > 4095) { virReportError(VIR_ERR_XML_ERROR, - _("vlan tag id %u too large (maximum 4095)"), def->tag[i]); + _("vlan tag id %1$u too large (maximum 4095)"), def->tag[i]); goto cleanup; } @@ -100,8 +100,8 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def) if (!def->trunk) { if (nTags > 1) { virReportError(VIR_ERR_XML_ERROR, - _("invalid \"trunk='%s'\" in <vlan> - trunk='yes' " - "is required for more than one vlan tag"), trunk); + _("invalid \"trunk='%1$s'\" in <vlan> - trunk='yes' is required for more than one vlan tag"), + trunk); goto cleanup; } if (def->nativeMode != 0) { @@ -113,8 +113,8 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlan *def) /* allow (but discard) "trunk='no' if there is a single tag */ if (STRCASENEQ(trunk, "no")) { virReportError(VIR_ERR_XML_ERROR, - _("invalid \"trunk='%s'\" in <vlan> " - "- must be yes or no"), trunk); + _("invalid \"trunk='%1$s'\" in <vlan> - must be yes or no"), + trunk); goto cleanup; } } diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_profile_conf.c index 26f379248f..59237e10de 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -43,7 +43,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags) if ((virtPortType = virXMLPropString(node, "type")) && (virtPort->virtPortType = virNetDevVPortTypeFromString(virtPortType)) <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown virtualport type %s"), virtPortType); + _("unknown virtualport type %1$s"), virtPortType); return NULL; } diff --git a/src/conf/networkcommon_conf.c b/src/conf/networkcommon_conf.c index 275847853d..6f88d173c6 100644 --- a/src/conf/networkcommon_conf.c +++ b/src/conf/networkcommon_conf.c @@ -54,32 +54,28 @@ virNetDevIPRouteCreate(const char *errorDetail, if (!address) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Missing required address attribute " - "in route definition"), + _("%1$s: Missing required address attribute in route definition"), errorDetail); return NULL; } if (!gateway) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Missing required gateway attribute " - "in route definition"), + _("%1$s: Missing required gateway attribute in route definition"), errorDetail); return NULL; } if (virSocketAddrParse(&def->address, address, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad network address '%s' " - "in route definition"), + _("%1$s: Bad network address '%2$s' in route definition"), errorDetail, address); return NULL; } if (virSocketAddrParse(&def->gateway, gateway, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad gateway address '%s' " - "in route definition"), + _("%1$s: Bad gateway address '%2$s' in route definition"), errorDetail, gateway); return NULL; } @@ -90,89 +86,74 @@ virNetDevIPRouteCreate(const char *errorDetail, VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_UNSPEC))) { virReportError(VIR_ERR_XML_ERROR, def->family == NULL ? - _("%s: No family specified for non-IPv4 address '%s' " - "in route definition") : - _("%s: IPv4 family specified for non-IPv4 address '%s' " - "in route definition"), + _("%1$s: No family specified for non-IPv4 address '%2$s' in route definition") : + _("%1$s: IPv4 family specified for non-IPv4 address '%2$s' in route definition"), errorDetail, address); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->gateway, AF_INET)) { virReportError(VIR_ERR_XML_ERROR, def->family == NULL ? - _("%s: No family specified for non-IPv4 gateway '%s' " - "in route definition") : - _("%s: IPv4 family specified for non-IPv4 gateway '%s' " - "in route definition"), + _("%1$s: No family specified for non-IPv4 gateway '%2$s' in route definition") : + _("%1$s: IPv4 family specified for non-IPv4 gateway '%2$s' in route definition"), errorDetail, address); return NULL; } if (netmask) { if (virSocketAddrParse(&def->netmask, netmask, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad netmask address '%s' " - "in route definition"), + _("%1$s: Bad netmask address '%2$s' in route definition"), errorDetail, netmask); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->netmask, AF_INET)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid netmask '%s' " - "for address '%s' (both must be IPv4)"), + _("%1$s: Invalid netmask '%2$s' for address '%3$s' (both must be IPv4)"), errorDetail, netmask, address); return NULL; } if (def->has_prefix) { /* can't have both netmask and prefix at the same time */ virReportError(VIR_ERR_XML_ERROR, - _("%s: Route definition cannot have both " - "a prefix and a netmask"), + _("%1$s: Route definition cannot have both a prefix and a netmask"), errorDetail); return NULL; } } if (def->prefix > 32) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid prefix %u specified " - "in route definition, " - "must be 0 - 32"), + _("%1$s: Invalid prefix %2$u specified in route definition, must be 0 - 32"), errorDetail, def->prefix); return NULL; } } else if (STREQ(def->family, "ipv6")) { if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: ipv6 family specified for non-IPv6 address '%s' " - "in route definition"), + _("%1$s: ipv6 family specified for non-IPv6 address '%2$s' in route definition"), errorDetail, address); return NULL; } if (netmask) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Specifying netmask invalid for IPv6 address '%s' " - "in route definition"), + _("%1$s: Specifying netmask invalid for IPv6 address '%2$s' in route definition"), errorDetail, address); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->gateway, AF_INET6)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: ipv6 specified for non-IPv6 gateway address '%s' " - "in route definition"), + _("%1$s: ipv6 specified for non-IPv6 gateway address '%2$s' in route definition"), errorDetail, gateway); return NULL; } if (def->prefix > 128) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid prefix %u specified " - "in route definition, " - "must be 0 - 128"), + _("%1$s: Invalid prefix %2$u specified in route definition, must be 0 - 128"), errorDetail, def->prefix); return NULL; } } else { virReportError(VIR_ERR_XML_ERROR, - _("%s: Unrecognized family '%s' " - "in route definition"), + _("%1$s: Unrecognized family '%2$s' in route definition"), errorDetail, def->family); return NULL; } @@ -181,9 +162,7 @@ virNetDevIPRouteCreate(const char *errorDetail, if (netmask) { if (virSocketAddrMask(&def->address, &def->netmask, &testAddr) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: Error converting address '%s' with netmask '%s' " - "to network-address " - "in route definition"), + _("%1$s: Error converting address '%2$s' with netmask '%3$s' to network-address in route definition"), errorDetail, address, netmask); return NULL; } @@ -191,17 +170,14 @@ virNetDevIPRouteCreate(const char *errorDetail, if (virSocketAddrMaskByPrefix(&def->address, def->prefix, &testAddr) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: Error converting address '%s' with prefix %u " - "to network-address " - "in route definition"), + _("%1$s: Error converting address '%2$s' with prefix %3$u to network-address in route definition"), errorDetail, address, def->prefix); return NULL; } } if (!virSocketAddrEqual(&def->address, &testAddr)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Address '%s' in route definition " - "is not a network address"), + _("%1$s: Address '%2$s' in route definition is not a network address"), errorDetail, address); return NULL; } diff --git a/src/conf/node_device_util.c b/src/conf/node_device_util.c index 3c2fc4e258..cfe1b1077e 100644 --- a/src/conf/node_device_util.c +++ b/src/conf/node_device_util.c @@ -49,7 +49,7 @@ virNodeDeviceGetParentName(virConnectPtr conn, if (!(device = virNodeDeviceLookupByName(conn, nodedev_name))) { virReportError(VIR_ERR_XML_ERROR, - _("Cannot find '%s' in node device database"), + _("Cannot find '%1$s' in node device database"), nodedev_name); return NULL; } @@ -123,7 +123,7 @@ virNodeDeviceCreateVport(virStorageAdapterFCHost *fchost) */ if (!skip_capable_check && !virVHBAPathExists(NULL, parent_host)) { virReportError(VIR_ERR_XML_ERROR, - _("parent '%s' specified for vHBA does not exist"), + _("parent '%1$s' specified for vHBA does not exist"), parent_hoststr); return NULL; } @@ -174,7 +174,7 @@ virNodeDeviceDeleteVport(virConnectPtr conn, /* Find our vHBA by searching the fc_host sysfs tree for our wwnn/wwpn */ if (!(name = virVHBAGetHostByWWN(NULL, fchost->wwnn, fchost->wwpn))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find fc_host for wwnn='%s' and wwpn='%s'"), + _("Failed to find fc_host for wwnn='%1$s' and wwpn='%2$s'"), fchost->wwnn, fchost->wwpn); return -1; } diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 7ef7aa5138..b21671f587 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -180,7 +180,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa, if (mem_node->nodeset) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple memnode elements with cellid %u"), + _("Multiple memnode elements with cellid %1$u"), cellid); return -1; } @@ -211,7 +211,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa, if (virBitmapIsAllClear(mem_node->nodeset)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodeset': %s"), tmp); + _("Invalid value of 'nodeset': %1$s"), tmp); return -1; } } @@ -247,14 +247,14 @@ virDomainNumatuneParseXML(virDomainNuma *numa, if ((modestr = virXMLPropString(node, "mode")) && (mode = virDomainNumatuneMemModeTypeFromString(modestr)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported NUMA memory tuning mode '%s'"), modestr); + _("Unsupported NUMA memory tuning mode '%1$s'"), modestr); return -1; } if ((placementstr = virXMLPropString(node, "placement")) && (placement = virDomainNumatunePlacementTypeFromString(placementstr)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported NUMA memory placement mode '%s'"), placementstr); + _("Unsupported NUMA memory placement mode '%1$s'"), placementstr); return -1; } @@ -264,7 +264,7 @@ virDomainNumatuneParseXML(virDomainNuma *numa, if (virBitmapIsAllClear(nodeset)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodeset': %s"), nodesetstr); + _("Invalid value of 'nodeset': %1$s"), nodesetstr); return -1; } } @@ -507,7 +507,7 @@ virDomainNumatuneSet(virDomainNuma *numa, if (mode != -1 && (mode < 0 || mode >= VIR_DOMAIN_NUMATUNE_MEM_LAST)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported numatune mode '%d'"), + _("Unsupported numatune mode '%1$d'"), mode); return -1; } @@ -515,7 +515,7 @@ virDomainNumatuneSet(virDomainNuma *numa, if (placement != -1 && (placement < 0 || placement >= VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported numatune placement '%d'"), + _("Unsupported numatune placement '%1$d'"), mode); return -1; } @@ -732,8 +732,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, /* The "id" needs to be within numa/cell range */ if (sibling_id >= ndistances) { virReportError(VIR_ERR_XML_ERROR, - _("'sibling_id %d' does not refer to a " - "valid cell within NUMA 'cell id %d'"), + _("'sibling_id %1$d' does not refer to a valid cell within NUMA 'cell id %2$d'"), sibling_id, cur_cell); goto cleanup; } @@ -752,8 +751,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, (sibling_id != cur_cell && sibling_value == LOCAL_DISTANCE)) { virReportError(VIR_ERR_XML_ERROR, - _("'value %d' is invalid for " - "'sibling id %d' under NUMA 'cell id %d'"), + _("'value %1$d' is invalid for 'sibling id %2$d' under NUMA 'cell id %3$d'"), sibling_value, sibling_id, cur_cell); goto cleanup; } @@ -826,8 +824,7 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, if (!(tmp = virXMLPropString(nodes[i], "level"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'level' attribute in cache " - "element for NUMA node %d"), + _("Missing 'level' attribute in cache element for NUMA node %1$d"), cur_cell); return -1; } @@ -835,8 +832,7 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, if (virStrToLong_uip(tmp, NULL, 10, &level) < 0 || level == 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid 'level' attribute in cache " - "element for NUMA node %d"), + _("Invalid 'level' attribute in cache element for NUMA node %1$d"), cur_cell); return -1; } @@ -844,15 +840,14 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, if (!(tmp = virXMLPropString(nodes[i], "associativity"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'associativity' attribute in cache " - "element for NUMA node %d"), + _("Missing 'associativity' attribute in cache element for NUMA node %1$d"), cur_cell); return -1; } if ((associativity = virNumaCacheAssociativityTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid cache associativity '%s'"), + _("Invalid cache associativity '%1$s'"), tmp); return -1; } @@ -860,14 +855,13 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, if (!(tmp = virXMLPropString(nodes[i], "policy"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'policy' attribute in cache " - "element for NUMA node %d"), + _("Missing 'policy' attribute in cache element for NUMA node %1$d"), cur_cell); } if ((policy = virNumaCachePolicyTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid cache policy '%s'"), + _("Invalid cache policy '%1$s'"), tmp); return -1; } @@ -932,7 +926,7 @@ virDomainNumaDefParseXML(virDomainNuma *def, if (def->mem_nodes[cur_cell].mem) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate NUMA cell info for cell id '%u'"), + _("Duplicate NUMA cell info for cell id '%1$u'"), cur_cell); return -1; } @@ -956,7 +950,7 @@ virDomainNumaDefParseXML(virDomainNuma *def, if (virBitmapOverlaps(def->mem_nodes[j].cpumask, def->mem_nodes[cur_cell].cpumask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("NUMA cells %u and %zu have overlapping vCPU ids"), + _("NUMA cells %1$u and %2$zu have overlapping vCPU ids"), cur_cell, j); return -1; } @@ -1133,7 +1127,7 @@ virDomainNumaDefValidate(const virDomainNuma *def) if (virBitmapIsBitSet(levelsSeen, cache->level)) { virReportError(VIR_ERR_XML_ERROR, - _("Cache level '%u' already defined"), + _("Cache level '%1$u' already defined"), cache->level); return -1; } @@ -1259,8 +1253,7 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (virDomainNumaGetNodeCount(src) != virDomainNumaGetNodeCount(tgt)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NUMA node count '%zu' doesn't match " - "source '%zu'"), + _("Target NUMA node count '%1$zu' doesn't match source '%2$zu'"), virDomainNumaGetNodeCount(tgt), virDomainNumaGetNodeCount(src)); return false; @@ -1270,8 +1263,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (virDomainNumaGetNodeMemorySize(src, i) != virDomainNumaGetNodeMemorySize(tgt, i)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Size of target NUMA node %zu (%llu) doesn't " - "match source (%llu)"), i, + _("Size of target NUMA node %1$zu (%2$llu) doesn't match source (%3$llu)"), + i, virDomainNumaGetNodeMemorySize(tgt, i), virDomainNumaGetNodeMemorySize(src, i)); return false; @@ -1280,8 +1273,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (!virBitmapEqual(virDomainNumaGetNodeCpumask(src, i), virDomainNumaGetNodeCpumask(tgt, i))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Processor mask of target NUMA node %zu doesn't " - "match source"), i); + _("Processor mask of target NUMA node %1$zu doesn't match source"), + i); return false; } @@ -1289,8 +1282,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (virDomainNumaGetNodeDistance(src, i, j) != virDomainNumaGetNodeDistance(tgt, i, j)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NUMA distance from %zu to %zu " - "doesn't match source"), i, j); + _("Target NUMA distance from %1$zu to %2$zu doesn't match source"), + i, j); return false; } @@ -1407,8 +1400,7 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa, if (node >= numa->nmem_nodes) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Argument 'node' %zu outranges " - "defined number of NUMA nodes"), + _("Argument 'node' %1$zu outranges defined number of NUMA nodes"), node); return -1; } @@ -1431,15 +1423,14 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa, if (value < LOCAL_DISTANCE || value > UNREACHABLE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Distance value of %d is not in valid range"), + _("Distance value of %1$d is not in valid range"), value); return -1; } if (value == LOCAL_DISTANCE && node != cellid) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Distance value %d under node %zu is " - "LOCAL_DISTANCE and should be set to 10"), + _("Distance value %1$d under node %2$zu is LOCAL_DISTANCE and should be set to 10"), value, node); return -1; } @@ -1461,7 +1452,7 @@ virDomainNumaSetNodeDistanceCount(virDomainNuma *numa, distances = numa->mem_nodes[node].distances; if (distances) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot alter an existing nmem_nodes distances set for node: %zu"), + _("Cannot alter an existing nmem_nodes distances set for node: %1$zu"), node); return 0; } diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 8d198a7bb1..70ad37e63d 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2009,7 +2009,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, if (!found || rc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s has illegal value %s"), + _("%1$s has illegal value %2$s"), att[idx].name, prop); rc = -1; } @@ -2115,10 +2115,8 @@ virNWFilterRuleValidate(virNWFilterRuleDef *rule) } if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s rule with port specification requires " - "protocol specification with protocol to be " - "either one of tcp(6), udp(17), dccp(33), or " - "sctp(132)"), protocol); + _("%1$s rule with port specification requires protocol specification with protocol to be either one of tcp(6), udp(17), dccp(33), or sctp(132)"), + protocol); } } break; @@ -2485,8 +2483,7 @@ virNWFilterIsValidChainName(const char *chainname) { if (strlen(chainname) > MAX_CHAIN_SUFFIX_SIZE) { virReportError(VIR_ERR_INVALID_ARG, - _("Name of chain is longer than " - "%u characters"), + _("Name of chain is longer than %1$u characters"), MAX_CHAIN_SUFFIX_SIZE); return false; } @@ -2532,8 +2529,7 @@ virNWFilterIsAllowedChain(const char *chainname) } virBufferAsprintf(&buf, - _("Invalid chain name '%s'. Please use a chain name " - "called '%s' or any of the following prefixes: "), + _("Invalid chain name '%1$s'. Please use a chain name called '%2$s' or any of the following prefixes: "), chainname, virNWFilterChainSuffixTypeToString( VIR_NWFILTER_CHAINSUFFIX_ROOT)); @@ -2579,15 +2575,14 @@ virNWFilterDefParseXML(xmlXPathContextPtr ctxt) if (chain_pri_s) { if (virStrToLong_i(chain_pri_s, NULL, 10, &chain_priority) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse chain priority '%s'"), + _("Could not parse chain priority '%1$s'"), chain_pri_s); return NULL; } if (chain_priority < NWFILTER_MIN_FILTER_PRIORITY || chain_priority > NWFILTER_MAX_FILTER_PRIORITY) { virReportError(VIR_ERR_INVALID_ARG, - _("Priority '%d' is outside valid " - "range of [%d,%d]"), + _("Priority '%1$d' is outside valid range of [%2$d,%3$d]"), chain_priority, NWFILTER_MIN_FILTER_PRIORITY, NWFILTER_MAX_FILTER_PRIORITY); @@ -2713,7 +2708,7 @@ virNWFilterDeleteDef(const char *configDir, if (unlink(configFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot remove config for %s"), + _("cannot remove config for %1$s"), def->name); return -1; } @@ -2792,7 +2787,7 @@ virNWFilterRuleDefDetailsFormat(virBuffer *buf, if (att[i].formatter && !(flags & NWFILTER_ENTRY_ITEM_FLAG_HAS_VAR)) { if (!att[i].formatter(buf, def, item)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("formatter for %s %s reported error"), + _("formatter for %1$s %2$s reported error"), type, att[i].name); return; diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index 92385a97e6..496ed2f0b8 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -338,7 +338,7 @@ virNWFilterVarCombIterAddVariable(virNWFilterVarCombIterEntry *cie, varValue = virHashLookup(hash, varName); if (varValue == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find value for variable '%s'"), + _("Could not find value for variable '%1$s'"), varName); return -1; } @@ -409,8 +409,8 @@ virNWFilterVarCombIterEntryAreUniqueEntries(virNWFilterVarCombIterEntry *cie, value = virNWFilterVarValueGetNthValue(varValue, cie->curValue); if (!value) { - VIR_ERROR(_("Lookup of value at index %u resulted in a NULL " - "pointer"), cie->curValue); + VIR_ERROR(_("Lookup of value at index %1$u resulted in a NULL pointer"), + cie->curValue); return true; } @@ -550,8 +550,8 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIter *ci, iterIndex = virNWFilterVarCombIterGetIndexByIterId(ci, iterId); if (iterIndex < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get iterator index for " - "iterator ID %u"), iterId); + _("Could not get iterator index for iterator ID %1$u"), + iterId); return NULL; } break; @@ -560,8 +560,8 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIter *ci, iterIndex = virNWFilterVarCombIterGetIndexByIterId(ci, iterId); if (iterIndex < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get iterator index for " - "(internal) iterator ID %u"), iterId); + _("Could not get iterator index for (internal) iterator ID %1$u"), + iterId); return NULL; } break; @@ -578,7 +578,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIter *ci, if (!found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find variable '%s' in iterator"), + _("Could not find variable '%1$s' in iterator"), varName); return NULL; } @@ -586,7 +586,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIter *ci, value = virHashLookup(ci->hashTable, varName); if (!value) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find value for variable '%s'"), + _("Could not find value for variable '%1$s'"), varName); return NULL; } @@ -594,8 +594,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIter *ci, res = virNWFilterVarValueGetNthValue(value, ci->iter[iterIndex].curValue); if (!res) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get nth (%u) value of " - "variable '%s'"), + _("Could not get nth (%1$u) value of variable '%2$s'"), ci->iter[iterIndex].curValue, varName); return NULL; } @@ -877,8 +876,8 @@ virNWFilterVarAccessParse(const char *varAccess) case VIR_NWFILTER_VAR_ACCESS_ITERATOR: if (result > VIR_NWFILTER_MAX_ITERID) { virReportError(VIR_ERR_INVALID_ARG, - _("Iterator ID exceeds maximum ID " - "of %u"), VIR_NWFILTER_MAX_ITERID); + _("Iterator ID exceeds maximum ID of %1$u"), + VIR_NWFILTER_MAX_ITERID); goto err_exit; } dest->u.iterId = result; diff --git a/src/conf/object_event.c b/src/conf/object_event.c index 62bbfb33bc..5fb96cb7aa 100644 --- a/src/conf/object_event.c +++ b/src/conf/object_event.c @@ -254,7 +254,7 @@ virObjectEventCallbackListRemoveID(virConnectPtr conn, } virReportError(VIR_ERR_INVALID_ARG, - _("could not find event callback %d for deletion"), + _("could not find event callback %1$d for deletion"), callbackID); return -1; } @@ -281,7 +281,7 @@ virObjectEventCallbackListMarkDeleteID(virConnectPtr conn, } virReportError(VIR_ERR_INVALID_ARG, - _("could not find event callback %d for deletion"), + _("could not find event callback %1$d for deletion"), callbackID); return -1; } @@ -596,7 +596,7 @@ virObjectEventNew(virClass *klass, if (!virClassIsDerivedFrom(klass, virObjectEventClass)) { virReportInvalidArg(klass, - _("Class %s must derive from virObjectEvent"), + _("Class %1$s must derive from virObjectEvent"), virClassName(klass)); return NULL; } @@ -973,7 +973,7 @@ virObjectEventStateCallbackID(virConnectPtr conn, if (ret < 0) virReportError(VIR_ERR_INVALID_ARG, - _("event callback function %p not registered"), + _("event callback function %1$p not registered"), callback); return ret; } @@ -1021,7 +1021,7 @@ virObjectEventStateEventID(virConnectPtr conn, if (ret < 0) virReportError(VIR_ERR_INVALID_ARG, - _("event callback id %d not registered"), + _("event callback id %1$d not registered"), callbackID); return ret; } diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 629a4a57f7..7463185eb1 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -61,7 +61,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt, type = virSecretUsageTypeFromString(type_str); if (type < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown secret usage type %s"), type_str); + _("unknown secret usage type %1$s"), type_str); return -1; } def->usage_type = type; @@ -116,7 +116,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt, default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } @@ -200,7 +200,7 @@ virSecretDefFormatUsage(virBuffer *buf, type = virSecretUsageTypeToString(def->usage_type); if (type == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } @@ -232,7 +232,7 @@ virSecretDefFormatUsage(virBuffer *buf, default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 9bf3c78353..0acba95d7f 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -153,7 +153,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, if (src->type == VIR_STORAGE_TYPE_VOLUME || src->type == VIR_STORAGE_TYPE_DIR) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported disk snapshot type '%s'"), + _("unsupported disk snapshot type '%1$s'"), virStorageTypeToString(src->type)); return -1; } @@ -170,7 +170,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, if ((driver = virXPathString("string(./driver/@type)", ctxt)) && (src->format = virStorageFileFormatTypeFromString(driver)) <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown disk snapshot driver '%s'"), driver); + _("unknown disk snapshot driver '%1$s'"), driver); return -1; } @@ -183,7 +183,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, /* validate that the passed path is absolute */ if (virStorageSourceIsRelative(src)) { virReportError(VIR_ERR_XML_ERROR, - _("disk snapshot image path '%s' must be absolute"), + _("disk snapshot image path '%1$s' must be absolute"), src->path); return -1; } @@ -259,7 +259,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, def->state = virDomainSnapshotStateTypeFromString(state); if (def->state <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid state '%s' in domain snapshot XML"), + _("Invalid state '%1$s' in domain snapshot XML"), state); return NULL; } @@ -336,7 +336,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, if (def->memorysnapshotfile && def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) { virReportError(VIR_ERR_XML_ERROR, - _("memory filename '%s' requires external snapshot"), + _("memory filename '%1$s' requires external snapshot"), def->memorysnapshotfile); return NULL; } @@ -360,7 +360,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, /* verify that memory path is absolute */ if (def->memorysnapshotfile && !g_path_is_absolute(def->memorysnapshotfile)) { virReportError(VIR_ERR_XML_ERROR, - _("memory snapshot file path (%s) must be absolute"), + _("memory snapshot file path (%1$s) must be absolute"), def->memorysnapshotfile); return NULL; } @@ -434,8 +434,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef *def, if ((flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) && def->state != VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) { virReportError(VIR_ERR_INVALID_ARG, - _("disk-only flag for snapshot %s requires " - "disk-snapshot state"), + _("disk-only flag for snapshot %1$s requires disk-snapshot state"), def->parent.name); return -1; } @@ -445,7 +444,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef *def, virUUIDFormat(domain_uuid, uuidstr); virReportError(VIR_ERR_INVALID_ARG, - _("definition for snapshot %s must use uuid %s"), + _("definition for snapshot %1$s must use uuid %2$s"), def->parent.name, uuidstr); return -1; } @@ -458,8 +457,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef *def, (def->state == VIR_DOMAIN_SNAPSHOT_RUNNING || def->state == VIR_DOMAIN_SNAPSHOT_PAUSED)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot change between online and offline " - "snapshot state in snapshot %s"), + _("cannot change between online and offline snapshot state in snapshot %1$s"), def->parent.name); return -1; } @@ -467,8 +465,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef *def, if ((otherdef->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) != (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot change between disk only and " - "full system in snapshot %s"), + _("cannot change between disk only and full system in snapshot %1$s"), def->parent.name); return -1; } @@ -512,25 +509,21 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapshotDef *def) if (disk->src->type != VIR_STORAGE_TYPE_FILE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name " - "for disk '%s' on a '%s' device"), + _("cannot generate external snapshot name for disk '%1$s' on a '%2$s' device"), disk->name, virStorageTypeToString(disk->src->type)); return -1; } if (!(origpath = virDomainDiskGetSource(def->parent.dom->disks[i]))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name " - "for disk '%s' without source"), + _("cannot generate external snapshot name for disk '%1$s' without source"), disk->name); return -1; } if (stat(origpath, &sb) < 0 || !S_ISREG(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("source for disk '%s' is not a regular " - "file; refusing to generate external " - "snapshot name"), + _("source for disk '%1$s' is not a regular file; refusing to generate external snapshot name"), disk->name); return -1; } @@ -549,8 +542,7 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapshotDef *def) for (j = 0; j < i; j++) { if (STREQ_NULLABLE(disk->src->path, def->disks[j].src->path)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name for " - "disk '%s': collision with disk '%s'"), + _("cannot generate external snapshot name for disk '%1$s': collision with disk '%2$s'"), disk->name, def->disks[j].name); return -1; } @@ -637,13 +629,13 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef, if (!domdisk) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), snapdisk->name); + _("no disk named '%1$s'"), snapdisk->name); return -1; } if (virHashHasEntry(map, domdisk->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), snapdisk->name); return -1; } @@ -664,7 +656,7 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef, !(snapdisk->snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NO && domdisk->snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NO)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' must use snapshot mode '%s'"), + _("disk '%1$s' must use snapshot mode '%2$s'"), snapdisk->name, virDomainSnapshotLocationTypeToString(default_snapshot)); return -1; @@ -673,8 +665,7 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef, if (snapdisk->src->path && snapdisk->snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("file '%s' for disk '%s' requires " - "use of external snapshot mode"), + _("file '%1$s' for disk '%2$s' requires use of external snapshot mode"), snapdisk->src->path, snapdisk->name); return -1; } diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_conf.c index 4c13cc4c17..2a8a1a3eb5 100644 --- a/src/conf/storage_adapter_conf.c +++ b/src/conf/storage_adapter_conf.c @@ -208,16 +208,14 @@ virStorageAdapterValidateFCHost(virStorageAdapterFCHost *fchost) if ((fchost->parent_wwnn && !fchost->parent_wwpn)) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent_wwnn='%s', the " - "parent_wwpn must also be provided"), + _("when providing parent_wwnn='%1$s', the parent_wwpn must also be provided"), fchost->parent_wwnn); return -1; } if (!fchost->parent_wwnn && fchost->parent_wwpn) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent_wwpn='%s', the " - "parent_wwnn must also be provided"), + _("when providing parent_wwpn='%1$s', the parent_wwnn must also be provided"), fchost->parent_wwpn); return -1; } diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index f5a9636ce2..3e584ad9b9 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -309,7 +309,7 @@ virStoragePoolTypeInfoLookup(int type) return &poolTypeInfo[i]; virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing backend for pool type %d"), type); + _("missing backend for pool type %1$d"), type); return NULL; } @@ -554,7 +554,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, if (source->format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown pool format type %s"), format); + _("unknown pool format type %1$s"), format); return -1; } } @@ -638,15 +638,14 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, if ((source->format != VIR_STORAGE_POOL_NETFS_NFS) && (source->format != VIR_STORAGE_POOL_NETFS_AUTO)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("storage pool protocol ver unsupported for " - "pool type '%s'"), + _("storage pool protocol ver unsupported for pool type '%1$s'"), virStoragePoolFormatFileSystemNetTypeToString(source->format)); return -1; } if (strchr(source->protocolVer, ',')) { virReportError(VIR_ERR_XML_DETAIL, - _("storage pool protocol ver '%s' must not contain ','"), + _("storage pool protocol ver '%1$s' must not contain ','"), source->protocolVer); return -1; } @@ -766,7 +765,7 @@ virStoragePoolDefRefreshParse(xmlXPathContextPtr ctxt, if ((tmp = virStorageVolDefRefreshAllocationTypeFromString(allocation)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown storage pool volume refresh allocation type %s"), + _("unknown storage pool volume refresh allocation type %1$s"), allocation); return -1; } @@ -865,7 +864,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (strchr(def->name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), def->name); + _("name %1$s cannot contain '/'"), def->name); return NULL; } @@ -1052,7 +1051,7 @@ virStoragePoolSourceFormat(virBuffer *buf, const char *format = (options->formatToString)(src->format); if (!format) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown pool format number %d"), + _("unknown pool format number %1$d"), src->format); return -1; } @@ -1275,7 +1274,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, if (type) { if ((def->type = virStorageVolTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume type '%s'"), type); + _("unknown volume type '%1$s'"), type); return NULL; } } @@ -1296,7 +1295,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, if (def->target.backingStore->format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume format type %s"), format); + _("unknown volume format type %1$s"), format); return NULL; } } @@ -1342,7 +1341,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, if (def->target.format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume format type %s"), format); + _("unknown volume format type %1$s"), format); return NULL; } } @@ -1386,7 +1385,8 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, int f = virStorageFileFeatureTypeFromString((const char*)nodes[i]->name); if (f < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported feature %s"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported feature %1$s"), (const char*)nodes[i]->name); return NULL; } @@ -1446,7 +1446,7 @@ virStorageVolTargetDefFormat(virStorageVolOptions *options, const char *format = (options->formatToString)(def->format); if (!format) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown volume format number %d"), + _("unknown volume format number %1$d"), def->format); return -1; } diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c index 3651ff8cfd..91fe30edf6 100644 --- a/src/conf/storage_encryption_conf.c +++ b/src/conf/storage_encryption_conf.c @@ -159,7 +159,7 @@ virStorageEncryptionSecretParse(xmlXPathContextPtr ctxt, if ((ret->type = virStorageEncryptionSecretTypeFromString(type_str)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume encryption secret type %s"), + _("unknown volume encryption secret type %1$s"), type_str); goto cleanup; } @@ -237,7 +237,7 @@ virStorageEncryptionParseNode(xmlNodePtr node, if ((encdef->format = virStorageEncryptionFormatTypeFromString(format_str)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume encryption format type %s"), + _("unknown volume encryption format type %1$s"), format_str); goto cleanup; } diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c index 58009fd06e..99061e4df7 100644 --- a/src/conf/storage_source_conf.c +++ b/src/conf/storage_source_conf.c @@ -259,7 +259,7 @@ virStorageAuthDefParse(xmlNodePtr node, */ if ((authdef->authType = virStorageAuthTypeFromString(authtype)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown auth type '%s'"), authtype); + _("unknown auth type '%1$s'"), authtype); return NULL; } } @@ -360,14 +360,14 @@ virStoragePRDefParseXML(xmlXPathContextPtr ctxt) if (type && STRNEQ(type, "unix")) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported connection type for <reservations/>: %s"), + _("unsupported connection type for <reservations/>: %1$s"), type); goto cleanup; } if (mode && STRNEQ(mode, "client")) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported connection mode for <reservations/>: %s"), + _("unsupported connection mode for <reservations/>: %1$s"), mode); goto cleanup; } @@ -648,7 +648,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDef *def) if (virStringHasChars(def->name, virStorageSourceCookieValueInvalidChars) || virStringHasChars(def->name, virStorageSourceCookieNameInvalidChars)) { virReportError(VIR_ERR_XML_ERROR, - _("cookie name '%s' contains invalid characters"), + _("cookie name '%1$s' contains invalid characters"), def->name); return -1; } @@ -657,7 +657,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDef *def) if (val[0] == '"') { if (val[len - 1] != '"') { virReportError(VIR_ERR_XML_ERROR, - _("value of cookie '%s' contains invalid characters"), + _("value of cookie '%1$s' contains invalid characters"), def->name); return -1; } @@ -669,7 +669,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDef *def) /* check invalid characters in value */ if (virStringHasChars(checkval, virStorageSourceCookieValueInvalidChars)) { virReportError(VIR_ERR_XML_ERROR, - _("value of cookie '%s' contains invalid characters"), + _("value of cookie '%1$s' contains invalid characters"), def->name); return -1; } @@ -690,7 +690,8 @@ virStorageSourceNetCookiesValidate(virStorageSource *src) for (j = i + 1; j < src->ncookies; j++) { if (STREQ(src->cookies[i]->name, src->cookies[j]->name)) { - virReportError(VIR_ERR_XML_ERROR, _("duplicate cookie '%s'"), + virReportError(VIR_ERR_XML_ERROR, + _("duplicate cookie '%1$s'"), src->cookies[i]->name); return -1; } diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 0ffd3db90a..acf1871d36 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -115,8 +115,7 @@ static int virChrdevLockFileCreate(const char *dev) if (virPidFileReadPathIfAlive(path, &pid, NULL) == 0 && pid >= 0) { /* the process exists, the lockfile is valid */ virReportError(VIR_ERR_OPERATION_FAILED, - _("Requested device '%s' is locked by " - "lock file '%s' held by process %lld"), + _("Requested device '%1$s' is locked by lock file '%2$s' held by process %3$lld"), dev, path, (long long) pid); return -1; } else { @@ -142,8 +141,7 @@ static int virChrdevLockFileCreate(const char *dev) return 0; } virReportSystemError(errno, - _("Couldn't create lock file for " - "device '%s' in path '%s'"), + _("Couldn't create lock file for device '%1$s' in path '%2$s'"), dev, path); return -1; } @@ -151,8 +149,7 @@ static int virChrdevLockFileCreate(const char *dev) /* write the pid to the file */ if (safewrite(lockfd, pidStr, strlen(pidStr)) < 0) { virReportSystemError(errno, - _("Couldn't write to lock file for " - "device '%s' in path '%s'"), + _("Couldn't write to lock file for device '%1$s' in path '%2$s'"), dev, path); unlink(path); return -1; @@ -340,7 +337,7 @@ int virChrdevOpen(virChrdevs *devs, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported device type '%s'"), + _("Unsupported device type '%1$s'"), virDomainChrTypeToString(source->type)); return -1; } @@ -405,7 +402,7 @@ int virChrdevOpen(virChrdevs *devs, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported device type '%s'"), + _("Unsupported device type '%1$s'"), virDomainChrTypeToString(source->type)); goto error; } diff --git a/src/conf/virdomainjob.c b/src/conf/virdomainjob.c index c4cbbe8f6d..2644a793f8 100644 --- a/src/conf/virdomainjob.c +++ b/src/conf/virdomainjob.c @@ -368,7 +368,7 @@ virDomainObjBeginJobInternal(virDomainObj *obj, virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, obj->def->name); goto cleanup; } @@ -461,18 +461,15 @@ virDomainObjBeginJobInternal(virDomainObj *obj, if (errno == ETIMEDOUT) { if (blocker && agentBlocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by monitor=%s agent=%s)"), + _("cannot acquire state change lock (held by monitor=%1$s agent=%2$s)"), blocker, agentBlocker); } else if (blocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by monitor=%s)"), + _("cannot acquire state change lock (held by monitor=%1$s)"), blocker); } else if (agentBlocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by agent=%s)"), + _("cannot acquire state change lock (held by agent=%1$s)"), agentBlocker); } else { virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s", @@ -483,21 +480,15 @@ virDomainObjBeginJobInternal(virDomainObj *obj, jobObj->jobsQueued > jobObj->maxQueuedJobs) { if (blocker && agentBlocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by monitor=%s agent=%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by monitor=%1$s agent=%2$s) due to max_queued limit"), blocker, agentBlocker); } else if (blocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by monitor=%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by monitor=%1$s) due to max_queued limit"), blocker); } else if (agentBlocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by agent=%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by agent=%1$s) due to max_queued limit"), agentBlocker); } else { virReportError(VIR_ERR_OPERATION_FAILED, "%s", @@ -569,7 +560,7 @@ virDomainObjBeginNestedJob(virDomainObj *obj, { if (asyncJob != obj->job->asyncJob) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected async job %d type expected %d"), + _("unexpected async job %1$d type expected %2$d"), asyncJob, obj->job->asyncJob); return -1; } diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentobjlist.c index f19ec3319a..e5cdd9a141 100644 --- a/src/conf/virdomainmomentobjlist.c +++ b/src/conf/virdomainmomentobjlist.c @@ -235,7 +235,7 @@ virDomainMomentAssignDef(virDomainMomentObjList *moments, if (virHashLookup(moments->objs, def->name) != NULL) { virReportError(VIR_ERR_OPERATION_FAILED, - _("domain moment %s already exists"), + _("domain moment %1$s already exists"), def->name); return NULL; } @@ -539,21 +539,21 @@ virDomainMomentCheckCycles(virDomainMomentObjList *list, if (def->parent_name) { if (STREQ(def->name, def->parent_name)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot set moment %s as its own parent"), + _("cannot set moment %1$s as its own parent"), def->name); return -1; } other = virDomainMomentFindByName(list, def->parent_name); if (!other) { virReportError(VIR_ERR_INVALID_ARG, - _("parent %s for moment %s not found"), + _("parent %1$s for moment %2$s not found"), def->parent_name, def->name); return -1; } while (other->def->parent_name) { if (STREQ(other->def->parent_name, def->name)) { virReportError(VIR_ERR_INVALID_ARG, - _("parent %s would create cycle to %s"), + _("parent %1$s would create cycle to %2$s"), other->def->name, def->name); return -1; } diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index 13675acda5..6be5de5e2b 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -280,14 +280,14 @@ virDomainObjListAddLocked(virDomainObjList *doms, if ((vm = virDomainObjListFindByUUIDLocked(doms, (*def)->uuid))) { if (vm->removing) { virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' is already being removed"), + _("domain '%1$s' is already being removed"), vm->def->name); goto error; } else if (STRNEQ(vm->def->name, (*def)->name)) { /* UUID matches, but if names don't match, refuse it */ virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' is already defined with uuid %s"), + _("domain '%1$s' is already defined with uuid %2$s"), vm->def->name, uuidstr); goto error; } @@ -296,13 +296,13 @@ virDomainObjListAddLocked(virDomainObjList *doms, /* UUID & name match, but if VM is already active, refuse it */ if (virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain '%s' is already active"), + _("domain '%1$s' is already active"), vm->def->name); goto error; } if (!vm->persistent) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain '%s' is already being started"), + _("domain '%1$s' is already being started"), vm->def->name); goto error; } @@ -317,7 +317,7 @@ virDomainObjListAddLocked(virDomainObjList *doms, if ((vm = virDomainObjListFindByNameLocked(doms, (*def)->name))) { virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' already exists with uuid %s"), + _("domain '%1$s' already exists with uuid %2$s"), (*def)->name, uuidstr); goto error; } @@ -443,7 +443,7 @@ virDomainObjListRename(virDomainObjList *doms, if (virHashLookup(doms->objsName, new_name) != NULL) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain with name '%s' already exists"), + _("domain with name '%1$s' already exists"), new_name); goto cleanup; } @@ -539,7 +539,7 @@ virDomainObjListLoadStatus(virDomainObjList *doms, if (virHashLookup(doms->objs, uuidstr) != NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain %s already exists"), + _("unexpected domain %1$s already exists"), obj->def->name); goto error; } @@ -608,7 +608,7 @@ virDomainObjListLoadAllConfigs(virDomainObjList *doms, dom->persistent = 1; virDomainObjEndAPI(&dom); } else { - VIR_ERROR(_("Failed to load config for domain '%s'"), entry->d_name); + VIR_ERROR(_("Failed to load config for domain '%1$s'"), entry->d_name); } } @@ -1007,7 +1007,7 @@ virDomainObjListConvert(virDomainObjList *domlist, virObjectRWUnlock(domlist); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, dom->name); goto error; } diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index c75ecf3a04..1726fc381f 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -543,7 +543,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, if (STRNEQ(obj->def->name, def->name)) { virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("network '%s' is already defined with uuid %s"), + _("network '%1$s' is already defined with uuid %2$s"), obj->def->name, uuidstr); goto cleanup; } @@ -552,7 +552,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, /* UUID & name match, but if network is already active, refuse it */ if (virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network is already active as '%s'"), + _("network is already active as '%1$s'"), obj->def->name); goto cleanup; } @@ -566,7 +566,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, virObjectLock(obj); virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("network '%s' already exists with uuid %s"), + _("network '%1$s' already exists with uuid %2$s"), def->name, uuidstr); goto cleanup; } @@ -862,8 +862,7 @@ virNetworkLoadState(virNetworkObjList *nets, if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network config filename '%s'" - " does not match network name '%s'"), + _("Network config filename '%1$s' does not match network name '%2$s'"), configFile, def->name); return NULL; } @@ -888,7 +887,7 @@ virNetworkLoadState(virNetworkObjList *nets, if (floor_sum && virStrToLong_ull(floor_sum, NULL, 10, &floor_sum_val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed 'floor_sum' attribute: %s"), + _("Malformed 'floor_sum' attribute: %1$s"), floor_sum); return NULL; } @@ -902,7 +901,7 @@ virNetworkLoadState(virNetworkObjList *nets, int flag = virNetworkTaintTypeFromString(str); if (flag < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown taint flag %s"), str); + _("Unknown taint flag %1$s"), str); return NULL; } /* Compute taint mask here. The network object does not @@ -961,8 +960,7 @@ virNetworkLoadConfig(virNetworkObjList *nets, if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network config filename '%s'" - " does not match network name '%s'"), + _("Network config filename '%1$s' does not match network name '%2$s'"), configFile, def->name); return NULL; } @@ -1105,7 +1103,7 @@ virNetworkObjDeleteConfig(const char *configDir, if (unlink(configFile) < 0) { virReportSystemError(errno, - _("cannot remove config file '%s'"), + _("cannot remove config file '%1$s'"), configFile); return -1; } @@ -1565,7 +1563,7 @@ virNetworkObjAddPort(virNetworkObj *net, if (virHashLookup(net->ports, uuidstr)) { virReportError(VIR_ERR_NETWORK_PORT_EXIST, - _("Network port with UUID %s already exists"), + _("Network port with UUID %1$s already exists"), uuidstr); return -1; } @@ -1596,7 +1594,7 @@ virNetworkObjLookupPort(virNetworkObj *net, if (!(ret = virHashLookup(net->ports, uuidstr))) { virReportError(VIR_ERR_NO_NETWORK_PORT, - _("Network port with UUID %s does not exist"), + _("Network port with UUID %1$s does not exist"), uuidstr); return NULL; } @@ -1618,7 +1616,7 @@ virNetworkObjDeletePort(virNetworkObj *net, if (!(portdef = virHashLookup(net->ports, uuidstr))) { virReportError(VIR_ERR_NO_NETWORK_PORT, - _("Network port with UUID %s does not exist"), + _("Network port with UUID %1$s does not exist"), uuidstr); return -1; } diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index 37f5376976..fc06ef41d5 100644 --- a/src/conf/virnetworkportdef.c +++ b/src/conf/virnetworkportdef.c @@ -102,7 +102,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) } if (virUUIDParse(uuid, def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); return NULL; } @@ -123,7 +123,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) if (virUUIDParse(uuid, def->owneruuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); return NULL; } @@ -143,7 +143,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) } if (virMacAddrParse(mac, &def->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse MAC '%s'"), mac); + _("Unable to parse MAC '%1$s'"), mac); return NULL; } @@ -196,8 +196,8 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) (def->plug.bridge.macTableManager = virNetworkBridgeMACTableManagerTypeFromString(macmgr)) <= 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid macTableManager setting '%s' " - "in network port"), macmgr); + _("Invalid macTableManager setting '%1$s' in network port"), + macmgr); return NULL; } break; @@ -213,7 +213,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) (def->plug.direct.mode = virNetDevMacVLanModeTypeFromString(mode)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid mode setting '%s' in network port"), mode); + _("Invalid mode setting '%1$s' in network port"), mode); return NULL; } break; @@ -424,7 +424,7 @@ virNetworkPortDefDeleteStatus(virNetworkPortDef *def, if (unlink(path) < 0 && errno != ENOENT) { virReportSystemError(errno, - _("Unable to delete %s"), path); + _("Unable to delete %1$s"), path); return -1; } diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 4c22484d11..cfef30d47e 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -554,8 +554,7 @@ virNodeDeviceFindFCParentHost(virNodeDeviceObj *obj) if (!cap) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parent device %s is not capable " - "of vport operations"), + _("Parent device %1$s is not capable of vport operations"), obj->def->name); return -1; } @@ -574,7 +573,7 @@ virNodeDeviceObjListGetParentHostByParent(virNodeDeviceObjList *devs, if (!(obj = virNodeDeviceObjListFindByName(devs, parent_name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } @@ -599,7 +598,7 @@ virNodeDeviceObjListGetParentHostByWWNs(virNodeDeviceObjList *devs, if (!(obj = virNodeDeviceObjListFindByWWNs(devs, parent_wwnn, parent_wwpn))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } @@ -622,7 +621,7 @@ virNodeDeviceObjListGetParentHostByFabricWWN(virNodeDeviceObjList *devs, if (!(obj = virNodeDeviceObjListFindByFabricWWN(devs, parent_fabric_wwn))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbindingdef.c index 592731fc1b..423ed7a392 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -113,7 +113,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt) if (virUUIDParse(uuid, ret->owneruuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); VIR_FREE(uuid); goto cleanup; } @@ -128,7 +128,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt) if (virMacAddrParse(mac, &ret->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse MAC '%s'"), mac); + _("Unable to parse MAC '%1$s'"), mac); VIR_FREE(mac); goto cleanup; } diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbindingobj.c index 862f825422..e0101a1086 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -159,7 +159,7 @@ virNWFilterBindingObjSave(const virNWFilterBindingObj *obj, if (g_mkdir_with_parents(statusDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory '%s'"), + _("cannot create config directory '%1$s'"), statusDir); return -1; } @@ -185,7 +185,7 @@ virNWFilterBindingObjDelete(const virNWFilterBindingObj *obj, if (unlink(filename) < 0 && errno != ENOENT) { virReportSystemError(errno, - _("Unable to remove status '%s' for nwfilter binding %s'"), + _("Unable to remove status '%1$s' for nwfilter binding %2$s'"), filename, obj->def->portdevname); return -1; } diff --git a/src/conf/virnwfilterbindingobjlist.c b/src/conf/virnwfilterbindingobjlist.c index a349f5c195..002f6e2245 100644 --- a/src/conf/virnwfilterbindingobjlist.c +++ b/src/conf/virnwfilterbindingobjlist.c @@ -169,11 +169,11 @@ virNWFilterBindingObjListAddLocked(virNWFilterBindingObjList *bindings, if (binding) { if (virNWFilterBindingObjGetRemoving(binding)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("binding '%s' is already being removed"), + _("binding '%1$s' is already being removed"), def->portdevname); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("binding '%s' already exists"), + _("binding '%1$s' already exists"), def->portdevname); } goto error; @@ -272,7 +272,7 @@ virNWFilterBindingObjListLoadStatus(virNWFilterBindingObjList *bindings, def = virNWFilterBindingObjGetDef(obj); if (virHashLookup(bindings->objs, def->portdevname) != NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected binding %s already exists"), + _("unexpected binding %1$s already exists"), def->portdevname); goto error; } @@ -321,7 +321,7 @@ virNWFilterBindingObjListLoadAllConfigs(virNWFilterBindingObjList *bindings, if (binding) virNWFilterBindingObjEndAPI(&binding); else - VIR_ERROR(_("Failed to load config for binding '%s'"), entry->d_name); + VIR_ERROR(_("Failed to load config for binding '%1$s'"), entry->d_name); } virObjectRWUnlock(bindings); diff --git a/src/conf/virnwfilterobj.c b/src/conf/virnwfilterobj.c index 2e75e90cf1..6456add593 100644 --- a/src/conf/virnwfilterobj.c +++ b/src/conf/virnwfilterobj.c @@ -190,13 +190,13 @@ virNWFilterObjListFindInstantiateFilter(virNWFilterObjList *nwfilters, if (!(obj = virNWFilterObjListFindByName(nwfilters, filtername))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("referenced filter '%s' is missing"), filtername); + _("referenced filter '%1$s' is missing"), filtername); return NULL; } if (virNWFilterObjWantRemoved(obj)) { virReportError(VIR_ERR_NO_NWFILTER, - _("Filter '%s' is in use."), filtername); + _("Filter '%1$s' is in use."), filtername); virNWFilterObjUnlock(obj); return NULL; } @@ -305,8 +305,7 @@ virNWFilterObjListAssignDef(virNWFilterObjList *nwfilters, if (STRNEQ(def->name, objdef->name)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("filter with same UUID but different name " - "('%s') already exists"), + _("filter with same UUID but different name ('%1$s') already exists"), objdef->name); virNWFilterObjUnlock(obj); return NULL; @@ -317,7 +316,7 @@ virNWFilterObjListAssignDef(virNWFilterObjList *nwfilters, objdef = obj->def; virUUIDFormat(objdef->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("filter '%s' already exists with uuid %s"), + _("filter '%1$s' already exists with uuid %2$s"), def->name, uuidstr); virNWFilterObjUnlock(obj); return NULL; @@ -576,8 +575,7 @@ virNWFilterObjListLoadConfig(virNWFilterObjList *nwfilters, if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_XML_ERROR, - _("network filter config filename '%s' " - "does not match name '%s'"), + _("network filter config filename '%1$s' does not match name '%2$s'"), configFile, def->name); goto error; } diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 4929f74155..e0393e6cec 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -344,8 +344,7 @@ virSecretObjListAdd(virSecretObjList *secrets, if (STRNEQ_NULLABLE(objdef->usage_id, (*newdef)->usage_id)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("a secret with UUID %s is already defined for " - "use with %s"), + _("a secret with UUID %1$s is already defined for use with %2$s"), uuidstr, objdef->usage_id); goto cleanup; } @@ -371,8 +370,7 @@ virSecretObjListAdd(virSecretObjList *secrets, objdef = obj->def; virUUIDFormat(objdef->uuid, uuidstr); virReportError(VIR_ERR_INTERNAL_ERROR, - _("a secret with UUID %s already defined for " - "use with %s"), + _("a secret with UUID %1$s already defined for use with %2$s"), uuidstr, (*newdef)->usage_id); goto cleanup; } @@ -644,7 +642,7 @@ virSecretObjDeleteConfig(virSecretObj *obj) if (!def->isephemeral && unlink(obj->configFile) < 0 && errno != ENOENT) { - virReportSystemError(errno, _("cannot unlink '%s'"), + virReportSystemError(errno, _("cannot unlink '%1$s'"), obj->configFile); return -1; } @@ -725,7 +723,7 @@ virSecretObjGetValue(virSecretObj *obj) char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(def->uuid, uuidstr); virReportError(VIR_ERR_NO_SECRET, - _("secret '%s' does not have a value"), uuidstr); + _("secret '%1$s' does not have a value"), uuidstr); return NULL; } @@ -799,7 +797,7 @@ virSecretLoadValidateUUID(virSecretDef *def, if (!virStringMatchesNameSuffix(file, uuidstr, ".xml")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("<uuid> does not match secret file name '%s'"), + _("<uuid> does not match secret file name '%1$s'"), file); return -1; } @@ -820,20 +818,20 @@ virSecretLoadValue(virSecretObj *obj) ret = 0; goto cleanup; } - virReportSystemError(errno, _("cannot open '%s'"), + virReportSystemError(errno, _("cannot open '%1$s'"), obj->base64File); goto cleanup; } if (fstat(fd, &st) < 0) { - virReportSystemError(errno, _("cannot stat '%s'"), + virReportSystemError(errno, _("cannot stat '%1$s'"), obj->base64File); goto cleanup; } if ((size_t)st.st_size != st.st_size) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("'%s' file does not fit in memory"), + _("'%1$s' file does not fit in memory"), obj->base64File); goto cleanup; } @@ -841,7 +839,7 @@ virSecretLoadValue(virSecretObj *obj) contents = g_new0(char, st.st_size + 1); if (saferead(fd, contents, st.st_size) != st.st_size) { - virReportSystemError(errno, _("cannot read '%s'"), + virReportSystemError(errno, _("cannot read '%1$s'"), obj->base64File); goto cleanup; } @@ -914,7 +912,7 @@ virSecretLoadAllConfigs(virSecretObjList *secrets, continue; if (!(obj = virSecretLoad(secrets, de->d_name, path, configDir))) { - VIR_ERROR(_("Error reading secret: %s"), + VIR_ERROR(_("Error reading secret: %1$s"), virGetLastErrorMessage()); VIR_FREE(path); continue; diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index e6c187e80a..7010e97d61 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1037,7 +1037,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList *pools, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("pool '%s' is already defined with uuid %s"), + _("pool '%1$s' is already defined with uuid %2$s"), obj->def->name, uuidstr); goto cleanup; } @@ -1046,14 +1046,14 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList *pools, /* UUID & name match, but if Pool is already active, refuse it */ if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("pool is already active as '%s'"), + _("pool is already active as '%1$s'"), obj->def->name); goto cleanup; } if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("pool '%s' is starting up"), + _("pool '%1$s' is starting up"), obj->def->name); goto cleanup; } @@ -1071,7 +1071,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList *pools, virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("pool '%s' already exists with uuid %s"), + _("pool '%1$s' already exists with uuid %2$s"), def->name, uuidstr); goto cleanup; } @@ -1455,7 +1455,7 @@ virStoragePoolObjSourceFindDuplicate(virStoragePoolObjList *pools, if (obj) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Storage source conflict with pool: '%s'"), + _("Storage source conflict with pool: '%1$s'"), obj->def->name); return -1; } @@ -1577,8 +1577,7 @@ virStoragePoolObjLoad(virStoragePoolObjList *pools, if (!virStringMatchesNameSuffix(file, def->name, ".xml")) { virReportError(VIR_ERR_XML_ERROR, - _("Storage pool config filename '%s' does " - "not match pool name '%s'"), + _("Storage pool config filename '%1$s' does not match pool name '%2$s'"), path, def->name); return NULL; } @@ -1630,8 +1629,7 @@ virStoragePoolObjLoadState(virStoragePoolObjList *pools, if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Storage pool state file '%s' does not match " - "pool name '%s'"), + _("Storage pool state file '%1$s' does not match pool name '%2$s'"), stateFile, def->name); return NULL; } @@ -1715,7 +1713,7 @@ virStoragePoolObjSaveDef(virStorageDriverState *driver, if (!obj->configFile) { if (g_mkdir_with_parents(driver->configDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory %s"), + _("cannot create config directory %1$s"), driver->configDir); return -1; } @@ -1741,13 +1739,13 @@ virStoragePoolObjDeleteDef(virStoragePoolObj *obj) { if (!obj->configFile) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no config file for %s"), obj->def->name); + _("no config file for %1$s"), obj->def->name); return -1; } if (unlink(obj->configFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot remove config for %s"), + _("cannot remove config for %1$s"), obj->def->name); return -1; } -- 2.39.2