if (!g_path_is_absolute(def->resource->partition)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Resource partition '%s' must start with '/'"),
+ _("Resource partition '%1$s' must start with '/'"),
def->resource->partition);
return NULL;
}
if (virStrToLong_i(buf, NULL, 10, &v) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Malformed ctrl-alt-del setting '%s'"), buf);
+ _("Malformed ctrl-alt-del setting '%1$s'"), buf);
return -1;
}
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
for (i = 1; i < nttyPaths; i++) {
if (!STRPREFIX(ttyPaths[i], "/dev/")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expected a /dev path for '%s'"),
+ _("Expected a /dev path for '%1$s'"),
ttyPaths[i]);
return NULL;
}
if (newfd < 0) {
virReportSystemError(errno,
- _("Cannot move fd %d out of the way"),
+ _("Cannot move fd %1$d out of the way"),
passFDs[j]);
goto cleanup;
}
/* Finally we can move into our desired FD number */
if (dup2(passFDs[i], wantfd) < 0) {
virReportSystemError(errno,
- _("Cannot duplicate fd %d onto fd %d"),
+ _("Cannot duplicate fd %1$d onto fd %2$d"),
passFDs[i], wantfd);
goto cleanup;
}
/* This detaches the subtree */
if (umount2(mounts[nmounts-1], MNT_DETACH) < 0) {
virReportSystemError(saveErrno,
- _("Failed to unmount '%s' and could not detach subtree '%s'"),
+ _("Failed to unmount '%1$s' and could not detach subtree '%2$s'"),
failedUmount, mounts[nmounts-1]);
return -1;
}
if (isOldRootFS &&
umount(mounts[nmounts-1]) < 0) {
virReportSystemError(saveErrno,
- _("Failed to unmount '%s' and could not unmount old root '%s'"),
+ _("Failed to unmount '%1$s' and could not unmount old root '%2$s'"),
failedUmount, mounts[nmounts-1]);
return -1;
}
return 0;
} else {
virReportSystemError(errno,
- _("Failed to access '%s'"), fs->src->path);
+ _("Failed to access '%1$s'"), fs->src->path);
return -1;
}
}
return 0;
} else {
virReportSystemError(errno,
- _("Failed to resolve symlink at %s"),
+ _("Failed to resolve symlink at %1$s"),
fs->src->path);
}
return -1;
if (root->type != VIR_DOMAIN_FS_TYPE_BLOCK) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported root filesystem type %s"),
+ _("Unsupported root filesystem type %1$s"),
virDomainFSTypeToString(root->type));
return -1;
}
if (g_mkdir_with_parents(oldroot, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create %s"),
+ _("Failed to create %1$s"),
oldroot);
return -1;
}
* on separate filesystems */
if (mount("tmprootfs", oldroot, "tmpfs", 0, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to mount empty tmpfs at %s"),
+ _("Failed to mount empty tmpfs at %1$s"),
oldroot);
return -1;
}
if (g_mkdir_with_parents(newroot, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create %s"),
+ _("Failed to create %1$s"),
newroot);
return -1;
}
/* ... and mount our root onto it */
if (mount(root->src->path, newroot, "none", MS_BIND|MS_REC, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to bind %s to new root %s"),
+ _("Failed to bind %1$s to new root %2$s"),
root->src->path, newroot);
return -1;
}
if (root->readonly) {
if (mount(root->src->path, newroot, "none", MS_BIND|MS_REC|MS_RDONLY|MS_REMOUNT, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to make new root %s readonly"),
+ _("Failed to make new root %1$s readonly"),
root->src->path);
return -1;
}
* root->src bind-mounted onto '/new' */
if (chdir(newroot) < 0) {
virReportSystemError(errno,
- _("Failed to chdir into %s"), newroot);
+ _("Failed to chdir into %1$s"), newroot);
return -1;
}
VIR_DEBUG("Bind readonly %s", mounts[i]);
if (mount(mounts[i], mounts[i], "none", MS_BIND|MS_REC|MS_RDONLY|MS_REMOUNT, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to make mount %s readonly"),
+ _("Failed to make mount %1$s readonly"),
mounts[i]);
return -1;
}
if (g_mkdir_with_parents(mnt->dst, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to mkdir %s"),
+ _("Failed to mkdir %1$s"),
mnt->dst);
return -1;
}
mnt_src, mnt->dst, mnt->type, mnt_mflags & ~MS_RDONLY);
if (mount(mnt_src, mnt->dst, mnt->type, mnt_mflags & ~MS_RDONLY, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to mount %s on %s type %s flags=0x%x"),
+ _("Failed to mount %1$s on %2$s type %3$s flags=0x%4$x"),
mnt_src, mnt->dst, NULLSTR(mnt->type),
mnt_mflags & ~MS_RDONLY);
return -1;
mount(mnt_src, mnt->dst, "none",
MS_BIND|MS_REMOUNT|mnt_mflags|MS_RDONLY, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to re-mount %s on %s flags=0x%x"),
+ _("Failed to re-mount %1$s on %2$s flags=0x%3$x"),
mnt_src, mnt->dst,
MS_BIND|MS_REMOUNT|MS_RDONLY);
return -1;
if (mount(meminfo_path, "/proc/meminfo",
NULL, MS_BIND, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to mount %s on /proc/meminfo"),
+ _("Failed to mount %1$s on /proc/meminfo"),
meminfo_path);
return -1;
}
if (mount(path, "/dev", "none", flags, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to mount %s on /dev"),
+ _("Failed to mount %1$s on /dev"),
path);
return -1;
}
if (mount(path, "/dev/pts", "none", flags, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to mount %s on /dev/pts"),
+ _("Failed to mount %1$s on /dev/pts"),
path);
return -1;
}
for (i = 0; i < G_N_ELEMENTS(links); i++) {
if (symlink(links[i].src, links[i].dst) < 0) {
virReportSystemError(errno,
- _("Failed to symlink device %s to %s"),
+ _("Failed to symlink device %1$s to %2$s"),
links[i].dst, links[i].src);
return -1;
}
if (stat(fs->dst, &st) < 0) {
if (errno != ENOENT) {
- virReportSystemError(errno, _("Unable to stat bind target %s"),
+ virReportSystemError(errno, _("Unable to stat bind target %1$s"),
fs->dst);
return -1;
}
/* ENOENT => create the target dir or file */
if (stat(src, &st) < 0) {
- virReportSystemError(errno, _("Unable to stat bind source %s"),
+ virReportSystemError(errno, _("Unable to stat bind source %1$s"),
src);
return -1;
}
if (S_ISDIR(st.st_mode)) {
if (g_mkdir_with_parents(fs->dst, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create %s"),
+ _("Failed to create %1$s"),
fs->dst);
return -1;
}
if (fd < 0) {
if (errno != EEXIST) {
virReportSystemError(errno,
- _("Failed to create bind target %s"),
+ _("Failed to create bind target %1$s"),
fs->dst);
return -1;
}
}
if (VIR_CLOSE(fd) < 0) {
virReportSystemError(errno,
- _("Failed to close bind target %s"),
+ _("Failed to close bind target %1$s"),
fs->dst);
return -1;
}
if (mount(src, fs->dst, "none", MS_BIND, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to bind mount directory %s to %s"),
+ _("Failed to bind mount directory %1$s to %2$s"),
src, fs->dst);
return -1;
}
VIR_DEBUG("Binding %s readonly", fs->dst);
if (mount(src, fs->dst, "none", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to make directory %s readonly"),
+ _("Failed to make directory %1$s readonly"),
fs->dst);
}
}
if ((fd = open(src, O_RDONLY)) < 0) {
virReportSystemError(errno,
- _("Unable to open filesystem %s"), src);
+ _("Unable to open filesystem %1$s"), src);
return -1;
}
}
if (blkid_probe_set_device(blkid, fd, 0, 0) < 0) {
virReportSystemError(EINVAL,
- _("Unable to associate device %s with blkid library"),
+ _("Unable to associate device %1$s with blkid library"),
src);
goto cleanup;
}
if (rc == -2) {
virReportSystemError(EINVAL,
- _("Too many filesystems detected for %s"),
+ _("Too many filesystems detected for %1$s"),
src);
} else {
virReportSystemError(errno,
- _("Unable to detect filesystem for %s"),
+ _("Unable to detect filesystem for %1$s"),
src);
}
goto cleanup;
if (blkid_probe_lookup_value(blkid, "TYPE", &data, NULL) < 0) {
virReportSystemError(ENOENT,
- _("Unable to find filesystem type for %s"),
+ _("Unable to find filesystem type for %1$s"),
src);
goto cleanup;
}
}
virReportSystemError(errno,
- _("Unable to read %s"),
+ _("Unable to read %1$s"),
fslist);
goto cleanup;
}
*/
if (gotStar && !tryProc) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("%s has unexpected '*' before last line"),
+ _("%1$s has unexpected '*' before last line"),
fslist);
goto cleanup;
}
continue;
virReportSystemError(errno,
- _("Failed to mount device %s to %s"),
+ _("Failed to mount device %1$s to %2$s"),
src, fs->dst);
goto cleanup;
}
if (ret != 0) {
virReportSystemError(ENODEV,
- _("Failed to mount device %s to %s, unable to detect filesystem"),
+ _("Failed to mount device %1$s to %2$s, unable to detect filesystem"),
src, fs->dst);
}
if (g_mkdir_with_parents(fs->dst, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create %s"),
+ _("Failed to create %1$s"),
fs->dst);
return -1;
}
src, fs->dst, format, sec_mount_options);
if (mount(src, fs->dst, format, fsflags, sec_mount_options) < 0) {
virReportSystemError(errno,
- _("Failed to mount device %s to %s as %s"),
+ _("Failed to mount device %1$s to %2$s as %3$s"),
src, fs->dst, format);
return -1;
}
if (g_mkdir_with_parents(fs->dst, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create %s"),
+ _("Failed to create %1$s"),
fs->dst);
return -1;
}
if (mount("tmpfs", fs->dst, "tmpfs", MS_NOSUID|MS_NODEV, data) < 0) {
virReportSystemError(errno,
- _("Failed to mount directory %s as tmpfs"),
+ _("Failed to mount directory %1$s as tmpfs"),
fs->dst);
return -1;
}
VIR_DEBUG("Binding %s readonly", fs->dst);
if (mount(fs->dst, fs->dst, "none", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) {
virReportSystemError(errno,
- _("Failed to make directory %s readonly"),
+ _("Failed to make directory %1$s readonly"),
fs->dst);
return -1;
}
* should have associated the file with a loopback
* device and changed this to TYPE_BLOCK for us */
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected filesystem type %s"),
+ _("Unexpected filesystem type %1$s"),
virDomainFSTypeToString(fs->type));
return -1;
case VIR_DOMAIN_FS_TYPE_TEMPLATE:
case VIR_DOMAIN_FS_TYPE_LAST:
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Cannot mount filesystem type %s"),
+ _("Cannot mount filesystem type %1$s"),
virDomainFSTypeToString(fs->type));
return -1;
}
*tmp = '\0';
if (g_mkdir_with_parents(dir, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to create directory for '%s' dev '%s'"),
+ _("Failed to create directory for '%1$s' dev '%2$s'"),
dir, dev);
return -1;
}
CAPNG_INHERITABLE | CAPNG_BOUNDING_SET,
capsMapping[i])) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to add capability %s: %d"),
+ _("Failed to add capability %1$s: %2$d"),
virDomainProcessCapsFeatureTypeToString(i), ret);
return -1;
}
CAPNG_INHERITABLE | CAPNG_BOUNDING_SET,
capsMapping[i])) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to remove capability %s: %d"),
+ _("Failed to remove capability %1$s: %2$d"),
virDomainProcessCapsFeatureTypeToString(i), ret);
return -1;
}
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to apply capabilities: %d"), ret);
+ _("Failed to apply capabilities: %1$d"), ret);
return -1;
}
if (vmDef->os.inituser) {
if (virGetUserID(vmDef->os.inituser, &uid) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("User %s doesn't exist"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("User %1$s doesn't exist"),
vmDef->os.inituser);
return -1;
}
* shells to have job control. */
if (chown(ttyPath, uid, -1) < 0) {
virReportSystemError(errno,
- _("Failed to change ownership of tty %s"),
+ _("Failed to change ownership of tty %1$s"),
ttyPath);
return -1;
}
if (vmDef->os.initgroup) {
if (virGetGroupID(vmDef->os.initgroup, &gid) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Group %s doesn't exist"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Group %1$s doesn't exist"),
vmDef->os.initgroup);
return -1;
}
ttyfd = open(ttyPath, O_RDWR);
if (ttyfd < 0) {
virReportSystemError(errno,
- _("Failed to open tty %s"),
+ _("Failed to open tty %1$s"),
ttyPath);
goto cleanup;
}
if (!virFileExists(vmDef->os.init)) {
virReportSystemError(errno,
- _("cannot find init path '%s' relative to container root"),
+ _("cannot find init path '%1$s' relative to container root"),
vmDef->os.init);
goto cleanup;
}
if (ret != 0) {
VIR_DEBUG("Tearing down container");
fprintf(stderr,
- _("Failure in libvirt_lxc startup: %s\n"),
+ _("Failure in libvirt_lxc startup: %1$s\n"),
virGetLastErrorMessage());
}
if (chown(path, uid, gid) < 0) {
virReportSystemError(errno,
- _("Failed to change owner of %s to %u:%u"),
+ _("Failed to change owner of %1$s to %2$u:%3$u"),
path, uid, gid);
return -1;
}
{
if (ctrl->def->nnets != ctrl->nveths) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("expecting %zu veths, but got %zu"),
+ _("expecting %1$zu veths, but got %2$zu"),
ctrl->def->nnets, ctrl->nveths);
return -1;
}
case VIR_DOMAIN_NET_TYPE_NULL:
case VIR_DOMAIN_NET_TYPE_VDS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported net type %s"),
+ _("Unsupported net type %1$s"),
virDomainNetTypeToString(actualType));
return -1;
case VIR_DOMAIN_NET_TYPE_LAST:
{
if (ctrl->def->nconsoles != ctrl->nconsoles) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("expecting %zu consoles, but got %zu tty file handlers"),
+ _("expecting %1$zu consoles, but got %2$zu tty file handlers"),
ctrl->def->nconsoles, ctrl->nconsoles);
return -1;
}
loops++;
} else {
virReportSystemError(errno,
- _("Cannot check NBD device %s pid"),
+ _("Cannot check NBD device %1$s pid"),
dev + 5);
return -1;
}
if (fs->format != VIR_STORAGE_FILE_RAW &&
fs->format != VIR_STORAGE_FILE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("fs format %s is not supported"),
+ _("fs format %1$s is not supported"),
virStorageFileFormatTypeToString(fs->format));
return -1;
}
return -1;
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("fs driver %s is not supported"),
+ _("fs driver %1$s is not supported"),
virDomainFSDriverTypeToString(fs->fsdriver));
return -1;
}
if (format != VIR_STORAGE_FILE_RAW &&
format != VIR_STORAGE_FILE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk format %s is not supported"),
+ _("disk format %1$s is not supported"),
virStorageFileFormatTypeToString(format));
return -1;
}
if (disk->cachemode != VIR_DOMAIN_DISK_CACHE_DEFAULT &&
disk->cachemode != VIR_DOMAIN_DISK_CACHE_DISABLE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Disk cache mode %s is not supported"),
+ _("Disk cache mode %1$s is not supported"),
virDomainDiskCacheTypeToString(disk->cachemode));
return -1;
}
return -1;
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("disk driver %s is not supported"),
+ _("disk driver %1$s is not supported"),
driver);
return -1;
}
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to apply capabilities: %d"), ret);
+ _("failed to apply capabilities: %1$d"), ret);
return -1;
}
#else
VIR_DEBUG("Set '%s' to '%s'", path, virBufferCurrentContent(&map_value));
if (virFileWriteStr(path, virBufferCurrentContent(&map_value), 0) < 0) {
- virReportSystemError(errno, _("unable write to %s"), path);
+ virReportSystemError(errno, _("unable write to %1$s"), path);
return -1;
}
if (mknod(path, S_IFCHR, dev) < 0 ||
chmod(path, devs[i].mode)) {
virReportSystemError(errno,
- _("Failed to make device %s"),
+ _("Failed to make device %1$s"),
path);
return -1;
}
case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
case VIR_DOMAIN_TIMER_NAME_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported timer type (name) '%s'"),
+ _("unsupported timer type (name) '%1$s'"),
virDomainTimerNameTypeToString(timer->name));
return -1;
case VIR_DOMAIN_TIMER_NAME_RTC:
continue;
if (stat(timer_dev, &sb) < 0) {
- virReportSystemError(errno, _("Unable to access %s"),
+ virReportSystemError(errno, _("Unable to access %1$s"),
timer_dev);
return -1;
}
if (mknod(path, S_IFCHR, dev) < 0 ||
chmod(path, sb.st_mode)) {
virReportSystemError(errno,
- _("Failed to make device %s"),
+ _("Failed to make device %1$s"),
path);
return -1;
}
if (stat(src, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"), src);
+ _("Unable to access %1$s"), src);
return -1;
}
if (!S_ISCHR(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("USB source %s was not a character device"),
+ _("USB source %1$s was not a character device"),
src);
return -1;
}
if (g_mkdir_with_parents(dstdir, 0777) < 0) {
virReportSystemError(errno,
- _("Unable to create %s"), dstdir);
+ _("Unable to create %1$s"), dstdir);
return -1;
}
dstfile, major(sb.st_rdev), minor(sb.st_rdev));
if (mknod(dstfile, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
- _("Unable to create device %s"),
+ _("Unable to create device %1$s"),
dstfile);
return -1;
}
if (stat(dev, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"),
+ _("Unable to access %1$s"),
dev);
goto cleanup;
}
if (!S_ISBLK(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Storage source %s must be a block device"),
+ _("Storage source %1$s must be a block device"),
dev);
goto cleanup;
}
if (lxcContainerSetupHostdevCapsMakePath(dst) < 0) {
virReportError(errno,
- _("Failed to create directory for device %s"),
+ _("Failed to create directory for device %1$s"),
dev);
goto cleanup;
}
major(sb.st_rdev), minor(sb.st_rdev));
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
- _("Unable to create device %s"),
+ _("Unable to create device %1$s"),
dst);
goto cleanup;
}
if (stat(dev, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"),
+ _("Unable to access %1$s"),
dev);
goto cleanup;
}
if (!S_ISCHR(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Storage source %s must be a character device"),
+ _("Storage source %1$s must be a character device"),
dev);
goto cleanup;
}
if (lxcContainerSetupHostdevCapsMakePath(dst) < 0) {
virReportError(errno,
- _("Failed to create directory for device %s"),
+ _("Failed to create directory for device %1$s"),
dst);
goto cleanup;
}
major(sb.st_rdev), minor(sb.st_rdev));
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
- _("Unable to create device %s"),
+ _("Unable to create device %1$s"),
dev);
goto cleanup;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device mode %s"),
+ _("Unsupported host device mode %1$s"),
virDomainHostdevSubsysTypeToString(def->source.subsys.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device mode %s"),
+ _("Unsupported host device mode %1$s"),
virDomainHostdevCapsTypeToString(def->source.subsys.type));
return -1;
}
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device mode %s"),
+ _("Unsupported host device mode %1$s"),
virDomainHostdevModeTypeToString(def->mode));
return -1;
}
if (stat(def->src->path, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"), tmpsrc);
+ _("Unable to access %1$s"), tmpsrc);
goto cleanup;
}
if (!S_ISCHR(sb.st_mode) && !S_ISBLK(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Disk source %s must be a character/block device"),
+ _("Disk source %1$s must be a character/block device"),
tmpsrc);
goto cleanup;
}
dst, major(sb.st_rdev), minor(sb.st_rdev), tmpsrc);
if (mknod(dst, mode, sb.st_rdev) < 0) {
virReportSystemError(errno,
- _("Unable to create device %s"),
+ _("Unable to create device %1$s"),
dst);
goto cleanup;
}
VIR_DEBUG("Setting personality to %s",
virArchToString(altArch));
if (personality(PER_LINUX32) < 0) {
- virReportSystemError(errno, _("Unable to request personality for %s on %s"),
+ virReportSystemError(errno, _("Unable to request personality for %1$s on %2$s"),
virArchToString(altArch),
virArchToString(virArchFromHost()));
return -1;
if (g_mkdir_with_parents(devpts, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to make path %s"),
+ _("Failed to make path %1$s"),
devpts);
return -1;
}
devpts, MS_NOSUID, opts);
if (mount("devpts", devpts, "devpts", MS_NOSUID, opts) < 0) {
virReportSystemError(errno,
- _("Failed to mount devpts on %s"),
+ _("Failed to mount devpts on %1$s"),
devpts);
return -1;
}
if (virGettextInitialize() < 0 ||
virErrorInitialize() < 0) {
- fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
+ fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
}
if (pid > 0) {
if ((rc = virPidFileWrite(LXC_STATE_DIR, name, pid)) < 0) {
virReportSystemError(-rc,
- _("Unable to write pid file '%s/%s.pid'"),
+ _("Unable to write pid file '%1$s/%2$s.pid'"),
LXC_STATE_DIR, name);
_exit(1);
}
cleanup:
if (rc < 0) {
fprintf(stderr,
- _("Failure in libvirt_lxc startup: %s\n"),
+ _("Failure in libvirt_lxc startup: %1$s\n"),
virGetLastErrorMessage());
}
if ((feature = virLXCDomainNamespaceTypeFromString(
(const char *)nodes[i]->name)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported Namespace feature: %s"),
+ _("unsupported Namespace feature: %1$s"),
nodes[i]->name);
goto cleanup;
}
if ((lxcDef->ns_source[feature] =
virLXCDomainNamespaceSourceTypeFromString(tmp)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown LXC namespace source '%s'"),
+ _("Unknown LXC namespace source '%1$s'"),
tmp);
goto cleanup;
}
if (errno == ENOENT)
continue;
- virReportSystemError(errno, _("Unable to stat %s"), fifo);
+ virReportSystemError(errno, _("Unable to stat %1$s"), fifo);
return -1;
}
if (errno == ENOENT)
continue;
- virReportSystemError(errno, _("Unable to stat %s"), fifo);
+ virReportSystemError(errno, _("Unable to stat %1$s"), fifo);
goto cleanup;
}
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;
}
STRNEQ(conn->uri->path, "/") &&
STRNEQ(conn->uri->path, "/system")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected LXC URI path '%s', try lxc:///system"),
+ _("Unexpected LXC URI path '%1$s', try lxc:///system"),
conn->uri->path);
return VIR_DRV_OPEN_ERROR;
}
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;
}
vm = virDomainObjListFindByName(driver->domains, name);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("No domain with matching name '%s'"), name);
+ _("No domain with matching name '%1$s'"), name);
goto cleanup;
}
if (STRNEQ(nativeFormat, LXC_CONFIG_FORMAT)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported config type %s"), nativeFormat);
+ _("unsupported config type %1$s"), nativeFormat);
return NULL;
}
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;
}
if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to mkdir %s"),
+ _("Failed to mkdir %1$s"),
cfg->stateDir);
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_MIGRATE_CHANGE_PROTECTION:
return -1;
if (virStringParseVersion(version, ver.release, true) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown release: %s"), ver.release);
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown release: %1$s"), ver.release);
return -1;
}
default:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
- _("Unknown IP address data source %d"),
+ _("Unknown IP address data source %1$d"),
source);
break;
}
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid path: %s"), path);
+ _("invalid path: %1$s"), path);
goto endjob;
}
if (!disk->info.alias) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing disk device alias name for %s"), disk->dst);
+ _("missing disk device alias name for %1$s"), disk->dst);
goto endjob;
}
} else {
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid path: %s"), path);
+ _("invalid path: %1$s"), path);
goto endjob;
}
if (!disk->info.alias) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("missing disk device alias name for %s"), disk->dst);
+ _("missing disk device alias name for %1$s"), disk->dst);
goto endjob;
}
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;
}
} else {
if (unlink(autostartLink) < 0 && errno != ENOENT && errno != ENOTDIR) {
virReportSystemError(errno,
- _("Failed to delete symlink '%s'"),
+ _("Failed to delete symlink '%1$s'"),
autostartLink);
goto endjob;
}
if (!chr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find console device '%s'"),
+ _("cannot find console device '%1$s'"),
dev_name ? dev_name : _("default"));
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 (signum >= VIR_DOMAIN_PROCESS_SIGNAL_LAST) {
virReportError(VIR_ERR_INVALID_ARG,
- _("signum value %d is out of range"),
+ _("signum value %1$d is out of range"),
signum);
return -1;
}
*/
if (kill(victim, signum) < 0) {
virReportSystemError(errno,
- _("Unable to send %d signal to process %d"),
+ _("Unable to send %1$d signal to process %2$d"),
signum, victim);
goto endjob;
}
if (kill(priv->initpid, SIGTERM) < 0 &&
errno != ESRCH) {
virReportSystemError(errno,
- _("Unable to send SIGTERM to init pid %llu"),
+ _("Unable to send SIGTERM to init pid %1$llu"),
(long long)priv->initpid);
goto endjob;
}
if (kill(priv->initpid, SIGHUP) < 0 &&
errno != ESRCH) {
virReportSystemError(errno,
- _("Unable to send SIGTERM to init pid %llu"),
+ _("Unable to send SIGTERM to init pid %1$llu"),
(long long)priv->initpid);
goto endjob;
}
disk = dev->data.disk;
if (virDomainDiskIndexByName(vmdef, disk->dst, true) >= 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("target %s already exists."), disk->dst);
+ _("target %1$s already exists."), disk->dst);
return -1;
}
virDomainDiskInsert(vmdef, disk);
disk = dev->data.disk;
if (!(det_disk = virDomainDiskRemoveByName(vmdef, disk->dst))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("no target device %s"), disk->dst);
+ _("no target device %1$s"), disk->dst);
return -1;
}
virDomainDiskDefFree(det_disk);
if (virFileMakeParentPath(data->file) < 0) {
virReportSystemError(errno,
- _("Unable to create %s"), data->file);
+ _("Unable to create %1$s"), data->file);
goto cleanup;
}
data->file, major(data->dev), minor(data->dev));
if (mknod(data->file, data->mode, data->dev) < 0) {
virReportSystemError(errno,
- _("Unable to create device %s"),
+ _("Unable to create device %1$s"),
data->file);
goto cleanup;
}
case VIR_DOMAIN_DEVICE_AUDIO:
case VIR_DOMAIN_DEVICE_CRYPTO:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected device type %d"),
+ _("Unexpected device type %1$d"),
data->def->type);
goto cleanup;
}
VIR_DEBUG("Unlinking %s", path);
if (unlink(path) < 0 && errno != ENOENT) {
virReportSystemError(errno,
- _("Unable to remove device %s"), path);
+ _("Unable to remove device %1$s"), path);
return -1;
}
if (virDomainDiskIndexByName(vm->def, def->dst, true) >= 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("target %s already exists"), def->dst);
+ _("target %1$s already exists"), def->dst);
goto cleanup;
}
if (stat(src, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"), src);
+ _("Unable to access %1$s"), src);
goto cleanup;
}
if (!S_ISBLK(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Disk source %s must be a block device"),
+ _("Disk source %1$s must be a block device"),
src);
goto cleanup;
}
if (stat(src, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"), src);
+ _("Unable to access %1$s"), src);
goto cleanup;
}
if (!S_ISCHR(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("USB source %s was not a character device"),
+ _("USB source %1$s was not a character device"),
src);
goto cleanup;
}
if (stat(def->source.caps.u.storage.block, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"),
+ _("Unable to access %1$s"),
def->source.caps.u.storage.block);
goto cleanup;
}
if (!S_ISBLK(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Hostdev source %s must be a block device"),
+ _("Hostdev source %1$s must be a block device"),
def->source.caps.u.storage.block);
goto cleanup;
}
if (stat(def->source.caps.u.misc.chardev, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access %s"),
+ _("Unable to access %1$s"),
def->source.caps.u.misc.chardev);
goto cleanup;
}
if (!S_ISCHR(sb.st_mode)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Hostdev source %s must be a block device"),
+ _("Hostdev source %1$s must be a block device"),
def->source.caps.u.misc.chardev);
goto cleanup;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device type %s"),
+ _("Unsupported host device type %1$s"),
virDomainHostdevSubsysTypeToString(dev->data.hostdev->source.subsys.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device type %s"),
+ _("Unsupported host device type %1$s"),
virDomainHostdevCapsTypeToString(dev->data.hostdev->source.caps.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device mode %s"),
+ _("Unsupported host device mode %1$s"),
virDomainHostdevModeTypeToString(dev->data.hostdev->mode));
return -1;
}
case VIR_DOMAIN_DEVICE_AUDIO:
case VIR_DOMAIN_DEVICE_CRYPTO:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("device type '%s' cannot be attached"),
+ _("device type '%1$s' cannot be attached"),
virDomainDeviceTypeToString(dev->type));
break;
}
dev->data.disk->dst,
false)) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("disk %s not found"), dev->data.disk->dst);
+ _("disk %1$s not found"), dev->data.disk->dst);
return -1;
}
dev->data.hostdev,
&def)) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("hostdev %s not found"),
+ _("hostdev %1$s not found"),
dev->data.hostdev->source.caps.u.storage.block);
return -1;
}
dev->data.hostdev,
&def)) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("hostdev %s not found"),
+ _("hostdev %1$s not found"),
dev->data.hostdev->source.caps.u.misc.chardev);
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device type %s"),
+ _("Unsupported host device type %1$s"),
virDomainHostdevSubsysTypeToString(dev->data.hostdev->source.subsys.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device type %s"),
+ _("Unsupported host device type %1$s"),
virDomainHostdevCapsTypeToString(dev->data.hostdev->source.caps.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported host device mode %s"),
+ _("Unsupported host device mode %1$s"),
virDomainHostdevModeTypeToString(dev->data.hostdev->mode));
return -1;
}
case VIR_DOMAIN_DEVICE_AUDIO:
case VIR_DOMAIN_DEVICE_CRYPTO:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("device type '%s' cannot be detached"),
+ _("device type '%1$s' cannot be detached"),
virDomainDeviceTypeToString(dev->type));
break;
}
if (!hostname) {
virReportError(VIR_ERR_NO_HOSTNAME,
- _("no hostname found for domain %s"),
+ _("no hostname found for domain %1$s"),
vm->def->name);
goto endjob;
}
fp = fopen(hostpath, "r");
if (fp == NULL) {
- virReportSystemError(errno, _("Cannot open %s"), hostpath);
+ virReportSystemError(errno, _("Cannot open %1$s"), hostpath);
return -errno;
}
fuse->mountpoint = g_strdup_printf("%s/%s.fuse/", LXC_STATE_DIR, def->name);
if (g_mkdir_with_parents(fuse->mountpoint, 0777) < 0) {
- virReportSystemError(errno, _("Cannot create %s"),
+ virReportSystemError(errno, _("Cannot create %1$s"),
fuse->mountpoint);
goto error;
}
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported hostdev type %s"),
+ _("Unsupported hostdev type %1$s"),
virDomainHostdevSubsysTypeToString(dev->source.subsys.type));
return -1;
}
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported hostdev type %s"),
+ _("Unsupported hostdev type %1$s"),
virDomainHostdevSubsysTypeToString(dev->source.subsys.type));
return -1;
}
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported hostdev mode %s"),
+ _("Unsupported hostdev mode %1$s"),
virDomainHostdevModeTypeToString(dev->mode));
return -1;
}
if (STREQ(unit, "%")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("can't convert relative size: '%s'"),
+ _("can't convert relative size: '%1$s'"),
size);
return -1;
} else {
error:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to convert size: '%s'"),
+ _("failed to convert size: '%1$s'"),
size);
return -1;
}
virStrToLong_ui(ipparts[1], NULL, 10, &ip->prefix) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Invalid CIDR address: '%s'"), value->str);
+ _("Invalid CIDR address: '%1$s'"), value->str);
return -1;
}
}
if (virStrToLong_i(value, NULL, 10, &nbttys) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse int: '%s'"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse int: '%1$s'"),
value);
return -1;
}
if (sscanf(value->str, "%c %lu %lu %lu", &type,
&target, &start, &count) != 4) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid %s: '%s'"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid %1$s: '%2$s'"),
name, value->str);
return -1;
}
error:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse integer: '%s'"), value);
+ _("failed to parse integer: '%1$s'"), value);
return -1;
}
if (!parts[0] || !parts[1]) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid %s value: '%s'"),
+ _("invalid %1$s value: '%2$s'"),
name, value->str);
return -1;
}
if (STREQ(name, "lxc.cgroup.blkio.device_weight")) {
if (virStrToLong_ui(parts[1], NULL, 10, &device->weight) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse device weight: '%s'"), parts[1]);
+ _("failed to parse device weight: '%1$s'"), parts[1]);
return -1;
}
} else if (STREQ(name, "lxc.cgroup.blkio.throttle.read_bps_device")) {
if (virStrToLong_ull(parts[1], NULL, 10, &device->rbps) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse read_bps_device: '%s'"),
+ _("failed to parse read_bps_device: '%1$s'"),
parts[1]);
return -1;
}
} else if (STREQ(name, "lxc.cgroup.blkio.throttle.write_bps_device")) {
if (virStrToLong_ull(parts[1], NULL, 10, &device->wbps) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse write_bps_device: '%s'"),
+ _("failed to parse write_bps_device: '%1$s'"),
parts[1]);
return -1;
}
} else if (STREQ(name, "lxc.cgroup.blkio.throttle.read_iops_device")) {
if (virStrToLong_ui(parts[1], NULL, 10, &device->riops) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse read_iops_device: '%s'"),
+ _("failed to parse read_iops_device: '%1$s'"),
parts[1]);
return -1;
}
} else if (STREQ(name, "lxc.cgroup.blkio.throttle.write_iops_device")) {
if (virStrToLong_ui(parts[1], NULL, 10, &device->wiops) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse write_iops_device: '%s'"),
+ _("failed to parse write_iops_device: '%1$s'"),
parts[1]);
return -1;
}
&value) > 0) {
if (virStrToLong_ui(value, NULL, 10, &def->blkio.weight) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse integer: '%s'"), value);
+ _("failed to parse integer: '%1$s'"), value);
return -1;
}
}
vm = virDomainObjListFindByName(driver->domains, name);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("No domain with matching name '%s'"), name);
+ _("No domain with matching name '%1$s'"), name);
return -1;
}
if ((fd = open(path, O_RDONLY)) < 0) {
virReportSystemError(errno,
- _("failed to open ns %s"),
+ _("failed to open ns %1$s"),
virLXCDomainNamespaceTypeToString(ns_type));
goto cleanup;
}
int fd = open(path, O_RDONLY);
if (fd < 0) {
virReportSystemError(errno,
- _("failed to open ns %s"),
+ _("failed to open ns %1$s"),
virLXCDomainNamespaceTypeToString(ns_type));
return -1;
}
fd = open(path, O_RDONLY);
if (fd < 0) {
virReportSystemError(errno,
- _("failed to open netns %s"), name);
+ _("failed to open netns %1$s"), name);
return -1;
}
return fd;
case VIR_DOMAIN_NET_TYPE_VDS:
case VIR_DOMAIN_NET_TYPE_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unsupported network type %s"),
+ _("Unsupported network type %1$s"),
virDomainNetTypeToString(type));
goto cleanup;
if (stat(path, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to stat %s"), path);
+ _("Unable to stat %1$s"), path);
return -1;
}
* libvirt_lxc process */
if (virProcessKillPainfully(vm->pid, true) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Processes %d refused to die"), (int)vm->pid);
+ _("Processes %1$d refused to die"), (int)vm->pid);
return -1;
}
}
if (got == buflen-1) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Out of space while reading log output: %s"),
+ _("Out of space while reading log output: %1$s"),
buf);
return -1;
}
}
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Timed out while reading log output: %s"),
+ _("Timed out while reading log output: %1$s"),
buf);
return -1;
if ((fd = open(logfile, O_RDONLY)) < 0) {
virReportSystemError(errno,
- _("Unable to open log file %s"),
+ _("Unable to open log file %1$s"),
logfile);
return -1;
}
if (lseek(fd, pos, SEEK_SET) < 0) {
virReportSystemError(errno,
- _("Unable to seek log file %s to %llu"),
+ _("Unable to seek log file %1$s to %2$llu"),
logfile, (unsigned long long)pos);
return -1;
}
return 0;
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("guest failed to start: %s"), errbuf);
+ _("guest failed to start: %1$s"), errbuf);
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 ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
S_IRUSR|S_IWUSR)) < 0) {
virReportSystemError(errno,
- _("Failed to open '%s'"),
+ _("Failed to open '%1$s'"),
logfile);
goto cleanup;
}
/* In case there isn't an error in the logs report one based on the exit status */
if (WIFEXITED(status)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("guest failed to start: unexpected exit status %d"),
+ _("guest failed to start: unexpected exit status %1$d"),
WEXITSTATUS(status));
} else {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
goto cleanup;
/* In case there isn't an error in the logs report that we failed to read the pidfile */
- virReportSystemError(-r, _("Failed to read pid file %s"), pidfile);
+ virReportSystemError(-r, _("Failed to read pid file %1$s"), pidfile);
goto cleanup;
}
if (!priv->cgroup) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("No valid cgroup for machine %s"),
+ _("No valid cgroup for machine %1$s"),
vm->def->name);
goto cleanup;
}
virDomainAuditStart(vm, "booted", rc >= 0);
if (rc < 0) {
- VIR_ERROR(_("Failed to autostart VM '%s': %s"),
+ VIR_ERROR(_("Failed to autostart VM '%1$s': %2$s"),
vm->def->name,
virGetLastErrorMessage());
return -1;
if (!priv->cgroup) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("No valid cgroup for machine %s"),
+ _("No valid cgroup for machine %1$s"),
vm->def->name);
goto error;
}