Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/domain_validate.c | 136 +++++++++++++++++--------------------
1 file changed, 62 insertions(+), 74 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 5fb2d4971c..d30bb31dda 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -76,7 +76,7 @@ virDomainDefResourceValidate(const virDomainDef *def)
len = strlen(def->resource->appid);
if (len < APPID_LEN_MIN || len > APPID_LEN_MAX) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Fibre Channel 'appid' string length must be
between [%d, %d]"),
+ _("Fibre Channel 'appid' string length must be
between [%1$d, %2$d]"),
APPID_LEN_MIN, APPID_LEN_MAX);
return -1;
}
@@ -277,7 +277,7 @@ virDomainDiskAddressDiskBusCompatibility(virDomainDiskBus bus,
}
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unexpected bus type '%d'"),
+ _("unexpected bus type '%1$d'"),
bus);
return true;
}
@@ -508,7 +508,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
case VIR_STORAGE_NET_PROTOCOL_VXHS:
case VIR_STORAGE_NET_PROTOCOL_NFS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("authentication is not supported for protocol
'%s'"),
+ _("authentication is not supported for protocol
'%1$s'"),
virStorageNetProtocolTypeToString(src->protocol));
return -1;
@@ -519,7 +519,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
if ((actUsage = virSecretUsageTypeFromString(authdef->secrettype)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown secret type '%s'"),
+ _("unknown secret type '%1$s'"),
NULLSTR(authdef->secrettype));
return -1;
}
@@ -529,7 +529,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
(src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD &&
actUsage != VIR_SECRET_USAGE_TYPE_CEPH)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("invalid secret type '%s'"),
+ _("invalid secret type '%1$s'"),
virSecretUsageTypeToString(actUsage));
return -1;
}
@@ -603,7 +603,7 @@ virDomainDiskDefSourceLUNValidate(const virStorageSource *src)
if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK) {
if (src->protocol != VIR_STORAGE_NET_PROTOCOL_ISCSI) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk device='lun' is not supported for
protocol='%s'"),
+ _("disk device='lun' is not supported for
protocol='%1$s'"),
virStorageNetProtocolTypeToString(src->protocol));
return -1;
}
@@ -649,7 +649,7 @@ virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk)
if (virStorageSourceGetActualType(disk->src) != VIR_STORAGE_TYPE_VOLUME
&&
!virStorageSourceIsLocalStorage(disk->src)) {
virReportError(VIR_ERR_XML_ERROR,
- _("disk startupPolicy '%s' is not allowed for disk of
'%s' type"),
+ _("disk startupPolicy '%1$s' is not allowed for disk
of '%2$s' type"),
virDomainStartupPolicyTypeToString(disk->startupPolicy),
virStorageTypeToString(disk->src->type));
return -1;
@@ -676,7 +676,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
/* disk target is used widely in other code so it must be validated first */
if (!disk->dst) {
if (disk->src->srcpool) {
- virReportError(VIR_ERR_NO_TARGET, _("pool = '%s', volume =
'%s'"),
+ virReportError(VIR_ERR_NO_TARGET, _("pool = '%1$s', volume =
'%2$s'"),
disk->src->srcpool->pool,
disk->src->srcpool->volume);
} else {
@@ -764,7 +764,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
*/
if (!virDomainDiskAddressDiskBusCompatibility(disk->bus, disk->info.type)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Invalid address type '%s' for the disk
'%s' with the bus type '%s'"),
+ _("Invalid address type '%1$s' for the disk
'%2$s' with the bus type '%3$s'"),
virDomainDeviceAddressTypeToString(disk->info.type),
disk->dst,
virDomainDiskBusTypeToString(disk->bus));
@@ -776,7 +776,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL ||
disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk model '%s' not supported for bus
'%s'"),
+ _("disk model '%1$s' not supported for bus
'%2$s'"),
virDomainDiskModelTypeToString(disk->model),
virDomainDiskBusTypeToString(disk->bus));
return -1;
@@ -843,7 +843,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
if (strlen(disk->vendor) > VENDOR_LEN) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk vendor is more than %d characters"),
+ _("disk vendor is more than %1$d characters"),
VENDOR_LEN);
return -1;
}
@@ -858,7 +858,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
if (strlen(disk->product) > PRODUCT_LEN) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk product is more than %d characters"),
+ _("disk product is more than %1$d characters"),
PRODUCT_LEN);
return -1;
}
@@ -867,7 +867,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
disk->bus != VIR_DOMAIN_DISK_BUS_FDC) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid bus type '%s' for floppy disk"),
+ _("Invalid bus type '%1$s' for floppy disk"),
virDomainDiskBusTypeToString(disk->bus));
return -1;
}
@@ -875,7 +875,7 @@ virDomainDiskDefValidate(const virDomainDef *def,
if (disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
disk->bus == VIR_DOMAIN_DISK_BUS_FDC) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid bus type '%s' for disk"),
+ _("Invalid bus type '%1$s' for disk"),
virDomainDiskBusTypeToString(disk->bus));
return -1;
}
@@ -901,14 +901,14 @@ virDomainDiskDefValidate(const virDomainDef *def,
!STRPREFIX(disk->dst, "xvd") &&
!STRPREFIX(disk->dst, "ubd")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid harddisk device name: %s"), disk->dst);
+ _("Invalid harddisk device name: %1$s"), disk->dst);
return -1;
}
if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
!STRPREFIX(disk->dst, "fd")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid floppy device name: %s"), disk->dst);
+ _("Invalid floppy device name: %1$s"), disk->dst);
return -1;
}
@@ -1115,7 +1115,7 @@ virDomainDefTunablesValidate(const virDomainDef *def)
if (STREQ(def->blkio.devices[j].path,
def->blkio.devices[i].path)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("duplicate blkio device path '%s'"),
+ _("duplicate blkio device path
'%1$s'"),
def->blkio.devices[i].path);
return -1;
}
@@ -1143,7 +1143,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (controller->idx > 255) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller index %d too high, maximum is
255"),
+ _("PCI controller index %1$d too high, maximum is
255"),
controller->idx);
return -1;
}
@@ -1153,7 +1153,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (opts->targetIndex < 0 || opts->targetIndex > 30) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller target index '%d' out of
range - must be 0-30"),
+ _("PCI controller target index '%1$d' out of
range - must be 0-30"),
opts->targetIndex);
return -1;
}
@@ -1169,7 +1169,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (opts->chassisNr != -1) {
if (opts->chassisNr < 1 || opts->chassisNr > 255) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller chassisNr '%d' out of range
- must be 1-255"),
+ _("PCI controller chassisNr '%1$d' out of
range - must be 1-255"),
opts->chassisNr);
return -1;
}
@@ -1178,7 +1178,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (opts->chassis != -1) {
if (opts->chassis < 0 || opts->chassis > 255) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller chassis '%d' out of range -
must be 0-255"),
+ _("PCI controller chassis '%1$d' out of range
- must be 0-255"),
opts->chassis);
return -1;
}
@@ -1187,7 +1187,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (opts->port != -1) {
if (opts->port < 0 || opts->port > 255) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller port '%d' out of range -
must be 0-255"),
+ _("PCI controller port '%1$d' out of range -
must be 0-255"),
opts->port);
return -1;
}
@@ -1196,7 +1196,7 @@ virDomainControllerDefValidate(const virDomainControllerDef
*controller)
if (opts->busNr != -1) {
if (opts->busNr < 1 || opts->busNr > 254) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("PCI controller busNr '%d' out of range -
must be 1-254"),
+ _("PCI controller busNr '%1$d' out of range -
must be 1-254"),
opts->busNr);
return -1;
}
@@ -1321,9 +1321,7 @@ virDomainDefDuplicateDriveAddressesValidate(const virDomainDef
*def)
if (virDomainDeviceInfoAddressIsEqual(disk_info_i, disk_info_j)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Found duplicate drive address for disk with
"
- "target name '%s' controller='%u'
bus='%u' "
- "target='%u' unit='%u'"),
+ _("Found duplicate drive address for disk with target
name '%1$s' controller='%2$u' bus='%3$u' target='%4$u'
unit='%5$u'"),
disk_i->dst,
disk_info_i->addr.drive.controller,
disk_info_i->addr.drive.bus,
@@ -1363,9 +1361,7 @@ virDomainDefDuplicateDriveAddressesValidate(const virDomainDef
*def)
if (virDomainDeviceInfoAddressIsEqual(hdev_info_i, hdev_info_j)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("SCSI host address controller='%u' "
- "bus='%u' target='%u'
unit='%u' in "
- "use by another SCSI host device"),
+ _("SCSI host address controller='%1$u'
bus='%2$u' target='%3$u' unit='%4$u' in use by another SCSI host
device"),
hdev_addr_i->bus,
hdev_addr_i->controller,
hdev_addr_i->target,
@@ -1377,9 +1373,7 @@ virDomainDefDuplicateDriveAddressesValidate(const virDomainDef
*def)
if (virDomainDriveAddressIsUsedByDisk(def, VIR_DOMAIN_DISK_BUS_SCSI,
hdev_addr_i)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("SCSI host address controller='%u' "
- "bus='%u' target='%u' unit='%u'
in "
- "use by another SCSI disk"),
+ _("SCSI host address controller='%1$u'
bus='%2$u' target='%3$u' unit='%4$u' in use by another SCSI
disk"),
hdev_addr_i->bus,
hdev_addr_i->controller,
hdev_addr_i->target,
@@ -1427,7 +1421,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDef *def,
if (virHashLookup(data->aliases, alias)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("non unique alias detected: %s"),
+ _("non unique alias detected: %1$s"),
alias);
return -1;
}
@@ -1487,7 +1481,7 @@ virDomainDeviceValidateAliasImpl(const virDomainDef *def,
if (virHashLookup(aliases, info->alias)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("non unique alias detected: %s"),
+ _("non unique alias detected: %1$s"),
info->alias);
return -1;
}
@@ -1558,16 +1552,14 @@ virDomainDefMemtuneValidate(const virDomainDef *def)
virBitmapOverlaps(mem->hugepages[i].nodemask,
mem->hugepages[j].nodemask)) {
virReportError(VIR_ERR_XML_DETAIL,
- _("nodeset attribute of hugepages "
- "of sizes %llu and %llu intersect"),
+ _("nodeset attribute of hugepages of sizes %1$llu and
%2$llu intersect"),
mem->hugepages[i].size,
mem->hugepages[j].size);
return -1;
} else if (!mem->hugepages[i].nodemask &&
!mem->hugepages[j].nodemask) {
virReportError(VIR_ERR_XML_DETAIL,
- _("two master hugepages detected: "
- "%llu and %llu"),
+ _("two master hugepages detected: %1$llu and
%2$llu"),
mem->hugepages[i].size,
mem->hugepages[j].size);
return -1;
@@ -1583,7 +1575,7 @@ virDomainDefMemtuneValidate(const virDomainDef *def)
nextBit = virBitmapNextSetBit(mem->hugepages[i].nodemask, pos);
if (nextBit >= 0) {
virReportError(VIR_ERR_XML_DETAIL,
- _("hugepages: node %zd not found"),
+ _("hugepages: node %1$zd not found"),
nextBit);
return -1;
}
@@ -1649,7 +1641,7 @@ virDomainDefOSValidate(const virDomainDef *def,
if (loader->nvram && def->os.firmware !=
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) {
virReportError(VIR_ERR_XML_DETAIL,
- _("firmware type '%s' does not support
nvram"),
+ _("firmware type '%1$s' does not support
nvram"),
virDomainOsDefFirmwareTypeToString(def->os.firmware));
return -1;
}
@@ -1707,7 +1699,7 @@ virDomainDefOSValidate(const virDomainDef *def,
(def->cputune.name < VIR_CGROUP_CPU_PERIOD_MIN || \
def->cputune.name > VIR_CGROUP_CPU_PERIOD_MAX)) { \
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
- _("Value of cputune '%s' must be in range [%llu,
%llu]"), \
+ _("Value of cputune '%1$s' must be in range
[%2$llu, %3$llu]"), \
#name, \
VIR_CGROUP_CPU_PERIOD_MIN, \
VIR_CGROUP_CPU_PERIOD_MAX); \
@@ -1721,7 +1713,7 @@ virDomainDefOSValidate(const virDomainDef *def,
(def->cputune.name < VIR_CGROUP_CPU_QUOTA_MIN || \
def->cputune.name > VIR_CGROUP_CPU_QUOTA_MAX)) { \
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
- _("Value of cputune '%s' must be in range [%llu,
%llu]"), \
+ _("Value of cputune '%1$s' must be in range
[%2$llu, %3$llu]"), \
#name, \
VIR_CGROUP_CPU_QUOTA_MIN, \
VIR_CGROUP_CPU_QUOTA_MAX); \
@@ -1787,7 +1779,7 @@ virDomainDefFSValidate(const virDomainDef *def)
if (virHashHasEntry(dsts, fs->dst)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("filesystem target '%s' specified
twice"),
+ _("filesystem target '%1$s' specified
twice"),
fs->dst);
return -1;
}
@@ -1998,7 +1990,7 @@ virDomainNetDefValidatePortOptions(const char *macstr,
if (!(type == VIR_DOMAIN_NET_TYPE_NETWORK ||
type == VIR_DOMAIN_NET_TYPE_BRIDGE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("interface %s - <port isolated='yes'/> is
not supported for network interfaces with type='%s'"),
+ _("interface %1$s - <port isolated='yes'/>
is not supported for network interfaces with type='%2$s'"),
macstr, virDomainNetTypeToString(type));
return -1;
}
@@ -2008,7 +2000,7 @@ virDomainNetDefValidatePortOptions(const char *macstr,
*/
if (vport && vport->virtPortType != VIR_NETDEV_VPORT_PROFILE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("interface %s - <port isolated='yes'/> is
not supported for network interfaces with virtualport type='%s'"),
+ _("interface %1$s - <port isolated='yes'/>
is not supported for network interfaces with virtualport type='%2$s'"),
macstr, virNetDevVPortTypeToString(vport->virtPortType));
return -1;
}
@@ -2052,7 +2044,7 @@ virDomainActualNetDefValidate(const virDomainNetDef *net)
(actualType == VIR_DOMAIN_NET_TYPE_BRIDGE &&
vport && vport->virtPortType ==
VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("interface %s - vlan tag not supported for this
connection type"),
+ _("interface %1$s - vlan tag not supported for this
connection type"),
macstr);
return -1;
}
@@ -2063,8 +2055,7 @@ virDomainActualNetDefValidate(const virDomainNetDef *net)
*/
if (bandwidth && actualType == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("interface %s - bandwidth settings are not supported
"
- "for hostdev interfaces"),
+ _("interface %1$s - bandwidth settings are not supported for
hostdev interfaces"),
macstr);
return -1;
}
@@ -2088,18 +2079,15 @@ virDomainNetDefValidate(const virDomainNetDef *net)
if ((net->hostIP.nroutes || net->hostIP.nips) &&
net->type != VIR_DOMAIN_NET_TYPE_ETHERNET) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Invalid attempt to set network interface "
- "host-side IP route and/or address info on "
- "interface of type '%s'. This is only supported
"
- "on interfaces of type 'ethernet'"),
+ _("Invalid attempt to set network interface host-side IP
route and/or address info on interface of type '%1$s'. "
+ "This is only supported on interfaces of type
'ethernet'"),
virDomainNetTypeToString(net->type));
return -1;
}
if (net->managed_tap == VIR_TRISTATE_BOOL_NO &&
net->type != VIR_DOMAIN_NET_TYPE_ETHERNET) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unmanaged target dev is not supported on "
- "interfaces of type '%s'"),
+ _("unmanaged target dev is not supported on interfaces of
type '%1$s'"),
virDomainNetTypeToString(net->type));
return -1;
}
@@ -2114,7 +2102,7 @@ virDomainNetDefValidate(const virDomainNetDef *net)
} else {
if (net->teaming->persistent) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("teaming persistent attribute not allowed if
teaming type is '%s'"),
+ _("teaming persistent attribute not allowed if
teaming type is '%1$s'"),
virDomainNetTeamingTypeToString(net->teaming->type));
return -1;
}
@@ -2292,7 +2280,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *mem,
if (mem->targetNode >= nodeCount) {
virReportError(VIR_ERR_XML_DETAIL,
- _("can't add memory backend for guest node
'%d' as the guest has only '%zu' NUMA nodes configured"),
+ _("can't add memory backend for guest node
'%1$d' as the guest has only '%2$zu' NUMA nodes configured"),
mem->targetNode, nodeCount);
return -1;
}
@@ -2329,14 +2317,14 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *mem,
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
if (!mem->nvdimmPath) {
virReportError(VIR_ERR_XML_DETAIL,
- _("path is required for model '%s'"),
+ _("path is required for model '%1$s'"),
virDomainMemoryModelTypeToString(mem->model));
return -1;
}
if (mem->discard == VIR_TRISTATE_BOOL_YES) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("discard is not supported for model
'%s'"),
+ _("discard is not supported for model
'%1$s'"),
virDomainMemoryModelTypeToString(mem->model));
return -1;
}
@@ -2357,7 +2345,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *mem,
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
if (mem->requestedsize > mem->size) {
virReportError(VIR_ERR_XML_DETAIL,
- _("requested size must be smaller than or equal to @size
(%lluKiB)"),
+ _("requested size must be smaller than or equal to @size
(%1$lluKiB)"),
mem->size);
return -1;
}
@@ -2378,7 +2366,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *mem,
if (mem->blocksize < thpSize) {
virReportError(VIR_ERR_XML_DETAIL,
- _("block size too small, must be at least
%lluKiB"),
+ _("block size too small, must be at least
%1$lluKiB"),
thpSize);
return -1;
}
@@ -2396,7 +2384,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *mem,
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
if (mem->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("memory device address is not supported for model
'%s'"),
+ _("memory device address is not supported for model
'%1$s'"),
virDomainMemoryModelTypeToString(mem->model));
return -1;
}
@@ -2464,13 +2452,13 @@ virDomainInputDefValidate(const virDomainInputDef *input,
input->type != VIR_DOMAIN_INPUT_TYPE_MOUSE &&
input->type != VIR_DOMAIN_INPUT_TYPE_KBD) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("ps2 bus does not support %s input device"),
+ _("ps2 bus does not support %1$s input device"),
virDomainInputTypeToString(input->type));
return -1;
}
if (input->bus == VIR_DOMAIN_INPUT_BUS_XEN) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported input bus %s"),
+ _("unsupported input bus %1$s"),
virDomainInputBusTypeToString(input->bus));
return -1;
}
@@ -2480,14 +2468,14 @@ virDomainInputDefValidate(const virDomainInputDef *input,
case VIR_DOMAIN_OSTYPE_XENPVH:
if (input->bus != VIR_DOMAIN_INPUT_BUS_XEN) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported input bus %s"),
+ _("unsupported input bus %1$s"),
virDomainInputBusTypeToString(input->bus));
return -1;
}
if (input->type != VIR_DOMAIN_INPUT_TYPE_MOUSE &&
input->type != VIR_DOMAIN_INPUT_TYPE_KBD) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("xen bus does not support %s input device"),
+ _("xen bus does not support %1$s input device"),
virDomainInputTypeToString(input->type));
return -1;
}
@@ -2498,7 +2486,7 @@ virDomainInputDefValidate(const virDomainInputDef *input,
def->virtType == VIR_DOMAIN_VIRT_PARALLELS) {
if (input->bus != VIR_DOMAIN_INPUT_BUS_PARALLELS) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("parallels containers don't support input bus
%s"),
+ _("parallels containers don't support input bus
%1$s"),
virDomainInputBusTypeToString(input->bus));
return -1;
}
@@ -2506,7 +2494,7 @@ virDomainInputDefValidate(const virDomainInputDef *input,
if (input->type != VIR_DOMAIN_INPUT_TYPE_MOUSE &&
input->type != VIR_DOMAIN_INPUT_TYPE_KBD) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("parallels bus does not support %s input
device"),
+ _("parallels bus does not support %1$s input
device"),
virDomainInputTypeToString(input->type));
return -1;
}
@@ -2556,7 +2544,7 @@ virDomainInputDefValidate(const virDomainInputDef *input,
case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL:
if (input->bus != VIR_DOMAIN_INPUT_BUS_VIRTIO) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("only bus 'virtio' is supported for input model
'%s'"),
+ _("only bus 'virtio' is supported for input model
'%1$s'"),
virDomainInputModelTypeToString(input->model));
return -1;
}
@@ -2637,7 +2625,7 @@ virDomainEnsureAudioID(const virDomainDef *def,
}
virReportError(VIR_ERR_XML_ERROR,
- _("no audio device with ID %u"),
+ _("no audio device with ID %1$u"),
id);
return -1;
}
@@ -2660,7 +2648,7 @@ virDomainAudioDefValidate(const virDomainDef *def,
continue;
if (def->audios[i]->id == audio->id) {
virReportError(VIR_ERR_XML_ERROR,
- _("audio ID %u is used multiple times"),
+ _("audio ID %1$u is used multiple times"),
audio->id);
return -1;
}
@@ -2723,7 +2711,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
iommu->iotlb != VIR_TRISTATE_SWITCH_ABSENT ||
iommu->aw_bits != 0) {
virReportError(VIR_ERR_XML_ERROR,
- _("iommu model '%s' doesn't support
additional attributes"),
+ _("iommu model '%1$s' doesn't support
additional attributes"),
virDomainIOMMUModelTypeToString(iommu->model));
return -1;
}
@@ -2739,7 +2727,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
case VIR_DOMAIN_IOMMU_MODEL_INTEL:
if (iommu->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_XML_ERROR,
- _("iommu model '%s' can't have
address"),
+ _("iommu model '%1$s' can't have
address"),
virDomainIOMMUModelTypeToString(iommu->model));
return -1;
}
@@ -2762,7 +2750,7 @@ virDomainTPMDevValidate(const virDomainTPMDef *tpm)
if (tpm->data.emulator.activePcrBanks &&
tpm->data.emulator.version != VIR_DOMAIN_TPM_VERSION_2_0) {
virReportError(VIR_ERR_XML_ERROR,
- _("<active_pcr_banks/> requires TPM version
'%s'"),
+ _("<active_pcr_banks/> requires TPM version
'%1$s'"),
virDomainTPMVersionTypeToString(VIR_DOMAIN_TPM_VERSION_2_0));
return -1;
}
@@ -2822,7 +2810,7 @@ virDomainDeviceInfoValidate(const virDomainDeviceDef *dev)
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED:
if (dev->type != VIR_DOMAIN_DEVICE_HOSTDEV) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("address of type '%s' is supported only for
hostdevs"),
+ _("address of type '%1$s' is supported only for
hostdevs"),
virDomainDeviceAddressTypeToString(info->type));
return -1;
}
--
2.39.2