if (handler == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("libxml2 doesn't handle %s encoding"), encoding);
+ _("libxml2 doesn't handle %1$s encoding"), encoding);
return NULL;
}
if (!(input = xmlBufferCreateStatic((char *)string, strlen(string))) ||
xmlCharEncInFunc(handler, utf8, input) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not convert from %s to UTF-8 encoding"), encoding);
+ _("Could not convert from %1$s to UTF-8 encoding"), encoding);
goto cleanup;
}
return 0;
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing essential config entry '%s'"), name);
+ _("Missing essential config entry '%1$s'"), name);
return -1;
}
rc = virUUIDParse(string, uuid);
if (rc < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"), string);
+ _("Could not parse UUID from string '%1$s'"), string);
goto cleanup;
}
*number = -1;
} else if (virStrToLong_ll(string, NULL, 10, number) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Config entry '%s' must represent an integer value"),
+ _("Config entry '%1$s' must represent an integer value"),
name);
goto cleanup;
}
*boolean_ = false;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Config entry '%s' must represent a boolean value "
- "(true|false)"), name);
+ _("Config entry '%1$s' must represent a boolean value (true|false)"),
+ name);
goto cleanup;
}
if (idx < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse valid disk index from '%s'"), name);
+ _("Could not parse valid disk index from '%1$s'"), name);
return -1;
}
/* Each of the 4 SCSI controllers has 1 bus with 15 units each for devices */
if (idx >= (4 * 15)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI disk index (parsed from '%s') is too large"), name);
+ _("SCSI disk index (parsed from '%1$s') is too large"), name);
return -1;
}
if (idx < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse valid disk index from '%s'"), name);
+ _("Could not parse valid disk index from '%1$s'"), name);
return -1;
}
/* The IDE controller has 2 buses with 2 units each for devices */
if (idx >= (2 * 2)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE disk index (parsed from '%s') is too large"), name);
+ _("IDE disk index (parsed from '%1$s') is too large"), name);
return -1;
}
if (idx < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse valid disk index from '%s'"), name);
+ _("Could not parse valid disk index from '%1$s'"), name);
return -1;
}
/* The FDC controller has 1 bus with 2 units for devices */
if (idx >= 2) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Floppy disk index (parsed from '%s') is too large"), name);
+ _("Floppy disk index (parsed from '%1$s') is too large"), name);
return -1;
}
if (disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported disk address type '%s'"),
+ _("Unsupported disk address type '%1$s'"),
virDomainDeviceAddressTypeToString(disk->info.type));
return -1;
}
def.info.addr.drive.bus != drive->bus ||
def.info.addr.drive.unit != drive->unit) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Disk address %d:%d:%d doesn't match target device '%s'"),
+ _("Disk address %1$d:%2$d:%3$d doesn't match target device '%4$s'"),
drive->controller, drive->bus, drive->unit, disk->dst);
return -1;
}
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
if (drive->controller > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI controller index %d out of [0..3] range"),
+ _("SCSI controller index %1$d out of [0..3] range"),
drive->controller);
return -1;
}
if (drive->bus != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI bus index %d out of [0] range"),
+ _("SCSI bus index %1$d out of [0] range"),
drive->bus);
return -1;
}
if (drive->unit > 15 || drive->unit == 7) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI unit index %d out of [0..6,8..15] range"),
+ _("SCSI unit index %1$d out of [0..6,8..15] range"),
drive->unit);
return -1;
}
} else if (disk->bus == VIR_DOMAIN_DISK_BUS_IDE) {
if (drive->controller != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE controller index %d out of [0] range"),
+ _("IDE controller index %1$d out of [0] range"),
drive->controller);
return -1;
}
if (drive->bus > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE bus index %d out of [0..1] range"),
+ _("IDE bus index %1$d out of [0..1] range"),
drive->bus);
return -1;
}
if (drive->unit > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE unit index %d out of [0..1] range"),
+ _("IDE unit index %1$d out of [0..1] range"),
drive->unit);
return -1;
}
} else if (disk->bus == VIR_DOMAIN_DISK_BUS_FDC) {
if (drive->controller != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("FDC controller index %d out of [0] range"),
+ _("FDC controller index %1$d out of [0] range"),
drive->controller);
return -1;
}
if (drive->bus != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("FDC bus index %d out of [0] range"),
+ _("FDC bus index %1$d out of [0] range"),
drive->bus);
return -1;
}
if (drive->unit > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("FDC unit index %d out of [0..1] range"),
+ _("FDC unit index %1$d out of [0..1] range"),
drive->unit);
return -1;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported bus type '%s'"),
+ _("Unsupported bus type '%1$s'"),
virDomainDiskBusTypeToString(disk->bus));
return -1;
}
if (model < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown driver name '%s'"), driver);
+ _("Unknown driver name '%1$s'"), driver);
return -1;
}
if (controller == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing SCSI controller for index %d"),
+ _("Missing SCSI controller for index %1$d"),
disk->info.addr.drive.controller);
return -1;
}
controller->model = model;
} else if (controller->model != model) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Inconsistent SCSI controller model ('%s' is not '%s') "
- "for SCSI controller index %d"), driver,
+ _("Inconsistent SCSI controller model ('%1$s' is not '%2$s') for SCSI controller index %3$d"), driver,
virDomainControllerModelSCSITypeToString(controller->model),
controller->idx);
return -1;
for (k = 0; k < count; ++k) {
if (autodetectedModels[k] != autodetectedModels[0]) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Disks on SCSI controller %d have inconsistent "
- "controller models, cannot autodetect model"),
+ _("Disks on SCSI controller %1$d have inconsistent controller models, cannot autodetect model"),
controller->idx);
goto cleanup;
}
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1068 &&
controller->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML attribute 'model' of entry "
- "'controller' to be 'buslogic' or 'lsilogic' or "
- "'lsisas1068' or 'vmpvscsi' but found '%s'"),
+ _("Expecting domain XML attribute 'model' of entry 'controller' to be 'buslogic' or 'lsilogic' or 'lsisas1068' or 'vmpvscsi' but found '%1$s'"),
virDomainControllerModelSCSITypeToString(controller->model));
goto cleanup;
}
if (virStrToLong_i(suffix, &p, 10, &idx) < 0 ||
*p != '.' || idx < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the index of the VMX key '%s'"),
+ _("failed to parse the index of the VMX key '%1$s'"),
name);
return -1;
}
uuidstr = g_strdup_printf("%.16llx%.16llx", vmid[0], vmid[1]);
if (virUUIDParse(uuidstr, def->genid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"), uuidstr);
+ _("Could not parse UUID from string '%1$s'"), uuidstr);
return -1;
}
def->genidRequested = true;
if (config_version != 8) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'config.version' to be 8 but found "
- "%lld"), config_version);
+ _("Expecting VMX entry 'config.version' to be 8 but found %1$lld"),
+ config_version);
goto cleanup;
}
if (virtualHW_version < 4) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'virtualHW.version' to be "
- "4 or higher but found %lld"),
+ _("Expecting VMX entry 'virtualHW.version' to be 4 or higher but found %1$lld"),
virtualHW_version);
goto cleanup;
} else if (virtualHW_version >= 13) {
if (memsize <= 0 || memsize % 4 != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'memsize' to be an unsigned "
- "integer (multiple of 4) but found %lld"), memsize);
+ _("Expecting VMX entry 'memsize' to be an unsigned integer (multiple of 4) but found %1$lld"),
+ memsize);
goto cleanup;
}
if (numvcpus <= 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'numvcpus' to be an unsigned "
- "integer greater than 0 but found %lld"), numvcpus);
+ _("Expecting VMX entry 'numvcpus' to be an unsigned integer greater than 0 but found %1$lld"),
+ numvcpus);
goto cleanup;
}
if (g_strv_length(afflist) < numvcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'sched.cpu.affinity' to contain "
- "at least as many values as 'numvcpus' (%lld) but "
- "found only %u value(s)"), numvcpus, g_strv_length(afflist));
+ _("Expecting VMX entry 'sched.cpu.affinity' to contain at least as many values as 'numvcpus' (%1$lld) but found only %2$u value(s)"),
+ numvcpus, g_strv_length(afflist));
goto cleanup;
}
if (rc < 0 || *current != '\0') {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'sched.cpu.affinity' to be "
- "a comma separated list of unsigned integers but "
- "found '%s'"), sched_cpu_affinity);
+ _("Expecting VMX entry 'sched.cpu.affinity' to be a comma separated list of unsigned integers but found '%1$s'"),
+ sched_cpu_affinity);
goto cleanup;
}
if (number >= VIR_DOMAIN_CPUMASK_LEN) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("VMX entry 'sched.cpu.affinity' contains a %d, "
- "this value is too large"), number);
+ _("VMX entry 'sched.cpu.affinity' contains a %1$d, this value is too large"),
+ number);
goto cleanup;
}
} else if (virStrToLong_ull(sched_cpu_shares, NULL, 10,
&def->cputune.shares) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry 'sched.cpu.shares' to be an "
- "unsigned integer or 'low', 'normal' or 'high' but "
- "found '%s'"), sched_cpu_shares);
+ _("Expecting VMX entry 'sched.cpu.shares' to be an unsigned integer or 'low', 'normal' or 'high' but found '%1$s'"),
+ sched_cpu_shares);
goto cleanup;
}
def->cputune.sharesSpecified = true;
def->os.firmware = VIR_DOMAIN_OS_DEF_FIRMWARE_EFI;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("VMX entry 'firmware' has unknown value '%s'"),
+ _("VMX entry 'firmware' has unknown value '%1$s'"),
firmware);
goto cleanup;
}
if (controller < 0 || controller > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI controller index %d out of [0..3] range"),
+ _("SCSI controller index %1$d out of [0..3] range"),
controller);
return -1;
}
*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1068 &&
*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' "
- "or 'lsisas1068' or 'pvscsi' but found '%s'"),
+ _("Expecting VMX entry '%1$s' to be 'buslogic' or 'lsilogic' or 'lsisas1068' or 'pvscsi' but found '%2$s'"),
virtualDev_name, virtualDev_string);
goto cleanup;
}
if (controller < 0 || controller > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SATA controller index %d out of [0..3] range"),
+ _("SATA controller index %1$d out of [0..3] range"),
controller);
return -1;
}
if (busType == VIR_DOMAIN_DISK_BUS_SCSI) {
if (controllerOrBus < 0 || controllerOrBus > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI controller index %d out of [0..3] range"),
+ _("SCSI controller index %1$d out of [0..3] range"),
controllerOrBus);
goto cleanup;
}
if (unit < 0 || unit > vmdef->scsiBusMaxUnit || unit == 7) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SCSI unit index %d out of [0..6,8..%u] range"),
+ _("SCSI unit index %1$d out of [0..6,8..%2$u] range"),
unit, vmdef->scsiBusMaxUnit);
goto cleanup;
}
} else if (busType == VIR_DOMAIN_DISK_BUS_SATA) {
if (controllerOrBus < 0 || controllerOrBus > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SATA controller index %d out of [0..3] range"),
+ _("SATA controller index %1$d out of [0..3] range"),
controllerOrBus);
goto cleanup;
}
if (unit < 0 || unit >= 30) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SATA unit index %d out of [0..29] range"),
+ _("SATA unit index %1$d out of [0..29] range"),
unit);
goto cleanup;
}
} else if (busType == VIR_DOMAIN_DISK_BUS_IDE) {
if (controllerOrBus < 0 || controllerOrBus > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE bus index %d out of [0..1] range"),
+ _("IDE bus index %1$d out of [0..1] range"),
controllerOrBus);
goto cleanup;
}
if (unit < 0 || unit > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("IDE unit index %d out of [0..1] range"), unit);
+ _("IDE unit index %1$d out of [0..1] range"), unit);
goto cleanup;
}
(*def)->dst = virIndexToDiskName(controllerOrBus * 2 + unit, "hd");
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported bus type '%s' for device type '%s'"),
+ _("Unsupported bus type '%1$s' for device type '%2$s'"),
virDomainDiskBusTypeToString(busType),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
if (busType == VIR_DOMAIN_DISK_BUS_FDC) {
if (controllerOrBus != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("FDC controller index %d out of [0] range"),
+ _("FDC controller index %1$d out of [0] range"),
controllerOrBus);
goto cleanup;
}
if (unit < 0 || unit > 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("FDC unit index %d out of [0..1] range"),
+ _("FDC unit index %1$d out of [0..1] range"),
unit);
goto cleanup;
}
(*def)->dst = virIndexToDiskName(unit, "fd");
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported bus type '%s' for device type '%s'"),
+ _("Unsupported bus type '%1$s' for device type '%2$s'"),
virDomainDiskBusTypeToString(busType),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported device type '%s'"),
+ _("Unsupported device type '%1$s'"),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
STRCASENEQ(deviceType, "scsi-hardDisk") &&
STRCASENEQ(deviceType, "disk")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'scsi-hardDisk' "
- "or 'disk' but found '%s'"), deviceType_name,
+ _("Expecting VMX entry '%1$s' to be 'scsi-hardDisk' or 'disk' but found '%2$s'"),
+ deviceType_name,
deviceType);
goto cleanup;
} else if (busType == VIR_DOMAIN_DISK_BUS_IDE &&
STRCASENEQ(deviceType, "ata-hardDisk") &&
STRCASENEQ(deviceType, "disk")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'ata-hardDisk' "
- "or 'disk' but found '%s'"), deviceType_name,
+ _("Expecting VMX entry '%1$s' to be 'ata-hardDisk' or 'disk' but found '%2$s'"),
+ deviceType_name,
deviceType);
goto cleanup;
}
"independent-nonpersistent");
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid or not yet handled value '%s' "
- "for VMX entry '%s' for device type '%s'"),
+ _("Invalid or not yet handled value '%1$s' for VMX entry '%2$s' for device type '%3$s'"),
fileName, fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup;
if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'cdrom-image' "
- "but found '%s'"), deviceType_name, deviceType);
+ _("Expecting VMX entry '%1$s' to be 'cdrom-image' but found '%2$s'"),
+ deviceType_name, deviceType);
goto cleanup;
}
} else if (fileName && STREQ(fileName, "emptyBackingString")) {
if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'cdrom-image' "
- "but found '%s'"), deviceType_name, deviceType);
+ _("Expecting VMX entry '%1$s' to be 'cdrom-image' but found '%2$s'"),
+ deviceType_name, deviceType);
goto cleanup;
}
virDomainDiskSetSource(*def, NULL);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid or not yet handled value '%s' "
- "for VMX entry '%s' for device type '%s'"),
+ _("Invalid or not yet handled value '%1$s' for VMX entry '%2$s' for device type '%3$s'"),
NULLSTR(fileName), fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup;
VIR_FREE(tmp);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid or not yet handled value '%s' "
- "for VMX entry '%s' for device type '%s'"),
+ _("Invalid or not yet handled value '%1$s' for VMX entry '%2$s' for device type '%3$s'"),
NULLSTR(fileName), fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup;
}
} else {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported device type '%s'"),
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported device type '%1$s'"),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
if (virDomainDiskDefAssignAddress(xmlopt, *def, vmdef) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not assign address to disk '%s'"),
+ _("Could not assign address to disk '%1$s'"),
virDomainDiskGetSource(*def));
goto cleanup;
}
if (generatedAddress != NULL) {
if (virMacAddrParse(generatedAddress, &(*def)->mac) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be MAC address but "
- "found '%s'"), generatedAddress_name,
+ _("Expecting VMX entry '%1$s' to be MAC address but found '%2$s'"),
+ generatedAddress_name,
generatedAddress);
goto cleanup;
}
if (address != NULL) {
if (virMacAddrParse(address, &(*def)->mac) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be MAC address but "
- "found '%s'"), address_name, address);
+ _("Expecting VMX entry '%1$s' to be MAC address but found '%2$s'"),
+ address_name, address);
goto cleanup;
}
}
(*def)->mac_type = VIR_DOMAIN_NET_MAC_TYPE_STATIC;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'generated' or 'static' or "
- "'vpx' but found '%s'"), addressType_name, addressType);
+ _("Expecting VMX entry '%1$s' to be 'generated' or 'static' or 'vpx' but found '%2$s'"),
+ addressType_name, addressType);
goto cleanup;
}
netmodel = VIR_DOMAIN_NET_MODEL_E1000E;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'vlance' or 'vmxnet' or "
- "'vmxnet3' or 'e1000' or 'e1000e' but found '%s'"),
+ _("Expecting VMX entry '%1$s' to be 'vlance' or 'vmxnet' or 'vmxnet3' or 'e1000' or 'e1000e' but found '%2$s'"),
virtualDev_name, virtualDev);
goto cleanup;
}
if (virUUIDParse(switchId, (*def)->data.vds.switch_id) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"),
+ _("Could not parse UUID from string '%1$s'"),
switchId);
goto cleanup;
}
} else if (STRCASEEQ(connectionType, "hostonly")) {
/* FIXME */
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("No yet handled value '%s' for VMX entry '%s'"),
+ _("No yet handled value '%1$s' for VMX entry '%2$s'"),
connectionType, connectionType_name);
goto cleanup;
} else if (STRCASEEQ(connectionType, "nat")) {
(*def)->ifname = g_steal_pointer(&vnet);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid value '%s' for VMX entry '%s'"), connectionType,
+ _("Invalid value '%1$s' for VMX entry '%2$s'"), connectionType,
connectionType_name);
goto cleanup;
}
if (port < 0 || port > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Serial port index %d out of [0..3] range"), port);
+ _("Serial port index %1$d out of [0..3] range"), port);
return -1;
}
if (parsedUri->port == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("VMX entry '%s' doesn't contain a port part"),
+ _("VMX entry '%1$s' doesn't contain a port part"),
fileName_name);
goto cleanup;
}
(*def)->source->data.tcp.protocol = VIR_DOMAIN_CHR_TCP_PROTOCOL_TLS;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("VMX entry '%s' contains unsupported scheme '%s'"),
+ _("VMX entry '%1$s' contains unsupported scheme '%2$s'"),
fileName_name, parsedUri->scheme);
goto cleanup;
}
(*def)->source->data.tcp.listen = false;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'server' or 'client' "
- "but found '%s'"), network_endPoint_name, network_endPoint);
+ _("Expecting VMX entry '%1$s' to be 'server' or 'client' but found '%2$s'"),
+ network_endPoint_name, network_endPoint);
goto cleanup;
}
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'device', 'file' or 'pipe' "
- "or 'network' but found '%s'"), fileType_name, fileType);
+ _("Expecting VMX entry '%1$s' to be 'device', 'file' or 'pipe' or 'network' but found '%2$s'"),
+ fileType_name, fileType);
goto cleanup;
}
if (port < 0 || port > 2) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Parallel port index %d out of [0..2] range"), port);
+ _("Parallel port index %1$d out of [0..2] range"), port);
return -1;
}
goto cleanup;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VMX entry '%s' to be 'device' or 'file' but "
- "found '%s'"), fileType_name, fileType);
+ _("Expecting VMX entry '%1$s' to be 'device' or 'file' but found '%2$s'"),
+ fileType_name, fileType);
goto cleanup;
}
if (def->virtType != VIR_DOMAIN_VIRT_VMWARE) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting virt type to be '%s' but found '%s'"),
+ _("Expecting virt type to be '%1$s' but found '%2$s'"),
virDomainVirtTypeToString(VIR_DOMAIN_VIRT_VMWARE),
virDomainVirtTypeToString(def->virtType));
return NULL;
virBufferAddLit(&buffer, "guestOS = \"other-64\"\n");
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML attribute 'arch' of entry 'os/type' "
- "to be 'i686' or 'x86_64' but found '%s'"),
+ _("Expecting domain XML attribute 'arch' of entry 'os/type' to be 'i686' or 'x86_64' but found '%1$s'"),
virArchToString(def->os.arch));
goto cleanup;
}
virBufferAddLit(&buffer, "smbios.reflecthost = \"true\"\n");
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported SMBIOS mode '%s'"),
+ _("Unsupported SMBIOS mode '%1$s'"),
virDomainSmbiosModeTypeToString(def->os.smbios_mode));
goto cleanup;
}
if (def->cpu->mode != VIR_CPU_MODE_CUSTOM) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML CPU mode 'custom' but "
- "found '%s'"),
+ _("Expecting domain XML CPU mode 'custom' but found '%1$s'"),
virCPUModeTypeToString(def->cpu->mode));
goto cleanup;
}
calculated_vcpus = def->cpu->sockets * def->cpu->cores;
if (calculated_vcpus != maxvcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML CPU sockets per core as %d "
- "but found %d"),
+ _("Expecting domain XML CPU sockets per core as %1$d but found %2$d"),
maxvcpus, calculated_vcpus);
goto cleanup;
}
if (sched_cpu_affinity_length < maxvcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML attribute 'cpuset' of entry "
- "'vcpu' to contain at least %d CPU(s)"),
+ _("Expecting domain XML attribute 'cpuset' of entry 'vcpu' to contain at least %1$d CPU(s)"),
maxvcpus);
goto cleanup;
}
case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
case VIR_DOMAIN_GRAPHICS_TYPE_DBUS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported graphics type '%s'"),
+ _("Unsupported graphics type '%1$s'"),
virDomainGraphicsTypeToString(def->graphics[i]->type));
goto cleanup;
case VIR_DOMAIN_DISK_DEVICE_LAST:
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported disk device type '%s'"),
+ _("Unsupported disk device type '%1$s'"),
virDomainDiskDeviceTypeToString(def->disks[i]->device));
goto cleanup;
}
def->device != VIR_DOMAIN_DISK_DEVICE_CDROM &&
def->device != VIR_DOMAIN_DISK_DEVICE_LUN) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid device type supplied: %s"), deviceType);
+ _("Invalid device type supplied: %1$s"), deviceType);
return -1;
}
if (type != VIR_STORAGE_TYPE_FILE &&
type != VIR_STORAGE_TYPE_BLOCK) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("%s %s '%s' has unsupported type '%s', expecting "
- "'%s' or '%s'"), busType, deviceType, def->dst,
+ _("%1$s %2$s '%3$s' has unsupported type '%4$s', expecting '%5$s' or '%6$s'"),
+ busType, deviceType, def->dst,
diskType,
virStorageTypeToString(VIR_STORAGE_TYPE_FILE),
virStorageTypeToString(VIR_STORAGE_TYPE_BLOCK));
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported bus type '%s' for %s"),
+ _("Unsupported bus type '%1$s' for %2$s"),
busType, deviceType);
return -1;
}
vmxDeviceType = "cdrom-raw";
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("%s %s '%s' has an unsupported type '%s'"),
+ _("%1$s %2$s '%3$s' has an unsupported type '%4$s'"),
busType, deviceType, def->dst, diskType);
return -1;
}
if (src) {
if (!virStringHasCaseSuffix(src, fileExt)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Image file for %s %s '%s' has "
- "unsupported suffix, expecting '%s'"),
+ _("Image file for %1$s %2$s '%3$s' has unsupported suffix, expecting '%4$s'"),
busType, deviceType, def->dst, fileExt);
return -1;
}
busType, controllerOrBus, unit);
} else if (def->cachemode != VIR_DOMAIN_DISK_CACHE_DEFAULT) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("%s harddisk '%s' has unsupported cache mode '%s'"),
+ _("%1$s harddisk '%2$s' has unsupported cache mode '%3$s'"),
busType, def->dst,
virDomainDiskCacheTypeToString(def->cachemode));
return -1;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Floppy '%s' has unsupported type '%s', expecting '%s' "
- "or '%s'"), def->dst,
+ _("Floppy '%1$s' has unsupported type '%2$s', expecting '%3$s' or '%4$s'"),
+ def->dst,
virStorageTypeToString(type),
virStorageTypeToString(VIR_STORAGE_TYPE_FILE),
virStorageTypeToString(VIR_STORAGE_TYPE_BLOCK));
{
if (def->type != VIR_DOMAIN_FS_TYPE_MOUNT) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Only '%s' filesystem type is supported"),
+ _("Only '%1$s' filesystem type is supported"),
virDomainFSTypeToString(VIR_DOMAIN_FS_TYPE_MOUNT));
return -1;
}
if (controller < 0 || controller > controller_limit) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Ethernet controller index %d out of [0..%d] range"),
+ _("Ethernet controller index %1$d out of [0..%2$d] range"),
controller, controller_limit);
return -1;
}
def->model != VIR_DOMAIN_NET_MODEL_E1000 &&
def->model != VIR_DOMAIN_NET_MODEL_E1000E) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML entry 'devices/interface/model' "
- "to be 'vlance' or 'vmxnet' or 'vmxnet2' or 'vmxnet3' "
- "or 'e1000' or 'e1000e' but found '%s'"),
+ _("Expecting domain XML entry 'devices/interface/model' to be 'vlance' or 'vmxnet' or 'vmxnet2' or 'vmxnet3' or 'e1000' or 'e1000e' but found '%1$s'"),
virDomainNetModelTypeToString(def->model));
return -1;
}
case VIR_DOMAIN_NET_TYPE_HOSTDEV:
case VIR_DOMAIN_NET_TYPE_UDP:
case VIR_DOMAIN_NET_TYPE_VDPA:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type '%s'"),
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type '%1$s'"),
virDomainNetTypeToString(def->type));
return -1;
if (def->target.port < 0 || def->target.port > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Serial port index %d out of [0..3] range"),
+ _("Serial port index %1$d out of [0..3] range"),
def->target.port);
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported character device TCP protocol '%s'"),
+ _("Unsupported character device TCP protocol '%1$s'"),
virDomainChrTcpProtocolTypeToString(
def->source->data.tcp.protocol));
return -1;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported character device type '%s'"),
+ _("Unsupported character device type '%1$s'"),
virDomainChrTypeToString(def->source->type));
return -1;
}
if (def->target.port < 0 || def->target.port > 2) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Parallel port index %d out of [0..2] range"),
+ _("Parallel port index %1$d out of [0..2] range"),
def->target.port);
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported character device type '%s'"),
+ _("Unsupported character device type '%1$s'"),
virDomainChrTypeToString(def->source->type));
return -1;
}
if (def->type != VIR_DOMAIN_VIDEO_TYPE_VMVGA) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported video device type '%s'"),
+ _("Unsupported video device type '%1$s'"),
virDomainVideoTypeToString(def->type));
return -1;
}