[libvirt PATCH 16/51] libxl: Update format strings in translated messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/libxl/libxl_capabilities.c |   2 +-
 src/libxl/libxl_conf.c         |  61 +++++-----
 src/libxl/libxl_domain.c       |  24 ++--
 src/libxl/libxl_driver.c       | 215 ++++++++++++++++-----------------
 src/libxl/libxl_migration.c    |   6 +-
 src/libxl/xen_common.c         |  72 +++++------
 src/libxl/xen_xl.c             |  28 ++---
 src/libxl/xen_xm.c             |   4 +-
 8 files changed, 201 insertions(+), 211 deletions(-)

diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index c2975d637e..cd40cff739 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -348,7 +348,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCaps *caps)
     regex = g_regex_new(XEN_CAP_REGEX, 0, 0, &err);
     if (!regex) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to compile regex %s"), err->message);
+                       _("Failed to compile regex %1$s"), err->message);
         return -1;
     }
 
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 15369b2791..12a0eb7085 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -186,7 +186,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx,
                                        strlen(def->seclabels[0]->label),
                                        &c_info->ssidref)) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("libxenlight failed to resolve security label '%s'"),
+                           _("libxenlight failed to resolve security label '%1$s'"),
                            def->seclabels[0]->label);
         }
     }
@@ -194,7 +194,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx,
     virUUIDFormat(def->uuid, uuidstr);
     if (libxl_uuid_from_string(&c_info->uuid, uuidstr)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to parse UUID '%s'"), uuidstr);
+                       _("libxenlight failed to parse UUID '%1$s'"), uuidstr);
         goto error;
     }
 
@@ -272,7 +272,7 @@ libxlMakeChrdevStr(virDomainChrDef *def, char **buf)
 
     default:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unsupported chardev '%s'"), type);
+                       _("unsupported chardev '%1$s'"), type);
         return -1;
     }
 
@@ -384,7 +384,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
 
     case VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unsupported clock offset '%s'"),
+                       _("unsupported clock offset '%1$s'"),
                        virDomainClockOffsetTypeToString(clock.offset));
         return -1;
 
@@ -392,7 +392,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
     case VIR_DOMAIN_CLOCK_OFFSET_LAST:
     default:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unexpected clock offset '%d'"), clock.offset);
+                       _("unexpected clock offset '%1$d'"), clock.offset);
         return -1;
     }
 
@@ -421,7 +421,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
         case VIR_DOMAIN_TIMER_NAME_HPET:
             if (!hvm) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("unsupported timer type (name) '%s'"),
+                               _("unsupported timer type (name) '%1$s'"),
                                virDomainTimerNameTypeToString(clock.timers[i]->name));
                 return -1;
             }
@@ -436,7 +436,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
         case VIR_DOMAIN_TIMER_NAME_PIT:
         case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported timer type (name) '%s'"),
+                           _("unsupported timer type (name) '%1$s'"),
                            virDomainTimerNameTypeToString(clock.timers[i]->name));
             return -1;
 
@@ -503,7 +503,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
                                            false));
                             if (libxl_cpuid_parse_config(&b_info->cpuid, xlCPU)) {
                                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                        _("unsupported cpu feature '%s'"),
+                                        _("unsupported cpu feature '%1$s'"),
                                         def->cpu->features[i].name);
                                 return -1;
                             }
@@ -524,7 +524,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
                                            def->cpu->features[i].name, false));
                             if (libxl_cpuid_parse_config(&b_info->cpuid, xlCPU)) {
                                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                        _("unsupported cpu feature '%s'"),
+                                        _("unsupported cpu feature '%1$s'"),
                                         def->cpu->features[i].name);
                                 return -1;
                             }
@@ -542,7 +542,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
                 libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt);
             } else {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                        _("unsupported nested HVM setting for %s machine on this Xen version"),
+                        _("unsupported nested HVM setting for %1$s machine on this Xen version"),
                         def->os.machine);
                 return -1;
             }
@@ -658,7 +658,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
 
         if (def->os.loader && def->os.loader->format != VIR_STORAGE_FILE_RAW) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("Unsupported loader format '%s'"),
+                           _("Unsupported loader format '%1$s'"),
                            virStorageFileFormatTypeToString(def->os.loader->format));
             return -1;
         }
@@ -666,14 +666,14 @@ libxlMakeDomBuildInfo(virDomainDef *def,
         if (def->emulator) {
             if (!virFileExists(def->emulator)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("emulator '%s' not found"),
+                               _("emulator '%1$s' not found"),
                                def->emulator);
                 return -1;
             }
 
             if (!virFileIsExecutable(def->emulator)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("emulator '%s' is not executable"),
+                               _("emulator '%1$s' is not executable"),
                                def->emulator);
                 return -1;
             }
@@ -800,7 +800,7 @@ libxlMakeDomBuildInfo(virDomainDef *def,
         case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITIONAL:
         case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRANSITIONAL:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported balloon device model '%s'"),
+                           _("unsupported balloon device model '%1$s'"),
                            virDomainMemballoonModelTypeToString(def->memballoon->model));
             return -1;
         case VIR_DOMAIN_MEMBALLOON_MODEL_NONE:
@@ -894,7 +894,7 @@ libxlMakeVnumaList(virDomainDef *def,
         bitmap = virDomainNumaGetNodeCpumask(numa, i);
         if (bitmap == NULL) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("vnuma sibling %zu missing vcpus set"), i);
+                           _("vnuma sibling %1$zu missing vcpus set"), i);
             goto cleanup;
         }
 
@@ -980,14 +980,14 @@ libxlMakeNetworkDiskSrcStr(virStorageSource *src,
     case VIR_STORAGE_NET_PROTOCOL_LAST:
     case VIR_STORAGE_NET_PROTOCOL_NONE:
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Unsupported network block protocol '%s'"),
+                       _("Unsupported network block protocol '%1$s'"),
                        virStorageNetProtocolTypeToString(src->protocol));
         return NULL;
 
     case VIR_STORAGE_NET_PROTOCOL_RBD:
         if (strchr(src->path, ':')) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("':' not allowed in RBD source volume name '%s'"),
+                           _("':' not allowed in RBD source volume name '%1$s'"),
                            src->path);
             return NULL;
         }
@@ -1115,8 +1115,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
                 break;
             default:
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("libxenlight does not support disk format %s "
-                                 "with disk driver %s"),
+                               _("libxenlight does not support disk format %1$s with disk driver %2$s"),
                                virStorageFileFormatTypeToString(format),
                                driver);
                 return -1;
@@ -1141,8 +1140,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
                 break;
             default:
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("libxenlight does not support disk format %s "
-                                 "with disk driver %s"),
+                               _("libxenlight does not support disk format %1$s with disk driver %2$s"),
                                virStorageFileFormatTypeToString(format),
                                driver);
                 return -1;
@@ -1150,8 +1148,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
         } else if (STREQ(driver, "file")) {
             if (format != VIR_STORAGE_FILE_RAW) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("libxenlight does not support disk format %s "
-                                 "with disk driver %s"),
+                               _("libxenlight does not support disk format %1$s with disk driver %2$s"),
                                virStorageFileFormatTypeToString(format),
                                driver);
                 return -1;
@@ -1161,8 +1158,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
         } else if (STREQ(driver, "phy")) {
             if (format != VIR_STORAGE_FILE_RAW) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("libxenlight does not support disk format %s "
-                                 "with disk driver %s"),
+                               _("libxenlight does not support disk format %1$s with disk driver %2$s"),
                                virStorageFileFormatTypeToString(format),
                                driver);
                 return -1;
@@ -1171,7 +1167,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
             x_disk->backend = LIBXL_DISK_BACKEND_PHY;
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("libxenlight does not support disk driver %s"),
+                           _("libxenlight does not support disk driver %1$s"),
                            driver);
             return -1;
         }
@@ -1409,7 +1405,7 @@ libxlMakeNic(virDomainDef *def,
         case VIR_DOMAIN_NET_TYPE_VDS:
         case VIR_DOMAIN_NET_TYPE_LAST:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                    _("unsupported interface type %s"),
+                    _("unsupported interface type %1$s"),
                     virDomainNetTypeToString(l_nic->type));
             goto cleanup;
     }
@@ -1728,7 +1724,7 @@ libxlGetAutoballoonConf(libxlDriverConfig *cfg,
                         0, 0, &err);
     if (!regex) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to compile regex %s"), err->message);
+                       _("Failed to compile regex %1$s"), err->message);
         return -1;
     }
 
@@ -1791,7 +1787,7 @@ libxlDriverConfigInit(libxlDriverConfig *cfg)
 
     if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) {
         virReportSystemError(errno,
-                             _("failed to create log dir '%s'"),
+                             _("failed to create log dir '%1$s'"),
                              cfg->logDir);
         return -1;
     }
@@ -2196,8 +2192,7 @@ libxlMakeUSB(virDomainHostdevDef *hostdev, libxl_device_usbdev *usbdev)
     } else {
         if (virHostdevFindUSBDevice(hostdev, true, &usb) < 0) {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("failed to find USB device busnum:devnum "
-                             "for %x:%x"),
+                           _("failed to find USB device busnum:devnum for %1$x:%2$x"),
                            usbsrc->vendor, usbsrc->product);
             goto cleanup;
         }
@@ -2390,7 +2385,7 @@ libxlMakeVideo(virDomainDef *def, libxl_domain_config *d_config)
         case VIR_DOMAIN_VIDEO_TYPE_LAST:
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("video type %s is not supported by libxl"),
+                           _("video type %1$s is not supported by libxl"),
                            virDomainVideoTypeToString(def->videos[0]->type));
             return -1;
         }
@@ -2421,7 +2416,7 @@ libxlDriverNodeGetInfo(libxlDriverPrivate *driver, virNodeInfoPtr info)
 
     if (virStrcpyStatic(info->model, virArchToString(hostarch)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("host arch %s is too big for destination"),
+                       _("host arch %1$s is too big for destination"),
                        virArchToString(hostarch));
         goto cleanup;
     }
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index f28a6207a3..6c167df63e 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -153,8 +153,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDef *dev,
         /* forbid capabilities mode hostdev in this kind of hypervisor */
         if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("hostdev mode 'capabilities' is not "
-                             "supported in %s"),
+                           _("hostdev mode 'capabilities' is not supported in %1$s"),
                            virDomainVirtTypeToString(def->virtType));
             return -1;
         }
@@ -339,7 +338,7 @@ libxlDomainDefValidate(const virDomainDef *def,
             case VIR_DOMAIN_SOUND_MODEL_ICH9:
             case VIR_DOMAIN_SOUND_MODEL_LAST:
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                        _("unsupported audio model %s"),
+                        _("unsupported audio model %1$s"),
                         virDomainSoundModelTypeToString(snd->model));
                 return -1;
         }
@@ -379,7 +378,7 @@ libxlDomainShutdownHandleRestart(libxlDriverPrivate *driver,
     libxlDomainDestroyInternal(driver, vm);
     libxlDomainCleanup(driver, vm);
     if (libxlDomainStartNew(driver, vm, false) < 0) {
-        VIR_ERROR(_("Failed to restart VM '%s': %s"),
+        VIR_ERROR(_("Failed to restart VM '%1$s': %2$s"),
                   vm->def->name, virGetLastErrorMessage());
     }
 }
@@ -489,8 +488,7 @@ libxlDomainShutdownThread(void *opaque)
 
         if (libxlRetrieveDomainConfigurationWrapper(cfg->ctx, vm->def->id,
                                                     &d_config) != 0) {
-            VIR_ERROR(_("Failed to retrieve config for VM '%s'. "
-                        "Unable to perform soft reset. Destroying VM"),
+            VIR_ERROR(_("Failed to retrieve config for VM '%1$s'. Unable to perform soft reset. Destroying VM"),
                       vm->def->name);
             libxlDomainShutdownHandleDestroy(driver, vm);
             goto endjob;
@@ -503,7 +501,7 @@ libxlDomainShutdownThread(void *opaque)
 
         if (libxl_domain_soft_reset(cfg->ctx, &d_config, vm->def->id,
                                     NULL, NULL) != 0) {
-            VIR_ERROR(_("Failed to soft reset VM '%s'. Destroying VM"),
+            VIR_ERROR(_("Failed to soft reset VM '%1$s'. Destroying VM"),
                       vm->def->name);
             libxlDomainShutdownHandleDestroy(driver, vm);
             goto endjob;
@@ -675,7 +673,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver,
 
     if ((fd = virFileOpenAs(from, O_RDONLY, 0, -1, -1, 0)) < 0) {
         virReportSystemError(-fd,
-                             _("Failed to open domain image file '%s'"), from);
+                             _("Failed to open domain image file '%1$s'"), from);
         goto error;
     }
 
@@ -692,14 +690,14 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver,
 
     if (hdr.version > LIBXL_SAVE_VERSION) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("image version is not supported (%d > %d)"),
+                       _("image version is not supported (%1$d > %2$d)"),
                        hdr.version, LIBXL_SAVE_VERSION);
         goto error;
     }
 
     if (hdr.xmlLen <= 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("invalid XML length: %d"), hdr.xmlLen);
+                       _("invalid XML length: %1$d"), hdr.xmlLen);
         goto error;
     }
 
@@ -1256,11 +1254,11 @@ libxlDomainStartPerform(libxlDriverPrivate *driver,
     if (libxlret) {
         if (restore_fd < 0)
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("libxenlight failed to create new domain '%s'"),
+                           _("libxenlight failed to create new domain '%1$s'"),
                            d_config.c_info.name);
         else
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("libxenlight failed to restore domain '%s'"),
+                           _("libxenlight failed to restore domain '%1$s'"),
                            d_config.c_info.name);
         goto cleanup;
     }
@@ -1399,7 +1397,7 @@ libxlDomainStartNew(libxlDriverPrivate *driver,
             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;
         }
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 04e74086e6..68c4c7b768 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -307,7 +307,7 @@ libxlDomObjFromDomain(virDomainPtr dom)
     if (!vm) {
         virUUIDFormat(dom->uuid, uuidstr);
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("no domain with matching uuid '%s' (%s)"),
+                       _("no domain with matching uuid '%1$s' (%2$s)"),
                        uuidstr, dom->name);
         return NULL;
     }
@@ -332,7 +332,7 @@ libxlAutostartDomain(virDomainObj *vm,
     if (vm->autostart && !virDomainObjIsActive(vm) &&
         libxlDomainStartNew(driver, vm, false) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to autostart VM '%s': %s"),
+                       _("Failed to autostart VM '%1$s': %2$s"),
                        vm->def->name, virGetLastErrorMessage());
         goto endjob;
     }
@@ -721,31 +721,31 @@ libxlStateInitialize(bool privileged,
     libxl_driver->config = cfg;
     if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) {
         virReportSystemError(errno,
-                             _("failed to create state dir '%s'"),
+                             _("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'"),
+                             _("failed to create lib dir '%1$s'"),
                              cfg->libDir);
         goto error;
     }
     if (g_mkdir_with_parents(cfg->saveDir, 0777) < 0) {
         virReportSystemError(errno,
-                             _("failed to create save dir '%s'"),
+                             _("failed to create save dir '%1$s'"),
                              cfg->saveDir);
         goto error;
     }
     if (g_mkdir_with_parents(cfg->autoDumpDir, 0777) < 0) {
         virReportSystemError(errno,
-                             _("failed to create dump dir '%s'"),
+                             _("failed to create dump dir '%1$s'"),
                              cfg->autoDumpDir);
         goto error;
     }
     if (g_mkdir_with_parents(cfg->channelDir, 0777) < 0) {
         virReportSystemError(errno,
-                             _("failed to create channel dir '%s'"),
+                             _("failed to create channel dir '%1$s'"),
                              cfg->channelDir);
         goto error;
     }
@@ -875,7 +875,7 @@ libxlConnectOpen(virConnectPtr conn,
         STRNEQ(conn->uri->path, "/") &&
         STRNEQ(conn->uri->path, "/system")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected Xen URI path '%s', try xen:///system"),
+                       _("unexpected Xen URI path '%1$s', try xen:///system"),
                        conn->uri->path);
         return VIR_DRV_OPEN_ERROR;
     }
@@ -1169,7 +1169,7 @@ libxlDomainSuspend(virDomainPtr dom)
     if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) {
         if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to suspend domain '%d' with libxenlight"),
+                           _("Failed to suspend domain '%1$d' with libxenlight"),
                            vm->def->id);
             goto endjob;
         }
@@ -1222,7 +1222,7 @@ libxlDomainResume(virDomainPtr dom)
     if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) {
         if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to resume domain '%d' with libxenlight"),
+                           _("Failed to resume domain '%1$d' with libxenlight"),
                            vm->def->id);
             goto endjob;
         }
@@ -1281,7 +1281,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 
         if (ret != ERROR_NOPARAVIRT) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to shutdown domain '%d' with libxenlight"),
+                           _("Failed to shutdown domain '%1$d' with libxenlight"),
                            vm->def->id);
             ret = -1;
             goto cleanup;
@@ -1296,7 +1296,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
             goto cleanup;
 
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to shutdown domain '%d' with libxenlight"),
+                       _("Failed to shutdown domain '%1$d' with libxenlight"),
                        vm->def->id);
         ret = -1;
     }
@@ -1343,7 +1343,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
             goto cleanup;
 
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to reboot domain '%d' with libxenlight"),
+                       _("Failed to reboot domain '%1$d' with libxenlight"),
                        vm->def->id);
         ret = -1;
     }
@@ -1382,7 +1382,7 @@ libxlDomainDestroyFlags(virDomainPtr dom,
 
     if (libxlDomainDestroyInternal(driver, vm) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to destroy domain '%d'"), vm->def->id);
+                       _("Failed to destroy domain '%1$d'"), vm->def->id);
         goto endjob;
     }
 
@@ -1430,7 +1430,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom,
     virCheckFlags(0, -1);
     if (target != VIR_NODE_SUSPEND_TARGET_MEM) {
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                _("PMSuspend type %d not supported by libxenlight driver"),
+                _("PMSuspend type %1$d not supported by libxenlight driver"),
                 target);
         return -1;
     }
@@ -1462,7 +1462,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom,
 
     if (ret < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to suspend domain '%d'"), vm->def->id);
+                       _("Failed to suspend domain '%1$d'"), vm->def->id);
         goto endjob;
     }
 
@@ -1513,7 +1513,7 @@ libxlDomainPMWakeup(virDomainPtr dom, unsigned int flags)
     priv = vm->privateData;
     if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, NULL) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to resume domain '%d'"), vm->def->id);
+                       _("Failed to resume domain '%1$d'"), vm->def->id);
         goto endjob;
     }
     virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_WAKEUP);
@@ -1647,8 +1647,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
         if (flags & VIR_DOMAIN_MEM_LIVE) {
             if (libxl_domain_setmaxmem(cfg->ctx, vm->def->id, newmem) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Failed to set maximum memory for domain '%d'"
-                                 " with libxenlight"), vm->def->id);
+                               _("Failed to set maximum memory for domain '%1$d' with libxenlight"),
+                               vm->def->id);
                 goto endjob;
             }
         }
@@ -1680,8 +1680,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
             virObjectLock(vm);
             if (res < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Failed to set memory for domain '%d'"
-                                 " with libxenlight"), vm->def->id);
+                               _("Failed to set memory for domain '%1$d' with libxenlight"),
+                               vm->def->id);
                 goto endjob;
             }
             vm->def->mem.cur_balloon = newmem;
@@ -1741,7 +1741,7 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
 
         if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("libxl_domain_info failed for domain '%d'"),
+                           _("libxl_domain_info failed for domain '%1$d'"),
                            vm->def->id);
             goto cleanup;
         }
@@ -1805,15 +1805,15 @@ libxlDoDomainSave(libxlDriverPrivate *driver,
 
     if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) {
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       _("Domain '%d' has to be running because libxenlight will"
-                         " suspend it"), vm->def->id);
+                       _("Domain '%1$d' has to be running because libxenlight will suspend it"),
+                       vm->def->id);
         goto cleanup;
     }
 
     if ((fd = virFileOpenAs(to, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR,
                             -1, -1, 0)) < 0) {
         virReportSystemError(-fd,
-                             _("Failed to create domain save file '%s'"), to);
+                             _("Failed to create domain save file '%1$s'"), to);
         goto cleanup;
     }
 
@@ -1845,7 +1845,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver,
 
     if (ret != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to save domain '%d' with libxenlight"),
+                       _("Failed to save domain '%1$d' with libxenlight"),
                        vm->def->id);
         ret = -1;
         goto cleanup;
@@ -1859,7 +1859,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver,
 
     if (libxlDomainDestroyInternal(driver, vm) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to destroy domain '%d'"), vm->def->id);
+                       _("Failed to destroy domain '%1$d'"), vm->def->id);
         goto cleanup;
     }
 
@@ -2025,8 +2025,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
         virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
         if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Before dumping core, failed to suspend domain '%d'"
-                             " with libxenlight"),
+                           _("Before dumping core, failed to suspend domain '%1$d' with libxenlight"),
                            vm->def->id);
             goto endjob;
         }
@@ -2040,7 +2039,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
     virObjectLock(vm);
     if (ret != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to dump core of domain '%d' with libxenlight"),
+                       _("Failed to dump core of domain '%1$d' with libxenlight"),
                        vm->def->id);
         ret = -1;
         goto unpause;
@@ -2049,7 +2048,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
     if (flags & VIR_DUMP_CRASH) {
         if (libxlDomainDestroyInternal(driver, vm) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to destroy domain '%d'"), vm->def->id);
+                           _("Failed to destroy domain '%1$d'"), vm->def->id);
             goto unpause;
         }
 
@@ -2068,8 +2067,8 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
     if (virDomainObjIsActive(vm) && paused) {
         if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("After dumping core, failed to resume domain '%d' with"
-                             " libxenlight"), vm->def->id);
+                           _("After dumping core, failed to resume domain '%1$d' with libxenlight"),
+                           vm->def->id);
         } else {
             virDomainObjSetState(vm, VIR_DOMAIN_RUNNING,
                                  VIR_DOMAIN_RUNNING_UNPAUSED);
@@ -2234,7 +2233,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
         (flags & (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) ==
          (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("invalid flag combination: (0x%x)"), flags);
+                       _("invalid flag combination: (0x%1$x)"), flags);
         return -1;
     }
 
@@ -2275,8 +2274,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
 
     if (nvcpus > max) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("requested vcpus is greater than max allowable"
-                         " vcpus for the domain: %d > %d"), nvcpus, max);
+                       _("requested vcpus is greater than max allowable vcpus for the domain: %1$d > %2$d"),
+                       nvcpus, max);
         goto endjob;
     }
 
@@ -2308,8 +2307,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
     case VIR_DOMAIN_VCPU_LIVE:
         if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to set vcpus for domain '%d'"
-                             " with libxenlight"), vm->def->id);
+                           _("Failed to set vcpus for domain '%1$d' with libxenlight"),
+                           vm->def->id);
             goto endjob;
         }
         if (virDomainDefSetVcpus(vm->def, nvcpus) < 0)
@@ -2319,8 +2318,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
     case VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG:
         if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to set vcpus for domain '%d'"
-                             " with libxenlight"), vm->def->id);
+                           _("Failed to set vcpus for domain '%1$d' with libxenlight"),
+                           vm->def->id);
             goto endjob;
         }
         if (virDomainDefSetVcpus(vm->def, nvcpus) < 0 ||
@@ -2388,7 +2387,7 @@ libxlDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
     }
     if ((flags & VIR_DOMAIN_VCPU_LIVE) && (flags & VIR_DOMAIN_VCPU_CONFIG)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("invalid flag combination: (0x%x)"), flags);
+                       _("invalid flag combination: (0x%1$x)"), flags);
         return -1;
     }
 
@@ -2464,7 +2463,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
     if (!(vcpuinfo = virDomainDefGetVcpu(targetDef, vcpu)) ||
         !vcpuinfo->online) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("vcpu '%u' is not active"), vcpu);
+                       _("vcpu '%1$u' is not active"), vcpu);
         goto endjob;
     }
 
@@ -2472,7 +2471,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
         libxl_bitmap map = { .size = maplen, .map = cpumap };
         if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, vcpu, &map, NULL) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to pin vcpu '%d' with libxenlight"),
+                           _("Failed to pin vcpu '%1$d' with libxenlight"),
                            vcpu);
             goto endjob;
         }
@@ -2571,7 +2570,7 @@ libxlDomainGetVcpus(virDomainPtr dom, virVcpuInfoPtr info, int maxinfo,
     if ((vcpuinfo = libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu,
                                     &hostcpus)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to list vcpus for domain '%d' with libxenlight"),
+                       _("Failed to list vcpus for domain '%1$d' with libxenlight"),
                        vm->def->id);
         goto cleanup;
     }
@@ -2676,7 +2675,7 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn,
         goto cleanup;
     } else {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported config type %s"), nativeFormat);
+                       _("unsupported config type %1$s"), nativeFormat);
         goto cleanup;
     }
 
@@ -2719,7 +2718,7 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
     } else {
 
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported config type %s"), nativeFormat);
+                       _("unsupported config type %1$s"), nativeFormat);
         goto cleanup;
     }
 
@@ -2958,14 +2957,14 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, virDomainDiskDef *disk)
 
     if (!origdisk) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("No device with bus '%s' and target '%s'"),
+                       _("No device with bus '%1$s' and target '%2$s'"),
                        virDomainDiskBusTypeToString(disk->bus), disk->dst);
         goto cleanup;
     }
 
     if (origdisk->device != VIR_DOMAIN_DISK_DEVICE_CDROM) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Removable media not supported for %s device"),
+                       _("Removable media not supported for %1$s device"),
                        virDomainDiskDeviceTypeToString(disk->device));
         goto cleanup;
     }
@@ -2975,7 +2974,7 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, virDomainDiskDef *disk)
 
     if ((ret = libxl_cdrom_insert(cfg->ctx, vm->def->id, &x_disk, NULL)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to change media for disk '%s'"),
+                       _("libxenlight failed to change media for disk '%1$s'"),
                        disk->dst);
         goto cleanup;
     }
@@ -3010,7 +3009,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
             if (l_disk->bus == VIR_DOMAIN_DISK_BUS_XEN) {
                 if (virDomainDiskIndexByName(vm->def, l_disk->dst, true) >= 0) {
                     virReportError(VIR_ERR_OPERATION_FAILED,
-                                   _("target %s already exists"), l_disk->dst);
+                                   _("target %1$s already exists"), l_disk->dst);
                     goto cleanup;
                 }
 
@@ -3031,7 +3030,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
                 if ((ret = libxl_device_disk_add(cfg->ctx, vm->def->id,
                                                 &x_disk, NULL)) < 0) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("libxenlight failed to attach disk '%s'"),
+                                   _("libxenlight failed to attach disk '%1$s'"),
                                    l_disk->dst);
                     if (virDomainLockImageDetach(libxl_driver->lockManager,
                                                  vm, l_disk->src) < 0) {
@@ -3046,7 +3045,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
 
             } else {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("disk bus '%s' cannot be hotplugged."),
+                               _("disk bus '%1$s' cannot be hotplugged."),
                                virDomainDiskBusTypeToString(l_disk->bus));
             }
             break;
@@ -3055,7 +3054,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
         case VIR_DOMAIN_DISK_DEVICE_LAST:
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("disk device type '%s' cannot be hotplugged"),
+                           _("disk device type '%1$s' cannot be hotplugged"),
                            virDomainDiskDeviceTypeToString(l_disk->device));
             break;
     }
@@ -3136,7 +3135,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate *driver,
 
     if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_USB) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("'%s' controller cannot be hot plugged."),
+                       _("'%1$s' controller cannot be hot plugged."),
                        type);
         goto cleanup;
     }
@@ -3150,7 +3149,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate *driver,
 
     if (virDomainControllerFind(vm->def, controller->type, controller->idx) >= 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("target %s:%d already exists"),
+                       _("target %1$s:%2$d already exists"),
                        type, controller->idx);
         goto cleanup;
     }
@@ -3234,7 +3233,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *driver,
 
     if (libxl_device_usbdev_add(cfg->ctx, vm->def->id, &usbdev, 0) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to attach usb device Busnum:%3x, Devnum:%3x"),
+                       _("libxenlight failed to attach usb device Busnum:%1$3x, Devnum:%2$3x"),
                        hostdev->source.subsys.u.usb.bus,
                        hostdev->source.subsys.u.usb.device);
         goto reattach;
@@ -3261,7 +3260,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *driver,
 {
     if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("hostdev mode '%s' not supported"),
+                       _("hostdev mode '%1$s' not supported"),
                        virDomainHostdevModeTypeToString(hostdev->mode));
         return -1;
     }
@@ -3279,7 +3278,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *driver,
 
     default:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("hostdev subsys type '%s' not supported"),
+                       _("hostdev subsys type '%1$s' not supported"),
                        virDomainHostdevSubsysTypeToString(hostdev->source.subsys.type));
         return -1;
     }
@@ -3305,7 +3304,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
                                                     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);
                     goto cleanup;
                 }
 
@@ -3317,7 +3316,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
                 if ((ret = libxl_device_disk_remove(cfg->ctx, vm->def->id,
                                                     &x_disk, NULL)) < 0) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("libxenlight failed to detach disk '%s'"),
+                                   _("libxenlight failed to detach disk '%1$s'"),
                                    l_disk->dst);
                     goto cleanup;
                 }
@@ -3332,7 +3331,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
 
             } else {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("disk bus '%s' cannot be hot unplugged."),
+                               _("disk bus '%1$s' cannot be hot unplugged."),
                                virDomainDiskBusTypeToString(dev->data.disk->bus));
             }
             break;
@@ -3342,7 +3341,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
         case VIR_DOMAIN_DISK_DEVICE_LAST:
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("device type '%s' cannot hot unplugged"),
+                           _("device type '%1$s' cannot hot unplugged"),
                            virDomainDiskDeviceTypeToString(dev->data.disk->device));
             break;
     }
@@ -3390,7 +3389,7 @@ libxlDomainAttachNetDevice(libxlDriverPrivate *driver,
 
     if (virDomainHasNet(vm->def, net)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("network device with mac %s already exists"),
+                       _("network device with mac %1$s already exists"),
                        virMacAddrFormat(&net->mac, mac));
         goto cleanup;
     }
@@ -3501,7 +3500,7 @@ libxlDomainAttachDeviceLive(libxlDriverPrivate *driver,
         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;
     }
@@ -3524,7 +3523,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
             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);
@@ -3550,7 +3549,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
             net = dev->data.net;
             if (virDomainHasNet(vmdef, net)) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("network device with mac %s already exists"),
+                               _("network device with mac %1$s already exists"),
                                virMacAddrFormat(&net->mac, mac));
                 return -1;
             }
@@ -3721,7 +3720,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate *driver,
 
     if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_USB) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("'%s' controller cannot be hot plugged."),
+                       _("'%1$s' controller cannot be hot plugged."),
                        type);
         goto cleanup;
     }
@@ -3730,7 +3729,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate *driver,
                                        controller->type,
                                        controller->idx)) < 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("controller %s:%d not found"),
+                       _("controller %1$s:%2$d not found"),
                        type, controller->idx);
         goto cleanup;
     }
@@ -3779,7 +3778,7 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *driver,
     idx = virDomainHostdevFind(vm->def, hostdev, &detach);
     if (idx < 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("host USB device Busnum: %3x, Devnum: %3x not found"),
+                       _("host USB device Busnum: %1$3x, Devnum: %2$3x not found"),
                        usbsrc->bus, usbsrc->device);
         goto cleanup;
     }
@@ -3797,15 +3796,14 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *driver,
 
     if (!found) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("host USB device Busnum: %3x, Devnum: %3x not found"),
+                       _("host USB device Busnum: %1$3x, Devnum: %2$3x not found"),
                        usbsrc->bus, usbsrc->device);
         goto cleanup;
     }
 
     if (libxl_device_usbdev_remove(cfg->ctx, vm->def->id, &usbdev, 0) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to detach USB device "
-                         "Busnum: %3x, Devnum: %3x"),
+                       _("libxenlight failed to detach USB device Busnum: %1$3x, Devnum: %2$3x"),
                        usbsrc->bus, usbsrc->device);
         goto cleanup;
     }
@@ -3833,7 +3831,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *driver,
 
     if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("hostdev mode '%s' not supported"),
+                       _("hostdev mode '%1$s' not supported"),
                        virDomainHostdevModeTypeToString(hostdev->mode));
         return -1;
     }
@@ -3847,7 +3845,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *driver,
 
         default:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unexpected hostdev type %d"), subsys->type);
+                           _("unexpected hostdev type %1$d"), subsys->type);
             break;
     }
 
@@ -3973,7 +3971,7 @@ libxlDomainDetachDeviceLive(libxlDriverPrivate *driver,
         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;
     }
@@ -3999,7 +3997,7 @@ libxlDomainDetachDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
             disk = dev->data.disk;
             if (!(detach = 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(detach);
@@ -4091,7 +4089,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDomainDeviceDef *dev)
                 case VIR_DOMAIN_DISK_DEVICE_LAST:
                 default:
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("disk bus '%s' cannot be updated."),
+                                   _("disk bus '%1$s' cannot be updated."),
                                    virDomainDiskBusTypeToString(disk->bus));
                     break;
             }
@@ -4125,7 +4123,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDomainDeviceDef *dev)
         case VIR_DOMAIN_DEVICE_AUDIO:
         case VIR_DOMAIN_DEVICE_CRYPTO:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("device type '%s' cannot be updated"),
+                           _("device type '%1$s' cannot be updated"),
                            virDomainDeviceTypeToString(dev->type));
             break;
     }
@@ -4144,7 +4142,7 @@ libxlDomainUpdateDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
             disk = dev->data.disk;
             if (!(orig = virDomainDiskByTarget(vmdef, disk->dst))) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("target %s doesn't exist."), disk->dst);
+                               _("target %1$s doesn't exist."), disk->dst);
                 return -1;
             }
             if (!(orig->device == VIR_DOMAIN_DISK_DEVICE_CDROM)) {
@@ -4526,7 +4524,7 @@ libxlNodeGetCellsFreeMemory(virConnectPtr conn,
     /* Check/sanitize the cell range */
     if (startCell >= nr_nodes) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("start cell %d out of range (0-%d)"),
+                       _("start cell %1$d out of range (0-%2$d)"),
                        startCell, nr_nodes - 1);
         goto cleanup;
     }
@@ -4644,21 +4642,21 @@ libxlDomainSetAutostart(virDomainPtr dom, int autostart)
         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;
             }
@@ -4719,8 +4717,8 @@ libxlDomainGetSchedulerType(virDomainPtr dom, int *nparams)
         break;
     default:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("Failed to get scheduler id for domain '%d'"
-                     " with libxenlight"), vm->def->id);
+                       _("Failed to get scheduler id for domain '%1$d' with libxenlight"),
+                       vm->def->id);
         goto cleanup;
     }
 
@@ -4769,8 +4767,8 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr dom,
 
     if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to get scheduler parameters for domain '%d'"
-                         " with libxenlight"), vm->def->id);
+                       _("Failed to get scheduler parameters for domain '%1$d' with libxenlight"),
+                       vm->def->id);
         goto cleanup;
     }
 
@@ -4846,8 +4844,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
 
     if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to get scheduler parameters for domain '%d'"
-                         " with libxenlight"), vm->def->id);
+                       _("Failed to get scheduler parameters for domain '%1$d' with libxenlight"),
+                       vm->def->id);
         goto endjob;
     }
 
@@ -4862,8 +4860,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
 
     if (libxl_domain_sched_params_set(cfg->ctx, vm->def->id, &sc_info) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to set scheduler parameters for domain '%d'"
-                         " with libxenlight"), vm->def->id);
+                       _("Failed to set scheduler parameters for domain '%1$d' with libxenlight"),
+                       vm->def->id);
         goto endjob;
     }
 
@@ -4921,14 +4919,14 @@ libxlDomainOpenConsole(virDomainPtr dom,
 
     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;
     }
@@ -5045,7 +5043,7 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
             libxl_for_each_set_bit(j, nodemap) {
                 if (virBitmapSetBit(nodes, j)) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Node %zu out of range"), j);
+                                   _("Node %1$zu out of range"), j);
                     goto cleanup;
                 }
             }
@@ -5187,7 +5185,7 @@ libxlDomainGetTotalCPUStats(libxlDriverPrivate *driver,
 
     if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxl_domain_info failed for domain '%d'"),
+                       _("libxl_domain_info failed for domain '%1$d'"),
                        vm->def->id);
         goto cleanup;
     }
@@ -5227,7 +5225,7 @@ libxlDomainGetPerCPUStats(libxlDriverPrivate *driver,
     if ((vcpuinfo = libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu,
                                     &hostcpus)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to list vcpus for domain '%d' with libxenlight"),
+                       _("Failed to list vcpus for domain '%1$d' with libxenlight"),
                        vm->def->id);
         goto cleanup;
     }
@@ -5322,7 +5320,7 @@ libxlDomainMemoryStats(virDomainPtr dom,
 
     if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxl_domain_info failed for domain '%d'"),
+                       _("libxl_domain_info failed for domain '%1$d'"),
                        vm->def->id);
         goto endjob;
     }
@@ -5556,7 +5554,7 @@ libxlDomainBlockStatsVBD(virDomainObj *vm,
     if ((virFileReadAll(name, 256, &val) < 0) || \
         (sscanf(val, "%llu", &status) != 1)) { \
         virReportError(VIR_ERR_OPERATION_FAILED, \
-                       _("cannot read %s"), name); \
+                       _("cannot read %1$s"), name); \
         goto cleanup; \
     } \
     VAR += (status * MUL); \
@@ -5605,7 +5603,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm,
 
     if (!(disk = virDomainDiskByName(vm->def, path, false))) {
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       _("invalid path: %s"), path);
+                       _("invalid path: %1$s"), path);
         return ret;
     }
 
@@ -5616,7 +5614,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm,
     if (STREQ(disk_drv, "phy")) {
         if (disk_fmt != VIR_STORAGE_FILE_RAW) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                           _("unsupported format %s"),
+                           _("unsupported format %1$s"),
                            virStorageFileFormatTypeToString(disk_fmt));
             return ret;
         }
@@ -5624,7 +5622,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm,
         ret = libxlDomainBlockStatsVBD(vm, disk->dst, stats);
     } else {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("unsupported disk driver %s"),
+                       _("unsupported disk driver %1$s"),
                        disk_drv);
     }
     return ret;
@@ -5847,7 +5845,7 @@ libxlConnectSupportsFeature(virConnectPtr conn, int feature)
     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_V3:
@@ -5880,7 +5878,7 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev,
 
     if (STRNEQ(driverName, "xen")) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported driver name '%s'"), driverName);
+                       _("unsupported driver name '%1$s'"), driverName);
         return -1;
     }
 
@@ -6164,8 +6162,7 @@ libxlDomainMigrateFinish3Params(virConnectPtr dconn,
         !(vm = virDomainObjListFindByName(driver->domains, dname))) {
         /* Migration obviously failed if the domain doesn't exist */
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Migration failed. No domain on destination host "
-                         "with matching name '%s'"),
+                       _("Migration failed. No domain on destination host with matching name '%1$s'"),
                        NULLSTR(dname));
         return NULL;
     }
@@ -6338,7 +6335,7 @@ libxlDomainInterfaceAddresses(virDomainPtr dom,
 
     default:
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                       _("Unsupported IP address data source %d"),
+                       _("Unsupported IP address data source %1$d"),
                        source);
         break;
     }
@@ -6374,21 +6371,21 @@ libxlConnectGetDomainCapabilities(virConnectPtr conn,
     if (virttype_str &&
         (virttype = virDomainVirtTypeFromString(virttype_str)) < 0) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unknown virttype: %s"),
+                       _("unknown virttype: %1$s"),
                        virttype_str);
         goto cleanup;
     }
 
     if (virttype != VIR_DOMAIN_VIRT_XEN) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unknown virttype: %s"),
+                       _("unknown virttype: %1$s"),
                        virttype_str);
         goto cleanup;
     }
 
     if (arch_str && (arch = virArchFromString(arch_str)) == VIR_ARCH_NONE) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unknown architecture: %s"),
+                       _("unknown architecture: %1$s"),
                        arch_str);
         goto cleanup;
     }
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index 0867194d9e..961815f9f7 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -471,7 +471,7 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn,
 
     if ((*mig)->xenMigStreamVer > LIBXL_SAVE_VERSION) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("Xen migration stream version '%d' is not supported on this host"),
+                       _("Xen migration stream version '%1$d' is not supported on this host"),
                        (*mig)->xenMigStreamVer);
         return -1;
     }
@@ -702,14 +702,14 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn,
 
         if (uri == NULL) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("unable to parse URI: %s"),
+                           _("unable to parse URI: %1$s"),
                            uri_in);
             goto endjob;
         }
 
         if (uri->server == NULL) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("missing host in migration URI: %s"),
+                           _("missing host in migration URI: %1$s"),
                            uri_in);
             goto endjob;
         }
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index f61719adac..d5a0399613 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -59,7 +59,7 @@ xenConfigGetBool(virConf *conf,
         *value = STREQ(val->str, "1") ? 1 : 0;
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("config value %s was malformed"), name);
+                       _("config value %1$s was malformed"), name);
         return -1;
     }
     return 0;
@@ -88,12 +88,12 @@ xenConfigGetULong(virConf *conf,
     } else if (val->type == VIR_CONF_STRING) {
         if (virStrToLong_ul(val->str, NULL, 10, value) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("config value %s was malformed"), name);
+                           _("config value %1$s was malformed"), name);
             return -1;
         }
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("config value %s was malformed"), name);
+                       _("config value %1$s was malformed"), name);
         return -1;
     }
     return 0;
@@ -122,12 +122,12 @@ xenConfigGetULongLong(virConf *conf,
     } else if (val->type == VIR_CONF_STRING) {
         if (virStrToLong_ull(val->str, NULL, 10, value) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("config value %s was malformed"), name);
+                           _("config value %1$s was malformed"), name);
             return -1;
         }
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("config value %s was malformed"), name);
+                       _("config value %1$s was malformed"), name);
         return -1;
     }
     return 0;
@@ -150,7 +150,7 @@ xenConfigCopyStringInternal(virConf *conf,
         if (allowMissing)
             return 0;
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("config value %s was missing"), name);
+                       _("config value %1$s was missing"), name);
         return -1;
     }
 
@@ -203,13 +203,13 @@ xenConfigGetUUID(virConf *conf, const char *name, unsigned char *uuid)
 
     if (!string) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("%s can't be empty"), name);
+                       _("%1$s can't be empty"), name);
         return -1;
     }
 
     if (virUUIDParse(string, uuid) < 0) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("%s not parseable"), string);
+                       _("%1$s not parseable"), string);
         return -1;
     }
 
@@ -249,7 +249,7 @@ xenConfigSetInt(virConf *conf, const char *setting, long long l)
     virConfValue *value = NULL;
 
     if ((long)l != l) {
-        virReportError(VIR_ERR_OVERFLOW, _("failed to store %lld to %s"),
+        virReportError(VIR_ERR_OVERFLOW, _("failed to store %1$lld to %2$s"),
                        l, setting);
         return -1;
     }
@@ -340,7 +340,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def)
 
     if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(on_poweroff)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected value %s for on_poweroff"), on_poweroff);
+                       _("unexpected value %1$s for on_poweroff"), on_poweroff);
         return -1;
     }
 
@@ -349,7 +349,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def)
 
     if ((def->onReboot = virDomainLifecycleActionTypeFromString(on_reboot)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected value %s for on_reboot"), on_reboot);
+                       _("unexpected value %1$s for on_reboot"), on_reboot);
         return -1;
     }
 
@@ -358,7 +358,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def)
 
     if ((def->onCrash = virDomainLifecycleActionTypeFromString(on_crash)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected value %s for on_crash"), on_crash);
+                       _("unexpected value %1$s for on_crash"), on_crash);
         return -1;
     }
 
@@ -401,7 +401,7 @@ xenParsePCI(char *entry)
     str = tokens[nexttoken];
     if (!(nextstr = strchr(str, '.'))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Malformed PCI address %s"), str);
+                       _("Malformed PCI address %1$s"), str);
         return NULL;
     }
     *nextstr = '\0';
@@ -427,7 +427,7 @@ xenParsePCI(char *entry)
 
             if (!(val = strchr(options[i], '='))) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Malformed PCI options %s"), str);
+                               _("Malformed PCI options %1$s"), str);
                 return NULL;
             }
             *val = '\0';
@@ -587,7 +587,7 @@ xenParseHypervisorFeatures(virConf *conf, virDomainDef *def)
             def->xen_passthrough_mode = VIR_DOMAIN_XEN_PASSTHROUGH_MODE_SHARE_PT;
         } else {
             virReportError(VIR_ERR_CONF_SYNTAX,
-                           _("Invalid passthrough mode %s"), passthrough);
+                           _("Invalid passthrough mode %1$s"), passthrough);
         }
     }
 
@@ -711,7 +711,7 @@ xenParseVfb(virConf *conf, virDomainDef *def)
 
             if (virStrcpyStatic(vfb, *vfbs) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("VFB %s too big for destination"),
+                               _("VFB %1$s too big for destination"),
                                *vfbs);
                 goto cleanup;
             }
@@ -745,7 +745,7 @@ xenParseVfb(virConf *conf, virDomainDef *def)
                         if (virStrToLong_i(key + 11, NULL, 10,
                                            &graphics->data.vnc.port) < 0) {
                             virReportError(VIR_ERR_INTERNAL_ERROR,
-                                           _("invalid vncdisplay value '%s'"),
+                                           _("invalid vncdisplay value '%1$s'"),
                                            key + 11);
                             goto cleanup;
                         }
@@ -826,7 +826,7 @@ xenParseSxprChar(const char *value,
         } else {
             if ((def->source->type = virDomainChrTypeFromString(prefix)) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("unknown chr device type '%s'"), prefix);
+                               _("unknown chr device type '%1$s'"), prefix);
                 goto error;
             }
         }
@@ -1095,19 +1095,19 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
     regex = g_regex_new(vif_bytes_per_sec_re, 0, 0, &err);
     if (!regex) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to compile regex %s"), err->message);
+                       _("Failed to compile regex %1$s"), err->message);
         return -1;
     }
 
     if (!g_regex_match(regex, trate, 0, NULL)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Invalid rate '%s' specified"), rate);
+                       _("Invalid rate '%1$s' specified"), rate);
         return -1;
     }
 
     if (virStrToLong_ull(rate, &suffix, 10, &tmp)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to parse rate '%s'"), rate);
+                       _("Failed to parse rate '%1$s'"), rate);
         return -1;
     }
 
@@ -1178,7 +1178,7 @@ xenParseVif(char *entry, const char *vif_typename)
     if (mac) {
         if (virMacAddrParse(mac, &net->mac) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("malformed mac address '%s'"), mac);
+                           _("malformed mac address '%1$s'"), mac);
             goto cleanup;
         }
     }
@@ -1376,7 +1376,7 @@ xenParseGeneralMeta(virConf *conf, virDomainDef *def, virCaps *caps)
             def->os.type = VIR_DOMAIN_OSTYPE_HVM;
         } else {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("type %s is not supported"), str);
+                           _("type %1$s is not supported"), str);
             return -1;
         }
     } else {
@@ -1439,7 +1439,7 @@ xenParseConfigCommon(virConf *conf,
             return -1;
     } else {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported config type %s"), nativeFormat);
+                       _("unsupported config type %1$s"), nativeFormat);
         return -1;
     }
 
@@ -1527,7 +1527,7 @@ xenFormatSxprChr(virDomainChrDef *def,
 
     default:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unsupported chr device type '%s'"), type);
+                       _("unsupported chr device type '%1$s'"), type);
         return -1;
     }
 
@@ -1657,7 +1657,7 @@ xenFormatNet(virConnectPtr conn,
         virObjectUnref(network);
         if (!bridge) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("network %s is not active"),
+                           _("network %1$s is not active"),
                            net->data.network.name);
             return -1;
         }
@@ -1679,7 +1679,7 @@ xenFormatNet(virConnectPtr conn,
     case VIR_DOMAIN_NET_TYPE_VDPA:
     case VIR_DOMAIN_NET_TYPE_NULL:
     case VIR_DOMAIN_NET_TYPE_VDS:
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type '%s'"),
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type '%1$s'"),
                        virDomainNetTypeToString(net->type));
         return -1;
 
@@ -1859,7 +1859,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def)
             break;
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported clock offset='%s'"),
+                           _("unsupported clock offset='%1$s'"),
                            virDomainClockOffsetTypeToString(def->clock.offset));
             return -1;
         }
@@ -1876,7 +1876,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def)
             break;
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported clock offset='%s'"),
+                           _("unsupported clock offset='%1$s'"),
                            virDomainClockOffsetTypeToString(def->clock.offset));
             return -1;
         }
@@ -1896,7 +1896,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *def)
 
     if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onPoweroff))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected lifecycle action %d"), def->onPoweroff);
+                       _("unexpected lifecycle action %1$d"), def->onPoweroff);
         return -1;
     }
     if (xenConfigSetString(conf, "on_poweroff", lifecycle) < 0)
@@ -1905,7 +1905,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *def)
 
     if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onReboot))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected lifecycle action %d"), def->onReboot);
+                       _("unexpected lifecycle action %1$d"), def->onReboot);
         return -1;
     }
     if (xenConfigSetString(conf, "on_reboot", lifecycle) < 0)
@@ -1914,7 +1914,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *def)
 
     if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onCrash))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected lifecycle action %d"), def->onCrash);
+                       _("unexpected lifecycle action %1$d"), def->onCrash);
         return -1;
     }
     if (xenConfigSetString(conf, "on_crash", lifecycle) < 0)
@@ -2122,7 +2122,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainDef *def)
                     return -1;
             } else {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("unsupported timer type (name) '%s'"),
+                               _("unsupported timer type (name) '%1$s'"),
                                virDomainTimerNameTypeToString(def->clock.timers[i]->name));
                 return -1;
             }
@@ -2135,7 +2135,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainDef *def)
         case VIR_DOMAIN_TIMER_NAME_PIT:
         case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported timer type (name) '%s'"),
+                           _("unsupported timer type (name) '%1$s'"),
                            virDomainTimerNameTypeToString(def->clock.timers[i]->name));
             return -1;
 
@@ -2284,7 +2284,7 @@ xenFormatSound(virConf *conf, virDomainDef *def)
     for (i = 0; i < def->nsounds; i++) {
         if (!(model = virDomainSoundModelTypeToString(def->sounds[i]->model))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unexpected sound model %d"),
+                           _("unexpected sound model %1$d"),
                            def->sounds[i]->model);
             return -1;
         }
@@ -2368,7 +2368,7 @@ xenFormatConfigCommon(virConf *conf,
             return -1;
     } else {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported config type %s"), nativeFormat);
+                       _("unsupported config type %1$s"), nativeFormat);
         return -1;
     }
 
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index cfd56b3b05..d5076f2438 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -274,7 +274,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def)
 
     if (STRNEQ(cpuid_pairs[0], "host")) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("cpuid starting with %s is not supported, only libxl format is"),
+                       _("cpuid starting with %1$s is not supported, only libxl format is"),
                        cpuid_pairs[0]);
         return -1;
     }
@@ -285,7 +285,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def)
             return -1;
         if (!name_and_value[0] || !name_and_value[1]) {
             virReportError(VIR_ERR_CONF_SYNTAX,
-                           _("Invalid libxl cpuid key=value element: %s"),
+                           _("Invalid libxl cpuid key=value element: %1$s"),
                            cpuid_pairs[i]);
             return -1;
         }
@@ -301,7 +301,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def)
             policy = VIR_CPU_FEATURE_OPTIONAL;
         } else {
             virReportError(VIR_ERR_CONF_SYNTAX,
-                           _("Invalid libxl cpuid value: %s"),
+                           _("Invalid libxl cpuid value: %1$s"),
                            cpuid_pairs[i]);
             return -1;
         }
@@ -434,7 +434,7 @@ xenParseXLVnuma(virConf *conf,
                 if (!str ||
                    !(data = strrchr(str, '='))) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("vnuma vnode invalid format '%s'"),
+                                   _("vnuma vnode invalid format '%1$s'"),
                                    str);
                     return -1;
                 }
@@ -447,7 +447,7 @@ xenParseXLVnuma(virConf *conf,
                         if ((virStrToLong_ui(data, NULL, 10, &cellid) < 0) ||
                             (cellid >= nr_nodes)) {
                             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                           _("vnuma vnode %zu contains invalid pnode value '%s'"),
+                                           _("vnuma vnode %1$zu contains invalid pnode value '%2$s'"),
                                            vnodeCnt, data);
                             return -1;
                         }
@@ -477,7 +477,7 @@ xenParseXLVnuma(virConf *conf,
 
                         if (ndistances != nr_nodes) {
                             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                       _("vnuma pnode %d configured '%s' (count %zu) doesn't fit the number of specified vnodes %zu"),
+                                       _("vnuma pnode %1$d configured '%2$s' (count %3$zu) doesn't fit the number of specified vnodes %4$zu"),
                                        pnode, str, ndistances, nr_nodes);
                             return -1;
                         }
@@ -493,7 +493,7 @@ xenParseXLVnuma(virConf *conf,
 
                     } else {
                         virReportError(VIR_ERR_CONF_SYNTAX,
-                                       _("Invalid vnuma configuration for vnode %zu"),
+                                       _("Invalid vnuma configuration for vnode %1$zu"),
                                        vnodeCnt);
                         return -1;
                     }
@@ -506,7 +506,7 @@ xenParseXLVnuma(virConf *conf,
             (cpumask == NULL) ||
             (kbsize == 0)) {
             virReportError(VIR_ERR_CONF_SYNTAX,
-                           _("Incomplete vnuma configuration for vnode %zu"),
+                           _("Incomplete vnuma configuration for vnode %1$zu"),
                            vnodeCnt);
             return -1;
         }
@@ -520,7 +520,7 @@ xenParseXLVnuma(virConf *conf,
 
     if (def->maxvcpus < vcpus) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("vnuma configuration contains %zu vcpus, which is greater than %zu maxvcpus"),
+                       _("vnuma configuration contains %1$zu vcpus, which is greater than %2$zu maxvcpus"),
                        vcpus, def->maxvcpus);
         return -1;
     }
@@ -693,7 +693,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def)
 
                 default:
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("disk image format not supported: %s"),
+                                   _("disk image format not supported: %1$s"),
                                    libxl_disk_format_to_string(libxldisk.format));
                     goto fail;
                 }
@@ -720,7 +720,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def)
 #endif
                 default:
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("disk backend not supported: %s"),
+                                   _("disk backend not supported: %1$s"),
                                    libxl_disk_backend_to_string(libxldisk.backend));
                     goto fail;
                 }
@@ -770,7 +770,7 @@ xenParseXLInputDevs(virConf *conf, virDomainDef *def)
         while (val) {
             if (val->type != VIR_CONF_STRING) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("config value %s was malformed"),
+                               _("config value %1$s was malformed"),
                                "usbdevice");
                 return -1;
             }
@@ -1448,14 +1448,14 @@ xenFormatXLDiskSrcNet(virStorageSource *src)
     case VIR_STORAGE_NET_PROTOCOL_LAST:
     case VIR_STORAGE_NET_PROTOCOL_NONE:
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Unsupported network block protocol '%s'"),
+                       _("Unsupported network block protocol '%1$s'"),
                        virStorageNetProtocolTypeToString(src->protocol));
         return NULL;
 
     case VIR_STORAGE_NET_PROTOCOL_RBD:
         if (strchr(src->path, ':')) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("':' not allowed in RBD source volume name '%s'"),
+                           _("':' not allowed in RBD source volume name '%1$s'"),
                            src->path);
             return NULL;
         }
diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c
index 334de071ba..0031d6cbc6 100644
--- a/src/libxl/xen_xm.c
+++ b/src/libxl/xen_xm.c
@@ -186,7 +186,7 @@ xenParseXMDisk(char *entry, int hvm)
             VIR_FREE(driverType);
             if (virDomainDiskGetFormat(disk) <= 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Unknown driver type %s"),
+                               _("Unknown driver type %1$s"),
                                src);
                 goto error;
             }
@@ -297,7 +297,7 @@ xenFormatXMDisk(virConfValue *list,
                 break;
             default:
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("unsupported disk type %s"),
+                               _("unsupported disk type %1$s"),
                                virStorageTypeToString(virDomainDiskGetType(disk)));
                 return -1;
             }
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux