}
if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def) < 0) {
- VIR_ERROR(_("Failed to set security context for agent for %s"),
+ VIR_ERROR(_("Failed to set security context for agent for %1$s"),
vm->def->name);
goto cleanup;
}
}
if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0) {
- VIR_ERROR(_("Failed to clear security context for agent for %s"),
+ VIR_ERROR(_("Failed to clear security context for agent for %1$s"),
vm->def->name);
qemuAgentClose(agent);
goto cleanup;
}
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("no disk found with alias '%s' or id '%s'"),
+ _("no disk found with alias '%1$s' or id '%2$s'"),
NULLSTR(alias), NULLSTR(qomid));
return NULL;
}
qemuMonitor *mon = NULL;
if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def) < 0) {
- VIR_ERROR(_("Failed to set security context for monitor for %s"),
+ VIR_ERROR(_("Failed to set security context for monitor for %1$s"),
vm->def->name);
return -1;
}
priv->mon = mon;
if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0) {
- VIR_ERROR(_("Failed to clear security context for monitor for %s"),
+ VIR_ERROR(_("Failed to clear security context for monitor for %1$s"),
vm->def->name);
return -1;
}
* pty path for this chardev, report an error
*/
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("no assigned pty for device %s"), id);
+ _("no assigned pty for device %1$s"), id);
return -1;
} else {
/* 'info chardev' had no pty path for this chardev,
if (!(prManagerInfo = virHashLookup(info, managedAlias))) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("missing info on pr-manager %s"),
+ _("missing info on pr-manager %1$s"),
managedAlias);
return -1;
}
if (niothreads != vm->def->niothreadids) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("got wrong number of IOThread pids from QEMU monitor. "
- "got %d, wanted %zu"),
+ _("got wrong number of IOThread pids from QEMU monitor. got %1$d, wanted %2$zu"),
niothreads, vm->def->niothreadids);
goto cleanup;
}
if (!(iothrid = virDomainIOThreadIDFind(vm->def,
iothreads[i]->iothread_id))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("iothread %d not found"),
+ _("iothread %1$d not found"),
iothreads[i]->iothread_id);
goto cleanup;
}
VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN);
if (rv < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Couldn't set link state on interface: %s"),
+ _("Couldn't set link state on interface: %1$s"),
def->nets[i]->info.alias);
goto cleanup;
}
cfg = virQEMUDriverGetConfig(driver);
if (!virFileIsExecutable(cfg->prHelperName)) {
- virReportSystemError(errno, _("'%s' is not a suitable pr helper"),
+ virReportSystemError(errno, _("'%1$s' is not a suitable pr helper"),
cfg->prHelperName);
goto cleanup;
}
if (unlink(socketPath) < 0 &&
errno != ENOENT) {
virReportSystemError(errno,
- _("Unable to remove stale socket path: %s"),
+ _("Unable to remove stale socket path: %1$s"),
socketPath);
goto cleanup;
}
if (virPidFileReadPath(pidfile, &cpid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("pr helper %s didn't show up"),
+ _("pr helper %1$s didn't show up"),
cfg->prHelperName);
goto cleanup;
}
if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) {
virReportSystemError(errno,
- _("pr helper %s died unexpectedly"),
+ _("pr helper %1$s died unexpectedly"),
cfg->prHelperName);
} else {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("pr helper died and reported: %s"), errbuf);
+ _("pr helper died and reported: %1$s"), errbuf);
}
goto cleanup;
}
if (g_mkdir_with_parents(path, 0700) < 0) {
virReportSystemError(errno,
- _("Unable to create %s"),
+ _("Unable to create %1$s"),
path);
return -1;
}
if (unlink(path) < 0 &&
errno != ENOENT) {
- virReportSystemError(errno, _("Unable to remove %s"), path);
+ virReportSystemError(errno, _("Unable to remove %1$s"), path);
return -1;
}
continue;
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("host doesn't support hyperv stimer '%s' feature"),
+ _("host doesn't support hyperv stimer '%1$s' feature"),
"direct");
return -1;
}
case VIR_DOMAIN_HYPERV_EVMCS:
case VIR_DOMAIN_HYPERV_AVIC:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("host doesn't support hyperv '%s' feature"),
+ _("host doesn't support hyperv '%1$s' feature"),
virDomainHypervTypeToString(i));
return -1;
if ((r = saferead(data->srcFD, buf, sizeof(buf))) < 0) {
virReportSystemError(errno,
- _("Unable to read from file '%s'"),
+ _("Unable to read from file '%1$s'"),
data->srcPath);
return -2;
}
if (safewrite(dstFD, buf, r) < 0) {
virReportSystemError(errno,
- _("Unable to write to file '%s'"),
+ _("Unable to write to file '%1$s'"),
dstPath);
return -1;
}
if (!loader->nvramTemplate) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("unable to find any master var store for "
- "loader: %s"), loader->path);
+ _("unable to find any master var store for loader: %1$s"),
+ loader->path);
return -1;
}
if ((srcFD = virFileOpenAs(loader->nvramTemplate, O_RDONLY,
0, -1, -1, 0)) < 0) {
virReportSystemError(-srcFD,
- _("Failed to open file '%s'"),
+ _("Failed to open file '%1$s'"),
loader->nvramTemplate);
return -1;
}
ipdef = virNetworkDefGetIPByIndex(netdef, AF_UNSPEC, 0);
if (!ipdef) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' doesn't have an IP address"),
+ _("network '%1$s' doesn't have an IP address"),
netdef->name);
return -1;
}
if (!dev_name) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' has no associated interface or bridge"),
+ _("network '%1$s' has no associated interface or bridge"),
netdef->name);
return -1;
}
const char *path)
{
if (g_mkdir_with_parents(path, 0750) < 0) {
- virReportSystemError(errno, _("Cannot create directory '%s'"), path);
+ virReportSystemError(errno, _("Cannot create directory '%1$s'"), path);
return -1;
}
if (strchr(shmem->name, '/')) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("shmem name '%s' must not contain '/'"),
+ _("shmem name '%1$s' must not contain '/'"),
shmem->name);
return -1;
}
}
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Requested TSC frequency %llu Hz is outside tolerance "
- "range ([%llu, %llu] Hz) around host frequency %llu Hz "
- "and TSC scaling is not supported by the host CPU"),
+ _("Requested TSC frequency %1$llu Hz is outside tolerance range ([%2$llu, %3$llu] Hz) around host frequency %4$llu Hz and TSC scaling is not supported by the host CPU"),
freq, minFreq, maxFreq, tsc->frequency);
return -1;
}
str = g_strjoinv(", ", features);
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Some features cannot be reliably used "
- "with this QEMU: %s"), str);
+ _("Some features cannot be reliably used with this QEMU: %1$s"), str);
return -1;
}
}
for (next = cfg->capabilityfilters; *next; next++) {
if ((tmp = virQEMUCapsTypeFromString(*next)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid capability_filters capability '%s'"),
+ _("invalid capability_filters capability '%1$s'"),
*next);
return -1;
}
for (next = nsdef->capsadd; next && *next; next++) {
if ((tmp = virQEMUCapsTypeFromString(*next)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid qemu namespace capability '%s'"),
+ _("invalid qemu namespace capability '%1$s'"),
*next);
return -1;
}
for (next = nsdef->capsdel; next && *next; next++) {
if ((tmp = virQEMUCapsTypeFromString(*next)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid qemu namespace capability '%s'"),
+ _("invalid qemu namespace capability '%1$s'"),
*next);
return -1;
}
if (virDomainHostdevFind(def, hostdev, NULL) >= 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("PCI device %04x:%02x:%02x.%x "
- "allocated from network %s is already "
- "in use by domain %s"),
+ _("PCI device %1$04x:%2$02x:%3$02x.%4$x allocated from network %5$s is already in use by domain %6$s"),
pcisrc->addr.domain, pcisrc->addr.bus,
pcisrc->addr.slot, pcisrc->addr.function,
net->data.network.name, def->name);
if (virProcessSchedCoreShareFrom(data->dummypid) < 0) {
virReportSystemError(errno,
- _("unable to share scheduling cookie from %lld"),
+ _("unable to share scheduling cookie from %1$lld"),
(long long) data->dummypid);
return -1;
}
if (virProcessSchedCoreShareTo(data->vcpupid) < 0) {
virReportSystemError(errno,
- _("unable to share scheduling cookie to %lld"),
+ _("unable to share scheduling cookie to %1$lld"),
(long long) data->vcpupid);
return -1;
}
if (vcpupid > 0 &&
virProcessSchedCoreShareTo(vcpupid) < 0) {
virReportSystemError(errno,
- _("unable to share scheduling cookie to %lld"),
+ _("unable to share scheduling cookie to %1$lld"),
(long long) vcpupid);
return -1;
}
if (vcpu->order != 0) {
if (virBitmapIsBitSet(ordermap, vcpu->order)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("duplicate vcpu order '%u'"), vcpu->order);
+ _("duplicate vcpu order '%1$u'"), vcpu->order);
return -1;
}
if (virBitmapSetBit(ordermap, vcpu->order)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("vcpu order '%u' exceeds vcpu count"),
+ _("vcpu order '%1$u' exceeds vcpu count"),
vcpu->order);
return -1;
}
subvcpu->online != vcpu->online ||
subvcpu->order != vcpu->order) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("vcpus '%zu' and '%zu' are in the same hotplug "
- "group but differ in configuration"), i, j);
+ _("vcpus '%1$zu' and '%2$zu' are in the same hotplug group but differ in configuration"),
+ i, j);
return -1;
}
}
vcpupriv->thread_id == -1 && vcpupriv->node_id == -1) ||
!vcpupriv->type) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("vcpu '%zu' is missing hotplug data"), i);
+ _("vcpu '%1$zu' is missing hotplug data"), i);
return -1;
}
}
if (!virQEMUCapsIsCPUModeSupported(qemuCaps, hostarch, def->virtType,
def->cpu->mode, def->os.machine)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("CPU mode '%s' for %s %s domain on %s host is not "
- "supported by hypervisor"),
+ _("CPU mode '%1$s' for %2$s %3$s domain on %4$s host is not supported by hypervisor"),
virCPUModeTypeToString(def->cpu->mode),
virArchToString(def->os.arch),
virDomainVirtTypeToString(def->virtType),
return -1;
if (virFileRewriteStr(configFile, S_IRUSR | S_IWUSR, data) < 0) {
- virReportSystemError(errno, _("failed to write data to config '%s'"),
+ virReportSystemError(errno, _("failed to write data to config '%1$s'"),
configFile);
return -1;
}
case VIR_DOMAIN_CHR_TYPE_LAST:
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported chardev '%s'"),
+ _("unsupported chardev '%1$s'"),
virDomainChrTypeToString(chardev->type));
return -1;
}
if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) {
virReportSystemError(errno,
- _("cannot create log directory %s"),
+ _("cannot create log directory %1$s"),
cfg->logDir);
return -1;
}
if (unlink(priv->pidfile) < 0 &&
errno != ENOENT) {
virReportSystemError(errno,
- _("Cannot remove stale PID file %s"),
+ _("Cannot remove stale PID file %1$s"),
priv->pidfile);
return -1;
}
if (rv == 0) {
if ((rv = virPidFileReadPath(priv->pidfile, &vm->pid)) < 0) {
virReportSystemError(-rv,
- _("Domain %s didn't show up"),
+ _("Domain %1$s didn't show up"),
vm->def->name);
goto cleanup;
}
if (fstat(incoming->fd, &stdin_sb) < 0) {
virReportSystemError(errno,
- _("cannot stat fd %d"), incoming->fd);
+ _("cannot stat fd %1$d"), incoming->fd);
goto cleanup;
}
if (S_ISFIFO(stdin_sb.st_mode) &&
if (!priv->qemuCaps) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("domain '%s' has no capabilities recorded"),
+ _("domain '%1$s' has no capabilities recorded"),
obj->def->name);
goto error;
}
/* We cannot use the security driver here, but we should not need to. */
if (chown(proc->uniqDir, proc->runUid, -1) < 0) {
virReportSystemError(errno,
- _("Cannot chown uniq path: %s"),
+ _("Cannot chown uniq path: %1$s"),
proc->uniqDir);
return -1;
}
if (!(proc->uniqDir = g_mkdtemp(template))) {
virReportSystemError(errno,
- _("Failed to create unique directory with "
- "template '%s' for probing QEMU"),
+ _("Failed to create unique directory with template '%1$s' for probing QEMU"),
template);
return -1;
}
if (status != 0) {
VIR_DEBUG("QEMU %s exited with status %d", proc->binary, status);
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to start QEMU binary %s for probing: %s"),
+ _("Failed to start QEMU binary %1$s for probing: %2$s"),
proc->binary,
proc->stdErr ? proc->stdErr : _("unknown error"));
return -1;
}
if ((rc = virPidFileReadPath(proc->pidfile, &proc->pid)) < 0) {
- virReportSystemError(-rc, _("Failed to read pidfile %s"), proc->pidfile);
+ virReportSystemError(-rc, _("Failed to read pidfile %1$s"), proc->pidfile);
return -1;
}