if (virStringParseVersion(&version, tmp, true) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to parse cloud-hypervisor version: %s"), tmp);
+ _("Unable to parse cloud-hypervisor version: %1$s"), tmp);
return -1;
}
case VIR_DOMAIN_DEVICE_AUDIO:
case VIR_DOMAIN_DEVICE_CRYPTO:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Cloud-Hypervisor doesn't support '%s' device"),
+ _("Cloud-Hypervisor doesn't support '%1$s' device"),
virDomainDeviceTypeToString(dev->type));
return -1;
if (!vm) {
virUUIDFormat(domain->uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching uuid '%s' (%s)"),
+ _("no domain with matching uuid '%1$s' (%2$s)"),
uuidstr, domain->name);
return NULL;
}
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching id '%d'"), id);
+ _("no domain with matching id '%1$d'"), id);
goto cleanup;
}
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), name);
+ _("no domain with matching name '%1$s'"), name);
goto cleanup;
}
char uuidstr[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching uuid '%s'"), uuidstr);
+ _("no domain with matching uuid '%1$s'"), uuidstr);
goto cleanup;
}
}
if (!chr) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find character device %s"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find character device %1$s"),
NULLSTR(dev_name));
goto cleanup;
}
if (chr->source->type != VIR_DOMAIN_CHR_TYPE_PTY) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("character device %s is not using a PTY"),
+ _("character device %1$s is not using a PTY"),
dev_name ? dev_name : NULLSTR(chr->info.alias));
goto cleanup;
}
case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
case VIR_DRV_FEATURE_FD_PASSING:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Global feature %d should have already been handled"),
+ _("Global feature %1$d should have already been handled"),
feature);
return -1;
case VIR_DRV_FEATURE_MIGRATION_V2:
if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("vcpu %d is out of range of live cpu count %d"),
+ _("vcpu %1$d is out of range of live cpu count %2$d"),
vcpu, virDomainDefGetVcpusMax(def));
return -1;
}
if (persistentDef &&
!(vcpuinfo = virDomainDefGetVcpu(persistentDef, vcpu))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("vcpu %d is out of range of persistent cpu count %d"),
+ _("vcpu %1$d is out of range of persistent cpu count %2$d"),
vcpu, virDomainDefGetVcpus(persistentDef));
goto endjob;
}
if (mode < 0 || mode >= VIR_DOMAIN_NUMATUNE_MEM_LAST) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported numatune mode: '%d'"), mode);
+ _("unsupported numatune mode: '%1$d'"), mode);
goto cleanup;
}
if (virBitmapIsAllClear(nodeset)) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("Invalid nodeset of 'numatune': %s"),
+ _("Invalid nodeset of 'numatune': %1$s"),
param->value.s);
goto cleanup;
}
}
if (diskdef->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Only virtio bus types are supported for '%s'"), diskdef->src->path);
+ _("Only virtio bus types are supported for '%1$s'"),
+ diskdef->src->path);
return -1;
}
if (virJSONValueObjectAppendString(disk, "path", diskdef->src->path) < 0)
if (virSocketAddrPrefixToNetmask(ip->prefix, &netmask, AF_INET) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to translate net prefix %d to netmask"),
+ _("Failed to translate net prefix %1$d to netmask"),
ip->prefix);
return -1;
}
if (netdef->driver.virtio.rx_queue_size || netdef->driver.virtio.tx_queue_size) {
if (netdef->driver.virtio.rx_queue_size != netdef->driver.virtio.tx_queue_size) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("virtio rx_queue_size option %d is not same with tx_queue_size %d"),
+ _("virtio rx_queue_size option %1$d is not same with tx_queue_size %2$d"),
netdef->driver.virtio.rx_queue_size,
netdef->driver.virtio.tx_queue_size);
return -1;
path = g_strdup_printf("/sys/bus/pci/devices/%s/", name);
if (!virFileExists(path)) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("host pci device %s not found"), path);
+ _("host pci device %1$s not found"), path);
return -1;
}
if (virJSONValueObjectAppendString(device, "path", path) < 0)
addr.sun_family = AF_UNIX;
if (virStrcpyStatic(addr.sun_path, socket_path) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("UNIX socket path '%s' too long"),
+ _("UNIX socket path '%1$s' too long"),
socket_path);
goto error;
}
if (unlink(socket_path) < 0 && errno != ENOENT) {
virReportSystemError(errno,
- _("Unable to unlink %s"),
+ _("Unable to unlink %1$s"),
socket_path);
goto error;
}
if (bind(fd, (struct sockaddr *)&addr, addrlen) < 0) {
virReportSystemError(errno,
- _("Unable to bind to UNIX socket path '%s'"),
+ _("Unable to bind to UNIX socket path '%1$s'"),
socket_path);
goto error;
}
if (listen(fd, 1) < 0) {
virReportSystemError(errno,
- _("Unable to listen to UNIX socket path '%s'"),
+ _("Unable to listen to UNIX socket path '%1$s'"),
socket_path);
goto error;
}
mon->socketpath = g_strdup_printf("%s/%s-socket", socketdir, vm->def->name);
if (g_mkdir_with_parents(socketdir, 0777) < 0) {
virReportSystemError(errno,
- _("Cannot create socket directory '%s'"),
+ _("Cannot create socket directory '%1$s'"),
socketdir);
return NULL;
}
socket_fd = chMonitorCreateSocket(mon->socketpath);
if (socket_fd < 0) {
virReportSystemError(errno,
- _("Cannot create socket '%s'"),
+ _("Cannot create socket '%1$s'"),
mon->socketpath);
return NULL;
}
if (errorCode != CURLE_OK) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("curl_easy_perform() returned an error: %s (%d)"),
+ _("curl_easy_perform() returned an error: %1$s (%2$d)"),
curl_easy_strerror(errorCode), errorCode);
return -1;
}
if (errorCode != CURLE_OK) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an "
- "error: %s (%d)"), curl_easy_strerror(errorCode),
+ _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an error: %1$s (%2$d)"),
+ curl_easy_strerror(errorCode),
errorCode);
return -1;
}
dev = virJSONValueObjectGet(config, device);
if (!dev) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing '%s' in 'config' from cloud-hypervisor"),
+ _("missing '%1$s' in 'config' from cloud-hypervisor"),
device);
return;
}
file = virJSONValueObjectGet(dev, "file");
if (!file) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing 'file' in '%s' from cloud-hypervisor"),
+ _("missing 'file' in '%1$s' from cloud-hypervisor"),
device);
return;
}
path = virJSONValueGetString(file);
if (!path) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to parse contents of 'file' field in '%s' from cloud-hypervisor"),
+ _("unable to parse contents of 'file' field in '%1$s' from cloud-hypervisor"),
device);
return;
}