if (qemuProcessBeginJob(vm, VIR_DOMAIN_JOB_OPERATION_START,
flags) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to start job on VM '%s': %s"),
+ _("Failed to start job on VM '%1$s': %2$s"),
vm->def->name, virGetLastErrorMessage());
goto cleanup;
}
if (qemuDomainObjStart(NULL, driver, vm, flags,
VIR_ASYNC_JOB_START) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to autostart VM '%s': %s"),
+ _("Failed to autostart VM '%1$s': %2$s"),
vm->def->name, virGetLastErrorMessage());
}
if (virFileReadAll(fullpath, 1024*1024*1, &xmlStr) < 0) {
/* Nothing we can do here, skip this one */
virReportSystemError(errno,
- _("Failed to read snapshot file %s"),
+ _("Failed to read snapshot file %1$s"),
fullpath);
continue;
}
if (snapdef == NULL) {
/* Nothing we can do here, skip this one */
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to parse snapshot XML from file '%s'"),
+ _("Failed to parse snapshot XML from file '%1$s'"),
fullpath);
continue;
}
if (cur && snap) {
if (current)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many snapshots claiming to be current for domain %s"),
+ _("Too many snapshots claiming to be current for domain %1$s"),
vm->def->name);
current = snap;
}
}
if (direrr < 0)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to fully read directory %s"),
+ _("Failed to fully read directory %1$s"),
snapDir);
virDomainSnapshotSetCurrent(vm->snapshots, current);
if (virDomainSnapshotUpdateRelations(vm->snapshots) < 0)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Snapshots have inconsistent relations for domain %s"),
+ _("Snapshots have inconsistent relations for domain %1$s"),
vm->def->name);
/* FIXME: qemu keeps internal track of snapshots. We can get access
if (virFileReadAll(fullpath, 1024*1024*1, &xmlStr) < 0) {
/* Nothing we can do here, skip this one */
virReportSystemError(errno,
- _("Failed to read checkpoint file %s"),
+ _("Failed to read checkpoint file %1$s"),
fullpath);
continue;
}
}
if (direrr < 0)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to fully read directory %s"),
+ _("Failed to fully read directory %1$s"),
chkDir);
if (virDomainCheckpointUpdateRelations(vm->checkpoints, ¤t) < 0)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Checkpoints have inconsistent relations for domain %s"),
+ _("Checkpoints have inconsistent relations for domain %1$s"),
vm->def->name);
virDomainCheckpointSetCurrent(vm->checkpoints, current);
goto error;
if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create state dir %s"),
+ virReportSystemError(errno, _("Failed to create state dir %1$s"),
cfg->stateDir);
goto error;
}
if (g_mkdir_with_parents(cfg->libDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create lib dir %s"),
+ virReportSystemError(errno, _("Failed to create lib dir %1$s"),
cfg->libDir);
goto error;
}
if (g_mkdir_with_parents(cfg->cacheDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create cache dir %s"),
+ virReportSystemError(errno, _("Failed to create cache dir %1$s"),
cfg->cacheDir);
goto error;
}
if (g_mkdir_with_parents(cfg->saveDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create save dir %s"),
+ virReportSystemError(errno, _("Failed to create save dir %1$s"),
cfg->saveDir);
goto error;
}
if (g_mkdir_with_parents(cfg->snapshotDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create snapshot dir %s"),
+ virReportSystemError(errno, _("Failed to create snapshot dir %1$s"),
cfg->snapshotDir);
goto error;
}
if (g_mkdir_with_parents(cfg->checkpointDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create checkpoint dir %s"),
+ virReportSystemError(errno, _("Failed to create checkpoint dir %1$s"),
cfg->checkpointDir);
goto error;
}
if (g_mkdir_with_parents(cfg->autoDumpPath, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create dump dir %s"),
+ virReportSystemError(errno, _("Failed to create dump dir %1$s"),
cfg->autoDumpPath);
goto error;
}
if (g_mkdir_with_parents(cfg->channelTargetDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create channel target dir %s"),
+ virReportSystemError(errno, _("Failed to create channel target dir %1$s"),
cfg->channelTargetDir);
goto error;
}
if (g_mkdir_with_parents(cfg->nvramDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create nvram dir %s"),
+ virReportSystemError(errno, _("Failed to create nvram dir %1$s"),
cfg->nvramDir);
goto error;
}
if (g_mkdir_with_parents(cfg->memoryBackingDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create memory backing dir %s"),
+ virReportSystemError(errno, _("Failed to create memory backing dir %1$s"),
cfg->memoryBackingDir);
goto error;
}
if (g_mkdir_with_parents(cfg->slirpStateDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create slirp state dir %s"),
+ virReportSystemError(errno, _("Failed to create slirp state dir %1$s"),
cfg->slirpStateDir);
goto error;
}
if (g_mkdir_with_parents(cfg->passtStateDir, 0777) < 0) {
- virReportSystemError(errno, _("Failed to create passt state dir %s"),
+ virReportSystemError(errno, _("Failed to create passt state dir %1$s"),
cfg->passtStateDir);
goto error;
}
if (virDirCreate(cfg->dbusStateDir, 0770, cfg->user, cfg->group,
VIR_DIR_CREATE_ALLOW_EXIST) < 0) {
- virReportSystemError(errno, _("Failed to create dbus state dir %s"),
+ virReportSystemError(errno, _("Failed to create dbus state dir %1$s"),
cfg->dbusStateDir);
goto error;
}
if (cfg->macFilter) {
if (!(qemu_driver->ebtables = ebtablesContextNew("qemu"))) {
virReportSystemError(errno,
- _("failed to enable mac filter in '%s'"),
+ _("failed to enable mac filter in '%1$s'"),
__FILE__);
goto error;
}
if (chown(cfg->libDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to user %d:%d"),
+ _("unable to set ownership of '%1$s' to user %2$d:%3$d"),
cfg->libDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->saveDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->saveDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->snapshotDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->snapshotDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->checkpointDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->checkpointDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->autoDumpPath, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->autoDumpPath, (int)cfg->user,
(int)cfg->group);
goto error;
if (chown(channeldir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
channeldir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->channelTargetDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->channelTargetDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->nvramDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->nvramDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->memoryBackingDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->memoryBackingDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->slirpStateDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->slirpStateDir, (int)cfg->user,
(int)cfg->group);
goto error;
}
if (chown(cfg->passtStateDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
- _("unable to set ownership of '%s' to %d:%d"),
+ _("unable to set ownership of '%1$s' to %2$d:%3$d"),
cfg->passtStateDir, (int)cfg->user,
(int)cfg->group);
goto error;
if (STRNEQ(root, qemu_driver->embeddedRoot)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Cannot open embedded driver at path '%s', "
- "already open with path '%s'"),
+ _("Cannot open embedded driver at path '%1$s', already open with path '%2$s'"),
root, qemu_driver->embeddedRoot);
return VIR_DRV_OPEN_ERROR;
}
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:
return virHostCPUGetKVMMaxVCPUs();
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown type '%s'"), type);
+ _("unknown type '%1$s'"), type);
return -1;
}
if (sscanf(buf, "%*u %llu", cpudelay) != 1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to parse schedstat info at '%s'"),
+ _("Unable to parse schedstat info at '%1$s'"),
path);
return -1;
}
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching id %d"), id);
+ _("no domain with matching id %1$d"), id);
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 (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), name);
+ _("no domain with matching name '%1$s'"), name);
goto cleanup;
}
keycodes[i]);
if (keycode < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot translate keycode %u of %s codeset to qnum keycode"),
+ _("cannot translate keycode %1$u of %2$s codeset to qnum keycode"),
keycodes[i],
virKeycodeSetTypeToString(codeset));
return -1;
if (unlink(name) < 0) {
virReportSystemError(errno,
- _("Failed to remove managed save file '%s'"),
+ _("Failed to remove managed save file '%1$s'"),
name);
goto cleanup;
}
if (privJobCurrent->stats.dump.status == QEMU_MONITOR_DUMP_STATUS_FAILED) {
if (vm->job->error)
virReportError(VIR_ERR_OPERATION_FAILED,
- _("memory-only dump failed: %s"),
+ _("memory-only dump failed: %1$s"),
vm->job->error);
else
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
if (rc <= 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported dumpformat '%s' "
- "for this QEMU binary"),
+ _("unsupported dumpformat '%1$s' for this QEMU binary"),
dumpformat);
qemuDomainObjExitMonitor(vm);
return -1;
if (dump_flags & VIR_DUMP_MEMORY_ONLY) {
if (!(memory_dump_format = qemuDumpFormatTypeToString(dumpformat))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown dumpformat '%d'"), dumpformat);
+ _("unknown dumpformat '%1$d'"), dumpformat);
goto cleanup;
}
if (VIR_CLOSE(fd) < 0) {
virReportSystemError(errno,
- _("unable to close file %s"),
+ _("unable to close file %1$s"),
path);
goto cleanup;
}
tmp = g_strdup_printf("%s/qemu.screendump.XXXXXX", priv->libDir);
if ((tmp_fd = g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)) == -1) {
- virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"), tmp);
+ virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"), tmp);
goto endjob;
}
unlink_tmp = true;
qemuDomainObjExitMonitor(vm);
if (VIR_CLOSE(tmp_fd) < 0) {
- virReportSystemError(errno, _("unable to close %s"), tmp);
+ virReportSystemError(errno, _("unable to close %1$s"), tmp);
goto endjob;
}
if (nvcpus > virDomainDefGetVcpus(vm->def)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("requested vcpu count is greater than the count "
- "of enabled vcpus in the domain: %d > %d"),
+ _("requested vcpu count is greater than the count of enabled vcpus in the domain: %1$d > %2$d"),
nvcpus, virDomainDefGetVcpus(vm->def));
goto cleanup;
}
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));
goto cleanup;
}
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 (!(iothrid = virDomainIOThreadIDFind(def, iothread_id))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("iothread %d not found"), iothread_id);
+ _("iothread %1$d not found"), iothread_id);
goto endjob;
}
goto endjob;
if (virDomainCgroupSetupCpusetCpus(cgroup_iothread, pcpumap) < 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("failed to set cpuset.cpus in cgroup"
- " for iothread %d"), iothread_id);
+ _("failed to set cpuset.cpus in cgroup for iothread %1$d"),
+ iothread_id);
goto endjob;
}
}
if (!(iothrid = virDomainIOThreadIDFind(persistentDef, iothread_id))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("iothreadid %d not found"), iothread_id);
+ _("iothreadid %1$d not found"), iothread_id);
goto endjob;
}
if (new_niothreads != exp_niothreads) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("got wrong number of IOThread ids from QEMU monitor. "
- "got %d, wanted %d"),
+ _("got wrong number of IOThread ids from QEMU monitor. got %1$d, wanted %2$d"),
new_niothreads, exp_niothreads);
goto cleanup;
}
if (idx == new_niothreads) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find new IOThread '%u' in QEMU monitor."),
+ _("cannot find new IOThread '%1$u' in QEMU monitor."),
iothread_id);
goto cleanup;
}
if (new_niothreads != exp_niothreads) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("got wrong number of IOThread ids from QEMU monitor. "
- "got %d, wanted %d"),
+ _("got wrong number of IOThread ids from QEMU monitor. got %1$d, wanted %2$d"),
new_niothreads, exp_niothreads);
goto cleanup;
}
if (iothread->set_poll_max_ns && iothread->poll_max_ns > INT_MAX) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("poll-max-ns (%llu) must be less than or equal to %d"),
+ _("poll-max-ns (%1$llu) must be less than or equal to %2$d"),
iothread->poll_max_ns, INT_MAX);
return -1;
}
if (iothread->set_poll_grow && iothread->poll_grow > INT_MAX) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("poll-grow (%u) must be less than or equal to %d"),
+ _("poll-grow (%1$u) must be less than or equal to %2$d"),
iothread->poll_grow, INT_MAX);
return -1;
}
if (iothread->set_poll_shrink && iothread->poll_shrink > INT_MAX) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("poll-shrink (%u) must be less than or equal to %d"),
+ _("poll-shrink (%1$u) must be less than or equal to %2$d"),
iothread->poll_shrink, INT_MAX);
return -1;
}
if (iothread->set_thread_pool_min && iothread->thread_pool_min < -1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("thread_pool_min (%d) must be equal to or greater than -1"),
+ _("thread_pool_min (%1$d) must be equal to or greater than -1"),
iothread->thread_pool_min);
return -1;
}
if (iothread->set_thread_pool_max &&
(iothread->thread_pool_max < -1 || iothread->thread_pool_max == 0)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("thread_pool_max (%d) must be a positive number or -1"),
+ _("thread_pool_max (%1$d) must be a positive number or -1"),
iothread->thread_pool_max);
return -1;
}
if (iothread.set_thread_pool_min) {
if (live && iothread.thread_pool_min < 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("thread_pool_min (%d) must be equal to or greater than 0 for live change"),
+ _("thread_pool_min (%1$d) must be equal to or greater than 0 for live change"),
iothread.thread_pool_min);
return -1;
}
if (iothread.set_thread_pool_max) {
if (live && iothread.thread_pool_max < 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("thread_pool_max (%d) must be equal to or greater than 0 for live change"),
+ _("thread_pool_max (%1$d) must be equal to or greater than 0 for live change"),
iothread.thread_pool_max);
return -1;
}
if (thread_pool_min > thread_pool_max) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("thread_pool_min (%d) can't be greater than thread_pool_max (%d)"),
+ _("thread_pool_min (%1$d) can't be greater than thread_pool_max (%2$d)"),
thread_pool_min, thread_pool_max);
return -1;
}
if (!iothreaddef) {
virReportError(VIR_ERR_INVALID_ARG,
- _("cannot find IOThread '%u' in iothreadids"),
+ _("cannot find IOThread '%1$u' in iothreadids"),
iothread.iothread_id);
goto endjob;
}
if (!iothreaddef) {
virReportError(VIR_ERR_INVALID_ARG,
- _("cannot find IOThread '%u' in iothreadids"),
+ _("cannot find IOThread '%1$u' in iothreadids"),
iothread.iothread_id);
goto endjob;
}
if (virStrcpy(secmodel->model, caps->host.secModels[0].model,
VIR_SECURITY_MODEL_BUFLEN) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("security model string exceeds max %d bytes"),
+ _("security model string exceeds max %1$d bytes"),
VIR_SECURITY_MODEL_BUFLEN - 1);
return -1;
}
if (virStrcpy(secmodel->doi, caps->host.secModels[0].doi,
VIR_SECURITY_DOI_BUFLEN) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("security DOI string exceeds max %d bytes"),
+ _("security DOI string exceeds max %1$d bytes"),
VIR_SECURITY_DOI_BUFLEN - 1);
return -1;
}
goto cleanup;
if (lseek(fd, 0, SEEK_SET) != 0) {
- virReportSystemError(errno, _("cannot seek in '%s'"), path);
+ virReportSystemError(errno, _("cannot seek in '%1$s'"), path);
goto cleanup;
}
goto cleanup;
if (VIR_CLOSE(fd) < 0) {
- virReportSystemError(errno, _("failed to write header data to '%s'"), path);
+ virReportSystemError(errno, _("failed to write header data to '%1$s'"), path);
goto cleanup;
}
virUUIDFormat(vm->def->uuid, vm_uuidstr);
virUUIDFormat(def->uuid, def_uuidstr);
virReportError(VIR_ERR_OPERATION_FAILED,
- _("cannot restore domain '%s' uuid %s from a file"
- " which belongs to domain '%s' uuid %s"),
+ _("cannot restore domain '%1$s' uuid %2$s from a file which belongs to domain '%3$s' uuid %4$s"),
vm->def->name, vm_uuidstr,
def->name, def_uuidstr);
goto cleanup;
if (STRNEQ(format, QEMU_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported config type %s"), format);
+ _("unsupported config type %1$s"), format);
return NULL;
}
if (force_boot) {
if (unlink(managed_save) < 0) {
virReportSystemError(errno,
- _("cannot remove managed save file %s"),
+ _("cannot remove managed save file %1$s"),
managed_save);
return ret;
}
(nsnapshots = virDomainSnapshotObjListNum(vm->snapshots, NULL, 0))) {
if (!(flags & VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA)) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("cannot delete inactive domain with %d "
- "snapshots"),
+ _("cannot delete inactive domain with %1$d snapshots"),
nsnapshots);
goto endjob;
}
NULL, flags)) > 0) {
if (!(flags & VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA)) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("cannot delete inactive domain with %d "
- "checkpoints"),
+ _("cannot delete inactive domain with %1$d checkpoints"),
ncheckpoints);
goto endjob;
}
if ((flags & VIR_DOMAIN_UNDEFINE_NVRAM)) {
if (unlink(nvram_path) < 0) {
virReportSystemError(errno,
- _("failed to remove nvram: %s"),
+ _("failed to remove nvram: %1$s"),
nvram_path);
goto endjob;
}
case VIR_DOMAIN_DEVICE_CRYPTO:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("live attach of device '%s' is not supported"),
+ _("live attach of device '%1$s' is not supported"),
virDomainDeviceTypeToString(dev->type));
break;
}
if (!(orig_disk = virDomainDiskByTarget(vm->def, disk->dst))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("disk '%s' not found"), disk->dst);
+ _("disk '%1$s' not found"), disk->dst);
return -1;
}
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
case VIR_DOMAIN_MEMORY_MODEL_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory of model '%s'"),
+ _("cannot modify memory of model '%1$s'"),
virDomainMemoryModelTypeToString(oldDef->model));
return false;
break;
if (oldDef->model != newDef->model) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory model from '%s' to '%s'"),
+ _("cannot modify memory model from '%1$s' to '%2$s'"),
virDomainMemoryModelTypeToString(oldDef->model),
virDomainMemoryModelTypeToString(newDef->model));
return false;
if (oldDef->access != newDef->access) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory access from '%s' to '%s'"),
+ _("cannot modify memory access from '%1$s' to '%2$s'"),
virDomainMemoryAccessTypeToString(oldDef->access),
virDomainMemoryAccessTypeToString(newDef->access));
return false;
if (oldDef->discard != newDef->discard) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory discard from '%s' to '%s'"),
+ _("cannot modify memory discard from '%1$s' to '%2$s'"),
virTristateBoolTypeToString(oldDef->discard),
virTristateBoolTypeToString(newDef->discard));
return false;
if (oldDef->pagesize != newDef->pagesize) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory pagesize from '%llu' to '%llu'"),
+ _("cannot modify memory pagesize from '%1$llu' to '%2$llu'"),
oldDef->pagesize,
newDef->pagesize);
return false;
if (STRNEQ_NULLABLE(oldDef->nvdimmPath, newDef->nvdimmPath)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory path from '%s' to '%s'"),
+ _("cannot modify memory path from '%1$s' to '%2$s'"),
NULLSTR(oldDef->nvdimmPath),
NULLSTR(newDef->nvdimmPath));
return false;
if (oldDef->alignsize != newDef->alignsize) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory align size from '%llu' to '%llu'"),
+ _("cannot modify memory align size from '%1$llu' to '%2$llu'"),
oldDef->alignsize, newDef->alignsize);
return false;
}
if (oldDef->nvdimmPmem != newDef->nvdimmPmem) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory pmem from '%d' to '%d'"),
+ _("cannot modify memory pmem from '%1$d' to '%2$d'"),
oldDef->nvdimmPmem, newDef->nvdimmPmem);
return false;
}
if (oldDef->targetNode != newDef->targetNode) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory targetNode from '%d' to '%d'"),
+ _("cannot modify memory targetNode from '%1$d' to '%2$d'"),
oldDef->targetNode, newDef->targetNode);
return false;
}
if (oldDef->size != newDef->size) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory size from '%llu' to '%llu'"),
+ _("cannot modify memory size from '%1$llu' to '%2$llu'"),
oldDef->size, newDef->size);
return false;
}
if (oldDef->labelsize != newDef->labelsize) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory label size from '%llu' to '%llu'"),
+ _("cannot modify memory label size from '%1$llu' to '%2$llu'"),
oldDef->labelsize, newDef->labelsize);
return false;
}
if (oldDef->blocksize != newDef->blocksize) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("cannot modify memory block size from '%llu' to '%llu'"),
+ _("cannot modify memory block size from '%1$llu' to '%2$llu'"),
oldDef->blocksize, newDef->blocksize);
return false;
}
oldDef = virDomainMemoryFindByDeviceInfo(vm->def, &dev->data.memory->info, NULL);
if (!oldDef) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("memory '%s' not found"), dev->data.memory->info.alias);
+ _("memory '%1$s' not found"), dev->data.memory->info.alias);
return -1;
}
case VIR_DOMAIN_DEVICE_CRYPTO:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("live update of device '%s' is not supported"),
+ _("live update of device '%1$s' is not supported"),
virDomainDeviceTypeToString(dev->type));
return -1;
}
disk = dev->data.disk;
if (virDomainDiskIndexByName(vmdef, disk->dst, true) >= 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("target %s already exists"), disk->dst);
+ _("target %1$s already exists"), disk->dst);
return -1;
}
if (virDomainDiskTranslateSourcePool(disk) < 0)
lease = dev->data.lease;
if (virDomainLeaseIndex(vmdef, lease) >= 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("Lease %s in lockspace %s already exists"),
+ _("Lease %1$s in lockspace %2$s already exists"),
lease->key, NULLSTR(lease->lockspace));
return -1;
}
virDomainControllerFind(vmdef, controller->type,
controller->idx) >= 0) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("controller index='%d' already exists"),
+ _("controller index='%1$d' already exists"),
controller->idx);
return -1;
}
case VIR_DOMAIN_DEVICE_CRYPTO:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("persistent attach of device '%s' is not supported"),
+ _("persistent attach of device '%1$s' is not supported"),
virDomainDeviceTypeToString(dev->type));
return -1;
}
disk = dev->data.disk;
if (!(det_disk = virDomainDiskRemoveByName(vmdef, disk->dst))) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no target device %s"), disk->dst);
+ _("no target device %1$s"), disk->dst);
return -1;
}
virDomainDiskDefFree(det_disk);
lease = dev->data.lease;
if (!(det_lease = virDomainLeaseRemove(vmdef, lease))) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("Lease %s in lockspace %s does not exist"),
+ _("Lease %1$s in lockspace %2$s does not exist"),
lease->key, NULLSTR(lease->lockspace));
return -1;
}
case VIR_DOMAIN_DEVICE_CRYPTO:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("persistent detach of device '%s' is not supported"),
+ _("persistent detach of device '%1$s' is not supported"),
virDomainDeviceTypeToString(dev->type));
return -1;
}
newDisk = dev->data.disk;
if ((pos = virDomainDiskIndexByName(vmdef, newDisk->dst, false)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("target %s doesn't exist."), newDisk->dst);
+ _("target %1$s doesn't exist."), newDisk->dst);
return -1;
}
pos = qemuDomainFindGraphicsIndex(vmdef, newGraphics);
if (pos < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("cannot find existing graphics type '%s' device to modify"),
+ _("cannot find existing graphics type '%1$s' device to modify"),
virDomainGraphicsTypeToString(newGraphics->type));
return -1;
}
case VIR_DOMAIN_DEVICE_CRYPTO:
case VIR_DOMAIN_DEVICE_LAST:
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("persistent update of device '%s' is not supported"),
+ _("persistent update of device '%1$s' is not supported"),
virDomainDeviceTypeToString(dev->type));
return -1;
}
if (autostart) {
if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) {
virReportSystemError(errno,
- _("cannot create autostart directory %s"),
+ _("cannot create autostart directory %1$s"),
cfg->autostartDir);
goto endjob;
}
if (symlink(configFile, autostartLink) < 0) {
virReportSystemError(errno,
- _("Failed to create symlink '%s' to '%s'"),
+ _("Failed to create symlink '%1$s' to '%2$s'"),
autostartLink, configFile);
goto endjob;
}
errno != ENOENT &&
errno != ENOTDIR) {
virReportSystemError(errno,
- _("Failed to delete symlink '%s'"),
+ _("Failed to delete symlink '%1$s'"),
autostartLink);
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;
}
#define SCHED_RANGE_CHECK(VAR, NAME, MIN, MAX) \
if (((VAR) > 0 && (VAR) < (MIN)) || (VAR) > (MAX)) { \
virReportError(VIR_ERR_INVALID_ARG, \
- _("value of '%s' is out of range [%lld, %lld]"), \
+ _("value of '%1$s' is out of range [%2$lld, %3$lld]"), \
NAME, MIN, MAX); \
rc = -1; \
goto endjob; \
if ((flags & VIR_DOMAIN_BLOCK_RESIZE_BYTES) == 0) {
if (size > ULLONG_MAX / 1024) {
virReportError(VIR_ERR_OVERFLOW,
- _("size must be less than %llu"),
+ _("size must be less than %1$llu"),
ULLONG_MAX / 1024);
return -1;
}
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("disk '%s' was not found in the domain config"), path);
+ _("disk '%1$s' was not found in the domain config"), path);
goto endjob;
}
if (virStorageSourceIsEmpty(disk->src) || disk->src->readonly) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("can't resize empty or readonly disk '%s'"),
+ _("can't resize empty or readonly disk '%1$s'"),
disk->dst);
goto endjob;
}
if (*path) {
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
- virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %s"), path);
+ virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %1$s"), path);
return -1;
}
if (!entryname) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing disk device alias name for %s"), disk->dst);
+ _("missing disk device alias name for %1$s"), disk->dst);
return -1;
}
}
if (!(stats = virHashLookup(blockstats, entryname))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find statistics for device '%s'"), entryname);
+ _("cannot find statistics for device '%1$s'"), entryname);
return -1;
}
if (!(stats = virHashLookup(blockstats, entryname))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find statistics for device '%s'"), entryname);
+ _("cannot find statistics for device '%1$s'"), entryname);
return -1;
}
long long tmp; \
if (VIR_ASSIGN_IS_OVERFLOW(tmp, (blockstats->VAR))) { \
virReportError(VIR_ERR_OVERFLOW, \
- _("value of '%s' is too large"), NAME); \
+ _("value of '%1$s' is too large"), NAME); \
goto endjob; \
} \
if (virTypedParameterAssign(params + nstats, NAME, \
if (!qosSupported) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("setting bandwidth on interfaces of "
- "type '%s' is not implemented yet"),
+ _("setting bandwidth on interfaces of type '%1$s' is not implemented yet"),
virDomainNetTypeToString(actualType));
goto endjob;
}
virMacAddrFormat(&net->mac, ifmac);
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("Invalid use of 'floor' on interface with MAC address %s "
- "- 'floor' is only supported for interface type 'network' with forward type 'nat', 'route', 'open' or none"),
+ _("Invalid use of 'floor' on interface with MAC address %1$s - 'floor' is only supported for interface type 'network' with forward type 'nat', 'route', 'open' or none"),
ifmac);
goto endjob;
}
if (disk->src->format != VIR_STORAGE_FILE_RAW) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("peeking is only supported for disk with 'raw' format not '%s'"),
+ _("peeking is only supported for disk with 'raw' format not '%1$s'"),
virStorageFileFormatTypeToString(disk->src->format));
goto cleanup;
}
if ((nread = virStorageSourceRead(disk->src, offset, size, &tmpbuf)) < 0) {
if (nread == -2) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("storage file reading is not supported for "
- "storage type %s (protocol: %s)"),
+ _("storage file reading is not supported for storage type %1$s (protocol: %2$s)"),
virStorageTypeToString(disk->src->type),
virStorageNetProtocolTypeToString(disk->src->protocol));
}
if (nread < size) {
virReportError(VIR_ERR_INVALID_ARG,
- _("'%s' starting from %llu has only %zd bytes available"),
+ _("'%1$s' starting from %2$llu has only %3$zd bytes available"),
path, offset, nread);
goto cleanup;
}
/* Create a temporary filename. */
if ((fd = g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)) == -1) {
virReportSystemError(errno,
- _("g_mkstemp(\"%s\") failed"), tmp);
+ _("g_mkstemp(\"%1$s\") failed"), tmp);
goto endjob;
}
/* Read the memory file into buffer. */
if (saferead(fd, buffer, size) == (ssize_t)-1) {
virReportSystemError(errno,
- _("failed to read temporary file "
- "created with template %s"), tmp);
+ _("failed to read temporary file created with template %1$s"),
+ tmp);
goto endjob;
}
return -1;
if (fstat(*ret_fd, ret_sb) < 0) {
- virReportSystemError(errno, _("cannot stat file '%s'"), src->path);
+ virReportSystemError(errno, _("cannot stat file '%1$s'"), src->path);
VIR_FORCE_CLOSE(*ret_fd);
return -1;
}
if (virStorageSourceStat(src, ret_sb) < 0) {
virStorageSourceDeinit(src);
- virReportSystemError(errno, _("failed to stat remote file '%s'"),
+ virReportSystemError(errno, _("failed to stat remote file '%1$s'"),
NULLSTR(src->path));
return -1;
}
if (virStorageSourceIsLocalStorage(src)) {
if ((len = virFileReadHeaderFD(fd, VIR_STORAGE_MAX_HEADER, &buf)) < 0) {
- virReportSystemError(errno, _("cannot read header '%s'"),
+ virReportSystemError(errno, _("cannot read header '%1$s'"),
src->path);
goto cleanup;
}
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid path %s not assigned to domain"), path);
+ _("invalid path %1$s not assigned to domain"), path);
goto endjob;
}
if (virStorageSourceIsEmpty(disk->src)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("disk '%s' does not currently have a source assigned"),
+ _("disk '%1$s' does not currently have a source assigned"),
path);
goto endjob;
}
if (virLockManagerPluginUsesState(driver->lockManager)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Cannot use migrate v2 protocol with lock manager %s"),
+ _("Cannot use migrate v2 protocol with lock manager %1$s"),
virLockManagerPluginGetName(driver->lockManager));
return -1;
}
if (virLockManagerPluginUsesState(driver->lockManager)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Cannot use migrate v2 protocol with lock manager %s"),
+ _("Cannot use migrate v2 protocol with lock manager %1$s"),
virLockManagerPluginGetName(driver->lockManager));
return -1;
}
if (virLockManagerPluginUsesState(driver->lockManager)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Cannot use migrate v2 protocol with lock manager %s"),
+ _("Cannot use migrate v2 protocol with lock manager %1$s"),
virLockManagerPluginGetName(driver->lockManager));
goto cleanup;
}
vm = virDomainObjListFindByName(driver->domains, dname);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), dname);
+ _("no domain with matching name '%1$s'"), dname);
qemuMigrationDstErrorReport(driver, dname);
return NULL;
}
vm = virDomainObjListFindByName(driver->domains, dname);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), dname);
+ _("no domain with matching name '%1$s'"), dname);
qemuMigrationDstErrorReport(driver, dname);
return NULL;
}
vm = virDomainObjListFindByName(driver->domains, dname);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), dname);
+ _("no domain with matching name '%1$s'"), dname);
qemuMigrationDstErrorReport(driver, dname);
return NULL;
}
* the previously supported 'kvm' driver is provided below. */
if (STRNEQ(driverName, "vfio") && STRNEQ(driverName, "kvm")) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown driver name '%s'"), driverName);
+ _("unknown driver name '%1$s'"), driverName);
return -1;
}
if (!hvCPU || hvCPU->fallback != VIR_CPU_FALLBACK_FORBID) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("QEMU '%s' does not support reporting CPU model for "
- "virttype '%s'"),
+ _("QEMU '%1$s' does not support reporting CPU model for virttype '%2$s'"),
virQEMUCapsGetBinary(qemuCaps),
virDomainVirtTypeToString(virttype));
goto cleanup;
hvCPU, cpu, failIncompatible);
} else {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("comparing with the hypervisor CPU is not supported "
- "for arch %s"), virArchToString(arch));
+ _("comparing with the hypervisor CPU is not supported for arch %1$s"),
+ virArchToString(arch));
}
cleanup:
for (i = 0; i < ncpus; i++) {
if (!cpus[i]) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid CPU definition at index %zu"), i);
+ _("invalid CPU definition at index %1$zu"), i);
return NULL;
}
if (!cpus[i]->model) {
virReportError(VIR_ERR_INVALID_ARG,
- _("no CPU model specified at index %zu"), i);
+ _("no CPU model specified at index %1$zu"), i);
return NULL;
}
if (!virDomainCapsCPUModelsGet(cpuModels, cpus[i]->model)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("CPU model '%s' not supported by hypervisor"),
+ _("CPU model '%1$s' not supported by hypervisor"),
cpus[i]->model);
return NULL;
}
if (!(cpuModels = virQEMUCapsGetCPUModels(qemuCaps, virttype, NULL, NULL)) ||
cpuModels->nmodels == 0) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("QEMU '%s' does not support any CPU models for "
- "virttype '%s'"),
+ _("QEMU '%1$s' does not support any CPU models for virttype '%2$s'"),
virQEMUCapsGetBinary(qemuCaps),
virDomainVirtTypeToString(virttype));
goto cleanup;
goto cleanup;
} else {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("computing baseline hypervisor CPU is not supported "
- "for arch %s"), virArchToString(arch));
+ _("computing baseline hypervisor CPU is not supported for arch %1$s"),
+ virArchToString(arch));
goto cleanup;
}
case QEMU_MONITOR_DUMP_STATUS_FAILED:
case QEMU_MONITOR_DUMP_STATUS_LAST:
virReportError(VIR_ERR_OPERATION_FAILED,
- _("dump query failed, status=%d"),
+ _("dump query failed, status=%1$d"),
privJob->stats.dump.status);
return -1;
break;
if (bandwidth > max) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu"), max + 1);
+ _("bandwidth must be less than %1$llu"), max + 1);
goto cleanup;
}
if (bw > ULONG_MAX) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth %llu is greater than %lu which is the "
- "maximum value supported by this API"),
+ _("bandwidth %1$llu is greater than %2$lu which is the maximum value supported by this API"),
bw, ULONG_MAX);
goto cleanup;
}
if (!snap->def->parent_name) {
virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
- _("snapshot '%s' does not have a parent"),
+ _("snapshot '%1$s' does not have a parent"),
snap->def->name);
goto cleanup;
}
if (!chk->def->parent_name) {
virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT,
- _("checkpoint '%s' does not have a parent"),
+ _("checkpoint '%1$s' does not have a parent"),
chk->def->name);
goto cleanup;
}
if (!chr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find character device %s"),
+ _("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;
}
if (!chr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find channel %s"),
+ _("cannot find channel %1$s"),
NULLSTR(name));
goto cleanup;
}
if (chr->source->type != VIR_DOMAIN_CHR_TYPE_UNIX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("channel %s is not using a UNIX socket"),
+ _("channel %1$s is not using a UNIX socket"),
name ? name : NULLSTR(chr->info.alias));
goto cleanup;
}
if (!(flags & VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES)) {
if (speed > LLONG_MAX >> 20) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu"),
+ _("bandwidth must be less than %1$llu"),
LLONG_MAX >> 20);
goto endjob;
}
if (!(job = qemuBlockJobDiskGetJob(disk))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("disk %s does not have an active block job"), disk->dst);
+ _("disk %1$s does not have an active block job"), disk->dst);
goto endjob;
}
if (job->state == QEMU_BLOCKJOB_STATE_ABORTING ||
job->state == QEMU_BLOCKJOB_STATE_PIVOTING) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("block job on disk '%s' is still being ended"),
+ _("block job on disk '%1$s' is still being ended"),
disk->dst);
goto endjob;
}
job->state == QEMU_BLOCKJOB_STATE_FAILED) {
if (job->errmsg) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("block job '%s' failed while pivoting: %s"),
+ _("block job '%1$s' failed while pivoting: %2$s"),
job->name, job->errmsg);
} else {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("block job '%s' failed while pivoting"),
+ _("block job '%1$s' failed while pivoting"),
job->name);
}
info->bandwidth = rawInfo->bandwidth;
if (info->bandwidth != rawInfo->bandwidth) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth %llu cannot be represented in result"),
+ _("bandwidth %1$llu cannot be represented in result"),
rawInfo->bandwidth);
return -1;
}
if (!(flags & VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES)) {
if (speed > LLONG_MAX >> 20) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu"),
+ _("bandwidth must be less than %1$llu"),
LLONG_MAX >> 20);
return -1;
}
if (!(job = qemuBlockJobDiskGetJob(disk))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("disk %s does not have an active block job"), disk->dst);
+ _("disk %1$s does not have an active block job"), disk->dst);
goto endjob;
}
if (*reuse || desttype == VIR_STORAGE_TYPE_BLOCK) {
virReportSystemError(errno,
- _("missing destination file for disk %s: %s"),
+ _("missing destination file for disk %1$s: %2$s"),
dst, mirror->path);
return -1;
}
} else {
if (virStorageSourceStat(mirror, &st) < 0) {
virReportSystemError(errno,
- _("unable to stat block copy target '%s'"),
+ _("unable to stat block copy target '%1$s'"),
mirror->path);
return -1;
}
} else {
if (st.st_size && !(*reuse)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("external destination file for disk %s already "
- "exists and is not a block device: %s"),
+ _("external destination file for disk %1$s already exists and is not a block device: %2$s"),
dst, mirror->path);
return -1;
}
if (desttype == VIR_STORAGE_TYPE_BLOCK) {
virReportError(VIR_ERR_INVALID_ARG,
- _("blockdev flag requested for disk %s, but file "
- "'%s' is not a block device"),
+ _("blockdev flag requested for disk %1$s, but file '%2$s' is not a block device"),
dst, mirror->path);
return -1;
}
if (bandwidth > LLONG_MAX) {
virReportError(VIR_ERR_INVALID_ARG,
- _("bandwidth must be less than "
- "'%llu' bytes/s (%llu MiB/s)"),
+ _("bandwidth must be less than '%1$llu' bytes/s (%2$llu MiB/s)"),
LLONG_MAX, LLONG_MAX >> 20);
return -1;
}
* file is not possible */
if (mirror_shallow && !existing && mirror->format == VIR_STORAGE_FILE_RAW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("shallow copy of disk '%s' into a raw file "
- "is not possible"),
+ _("shallow copy of disk '%1$s' into a raw file is not possible"),
disk->dst);
goto endjob;
}
if (!(flags & VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES)) {
if (speed > LLONG_MAX >> 20) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu"),
+ _("bandwidth must be less than %1$llu"),
LLONG_MAX >> 20);
goto cleanup;
}
if (sizeof(unsigned long)< sizeof(bandwidth) &&
param->value.ul > ULONG_MAX * (1ULL << 20)) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu bytes"),
+ _("bandwidth must be less than %1$llu bytes"),
ULONG_MAX * (1ULL << 20));
goto cleanup;
}
if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES)) {
if (speed > LLONG_MAX >> 20) {
virReportError(VIR_ERR_OVERFLOW,
- _("bandwidth must be less than %llu"),
+ _("bandwidth must be less than %1$llu"),
LLONG_MAX >> 20);
goto endjob;
}
if (idx >= vm->def->ngraphics) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("No graphics backend with index %d"), idx);
+ _("No graphics backend with index %1$d"), idx);
goto endjob;
}
switch (vm->def->graphics[idx]->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP:
case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Can only open VNC, SPICE or D-Bus p2p graphics backends, not %s"),
+ _("Can only open VNC, SPICE or D-Bus p2p graphics backends, not %1$s"),
virDomainGraphicsTypeToString(vm->def->graphics[idx]->type));
goto endjob;
case VIR_DOMAIN_GRAPHICS_TYPE_LAST:
if (idx >= vm->def->ngraphics) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("No graphics backend with index %d"), idx);
+ _("No graphics backend with index %1$d"), idx);
goto cleanup;
}
switch (vm->def->graphics[idx]->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP:
case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Can only open VNC, SPICE or D-Bus p2p graphics backends, not %s"),
+ _("Can only open VNC, SPICE or D-Bus p2p graphics backends, not %1$s"),
virDomainGraphicsTypeToString(vm->def->graphics[idx]->type));
goto cleanup;
case VIR_DOMAIN_GRAPHICS_TYPE_LAST:
if (param->value.ul > QEMU_BLOCK_IOTUNE_MAX) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
- _("block I/O throttle limit value must"
- " be no more than %llu"), QEMU_BLOCK_IOTUNE_MAX);
+ _("block I/O throttle limit value must be no more than %1$llu"),
+ QEMU_BLOCK_IOTUNE_MAX);
goto endjob;
}
if (!info.val) { \
if (QEMU_BLOCK_IOTUNE_SET_##_bool) { \
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
- _("cannot reset '%s' when " \
- "'%s' is set"), \
+ _("cannot reset '%1$s' when '%2$s' is set"), \
#val, #val "_max"); \
} else { \
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
- _("value '%s' cannot be set if " \
- "'%s' is not set"), \
+ _("value '%1$s' cannot be set if '%2$s' is not set"), \
#val "_max", #val); \
} \
goto endjob; \
} \
if (info.val##_max < info.val) { \
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
- _("value '%s' cannot be " \
- "smaller than '%s'"), \
+ _("value '%1$s' cannot be smaller than '%2$s'"), \
#val "_max", #val); \
goto endjob; \
} \
if (persistentDef) {
if (!(conf_disk = virDomainDiskByName(persistentDef, path, true))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("missing persistent configuration for disk '%s'"),
+ _("missing persistent configuration for disk '%1$s'"),
path);
goto endjob;
}
if (persistentDef) {
if (!(disk = virDomainDiskByName(persistentDef, path, true))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("disk '%s' was not found in the domain config"),
+ _("disk '%1$s' was not found in the domain config"),
path);
goto endjob;
}
target == VIR_NODE_SUSPEND_TARGET_DISK ||
target == VIR_NODE_SUSPEND_TARGET_HYBRID)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Unknown suspend target: %u"),
+ _("Unknown suspend target: %1$u"),
target);
return -1;
}
if (!(arch = virArchFromString(archName))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("cannot find architecture %s"),
+ _("cannot find architecture %1$s"),
archName);
return -1;
}
if (!hostname) {
virReportError(VIR_ERR_NO_HOSTNAME,
- _("no hostname found for domain %s"),
+ _("no hostname found for domain %1$s"),
vm->def->name);
goto cleanup;
}
if (enforce &&
*stats & ~supportedstats) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
- _("Stats types bits 0x%x are not supported by this daemon or QEMU"),
+ _("Stats types bits 0x%1$x are not supported by this daemon or QEMU"),
*stats & ~supportedstats);
return -1;
}
default:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
- _("Unknown IP address data source %d"),
+ _("Unknown IP address data source %1$d"),
source);
break;
}
if (strchr(new_name, '/')) {
virReportError(VIR_ERR_XML_ERROR,
- _("name %s cannot contain '/'"), new_name);
+ _("name %1$s cannot contain '/'"), new_name);
return -1;
}
if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) {
virReportSystemError(errno,
- _("Failed to create symlink '%s' to '%s'"),
+ _("Failed to create symlink '%1$s' to '%2$s'"),
new_dom_autostart_link, new_dom_cfg_file);
return -1;
}
for (i = 0; i < ninfo; i++) {
if (virBitmapSetBit(vcpus, info[i].id) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("vcpu id '%u' reported by guest agent is out of "
- "range"), info[i].id);
+ _("vcpu id '%1$u' reported by guest agent is out of range"),
+ info[i].id);
goto cleanup;
}
if (!state && !info[i].offlinable) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("vCPU '%u' is not offlinable"), info[i].id);
+ _("vCPU '%1$u' is not offlinable"), info[i].id);
goto endjob;
}
if (!virBitmapIsAllClear(map)) {
char *tmp = virBitmapFormat(map);
virReportError(VIR_ERR_INVALID_ARG,
- _("guest is missing vCPUs '%s'"), NULLSTR(tmp));
+ _("guest is missing vCPUs '%1$s'"), NULLSTR(tmp));
VIR_FREE(tmp);
goto endjob;
}
if (persistentDef) {
if (lastvcpu >= virDomainDefGetVcpusMax(persistentDef)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("vcpu %zd is not present in persistent config"),
+ _("vcpu %1$zd is not present in persistent config"),
lastvcpu);
goto endjob;
}
if (def) {
if (lastvcpu >= virDomainDefGetVcpusMax(def)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("vcpu %zd is not present in live config"),
+ _("vcpu %1$zd is not present in live config"),
lastvcpu);
goto endjob;
}
if (types != *supportedTypes) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported guest information types '0x%x'"),
+ _("unsupported guest information types '0x%1$x'"),
types & ~qemuDomainGetGuestInfoSupportedTypes);
return -1;
}
if (timeout < VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN) {
virReportError(VIR_ERR_INVALID_ARG,
- _("guest agent timeout '%d' is "
- "less than the minimum '%d'"),
+ _("guest agent timeout '%1$d' is less than the minimum '%2$d'"),
timeout, VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN);
return -1;
}
if (seconds < MIN_DIRTYRATE_CALC_PERIOD ||
seconds > MAX_DIRTYRATE_CALC_PERIOD) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("seconds=%d is invalid, please choose value within [%d, %d]."),
+ _("seconds=%1$d is invalid, please choose value within [%2$d, %3$d]."),
seconds,
MIN_DIRTYRATE_CALC_PERIOD,
MAX_DIRTYRATE_CALC_PERIOD);
for (i = 0; i < new->nfds; i++) {
if ((new->fds[i] = dup(fds[i])) < 0) {
virReportSystemError(errno,
- _("failed to duplicate passed fd with index '%zu'"),
+ _("failed to duplicate passed fd with index '%1$zu'"),
i);
goto cleanup;
}