]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: Update format strings in translated messages
authorJiri Denemark <jdenemar@redhat.com>
Thu, 9 Mar 2023 11:11:59 +0000 (12:11 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Sat, 1 Apr 2023 09:40:33 +0000 (11:40 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libxl/libxl_capabilities.c
src/libxl/libxl_conf.c
src/libxl/libxl_domain.c
src/libxl/libxl_driver.c
src/libxl/libxl_migration.c
src/libxl/xen_common.c
src/libxl/xen_xl.c
src/libxl/xen_xm.c

index c2975d637ee962ad9a2bcad7ab0ec26995003e40..cd40cff739cf9bb29867a646fe847be4410973bd 100644 (file)
@@ -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;
     }
 
index a20474cc371a89ab5ec98118d541123b04d7bfb4..a1c76935b642367de31e095325759b2a3914f66f 100644 (file)
@@ -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;
             }
@@ -656,7 +656,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;
         }
@@ -664,14 +664,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;
             }
@@ -798,7 +798,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:
@@ -892,7 +892,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;
         }
 
@@ -978,14 +978,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;
         }
@@ -1113,8 +1113,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;
@@ -1139,8 +1138,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;
@@ -1148,8 +1146,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;
@@ -1159,8 +1156,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;
@@ -1169,7 +1165,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;
         }
@@ -1407,7 +1403,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;
     }
@@ -1726,7 +1722,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;
     }
 
@@ -1789,7 +1785,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;
     }
@@ -2194,8 +2190,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;
         }
@@ -2388,7 +2383,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;
         }
@@ -2419,7 +2414,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;
     }
index f28a6207a3d4c961b4a3df2d3db88b7208e501e2..6c167df63efc9fdcb22e91ea5dbc6d127d79b738 100644 (file)
@@ -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;
         }
index 6e002ab77c029c4557e8aa292f752344d634041c..d99bc37bf6ac378af37a4de992d4a2b186cc0d48 100644 (file)
@@ -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;
     }
@@ -3082,7 +3081,7 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivate *driver,
 
     if (virDomainHostdevFind(vm->def, hostdev, &found) >= 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("target pci device %04x:%02x:%02x.%d already exists"),
+                       _("target pci device %1$04x:%2$02x:%3$02x.%4$d already exists"),
                        pcisrc->addr.domain, pcisrc->addr.bus,
                        pcisrc->addr.slot, pcisrc->addr.function);
         goto cleanup;
@@ -3100,7 +3099,7 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivate *driver,
 
     if (libxl_device_pci_add(cfg->ctx, vm->def->id, &pcidev, 0) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to attach pci device %04x:%02x:%02x.%d"),
+                       _("libxenlight failed to attach pci device %1$04x:%2$02x:%3$02x.%4$d"),
                        pcisrc->addr.domain, pcisrc->addr.bus,
                        pcisrc->addr.slot, pcisrc->addr.function);
         goto error;
@@ -3134,7 +3133,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;
     }
@@ -3148,7 +3147,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;
     }
@@ -3232,7 +3231,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;
@@ -3259,7 +3258,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;
     }
@@ -3277,7 +3276,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;
     }
@@ -3303,7 +3302,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;
                 }
 
@@ -3315,7 +3314,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;
                 }
@@ -3330,7 +3329,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;
@@ -3340,7 +3339,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;
     }
@@ -3388,7 +3387,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;
     }
@@ -3499,7 +3498,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;
     }
@@ -3522,7 +3521,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);
@@ -3548,7 +3547,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;
             }
@@ -3657,7 +3656,7 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivate *driver,
     idx = virDomainHostdevFind(vm->def, hostdev, &detach);
     if (idx < 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("host pci device %04x:%02x:%02x.%d not found"),
+                       _("host pci device %1$04x:%2$02x:%3$02x.%4$d not found"),
                        pcisrc->addr.domain, pcisrc->addr.bus,
                        pcisrc->addr.slot, pcisrc->addr.function);
         goto cleanup;
@@ -3665,7 +3664,7 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivate *driver,
 
     if (libxlIsMultiFunctionDevice(vm->def, detach->info)) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("cannot hot unplug multifunction PCI device: %04x:%02x:%02x.%d"),
+                       _("cannot hot unplug multifunction PCI device: %1$04x:%2$02x:%3$02x.%4$d"),
                        pcisrc->addr.domain, pcisrc->addr.bus,
                        pcisrc->addr.slot, pcisrc->addr.function);
         goto error;
@@ -3677,7 +3676,7 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivate *driver,
 
     if (libxl_device_pci_remove(cfg->ctx, vm->def->id, &pcidev, 0) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("libxenlight failed to detach pci device %04x:%02x:%02x.%d"),
+                       _("libxenlight failed to detach pci device %1$04x:%2$02x:%3$02x.%4$d"),
                        pcisrc->addr.domain, pcisrc->addr.bus,
                        pcisrc->addr.slot, pcisrc->addr.function);
         goto error;
@@ -3716,7 +3715,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;
     }
@@ -3725,7 +3724,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;
     }
@@ -3774,7 +3773,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;
     }
@@ -3792,15 +3791,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;
     }
@@ -3828,7 +3826,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;
     }
@@ -3842,7 +3840,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *driver,
 
         default:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unexpected hostdev type %d"), subsys->type);
+                           _("unexpected hostdev type %1$d"), subsys->type);
             break;
     }
 
@@ -3968,7 +3966,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;
     }
@@ -3994,7 +3992,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);
@@ -4086,7 +4084,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;
             }
@@ -4120,7 +4118,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;
     }
@@ -4139,7 +4137,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)) {
@@ -4521,7 +4519,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;
     }
@@ -4639,21 +4637,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;
             }
@@ -4714,8 +4712,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;
     }
 
@@ -4764,8 +4762,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;
     }
 
@@ -4841,8 +4839,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;
     }
 
@@ -4857,8 +4855,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;
     }
 
@@ -4916,14 +4914,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;
     }
@@ -5040,7 +5038,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;
                 }
             }
@@ -5182,7 +5180,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;
     }
@@ -5222,7 +5220,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;
     }
@@ -5317,7 +5315,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;
     }
@@ -5551,7 +5549,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); \
@@ -5600,7 +5598,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;
     }
 
@@ -5611,7 +5609,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;
         }
@@ -5619,7 +5617,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;
@@ -5842,7 +5840,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:
@@ -5875,7 +5873,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;
     }
 
@@ -6159,8 +6157,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;
     }
@@ -6333,7 +6330,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;
     }
@@ -6369,21 +6366,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;
     }
index 0867194d9eec0adb21a2399a436f59a916d9ab40..961815f9f7daf5c68a175fabe46b7f15ba84f772 100644 (file)
@@ -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;
         }
index f61719adac62c83493b01d45910fe0f0a658e6d8..d5a0399613fadc3594574c1b1956de3c78230266 100644 (file)
@@ -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;
     }
 
index 02d43d05ce7d4c272c5c281e07975e03a188278d..77f9f112f0f88d11dadc67a60b17f4708947fc82 100644 (file)
@@ -279,7 +279,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;
     }
@@ -290,7 +290,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;
         }
@@ -306,7 +306,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;
         }
@@ -439,7 +439,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;
                 }
@@ -452,7 +452,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;
                         }
@@ -482,7 +482,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;
                         }
@@ -498,7 +498,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;
                     }
@@ -511,7 +511,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;
         }
@@ -525,7 +525,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;
     }
@@ -698,7 +698,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;
                 }
@@ -725,7 +725,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;
                 }
@@ -775,7 +775,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;
             }
@@ -1457,14 +1457,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;
         }
index 334de071bab2c6ec9e16cb611a2863b7e35a9d50..0031d6cbc6eea95feb8cb191a00b2b13dc9bfe2b 100644 (file)
@@ -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;
             }