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;
}
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;
}
}
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;
}
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) {
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;
}
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;
}
!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;
}
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;
}
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;
}
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;
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
if (def->mode < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Invalid mode attribute '%s'"),
+ _("Invalid mode attribute '%1$s'"),
cpuMode);
return -1;
}
}
if ((def->arch = virArchFromString(arch)) == VIR_ARCH_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unknown architecture %s"), arch);
+ _("Unknown architecture %1$s"), arch);
return -1;
}
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;
}
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;
}
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);
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;
}
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;
}
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;
}
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;
}
}
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;
}
}
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;
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;
}
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;
}
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;
}
} 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;
!(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;
!(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;
* 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;
}
}
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;
}
/* 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
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;
}
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;
}
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;
}
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;
}
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);
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);
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;
}
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;
}
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);
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;
}
if (!val) {
/* Integer overflow */
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("integer overflow on %s. Please contact the "
- "libvirt development team at libvir-list@redhat.com"),
+ _("integer overflow on %1$s. Please contact the libvirt development team at libvir-list@redhat.com"),
capsEnumName);
return -1;
}
if (!virClassIsDerivedFrom(klass, virDomainEventClass)) {
virReportInvalidArg(klass,
- _("Class %s must derive from virDomainEvent"),
+ _("Class %1$s must derive from virDomainEvent"),
virClassName(klass));
return NULL;
}
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;
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;
}
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;
}
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;
}
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;
(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;
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;
}
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;
}
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;
}
}
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;
}
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;
}
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;
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;
}
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;
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;
}
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;
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;
}
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;
}
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;
}
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);
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;
}
|| (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;
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
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) {
/* 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;
}
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
*/
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;
}
/* 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;
}
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;
}
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;
}
}
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;
}
if (virBitmapIsAllClear(nodeset)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Invalid value of 'nodeset': %s"), nodesetstr);
+ _("Invalid value of 'nodeset': %1$s"), nodesetstr);
return -1;
}
}
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;
}
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;
}
/* 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;
}
(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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
}
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;
{
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;
}
}
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));
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);
if (unlink(configFile) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot remove config for %s"),
+ _("cannot remove config for %1$s"),
def->name);
return -1;
}
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;
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;
}
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;
}
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;
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;
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;
}
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;
}
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;
}
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;
}
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;
}
}
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;
}
if (!virClassIsDerivedFrom(klass, virObjectEventClass)) {
virReportInvalidArg(klass,
- _("Class %s must derive from virObjectEvent"),
+ _("Class %1$s must derive from virObjectEvent"),
virClassName(klass));
return NULL;
}
if (ret < 0)
virReportError(VIR_ERR_INVALID_ARG,
- _("event callback function %p not registered"),
+ _("event callback function %1$p not registered"),
callback);
return ret;
}
if (ret < 0)
virReportError(VIR_ERR_INVALID_ARG,
- _("event callback id %d not registered"),
+ _("event callback id %1$d not registered"),
callbackID);
return ret;
}
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;
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected secret usage type %d"),
+ _("unexpected secret usage type %1$d"),
def->usage_type);
return -1;
}
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;
}
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected secret usage type %d"),
+ _("unexpected secret usage type %1$d"),
def->usage_type);
return -1;
}
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;
}
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;
}
/* 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;
}
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;
}
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;
}
/* 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;
}
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;
}
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;
}
(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;
}
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;
}
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;
}
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;
}
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;
}
!(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;
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;
}
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;
}
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;
}
if (source->format < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown pool format type %s"), format);
+ _("unknown pool format type %1$s"), format);
return -1;
}
}
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;
}
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;
}
if (strchr(def->name, '/')) {
virReportError(VIR_ERR_XML_ERROR,
- _("name %s cannot contain '/'"), def->name);
+ _("name %1$s cannot contain '/'"), def->name);
return NULL;
}
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;
}
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;
}
}
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;
}
}
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;
}
}
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;
}
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;
}
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;
}
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;
}
*/
if ((authdef->authType = virStorageAuthTypeFromString(authtype)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unknown auth type '%s'"), authtype);
+ _("unknown auth type '%1$s'"), authtype);
return NULL;
}
}
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;
}
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;
}
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;
}
/* 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;
}
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;
}
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 {
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;
}
/* 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;
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported device type '%s'"),
+ _("Unsupported device type '%1$s'"),
virDomainChrTypeToString(source->type));
return -1;
}
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported device type '%s'"),
+ _("Unsupported device type '%1$s'"),
virDomainChrTypeToString(source->type));
goto error;
}
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;
}
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",
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",
{
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;
}
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;
}
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;
}
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;
}
/* 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;
}
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;
}
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;
}
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;
}
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);
}
}
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;
}
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;
}
/* 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;
}
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;
}
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;
}
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;
}
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
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;
}
if (unlink(configFile) < 0) {
virReportSystemError(errno,
- _("cannot remove config file '%s'"),
+ _("cannot remove config file '%1$s'"),
configFile);
return -1;
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
}
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;
}
(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;
(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;
if (unlink(path) < 0 && errno != ENOENT) {
virReportSystemError(errno,
- _("Unable to delete %s"), path);
+ _("Unable to delete %1$s"), path);
return -1;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
if (g_mkdir_with_parents(statusDir, 0777) < 0) {
virReportSystemError(errno,
- _("cannot create config directory '%s'"),
+ _("cannot create config directory '%1$s'"),
statusDir);
return -1;
}
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;
}
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;
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;
}
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);
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;
}
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;
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;
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;
}
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;
}
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;
}
if (!def->isephemeral &&
unlink(obj->configFile) < 0 && errno != ENOENT) {
- virReportSystemError(errno, _("cannot unlink '%s'"),
+ virReportSystemError(errno, _("cannot unlink '%1$s'"),
obj->configFile);
return -1;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
}
/* 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
{
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;
}