[libvirt PATCH 32/51] qemu: 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/qemu/qemu_agent.c            | 41 ++++++++---------
 src/qemu/qemu_backup.c           | 12 ++---
 src/qemu/qemu_block.c            | 39 ++++++++--------
 src/qemu/qemu_blockjob.c         |  2 +-
 src/qemu/qemu_capabilities.c     | 50 ++++++++++----------
 src/qemu/qemu_cgroup.c           |  4 +-
 src/qemu/qemu_checkpoint.c       | 19 ++++----
 src/qemu/qemu_conf.c             | 75 ++++++++++++++----------------
 src/qemu/qemu_dbus.c             | 12 ++---
 src/qemu/qemu_domain_address.c   | 26 ++++-------
 src/qemu/qemu_domainjob.c        |  6 +--
 src/qemu/qemu_extdevice.c        |  2 +-
 src/qemu/qemu_fd.c               |  2 +-
 src/qemu/qemu_firmware.c         | 42 ++++++++---------
 src/qemu/qemu_interface.c        |  6 +--
 src/qemu/qemu_interop_config.c   |  4 +-
 src/qemu/qemu_migration_cookie.c | 34 +++++++-------
 src/qemu/qemu_migration_params.c | 18 ++++----
 src/qemu/qemu_monitor.c          | 30 ++++++------
 src/qemu/qemu_monitor_text.c     |  4 +-
 src/qemu/qemu_namespace.c        | 46 +++++++++----------
 src/qemu/qemu_passt.c            |  2 +-
 src/qemu/qemu_qapi.c             |  4 +-
 src/qemu/qemu_saveimage.c        | 30 ++++++------
 src/qemu/qemu_slirp.c            |  6 +--
 src/qemu/qemu_snapshot.c         | 78 ++++++++++++++------------------
 src/qemu/qemu_tpm.c              | 29 ++++++------
 src/qemu/qemu_vhost_user.c       |  8 ++--
 src/qemu/qemu_vhost_user_gpu.c   |  2 +-
 src/qemu/qemu_virtiofs.c         | 10 ++--
 30 files changed, 303 insertions(+), 340 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index b5aa518d55..eda1308097 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -169,7 +169,7 @@ qemuAgentOpenUnix(const char *socketpath)
     addr.sun_family = AF_UNIX;
     if (virStrcpyStatic(addr.sun_path, socketpath) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Socket path %s too big for destination"), socketpath);
+                       _("Socket path %1$s too big for destination"), socketpath);
         goto error;
     }
 
@@ -226,7 +226,7 @@ qemuAgentIOProcessLine(qemuAgent *agent,
 
     if (virJSONValueGetType(obj) != VIR_JSON_TYPE_OBJECT) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Parsed JSON reply '%s' isn't an object"), line);
+                       _("Parsed JSON reply '%1$s' isn't an object"), line);
         return -1;
     }
 
@@ -264,7 +264,7 @@ qemuAgentIOProcessLine(qemuAgent *agent,
     }
 
     virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("Unknown JSON reply '%s'"), line);
+                   _("Unknown JSON reply '%1$s'"), line);
     return -1;
 }
 
@@ -375,7 +375,7 @@ qemuAgentIORead(qemuAgent *agent)
     if (avail < 1024) {
         if (agent->bufferLength >= QEMU_AGENT_MAX_RESPONSE) {
             virReportSystemError(ERANGE,
-                                 _("No complete agent response found in %d bytes"),
+                                 _("No complete agent response found in %1$d bytes"),
                                  QEMU_AGENT_MAX_RESPONSE);
             return -1;
         }
@@ -616,7 +616,7 @@ qemuAgentOpen(virDomainObj *vm,
 
     if (config->type != VIR_DOMAIN_CHR_TYPE_UNIX) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to handle agent type: %s"),
+                       _("unable to handle agent type: %1$s"),
                        virDomainChrTypeToString(config->type));
         goto cleanup;
     }
@@ -633,7 +633,7 @@ qemuAgentOpen(virDomainObj *vm,
     agent->socket = g_socket_new_from_fd(agent->fd, &gerr);
     if (!agent->socket) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unable to create socket object: %s"),
+                       _("Unable to create socket object: %1$s"),
                        gerr->message);
         goto cleanup;
     }
@@ -973,7 +973,7 @@ qemuAgentCheckError(virJSONValue *cmd,
         /* Only send the user the command name + friendly error */
         if (!error) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unable to execute QEMU agent command '%s'"),
+                           _("unable to execute QEMU agent command '%1$s'"),
                            qemuAgentCommandName(cmd));
             return -1;
         }
@@ -987,7 +987,7 @@ qemuAgentCheckError(virJSONValue *cmd,
         }
 
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to execute QEMU agent command '%s': %s"),
+                       _("unable to execute QEMU agent command '%1$s': %2$s"),
                        qemuAgentCommandName(cmd),
                        qemuAgentStringifyError(error));
 
@@ -1000,7 +1000,7 @@ qemuAgentCheckError(virJSONValue *cmd,
         VIR_DEBUG("Neither 'return' nor 'error' is set in the JSON reply %s: %s",
                   NULLSTR(cmdstr), NULLSTR(replystr));
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to execute QEMU agent command '%s'"),
+                       _("unable to execute QEMU agent command '%1$s'"),
                        qemuAgentCommandName(cmd));
         return -1;
     }
@@ -1283,8 +1283,7 @@ qemuAgentArbitraryCommand(qemuAgent *agent,
     *result = NULL;
     if (timeout < VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("guest agent timeout '%d' is "
-                         "less than the minimum '%d'"),
+                       _("guest agent timeout '%1$d' is less than the minimum '%2$d'"),
                        timeout, VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN);
         return -1;
     }
@@ -1654,7 +1653,7 @@ qemuAgentSetTime(qemuAgent *agent,
          * not ULLONG_MAX. */
         if (seconds > LLONG_MAX / 1000000000LL) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("Time '%lld' is too big for guest agent"),
+                           _("Time '%1$lld' is too big for guest agent"),
                            seconds);
             return -1;
         }
@@ -1739,7 +1738,7 @@ qemuAgentGetDiskAddress(virJSONValue *json)
     do { \
         if (virJSONValueObjectGetNumberUint(jsonObject, name, var) < 0) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("'%s' missing"), name); \
+                           _("'%1$s' missing"), name); \
             return NULL; \
         } \
     } while (0)
@@ -1796,8 +1795,7 @@ qemuAgentGetFSInfoFillDisks(virJSONValue *jsondisks,
 
         if (!jsondisk) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("array element '%zd' of '%zd' missing in "
-                             "guest-get-fsinfo 'disk' data"),
+                           _("array element '%1$zd' of '%2$zd' missing in guest-get-fsinfo 'disk' data"),
                            i, fsinfo->ndisks);
             return -1;
         }
@@ -1859,8 +1857,7 @@ qemuAgentGetFSInfo(qemuAgent *agent,
 
         if (!entry) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("array element '%zd' of '%zd' missing in "
-                             "guest-get-fsinfo return data"),
+                           _("array element '%1$zd' of '%2$zd' missing in guest-get-fsinfo return data"),
                            i, ndata);
             goto cleanup;
         }
@@ -1951,14 +1948,14 @@ qemuAgentGetInterfaceOneAddress(virDomainIPAddressPtr ip_addr,
     type = virJSONValueObjectGetString(ip_addr_obj, "ip-address-type");
     if (!type) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("qemu agent didn't provide 'ip-address-type'"
-                         " field for interface '%s'"), name);
+                       _("qemu agent didn't provide 'ip-address-type' field for interface '%1$s'"),
+                       name);
         return -1;
     }
 
     if (STRNEQ(type, "ipv4") && STRNEQ(type, "ipv6")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown ip address type '%s'"),
+                       _("unknown ip address type '%1$s'"),
                        type);
         return -1;
     }
@@ -1966,8 +1963,8 @@ qemuAgentGetInterfaceOneAddress(virDomainIPAddressPtr ip_addr,
     addr = virJSONValueObjectGetString(ip_addr_obj, "ip-address");
     if (!addr) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("qemu agent didn't provide 'ip-address'"
-                         " field for interface '%s'"), name);
+                       _("qemu agent didn't provide 'ip-address' field for interface '%1$s'"),
+                       name);
         return -1;
     }
 
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 6a5aacd9f6..3be33193f4 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -206,7 +206,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
                                      dd->backupdisk->incremental,
                                      blockNamedNodeData)) {
         virReportError(VIR_ERR_CHECKPOINT_INCONSISTENT,
-                       _("missing or broken bitmap '%s' for disk '%s'"),
+                       _("missing or broken bitmap '%1$s' for disk '%2$s'"),
                        dd->backupdisk->incremental, dd->domdisk->dst);
         return -1;
     }
@@ -256,7 +256,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm,
 
     if (!(dd->domdisk = virDomainDiskByTarget(vm->def, dd->backupdisk->name))) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("no disk named '%s'"), dd->backupdisk->name);
+                       _("no disk named '%1$s'"), dd->backupdisk->name);
         return -1;
     }
 
@@ -268,7 +268,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm,
     } else if (dd->store->format != VIR_STORAGE_FILE_QCOW2) {
         if (pull) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("pull mode backup for disk '%s' requires qcow2 driver"),
+                           _("pull mode backup for disk '%1$s' requires qcow2 driver"),
                            dd->backupdisk->name);
             return -1;
         }
@@ -298,7 +298,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm,
          * has corresponding bitmap. */
         if (!virDomainCheckpointFindByName(vm->checkpoints, dd->backupdisk->incremental)) {
             virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT,
-                           _("Checkpoint '%s' for incremental backup of disk '%s' not found"),
+                           _("Checkpoint '%1$s' for incremental backup of disk '%2$s' not found"),
                            dd->backupdisk->incremental, dd->backupdisk->name);
             return -1;
         }
@@ -428,7 +428,7 @@ qemuBackupDiskPrepareOneStorage(virDomainObj *vm,
 
         if (virFileExists(dd->store->path)) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("store '%s' for backup of '%s' exists"),
+                           _("store '%1$s' for backup of '%2$s' exists"),
                            dd->store->path, dd->domdisk->dst);
             return -1;
         }
@@ -440,7 +440,7 @@ qemuBackupDiskPrepareOneStorage(virDomainObj *vm,
 
         if (virStorageSourceCreate(dd->store) < 0) {
             virReportSystemError(errno,
-                                 _("failed to create image file '%s'"),
+                                 _("failed to create image file '%1$s'"),
                                  NULLSTR(dd->store->path));
             return -1;
         }
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 8fcebd8992..918b426103 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -44,7 +44,7 @@ qemuBlockNodeNameValidate(const char *nn)
 
     if (strlen(nn) >= qemuBlockNodeNameBufSize) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("node-name '%s' too long for qemu"), nn);
+                       _("node-name '%1$s' too long for qemu"), nn);
         return -1;
     }
 
@@ -80,7 +80,7 @@ qemuBlockStorageSourceGetURI(virStorageSource *src)
 
     if (src->nhosts != 1) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("protocol '%s' accepts only one host"),
+                       _("protocol '%1$s' accepts only one host"),
                        virStorageNetProtocolTypeToString(src->protocol));
         return NULL;
     }
@@ -153,7 +153,7 @@ qemuBlockStorageSourceBuildJSONSocketAddress(virStorageNetHostDef *host)
     case VIR_STORAGE_NET_HOST_TRANS_RDMA:
     case VIR_STORAGE_NET_HOST_TRANS_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("transport protocol '%s' is not yet supported"),
+                       _("transport protocol '%1$s' is not yet supported"),
                        virStorageNetHostTransportTypeToString(host->transport));
         return NULL;
     }
@@ -469,7 +469,7 @@ qemuBlockStorageSourceGetISCSIProps(virStorageSource *src,
         *(lunStr++) = '\0';
         if (virStrToLong_ui(lunStr, NULL, 10, &lun) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("cannot parse target for lunStr '%s'"),
+                           _("cannot parse target for lunStr '%1$s'"),
                            target);
             return NULL;
         }
@@ -866,7 +866,7 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src,
 
     case VIR_STORAGE_TYPE_VOLUME:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("storage source pool '%s' volume '%s' is not translated"),
+                       _("storage source pool '%1$s' volume '%2$s' is not translated"),
                        src->srcpool->pool, src->srcpool->volume);
         return NULL;
 
@@ -1212,7 +1212,7 @@ qemuBlockStorageSourceGetBlockdevFormatProps(virStorageSource *src)
     case VIR_STORAGE_FILE_ISO:
     case VIR_STORAGE_FILE_DIR:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("mishandled storage format '%s'"),
+                       _("mishandled storage format '%1$s'"),
                        virStorageFileFormatTypeToString(src->format));
         return NULL;
 
@@ -1271,7 +1271,7 @@ qemuBlockStorageSourceGetBlockdevProps(virStorageSource *src,
         } else {
             if (virStorageSourceIsBacking(backingStore)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("storage format '%s' does not support backing store"),
+                               _("storage format '%1$s' does not support backing store"),
                                virStorageFileFormatTypeToString(src->format));
                 return NULL;
             }
@@ -2198,7 +2198,7 @@ qemuBlockStorageSourceCreateGetFormatProps(virStorageSource *src,
     case VIR_STORAGE_FILE_AUTO:
     case VIR_STORAGE_FILE_NONE:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("mishandled storage format '%s'"),
+                       _("mishandled storage format '%1$s'"),
                        virStorageFileFormatTypeToString(src->format));
         return -1;
 
@@ -2352,7 +2352,7 @@ qemuBlockStorageSourceCreateGeneric(virDomainObj *vm,
                            _("blockdev-create job was cancelled"));
         } else {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("failed to format image: '%s'"), NULLSTR(job->errmsg));
+                           _("failed to format image: '%1$s'"), NULLSTR(job->errmsg));
         }
         goto cleanup;
     }
@@ -2421,7 +2421,7 @@ qemuBlockStorageSourceCreateFormat(virDomainObj *vm,
 
     if (!createformatprops) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("can't create storage format '%s'"),
+                       _("can't create storage format '%1$s'"),
                        virStorageFileFormatTypeToString(src->format));
         return -1;
     }
@@ -2552,7 +2552,7 @@ qemuBlockStorageSourceCreateDetectSize(GHashTable *blockNamedNodeData,
 
     if (!(entry = virHashLookup(blockNamedNodeData, templ->nodeformat))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to update capacity data for block node '%s'"),
+                       _("failed to update capacity data for block node '%1$s'"),
                        templ->nodeformat);
         return -1;
     }
@@ -3282,7 +3282,7 @@ qemuBlockCommit(virDomainObj *vm,
 
     if (virStorageSourceIsEmpty(disk->src)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("disk %s has no source file to be committed"),
+                       _("disk %1$s has no source file to be committed"),
                        disk->dst);
         return NULL;
     }
@@ -3297,20 +3297,20 @@ qemuBlockCommit(virDomainObj *vm,
         /* XXX Should we auto-pivot when COMMIT_ACTIVE is not specified? */
         if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("commit of '%s' active layer requires active flag"),
+                           _("commit of '%1$s' active layer requires active flag"),
                            disk->dst);
             return NULL;
         }
     } else if (flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("active commit requested but '%s' is not active"),
+                       _("active commit requested but '%1$s' is not active"),
                        topSource->path);
         return NULL;
     }
 
     if (!virStorageSourceHasBacking(topSource)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("top '%s' in chain for '%s' has no backing file"),
+                       _("top '%1$s' in chain for '%2$s' has no backing file"),
                        topSource->path, disk->src->path);
         return NULL;
     }
@@ -3318,8 +3318,7 @@ qemuBlockCommit(virDomainObj *vm,
     if ((flags & VIR_DOMAIN_BLOCK_COMMIT_SHALLOW) &&
         baseSource != topSource->backingStore) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("base '%s' is not immediately below '%s' in chain "
-                         "for '%s'"),
+                       _("base '%1$s' is not immediately below '%2$s' in chain for '%3$s'"),
                        baseSource->path, topSource->path, disk->src->path);
         return NULL;
     }
@@ -3448,7 +3447,7 @@ qemuBlockPivot(virDomainObj *vm,
 
     if (job->state != QEMU_BLOCKJOB_STATE_READY) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE,
-                       _("block job '%s' not ready for pivot yet"),
+                       _("block job '%1$s' not ready for pivot yet"),
                        job->name);
         return -1;
     }
@@ -3457,7 +3456,7 @@ qemuBlockPivot(virDomainObj *vm,
     case QEMU_BLOCKJOB_TYPE_NONE:
     case QEMU_BLOCKJOB_TYPE_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("invalid job type '%d'"), job->type);
+                       _("invalid job type '%1$d'"), job->type);
         return -1;
 
     case QEMU_BLOCKJOB_TYPE_PULL:
@@ -3467,7 +3466,7 @@ qemuBlockPivot(virDomainObj *vm,
     case QEMU_BLOCKJOB_TYPE_CREATE:
     case QEMU_BLOCKJOB_TYPE_BROKEN:
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       _("job type '%s' does not support pivot"),
+                       _("job type '%1$s' does not support pivot"),
                        qemuBlockjobTypeToString(job->type));
         return -1;
 
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index a20cf1db62..ecd9007ef5 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -175,7 +175,7 @@ qemuBlockJobRegister(qemuBlockJobData *job,
 
     if (disk && QEMU_DOMAIN_DISK_PRIVATE(disk)->blockjob) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("disk '%s' has a blockjob assigned"), disk->dst);
+                       _("disk '%1$s' has a blockjob assigned"), disk->dst);
         return -1;
     }
 
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 218e6c09a4..68e940b70d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1807,7 +1807,7 @@ int virQEMUCapsGetDefaultVersion(virCaps *caps,
             VIR_DOMAIN_OSTYPE_HVM, hostarch, VIR_DOMAIN_VIRT_NONE,
             NULL, NULL))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Cannot find suitable emulator for %s"),
+                       _("Cannot find suitable emulator for %1$s"),
                        virArchToString(hostarch));
         return -1;
     }
@@ -3665,8 +3665,7 @@ virQEMUCapsInitCPUModelS390(virQEMUCaps *qemuCaps,
     if (!modelInfo) {
         if (type == VIR_DOMAIN_VIRT_KVM) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing host CPU model info from QEMU "
-                             "capabilities for binary %s"),
+                           _("missing host CPU model info from QEMU capabilities for binary %1$s"),
                            qemuCaps->binary);
             return -1;
         }
@@ -4034,8 +4033,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccel *caps,
                 prop->value.string = virXMLPropString(ctxt->node, "value");
                 if (!prop->value.string) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("invalid string value for '%s' host CPU "
-                                     "model property in QEMU capabilities cache"),
+                                   _("invalid string value for '%1$s' host CPU model property in QEMU capabilities cache"),
                                    prop->name);
                     return -1;
                 }
@@ -4045,8 +4043,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccel *caps,
                 if (virXPathLongLong("string(./@value)", ctxt,
                                      &prop->value.number) < 0) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("invalid number value for '%s' host CPU "
-                                     "model property in QEMU capabilities cache"),
+                                   _("invalid number value for '%1$s' host CPU model property in QEMU capabilities cache"),
                                    prop->name);
                     return -1;
                 }
@@ -4105,7 +4102,7 @@ virQEMUCapsLoadCPUModels(virArch arch,
         if ((strUsable = virXMLPropString(nodes[i], "usable")) &&
             (usable = virDomainCapsCPUUsableTypeFromString(strUsable)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unknown value '%s' in attribute 'usable'"),
+                           _("unknown value '%1$s' in attribute 'usable'"),
                            strUsable);
             return -1;
         }
@@ -4457,7 +4454,7 @@ virQEMUCapsParseHypervCapabilities(virQEMUCaps *qemuCaps,
 
         if ((val = virDomainHypervTypeFromString(name)) < 0) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unsupported HyperV Enlightenment feature: %s"),
+                           _("unsupported HyperV Enlightenment feature: %1$s"),
                            name);
             return -1;
         }
@@ -4497,7 +4494,7 @@ virQEMUCapsParseFlags(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
         flag = virQEMUCapsTypeFromString(str);
         if (flag < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unknown qemu capabilities flag %s"), str);
+                           _("Unknown qemu capabilities flag %1$s"), str);
             return -1;
         }
 
@@ -4597,7 +4594,7 @@ virQEMUCapsValidateEmulator(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
 
     if (STRNEQ(str, qemuCaps->binary)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expected caps for '%s' but saw '%s'"),
+                       _("Expected caps for '%1$s' but saw '%2$s'"),
                        qemuCaps->binary, str);
         return -1;
     }
@@ -4618,7 +4615,7 @@ virQEMUCapsValidateArch(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
     }
     if (!(qemuCaps->arch = virArchFromString(str))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown arch %s in QEMU capabilities cache"), str);
+                       _("unknown arch %1$s in QEMU capabilities cache"), str);
         return -1;
     }
 
@@ -5128,7 +5125,7 @@ virQEMUCapsSaveFile(void *data,
 
     if (virFileWriteStr(filename, xml, 0600) < 0) {
         virReportSystemError(errno,
-                             _("Failed to save '%s' for '%s'"),
+                             _("Failed to save '%1$s' for '%2$s'"),
                              filename, qemuCaps->binary);
         return -1;
     }
@@ -5259,7 +5256,7 @@ virQEMUCapsKVMUsable(virQEMUCapsCachePriv *priv)
     if (stat(kvm_device, &sb) < 0) {
         if (errno != ENOENT) {
             virReportSystemError(errno,
-                                 _("Failed to stat %s"), kvm_device);
+                                 _("Failed to stat %1$s"), kvm_device);
         }
         return false;
     }
@@ -5456,7 +5453,7 @@ virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps,
 
     if ((qemuCaps->arch = virQEMUCapsArchFromString(archstr)) == VIR_ARCH_NONE) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unknown QEMU arch %s"), archstr);
+                       _("Unknown QEMU arch %1$s"), archstr);
         return -1;
     }
 
@@ -5601,7 +5598,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCaps *qemuCaps,
     if (major < QEMU_MIN_MAJOR ||
         (major == QEMU_MIN_MAJOR && minor < QEMU_MIN_MINOR)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("QEMU version >= %d.%d.%d is required, but %d.%d.%d found"),
+                       _("QEMU version >= %1$d.%2$d.%3$d is required, but %4$d.%5$d.%6$d found"),
                        QEMU_MIN_MAJOR, QEMU_MIN_MINOR, QEMU_MIN_MICRO,
                        major, minor, micro);
         return -1;
@@ -5702,7 +5699,7 @@ virQEMUCapsLogProbeFailure(const char *binary)
                   VIR_LOG_WARN,
                   __FILE__, __LINE__, __func__,
                   meta,
-                  _("Failed to probe capabilities for %s: %s"),
+                  _("Failed to probe capabilities for %1$s: %2$s"),
                   binary, virGetLastErrorMessage());
 }
 
@@ -5777,7 +5774,7 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch,
     /* We would also want to check faccessat if we cared about ACLs,
      * but we don't.  */
     if (stat(binary, &sb) < 0) {
-        virReportSystemError(errno, _("Cannot check QEMU binary %s"),
+        virReportSystemError(errno, _("Cannot check QEMU binary %1$s"),
                              binary);
         return NULL;
     }
@@ -5788,14 +5785,14 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch,
      * in a sub-process so it's hard to feed back a useful error.
      */
     if (!virFileIsExecutable(binary)) {
-        virReportSystemError(errno, _("QEMU binary %s is not executable"),
+        virReportSystemError(errno, _("QEMU binary %1$s is not executable"),
                              binary);
         return NULL;
     }
 
     if (virFileExists(QEMU_MODDIR)) {
         if (stat(QEMU_MODDIR, &sb) < 0) {
-            virReportSystemError(errno, _("Cannot check QEMU module directory %s"),
+            virReportSystemError(errno, _("Cannot check QEMU module directory %1$s"),
                                  QEMU_MODDIR);
             return NULL;
         }
@@ -6036,14 +6033,14 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
     if (virttypeStr &&
         (virttype = virDomainVirtTypeFromString(virttypeStr)) < 0) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unknown virttype: %s"), virttypeStr);
+                       _("unknown virttype: %1$s"), virttypeStr);
         return NULL;
     }
 
     if (archStr &&
         (arch = virArchFromString(archStr)) == VIR_ARCH_NONE) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unknown architecture: %s"), archStr);
+                       _("unknown architecture: %1$s"), archStr);
         return NULL;
     }
 
@@ -6053,7 +6050,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
     }
     if (!binary) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unable to find any emulator to serve '%s' architecture"),
+                       _("unable to find any emulator to serve '%1$s' architecture"),
                        archStr);
         return NULL;
     }
@@ -6069,8 +6066,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
           (ARCH_IS_ARM(arch) && ARCH_IS_ARM(arch_from_caps)) ||
           (ARCH_IS_S390(arch) && ARCH_IS_S390(arch_from_caps)))) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("architecture from emulator '%s' doesn't "
-                         "match given architecture '%s'"),
+                       _("architecture from emulator '%1$s' doesn't match given architecture '%2$s'"),
                        virArchToString(arch_from_caps),
                        virArchToString(arch));
         return NULL;
@@ -6083,7 +6079,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
 
     if (virQEMUCapsTypeIsAccelerated(virttype) && capsType == VIR_DOMAIN_VIRT_QEMU) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("the accel '%s' is not supported by '%s' on this host"),
+                       _("the accel '%1$s' is not supported by '%2$s' on this host"),
                        virQEMUCapsAccelStr(virttype), binary);
         return NULL;
     }
@@ -6094,7 +6090,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache,
 
         if (!virQEMUCapsIsMachineSupported(qemuCaps, virttype, machine)) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("the machine '%s' is not supported by emulator '%s'"),
+                           _("the machine '%1$s' is not supported by emulator '%2$s'"),
                            machine, binary);
             return NULL;
         }
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index b1178e0146..fe78a0251a 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -171,7 +171,7 @@ qemuSetupImagePathCgroup(virDomainObj *vm,
     if (virDevMapperGetTargets(path, &targetPaths) < 0 &&
         errno != ENOSYS) {
         virReportSystemError(errno,
-                             _("Unable to get devmapper targets for %s"),
+                             _("Unable to get devmapper targets for %1$s"),
                              path);
         return -1;
     }
@@ -865,7 +865,7 @@ qemuSetupCgroupAppid(virDomainObj *vm)
 
     if (virFileWriteStr(path, appid, 0) < 0) {
         virReportSystemError(errno,
-                             _("Unable to write '%s' to '%s'"), appid, path);
+                             _("Unable to write '%1$s' to '%2$s'"), appid, path);
         return -1;
     }
 
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 8580158d66..8449ed176a 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -87,7 +87,7 @@ qemuCheckpointObjFromName(virDomainObj *vm,
     chk = virDomainCheckpointFindByName(vm->checkpoints, name);
     if (!chk)
         virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT,
-                       _("no domain checkpoint with matching name '%s'"),
+                       _("no domain checkpoint with matching name '%1$s'"),
                        name);
 
     return chk;
@@ -121,7 +121,7 @@ qemuCheckpointWriteMetadata(virDomainObj *vm,
 
     chkDir = g_strdup_printf("%s/%s", checkpointDir, vm->def->name);
     if (g_mkdir_with_parents(chkDir, 0777) < 0) {
-        virReportSystemError(errno, _("cannot create checkpoint directory '%s'"),
+        virReportSystemError(errno, _("cannot create checkpoint directory '%1$s'"),
                              chkDir);
         return -1;
     }
@@ -164,7 +164,7 @@ qemuCheckpointDiscardDiskBitmaps(virStorageSource *src,
 
     if (!found) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("bitmap '%s' not found in backing chain of '%s'"),
+                       _("bitmap '%1$s' not found in backing chain of '%2$s'"),
                        delbitmap, diskdst);
         return -1;
     }
@@ -205,7 +205,7 @@ qemuCheckpointDiscardBitmaps(virDomainObj *vm,
 
         if (!chkdisk->bitmap) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("missing bitmap name for disk '%s' of checkpoint '%s'"),
+                           _("missing bitmap name for disk '%1$s' of checkpoint '%2$s'"),
                            chkdisk->name, chkdef->parent.name);
             return -1;
         }
@@ -357,15 +357,14 @@ qemuCheckpointPrepare(virQEMUDriver *driver,
 
         if (STRNEQ(disk->bitmap, def->parent.name)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("bitmap for disk '%s' must match checkpoint name '%s'"),
+                           _("bitmap for disk '%1$s' must match checkpoint name '%2$s'"),
                            disk->name, def->parent.name);
             return -1;
         }
 
         if (vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("checkpoint for disk %s unsupported "
-                             "for storage type %s"),
+                           _("checkpoint for disk %1$s unsupported for storage type %2$s"),
                            disk->name,
                            virStorageFileFormatTypeToString(
                                vm->def->disks[i]->src->format));
@@ -431,7 +430,7 @@ qemuCheckpointRedefineValidateBitmaps(virDomainObj *vm,
         if (!qemuBlockBitmapChainIsValid(domdisk->src, chkdef->parent.name,
                                          blockNamedNodeData)) {
             virReportError(VIR_ERR_CHECKPOINT_INCONSISTENT,
-                           _("missing or broken bitmap '%s' for disk '%s'"),
+                           _("missing or broken bitmap '%1$s' for disk '%2$s'"),
                            chkdef->parent.name, domdisk->dst);
             return -1;
         }
@@ -547,7 +546,7 @@ qemuCheckpointCreateFinalize(virQEMUDriver *driver,
         /* if writing of metadata fails, error out rather than trying
          * to silently carry on without completing the checkpoint */
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to save metadata for checkpoint %s"),
+                       _("unable to save metadata for checkpoint %1$s"),
                        chk->def->name);
         qemuCheckpointRollbackMetadata(vm, chk);
         return -1;
@@ -889,7 +888,7 @@ qemuCheckpointDelete(virDomainObj *vm,
                                                 driver->xmlopt,
                                                 cfg->checkpointDir) < 0) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("failed to set checkpoint '%s' as current"),
+                                   _("failed to set checkpoint '%1$s' as current"),
                                    chk->def->name);
                     virDomainCheckpointSetCurrent(vm->checkpoints, NULL);
                     goto endjob;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 680832742c..d9460d82e0 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -546,8 +546,7 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriverConfig *cfg,
          * to tell to vnc (usually subtract 5700, e.g. localhost:1
          * for port 5701) */
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("%s: remote_websocket_port_min: port must be greater "
-                         "than or equal to %d"),
+                       _("%1$s: remote_websocket_port_min: port must be greater than or equal to %2$d"),
                         filename, QEMU_WEBSOCKET_PORT_MIN);
         return -1;
     }
@@ -557,16 +556,15 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriverConfig *cfg,
     if (cfg->webSocketPortMax > QEMU_WEBSOCKET_PORT_MAX ||
         cfg->webSocketPortMax < cfg->webSocketPortMin) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("%s: remote_websocket_port_max: port must be between "
-                          "the minimal port and %d"),
+                        _("%1$s: remote_websocket_port_max: port must be between the minimal port and %2$d"),
                        filename, QEMU_WEBSOCKET_PORT_MAX);
         return -1;
     }
 
     if (cfg->webSocketPortMin > cfg->webSocketPortMax) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("%s: remote_websocket_port_min: min port must not be "
-                          "greater than max port"), filename);
+                        _("%1$s: remote_websocket_port_min: min port must not be greater than max port"),
+                        filename);
         return -1;
     }
 
@@ -577,8 +575,7 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriverConfig *cfg,
          * to tell to vnc (usually subtract 5900, e.g. localhost:1
          * for port 5901) */
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("%s: remote_display_port_min: port must be greater "
-                         "than or equal to %d"),
+                       _("%1$s: remote_display_port_min: port must be greater than or equal to %2$d"),
                         filename, QEMU_REMOTE_PORT_MIN);
         return -1;
     }
@@ -588,16 +585,15 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriverConfig *cfg,
     if (cfg->remotePortMax > QEMU_REMOTE_PORT_MAX ||
         cfg->remotePortMax < cfg->remotePortMin) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("%s: remote_display_port_max: port must be between "
-                          "the minimal port and %d"),
+                        _("%1$s: remote_display_port_max: port must be between the minimal port and %2$d"),
                        filename, QEMU_REMOTE_PORT_MAX);
         return -1;
     }
 
     if (cfg->remotePortMin > cfg->remotePortMax) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("%s: remote_display_port_min: min port must not be "
-                          "greater than max port"), filename);
+                        _("%1$s: remote_display_port_min: min port must not be greater than max port"),
+                        filename);
         return -1;
     }
 
@@ -686,7 +682,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig *cfg,
             cfg->maxCore = ULLONG_MAX;
         } else {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("Unknown core size '%s'"),
+                           _("Unknown core size '%1$s'"),
                            corestr);
             return -1;
         }
@@ -705,7 +701,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig *cfg,
             cfg->stdioLogD = false;
         } else {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("Unknown stdio handler %s"),
+                           _("Unknown stdio handler %1$s"),
                            stdioHandler);
             return -1;
         }
@@ -718,7 +714,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig *cfg,
 
         if (val < 0) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("Unknown sched_core value %s"),
+                           _("Unknown sched_core value %1$s"),
                            schedCore);
             return -1;
         }
@@ -794,7 +790,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig *cfg,
         return -1;
     if (cfg->migrationPortMin <= 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("%s: migration_port_min: port must be greater than 0"),
+                       _("%1$s: migration_port_min: port must be greater than 0"),
                         filename);
         return -1;
     }
@@ -804,8 +800,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig *cfg,
     if (cfg->migrationPortMax > 65535 ||
         cfg->migrationPortMax < cfg->migrationPortMin) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("%s: migration_port_max: port must be between "
-                          "the minimal port %d and 65535"),
+                        _("%1$s: migration_port_max: port must be between the minimal port %2$d and 65535"),
                        filename, cfg->migrationPortMin);
         return -1;
     }
@@ -817,8 +812,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig *cfg,
         (STRPREFIX(cfg->migrateHost, "localhost") ||
          virSocketAddrIsNumericLocalhost(cfg->migrateHost))) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("migration_host must not be the address of"
-                         " the local machine: %s"),
+                       _("migration_host must not be the address of the local machine: %1$s"),
                        cfg->migrateHost);
         return -1;
     }
@@ -830,8 +824,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig *cfg,
         (STRPREFIX(cfg->migrationAddress, "localhost") ||
          virSocketAddrIsNumericLocalhost(cfg->migrationAddress))) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("migration_address must not be the address of"
-                         " the local machine: %s"),
+                       _("migration_address must not be the address of the local machine: %1$s"),
                        cfg->migrationAddress);
         return -1;
     }
@@ -923,7 +916,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfig *cfg,
             if (STREQ(cfg->securityDriverNames[i],
                       cfg->securityDriverNames[j])) {
                 virReportError(VIR_ERR_CONF_SYNTAX,
-                               _("Duplicate security driver %s"),
+                               _("Duplicate security driver %1$s"),
                                cfg->securityDriverNames[i]);
                 return -1;
             }
@@ -961,7 +954,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfig *cfg,
             int ctl;
             if ((ctl = virCgroupControllerTypeFromString(controllers[i])) < 0) {
                 virReportError(VIR_ERR_CONF_SYNTAX,
-                               _("Unknown cgroup controller '%s'"),
+                               _("Unknown cgroup controller '%1$s'"),
                                controllers[i]);
                 return -1;
             }
@@ -987,7 +980,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfig *cfg,
 
             if (ns < 0) {
                 virReportError(VIR_ERR_CONF_SYNTAX,
-                               _("Unknown namespace: %s"),
+                               _("Unknown namespace: %1$s"),
                                namespaces[i]);
                 return -1;
             }
@@ -1000,14 +993,14 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfig *cfg,
 
             if (!qemuDomainNamespaceAvailable(ns)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("%s namespace is not available"),
+                               _("%1$s namespace is not available"),
                                namespaces[i]);
                 return -1;
             }
 
             if (virBitmapSetBit(cfg->namespaces, ns) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Unable to enable namespace: %s"),
+                               _("Unable to enable namespace: %1$s"),
                                namespaces[i]);
                 return -1;
             }
@@ -1158,8 +1151,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->defaultTLSx509certdirPresent) {
         if (!virFileExists(cfg->defaultTLSx509certdir)) {
             virReportError(VIR_ERR_CONF_SYNTAX,
-                           _("default_tls_x509_cert_dir directory '%s' "
-                             "does not exist"),
+                           _("default_tls_x509_cert_dir directory '%1$s' does not exist"),
                            cfg->defaultTLSx509certdir);
             return -1;
         }
@@ -1168,7 +1160,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->vncTLSx509certdir &&
         !virFileExists(cfg->vncTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("vnc_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("vnc_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->vncTLSx509certdir);
         return -1;
     }
@@ -1176,7 +1168,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->spiceTLSx509certdir &&
         !virFileExists(cfg->spiceTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("spice_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("spice_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->spiceTLSx509certdir);
         return -1;
     }
@@ -1184,7 +1176,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->chardevTLSx509certdir &&
         !virFileExists(cfg->chardevTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("chardev_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("chardev_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->chardevTLSx509certdir);
         return -1;
     }
@@ -1192,7 +1184,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->migrateTLSx509certdir &&
         !virFileExists(cfg->migrateTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("migrate_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("migrate_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->migrateTLSx509certdir);
         return -1;
     }
@@ -1200,7 +1192,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->backupTLSx509certdir &&
         !virFileExists(cfg->backupTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("backup_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("backup_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->backupTLSx509certdir);
         return -1;
     }
@@ -1208,7 +1200,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->vxhsTLSx509certdir &&
         !virFileExists(cfg->vxhsTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("vxhs_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("vxhs_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->vxhsTLSx509certdir);
         return -1;
     }
@@ -1216,7 +1208,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg)
     if (cfg->nbdTLSx509certdir &&
         !virFileExists(cfg->nbdTLSx509certdir)) {
         virReportError(VIR_ERR_CONF_SYNTAX,
-                       _("nbd_tls_x509_cert_dir directory '%s' does not exist"),
+                       _("nbd_tls_x509_cert_dir directory '%1$s' does not exist"),
                        cfg->nbdTLSx509certdir);
         return -1;
     }
@@ -1457,21 +1449,21 @@ virQEMUDriverGetDomainCapabilities(virQEMUDriver *driver,
 
     if (!virQEMUCapsIsArchSupported(qemuCaps, arch)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Emulator '%s' does not support arch '%s'"),
+                       _("Emulator '%1$s' does not support arch '%2$s'"),
                        path, virArchToString(arch));
         return NULL;
     }
 
     if (!virQEMUCapsIsVirtTypeSupported(qemuCaps, virttype)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Emulator '%s' does not support virt type '%s'"),
+                       _("Emulator '%1$s' does not support virt type '%2$s'"),
                        path, virDomainVirtTypeToString(virttype));
         return NULL;
     }
 
     if (!virQEMUCapsIsMachineSupported(qemuCaps, virttype, machine)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Emulator '%s' does not support machine type '%s'"),
+                       _("Emulator '%1$s' does not support machine type '%2$s'"),
                        path, NULLSTR(machine));
         return NULL;
     }
@@ -1567,8 +1559,7 @@ qemuGetDomainHupageMemPath(virQEMUDriver *driver,
 
     if (i == cfg->nhugetlbfs) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unable to find any usable hugetlbfs "
-                         "mount for %llu KiB"),
+                       _("Unable to find any usable hugetlbfs mount for %1$llu KiB"),
                        pagesize);
         return -1;
     }
@@ -1652,7 +1643,7 @@ qemuHugepageMakeBasedir(virQEMUDriver *driver,
 
     if (g_mkdir_with_parents(hugepagePath, 0777) < 0) {
         virReportSystemError(errno,
-                             _("unable to create hugepage path %s"),
+                             _("unable to create hugepage path %1$s"),
                              hugepagePath);
         return -1;
     }
diff --git a/src/qemu/qemu_dbus.c b/src/qemu/qemu_dbus.c
index a6dc802637..1ffe1f147f 100644
--- a/src/qemu/qemu_dbus.c
+++ b/src/qemu/qemu_dbus.c
@@ -190,7 +190,7 @@ qemuDBusStart(virQEMUDriver *driver,
 
     if (!virFileIsExecutable(cfg->dbusDaemonName)) {
         virReportSystemError(errno,
-                             _("'%s' is not a suitable dbus-daemon"),
+                             _("'%1$s' is not a suitable dbus-daemon"),
                              cfg->dbusDaemonName);
         return -1;
     }
@@ -203,7 +203,7 @@ qemuDBusStart(virQEMUDriver *driver,
     sockpath = qemuDBusCreateSocketPath(cfg, shortName);
 
     if (qemuDBusWriteConfig(configfile, sockpath) < 0) {
-        virReportSystemError(errno, _("Failed to write '%s'"), configfile);
+        virReportSystemError(errno, _("Failed to write '%1$s'"), configfile);
         return -1;
     }
 
@@ -222,7 +222,7 @@ qemuDBusStart(virQEMUDriver *driver,
 
     if (virPidFileReadPath(pidfile, &cpid) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("dbus-daemon %s didn't show up"),
+                       _("dbus-daemon %1$s didn't show up"),
                        cfg->dbusDaemonName);
         goto cleanup;
     }
@@ -240,11 +240,11 @@ qemuDBusStart(virQEMUDriver *driver,
 
         if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) {
             virReportSystemError(errno,
-                                 _("dbus-daemon %s died unexpectedly"),
+                                 _("dbus-daemon %1$s died unexpectedly"),
                                  cfg->dbusDaemonName);
         } else {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("dbus-daemon died and reported: %s"), errbuf);
+                           _("dbus-daemon died and reported: %1$s"), errbuf);
         }
 
         goto cleanup;
@@ -252,7 +252,7 @@ qemuDBusStart(virQEMUDriver *driver,
 
     if (!virFileExists(sockpath)) {
         virReportError(VIR_ERR_OPERATION_TIMEOUT,
-                       _("DBus daemon %s didn't show up"),
+                       _("DBus daemon %1$s didn't show up"),
                        cfg->dbusDaemonName);
         goto cleanup;
     }
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 2023f283d6..165f975e2a 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -68,7 +68,7 @@ qemuDomainGetSCSIControllerModel(const virDomainDef *def,
         return VIR_DOMAIN_CONTROLLER_MODEL_SCSI_NCR53C90;
 
     virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("Unable to determine model for SCSI controller idx=%d"),
+                   _("Unable to determine model for SCSI controller idx=%1$d"),
                    cont->idx);
     return -1;
 }
@@ -116,7 +116,7 @@ qemuDomainFindSCSIControllerModel(const virDomainDef *def,
 
     if (!(cont = virDomainDeviceFindSCSIController(def, &info->addr.drive))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to find a SCSI controller for idx=%d"),
+                       _("unable to find a SCSI controller for idx=%1$d"),
                        info->addr.drive.controller);
         return -1;
     }
@@ -207,7 +207,7 @@ qemuDomainAssignSpaprVIOAddress(virDomainDef *def,
     while (ret != 0) {
         if (user_reg) {
             virReportError(VIR_ERR_XML_ERROR,
-                           _("spapr-vio address %#llx already in use"),
+                           _("spapr-vio address %1$#llx already in use"),
                            info->addr.spaprvio.reg);
             return -EEXIST;
         }
@@ -1710,8 +1710,8 @@ qemuDomainPCIAddressSetCreate(virDomainDef *def,
 
         if (idx >= addrs->nbuses) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Inappropriate new pci controller index %zu "
-                             "exceeds addrs array length"), idx);
+                           _("Inappropriate new pci controller index %1$zu exceeds addrs array length"),
+                           idx);
             goto error;
         }
 
@@ -2306,7 +2306,7 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def,
 
         if (!virDeviceInfoPCIAddressIsWanted(&def->disks[i]->info)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("virtio disk cannot have an address of type '%s'"),
+                           _("virtio disk cannot have an address of type '%1$s'"),
                            virDomainDeviceAddressTypeToString(def->disks[i]->info.type));
             return -1;
         }
@@ -2807,8 +2807,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
             if (contIndex < 0) {
                 /* this should never happen - we just added it */
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find auto-added %s controller "
-                                 "with index %zu"),
+                               _("Could not find auto-added %1$s controller with index %2$zu"),
                                virDomainControllerModelPCITypeToString(bus->model),
                                i);
                 goto cleanup;
@@ -2896,10 +2895,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
                     options->busNr = qemuDomainAddressFindNewBusNr(def);
                 if (options->busNr == -1) {
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("No free busNr lower than current "
-                                     "lowest busNr is available to "
-                                     "auto-assign to bus %d. Must be "
-                                     "manually assigned"),
+                                   _("No free busNr lower than current lowest busNr is available to auto-assign to bus %1$d. Must be manually assigned"),
                                    addr->bus);
                     goto cleanup;
                 }
@@ -2923,7 +2919,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
                 }
                 if (options->targetIndex == -1) {
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                                   _("No usable target index found for %d"),
+                                   _("No usable target index found for %1$d"),
                                    addr->bus);
                     goto cleanup;
                 }
@@ -2943,9 +2939,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
             if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE &&
                 idx <= addr->bus) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("PCI controller at index %d (0x%02x) has "
-                                 "bus='0x%02x', but index must be "
-                                 "larger than bus"),
+                               _("PCI controller at index %1$d (0x%2$02x) has bus='0x%3$02x', but index must be larger than bus"),
                                idx, idx, addr->bus);
                 goto cleanup;
             }
diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c
index 27beb5229f..6376f928d5 100644
--- a/src/qemu/qemu_domainjob.c
+++ b/src/qemu/qemu_domainjob.c
@@ -725,7 +725,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm,
 
         if ((type = virDomainJobTypeFromString(tmp)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unknown job type %s"), tmp);
+                           _("Unknown job type %1$s"), tmp);
             return -1;
         }
         VIR_FREE(tmp);
@@ -738,7 +738,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm,
 
         if ((async = virDomainAsyncJobTypeFromString(tmp)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unknown async job type %s"), tmp);
+                           _("Unknown async job type %1$s"), tmp);
             return -1;
         }
         VIR_FREE(tmp);
@@ -748,7 +748,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm,
             vm->job->phase = qemuDomainAsyncJobPhaseFromString(async, tmp);
             if (vm->job->phase < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Unknown job phase %s"), tmp);
+                               _("Unknown job phase %1$s"), tmp);
                 return -1;
             }
             VIR_FREE(tmp);
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
index 1c397972e4..bf59967eb7 100644
--- a/src/qemu/qemu_extdevice.c
+++ b/src/qemu/qemu_extdevice.c
@@ -49,7 +49,7 @@ qemuExtDeviceLogCommand(virQEMUDriver *driver,
         return -1;
 
     return qemuDomainLogAppendMessage(driver, vm,
-                                      _("%s: Starting external device: %s\n%s\n"),
+                                      _("%1$s: Starting external device: %2$s\n%3$s\n"),
                                       timestamp, info, cmds);
 }
 
diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c
index feab907afd..e847056573 100644
--- a/src/qemu/qemu_fd.c
+++ b/src/qemu/qemu_fd.c
@@ -221,7 +221,7 @@ qemuFDPassTransferMonitor(qemuFDPass *fdpass,
     for (i = 0; i < fdsets->nfdsets; i++) {
         if (fdsets->fdsets[i].id == fdpass->fdSetID) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("fdset '%u' is already in use by qemu"),
+                           _("fdset '%1$u' is already in use by qemu"),
                            fdpass->fdSetID);
             return -1;
         }
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 9de4166772..2830b99f1b 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -307,7 +307,7 @@ qemuFirmwareInterfaceParse(const char *path,
 
     if (!(interfacesJSON = virJSONValueObjectGetArray(doc, "interface-types"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get interface-types from '%s'"),
+                       _("failed to get interface-types from '%1$s'"),
                        path);
         return -1;
     }
@@ -323,7 +323,7 @@ qemuFirmwareInterfaceParse(const char *path,
 
         if ((tmp = qemuFirmwareOSInterfaceTypeFromString(tmpStr)) <= 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unknown interface type: '%s'"),
+                           _("unknown interface type: '%1$s'"),
                            tmpStr);
             return -1;
         }
@@ -351,7 +351,7 @@ qemuFirmwareFlashFileParse(const char *path,
 
     if (!(filename = virJSONValueObjectGetString(doc, "filename"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing 'filename' in '%s'"),
+                       _("missing 'filename' in '%1$s'"),
                        path);
         return -1;
     }
@@ -360,7 +360,7 @@ qemuFirmwareFlashFileParse(const char *path,
 
     if (!(format = virJSONValueObjectGetString(doc, "format"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing 'format' in '%s'"),
+                       _("missing 'format' in '%1$s'"),
                        path);
         return -1;
     }
@@ -394,7 +394,7 @@ qemuFirmwareMappingFlashParse(const char *path,
         modeval = qemuFirmwareFlashModeTypeFromString(modestr);
         if (modeval < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Firmware flash mode value '%s' unexpected"),
+                           _("Firmware flash mode value '%1$s' unexpected"),
                            modestr);
             return -1;
         }
@@ -403,7 +403,7 @@ qemuFirmwareMappingFlashParse(const char *path,
 
     if (!(executable = virJSONValueObjectGet(doc, "executable"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing 'executable' in '%s'"),
+                       _("missing 'executable' in '%1$s'"),
                        path);
         return -1;
     }
@@ -414,7 +414,7 @@ qemuFirmwareMappingFlashParse(const char *path,
     if (flash->mode == QEMU_FIRMWARE_FLASH_MODE_SPLIT) {
         if (!(nvram_template = virJSONValueObjectGet(doc, "nvram-template"))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing 'nvram-template' in '%s'"),
+                           _("missing 'nvram-template' in '%1$s'"),
                            path);
             return -1;
         }
@@ -436,7 +436,7 @@ qemuFirmwareMappingKernelParse(const char *path,
 
     if (!(filename = virJSONValueObjectGetString(doc, "filename"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing 'filename' in '%s'"),
+                       _("missing 'filename' in '%1$s'"),
                        path);
     }
 
@@ -455,7 +455,7 @@ qemuFirmwareMappingMemoryParse(const char *path,
 
     if (!(filename = virJSONValueObjectGetString(doc, "filename"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing 'filename' in '%s'"),
+                       _("missing 'filename' in '%1$s'"),
                        path);
     }
 
@@ -476,21 +476,21 @@ qemuFirmwareMappingParse(const char *path,
 
     if (!(mapping = virJSONValueObjectGet(doc, "mapping"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing mapping in '%s'"),
+                       _("missing mapping in '%1$s'"),
                        path);
         return -1;
     }
 
     if (!(deviceStr = virJSONValueObjectGetString(mapping, "device"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing device type in '%s'"),
+                       _("missing device type in '%1$s'"),
                        path);
         return -1;
     }
 
     if ((tmp = qemuFirmwareDeviceTypeFromString(deviceStr)) <= 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown device type in '%s'"),
+                       _("unknown device type in '%1$s'"),
                        path);
         return -1;
     }
@@ -533,7 +533,7 @@ qemuFirmwareTargetParse(const char *path,
 
     if (!(targetsJSON = virJSONValueObjectGetArray(doc, "targets"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get targets from '%s'"),
+                       _("failed to get targets from '%1$s'"),
                        path);
         return -1;
     }
@@ -554,21 +554,21 @@ qemuFirmwareTargetParse(const char *path,
 
         if (!(architectureStr = virJSONValueObjectGetString(item, "architecture"))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing 'architecture' in '%s'"),
+                           _("missing 'architecture' in '%1$s'"),
                            path);
             goto cleanup;
         }
 
         if ((t->architecture = virQEMUCapsArchFromString(architectureStr)) == VIR_ARCH_NONE) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unknown architecture '%s'"),
+                           _("unknown architecture '%1$s'"),
                            architectureStr);
             goto cleanup;
         }
 
         if (!(machines = virJSONValueObjectGetArray(item, "machines"))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing 'machines' in '%s'"),
+                           _("missing 'machines' in '%1$s'"),
                            path);
             goto cleanup;
         }
@@ -615,7 +615,7 @@ qemuFirmwareFeatureParse(const char *path,
 
     if (!(featuresJSON = virJSONValueObjectGetArray(doc, "features"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get features from '%s'"),
+                       _("failed to get features from '%1$s'"),
                        path);
         return -1;
     }
@@ -659,7 +659,7 @@ qemuFirmwareParse(const char *path)
 
     if (!(doc = virJSONValueFromString(cont))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to parse json file '%s'"),
+                       _("unable to parse json file '%1$s'"),
                        path);
         return NULL;
     }
@@ -1603,7 +1603,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
         loader->format != VIR_STORAGE_FILE_RAW &&
         loader->format != VIR_STORAGE_FILE_QCOW2) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Unsupported loader format '%s'"),
+                       _("Unsupported loader format '%1$s'"),
                        virStorageFileFormatTypeToString(loader->format));
         return -1;
     }
@@ -1611,7 +1611,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
         nvram->format != VIR_STORAGE_FILE_RAW &&
         nvram->format != VIR_STORAGE_FILE_QCOW2) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Unsupported nvram format '%s'"),
+                       _("Unsupported nvram format '%1$s'"),
                        virStorageFileFormatTypeToString(nvram->format));
         return -1;
     }
@@ -1669,7 +1669,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
                 return -1;
         } else {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("Unable to find any firmware to satisfy '%s'"),
+                           _("Unable to find any firmware to satisfy '%1$s'"),
                            virDomainOsDefFirmwareTypeToString(def->os.firmware));
             return -1;
         }
diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c
index 076640cbde..faf7922f31 100644
--- a/src/qemu/qemu_interface.c
+++ b/src/qemu/qemu_interface.c
@@ -339,7 +339,7 @@ qemuCreateInBridgePortWithHelper(virQEMUDriverConfig *cfg,
     }
 
     if (!virFileIsExecutable(cfg->bridgeHelperName)) {
-        virReportSystemError(errno, _("'%s' is not a suitable bridge helper"),
+        virReportSystemError(errno, _("'%1$s' is not a suitable bridge helper"),
                              cfg->bridgeHelperName);
         return -1;
     }
@@ -377,7 +377,7 @@ qemuCreateInBridgePortWithHelper(virQEMUDriverConfig *cfg,
             errstr = g_strdup_printf("stderr=%s", errbuf);
 
         virReportSystemError(errno,
-                             _("%s: failed to communicate with bridge helper: %s"),
+                             _("%1$s: failed to communicate with bridge helper: %2$s"),
                              cmdstr,
                              NULLSTR_EMPTY(errstr));
         VIR_FREE(errstr);
@@ -650,7 +650,7 @@ qemuInterfaceVDPAConnect(virDomainNetDef *net)
 
     if ((fd = open(net->data.vdpa.devicepath, O_RDWR)) < 0) {
         virReportSystemError(errno,
-                             _("Unable to open '%s' for vdpa device"),
+                             _("Unable to open '%1$s' for vdpa device"),
                              net->data.vdpa.devicepath);
         return -1;
     }
diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c
index cdc710804f..08fb68c901 100644
--- a/src/qemu/qemu_interop_config.c
+++ b/src/qemu/qemu_interop_config.c
@@ -58,7 +58,7 @@ qemuBuildFileList(GHashTable *files, const char *dir)
         path = g_strdup_printf("%s/%s", dir, filename);
 
         if (stat(path, &sb) < 0) {
-            virReportSystemError(errno, _("Unable to access %s"), path);
+            virReportSystemError(errno, _("Unable to access %1$s"), path);
             return -1;
         }
 
@@ -141,7 +141,7 @@ qemuInteropFetchConfigs(const char *name,
 
         if ((len = virFileLength(path, -1)) < 0) {
             virReportSystemError(errno,
-                                 _("unable to get size of '%s'"),
+                                 _("unable to get size of '%1$s'"),
                                  path);
             return -1;
         }
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 26d07d1ad4..7f0b7a3412 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -188,14 +188,14 @@ qemuDomainExtractTLSSubject(const char *certdir)
 
     if (virFileReadAll(certfile, 8192, &pemdata) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to read server cert %s"), certfile);
+                       _("unable to read server cert %1$s"), certfile);
         return NULL;
     }
 
     rc = gnutls_x509_crt_init(&cert);
     if (rc < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("cannot initialize cert object: %s"),
+                       _("cannot initialize cert object: %1$s"),
                        gnutls_strerror(rc));
         return NULL;
     }
@@ -206,7 +206,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
     rc = gnutls_x509_crt_import(cert, &pemdatum, GNUTLS_X509_FMT_PEM);
     if (rc < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("cannot load cert data from %s: %s"),
+                       _("cannot load cert data from %1$s: %2$s"),
                        certfile, gnutls_strerror(rc));
         return NULL;
     }
@@ -219,7 +219,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
     }
     if (rc != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("cannot get cert distinguished name: %s"),
+                       _("cannot get cert distinguished name: %1$s"),
                        gnutls_strerror(rc));
         return NULL;
     }
@@ -287,8 +287,8 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriver *driver G_GNUC_UNUSED,
                 if (virNetDevOpenvswitchGetMigrateData(&mig->net[i].portdata,
                                                        netptr->ifname) != 0) {
                         virReportError(VIR_ERR_INTERNAL_ERROR,
-                                       _("Unable to run command to get OVS port data for "
-                                         "interface %s"), netptr->ifname);
+                                       _("Unable to run command to get OVS port data for interface %1$s"),
+                                       netptr->ifname);
                         return NULL;
                 }
                 break;
@@ -910,7 +910,7 @@ qemuMigrationCookieGraphicsXMLParse(xmlXPathContextPtr ctxt)
     }
     if ((grap->type = virDomainGraphicsTypeFromString(graphicstype)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown graphics type %s"), graphicstype);
+                       _("unknown graphics type %1$s"), graphicstype);
         return NULL;
     }
     if (virXPathInt("string(./graphics/@port)", ctxt, &grap->port) < 0) {
@@ -987,7 +987,7 @@ qemuMigrationCookieNBDXMLParse(xmlXPathContextPtr ctxt)
     port = virXPathString("string(./nbd/@port)", ctxt);
     if (port && virStrToLong_i(port, NULL, 10, &ret->port) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Malformed nbd port '%s'"),
+                       _("Malformed nbd port '%1$s'"),
                        port);
         return NULL;
     }
@@ -1015,7 +1015,7 @@ qemuMigrationCookieNBDXMLParse(xmlXPathContextPtr ctxt)
                 virStrToLong_ull(capacity, NULL, 10,
                                  &ret->disks[i].capacity) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Malformed disk capacity: '%s'"),
+                               _("Malformed disk capacity: '%1$s'"),
                                NULLSTR(capacity));
                 return NULL;
             }
@@ -1180,13 +1180,13 @@ qemuMigrationCookieXMLParseMandatoryFeatures(xmlXPathContextPtr ctxt,
 
         if ((val = qemuMigrationCookieFlagTypeFromString(str)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unknown migration cookie feature %s"), str);
+                           _("Unknown migration cookie feature %1$s"), str);
             return -1;
         }
 
         if ((flags & (1 << val)) == 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unsupported migration cookie feature %s"), str);
+                           _("Unsupported migration cookie feature %1$s"), str);
             return -1;
         }
     }
@@ -1279,7 +1279,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig,
     }
     if (STRNEQ(name, mig->name)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Incoming cookie data had unexpected name %s vs %s"),
+                       _("Incoming cookie data had unexpected name %1$s vs %2$s"),
                        name, mig->name);
         return -1;
     }
@@ -1293,7 +1293,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig,
     virUUIDFormat(mig->uuid, localdomuuid);
     if (STRNEQ(uuid, localdomuuid)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Incoming cookie data had unexpected UUID %s vs %s"),
+                       _("Incoming cookie data had unexpected UUID %1$s vs %2$s"),
                        uuid, localdomuuid);
         return -1;
     }
@@ -1321,7 +1321,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig,
     }
     if (memcmp(mig->remoteHostuuid, mig->localHostuuid, VIR_UUID_BUFLEN) == 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Attempt to migrate guest to the same host %s"),
+                       _("Attempt to migrate guest to the same host %1$s"),
                        hostuuid);
         return -1;
     }
@@ -1527,14 +1527,14 @@ qemuMigrationCookieParse(virQEMUDriver *driver,
         if (!mig->lockDriver) {
             if (virLockManagerPluginUsesState(driver->lockManager)) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Missing %s lock state for migration cookie"),
+                               _("Missing %1$s lock state for migration cookie"),
                                virLockManagerPluginGetName(driver->lockManager));
                 return NULL;
             }
         } else if (STRNEQ(mig->lockDriver,
                           virLockManagerPluginGetName(driver->lockManager))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Source host lock driver %s different from target %s"),
+                           _("Source host lock driver %1$s different from target %2$s"),
                            mig->lockDriver,
                            virLockManagerPluginGetName(driver->lockManager));
             return NULL;
@@ -1567,7 +1567,7 @@ qemuMigrationCookieBlockDirtyBitmapsMatchDisks(virDomainDef *def,
 
         if (!(disk->disk = virDomainDiskByTarget(def, disk->target))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Can't find disk '%s' in domain definition"),
+                           _("Can't find disk '%1$s' in domain definition"),
                            disk->target);
             return -1;
         }
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index bd09dcfb23..fc3379dcd3 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -330,7 +330,7 @@ qemuMigrationParamsCheckType(qemuMigrationParam param,
 {
     if (qemuMigrationParamInfo[param].type != type) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Type mismatch for '%s' migration parameter"),
+                       _("Type mismatch for '%1$s' migration parameter"),
                        qemuMigrationParamTypeToString(param));
         return -1;
     }
@@ -363,7 +363,7 @@ qemuMigrationParamsGetTPInt(qemuMigrationParams *migParams,
         unsigned int max = UINT_MAX / unit;
         if (migParams->params[param].value.i > max) {
             virReportError(VIR_ERR_OVERFLOW,
-                           _("migration parameter '%s' must be less than %u"),
+                           _("migration parameter '%1$s' must be less than %2$u"),
                            name, max + 1);
             return -1;
         }
@@ -424,7 +424,7 @@ qemuMigrationParamsGetTPULL(qemuMigrationParams *migParams,
         unsigned long long max = ULLONG_MAX / unit;
         if (migParams->params[param].value.ull > max) {
             virReportError(VIR_ERR_OVERFLOW,
-                           _("migration parameter '%s' must be less than %llu"),
+                           _("migration parameter '%1$s' must be less than %2$llu"),
                            name, max + 1);
             return -1;
         }
@@ -523,14 +523,14 @@ qemuMigrationParamsSetCompression(virTypedParameterPtr params,
         method = qemuMigrationCompressMethodTypeFromString(params[i].value.s);
         if (method < 0) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("Unsupported compression method '%s'"),
+                           _("Unsupported compression method '%1$s'"),
                            params[i].value.s);
             return -1;
         }
 
         if (migParams->compMethods & (1ULL << method)) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("Compression method '%s' is specified twice"),
+                           _("Compression method '%1$s' is specified twice"),
                            params[i].value.s);
             return -1;
         }
@@ -1229,7 +1229,7 @@ qemuMigrationParamsCheck(virDomainObj *vm,
 
         if (state && !qemuMigrationCapsGet(vm, cap)) {
             virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                           _("Migration option '%s' is not supported by QEMU binary"),
+                           _("Migration option '%1$s' is not supported by QEMU binary"),
                            qemuMigrationCapabilityTypeToString(cap));
             return -1;
         }
@@ -1398,14 +1398,14 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt,
 
         if ((param = qemuMigrationParamTypeFromString(name)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unknown migration parameter '%s'"), name);
+                           _("unknown migration parameter '%1$s'"), name);
             return -1;
         }
         pv = &params->params[param];
 
         if (!(value = virXMLPropString(nodes[i], "value"))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing value for migration parameter '%s'"),
+                           _("missing value for migration parameter '%1$s'"),
                            name);
             return -1;
         }
@@ -1431,7 +1431,7 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt,
 
         if (rc < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("invalid value '%s' for migration parameter '%s'"),
+                           _("invalid value '%1$s' for migration parameter '%2$s'"),
                            value, name);
             return -1;
         }
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 1fa35f03cc..71ebd356ad 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -241,7 +241,7 @@ qemuMonitorOpenUnix(const char *monitor)
     addr.sun_family = AF_UNIX;
     if (virStrcpyStatic(addr.sun_path, monitor) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Monitor path %s too big for destination"), monitor);
+                       _("Monitor path %1$s too big for destination"), monitor);
         return -1;
     }
 
@@ -401,7 +401,7 @@ qemuMonitorIORead(qemuMonitor *mon)
     if (avail < 1024) {
         if (mon->bufferLength >= QEMU_MONITOR_MAX_RESPONSE) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("QEMU monitor reply exceeds buffer size (%d bytes)"),
+                           _("QEMU monitor reply exceeds buffer size (%1$d bytes)"),
                            QEMU_MONITOR_MAX_RESPONSE);
             return -1;
         }
@@ -506,7 +506,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
         if (!error && !mon->goteof &&
             cond & G_IO_ERR) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid file descriptor while waiting for monitor (vm='%s')"), mon->domainName);
+                           _("Invalid file descriptor while waiting for monitor (vm='%1$s')"), mon->domainName);
             mon->goteof = true;
         }
     }
@@ -532,7 +532,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
         } else {
             if (virGetLastErrorCode() == VIR_ERR_OK && !mon->goteof)
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Error while processing monitor IO (vm='%s')"), mon->domainName);
+                               _("Error while processing monitor IO (vm='%1$s')"), mon->domainName);
             virCopyLastError(&mon->lastError);
             virResetLastError();
         }
@@ -636,7 +636,7 @@ qemuMonitorOpenInternal(virDomainObj *vm,
     mon->socket = g_socket_new_from_fd(fd, &gerr);
     if (!mon->socket) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unable to create socket object: %s"),
+                       _("Unable to create socket object: %1$s"),
                        gerr->message);
         goto cleanup;
     }
@@ -684,7 +684,7 @@ qemuMonitorOpen(virDomainObj *vm,
 
     if (config->type != VIR_DOMAIN_CHR_TYPE_UNIX) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to handle monitor type: %s"),
+                       _("unable to handle monitor type: %1$s"),
                        virDomainChrTypeToString(config->type));
         return NULL;
     }
@@ -851,7 +851,7 @@ qemuMonitorSend(qemuMonitor *mon,
     }
     if (mon->goteof) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("End of file from qemu monitor (vm='%s')"), mon->domainName);
+                       _("End of file from qemu monitor (vm='%1$s')"), mon->domainName);
         return -1;
     }
 
@@ -865,7 +865,7 @@ qemuMonitorSend(qemuMonitor *mon,
     while (!mon->msg->finished) {
         if (virCondWait(&mon->notify, &mon->parent.lock) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unable to wait on monitor condition (vm='%s')"), mon->domainName);
+                           _("Unable to wait on monitor condition (vm='%1$s')"), mon->domainName);
             goto cleanup;
         }
     }
@@ -1010,8 +1010,8 @@ qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon,
     if (rc < 0) {
         if (rc == -2)
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to find QOM Object path for "
-                             "device '%s'"), videoName);
+                           _("Failed to find QOM Object path for device '%1$s'"),
+                           videoName);
         return -1;
     }
 
@@ -1040,8 +1040,8 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon,
     if (rc < 0) {
         if (rc == -2)
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to find QOM Object path for "
-                             "device '%s'"), videoName);
+                           _("Failed to find QOM Object path for device '%1$s'"),
+                           videoName);
         return -1;
     }
 
@@ -1897,7 +1897,7 @@ qemuMonitorBlockIOStatusToError(const char *status)
 
     if (st < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown block IO status: %s"), status);
+                       _("unknown block IO status: %1$s"), status);
         return -1;
     }
 
@@ -2046,7 +2046,7 @@ qemuMonitorTypeToProtocol(int type)
         return "spice";
     default:
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("unsupported protocol type %s"),
+                       _("unsupported protocol type %1$s"),
                        virDomainGraphicsTypeToString(type));
         return NULL;
     }
@@ -2683,7 +2683,7 @@ qemuMonitorAddObject(qemuMonitor *mon,
 
     if (!id || !type) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("missing alias or qom-type for qemu object '%s'"),
+                       _("missing alias or qom-type for qemu object '%1$s'"),
                        NULLSTR(type));
         return -1;
     }
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 8e70b8f78d..3482972600 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -49,7 +49,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitor *mon,
         strstr(reply, "Error: ") ||
         (strstr(reply, "Error") && strstr(reply, "while writing VM"))) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Failed to take snapshot: %s"), reply);
+                       _("Failed to take snapshot: %1$s"), reply);
         return -1;
     } else if (strstr(reply, "No block device can accept snapshots")) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
@@ -80,7 +80,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitor *mon, const char *name)
                (strstr(reply, "Error") &&
                 strstr(reply, "while deleting snapshot"))) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Failed to delete snapshot: %s"), reply);
+                       _("Failed to delete snapshot: %1$s"), reply);
         return -1;
     }
 
diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
index 89d631ee5a..ba0e831178 100644
--- a/src/qemu/qemu_namespace.c
+++ b/src/qemu/qemu_namespace.c
@@ -283,7 +283,7 @@ qemuDomainSetupDisk(virStorageSource *src,
             if (virDevMapperGetTargets(next->path, &targetPaths) < 0 &&
                 errno != ENOSYS) {
                 virReportSystemError(errno,
-                                     _("Unable to get devmapper targets for %s"),
+                                     _("Unable to get devmapper targets for %1$s"),
                                      next->path);
                 return -1;
             }
@@ -778,7 +778,7 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg,
 
         if (stat(devMountsPath[i], &sb) < 0) {
             virReportSystemError(errno,
-                                 _("Unable to stat: %s"),
+                                 _("Unable to stat: %1$s"),
                                  devMountsPath[i]);
             goto cleanup;
         }
@@ -789,7 +789,7 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg,
         if ((S_ISDIR(sb.st_mode) && g_mkdir_with_parents(devMountsSavePath[i], 0777) < 0) ||
             (!S_ISDIR(sb.st_mode) && virFileTouch(devMountsSavePath[i], sb.st_mode) < 0)) {
             virReportSystemError(errno,
-                                 _("Failed to create %s"),
+                                 _("Failed to create %1$s"),
                                  devMountsSavePath[i]);
             goto cleanup;
         }
@@ -816,21 +816,21 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg,
 
         if (stat(devMountsSavePath[i], &sb) < 0) {
             virReportSystemError(errno,
-                                 _("Unable to stat: %s"),
+                                 _("Unable to stat: %1$s"),
                                  devMountsSavePath[i]);
             goto cleanup;
         }
 
         if (S_ISDIR(sb.st_mode)) {
             if (g_mkdir_with_parents(devMountsPath[i], 0777) < 0) {
-                virReportSystemError(errno, _("Cannot create %s"),
+                virReportSystemError(errno, _("Cannot create %1$s"),
                                      devMountsPath[i]);
                 goto cleanup;
             }
         } else {
             if (virFileMakeParentPath(devMountsPath[i]) < 0 ||
                 virFileTouch(devMountsPath[i], sb.st_mode) < 0) {
-                virReportSystemError(errno, _("Cannot create %s"),
+                virReportSystemError(errno, _("Cannot create %1$s"),
                                      devMountsPath[i]);
                 goto cleanup;
             }
@@ -878,7 +878,7 @@ qemuDomainEnableNamespace(virDomainObj *vm,
 
     if (virBitmapSetBit(priv->namespaces, ns) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unable to enable namespace: %s"),
+                       _("Unable to enable namespace: %1$s"),
                        qemuDomainNamespaceTypeToString(ns));
         return -1;
     }
@@ -1006,7 +1006,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
 
     if (virFileMakeParentPath(data->file) < 0) {
         virReportSystemError(errno,
-                             _("Unable to create %s"), data->file);
+                             _("Unable to create %1$s"), data->file);
         goto cleanup;
     }
 
@@ -1026,14 +1026,14 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
             if (unlink(data->file) < 0 &&
                 errno != ENOENT) {
                 virReportSystemError(errno,
-                                     _("Unable to remove symlink %s"),
+                                     _("Unable to remove symlink %1$s"),
                                      data->file);
                 goto cleanup;
             }
 
             if (symlink(data->target, data->file) < 0) {
                 virReportSystemError(errno,
-                                     _("Unable to create symlink %s (pointing to %s)"),
+                                     _("Unable to create symlink %1$s (pointing to %2$s)"),
                                      data->file, data->target);
                 goto cleanup;
             } else {
@@ -1053,7 +1053,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
             unlink(data->file);
             if (mknod(data->file, data->sb.st_mode, data->sb.st_rdev) < 0) {
                 virReportSystemError(errno,
-                                     _("Unable to create device %s"),
+                                     _("Unable to create device %1$s"),
                                      data->file);
                 goto cleanup;
             } else {
@@ -1068,7 +1068,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
         if (umount(data->file) < 0 &&
             errno != ENOENT && errno != EINVAL) {
             virReportSystemError(errno,
-                                 _("Unable to umount %s"),
+                                 _("Unable to umount %1$s"),
                                  data->file);
             goto cleanup;
         }
@@ -1080,14 +1080,14 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
          * proper owner and mode. Move the mount only after that. */
     } else {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("unsupported device type %s 0%o"),
+                       _("unsupported device type %1$s 0%2$o"),
                        data->file, data->sb.st_mode);
         goto cleanup;
     }
 
     if (lchown(data->file, data->sb.st_uid, data->sb.st_gid) < 0) {
         virReportSystemError(errno,
-                             _("Failed to chown device %s"),
+                             _("Failed to chown device %1$s"),
                              data->file);
         goto cleanup;
     }
@@ -1096,7 +1096,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
     if (!isLink &&
         chmod(data->file, data->sb.st_mode) < 0) {
         virReportSystemError(errno,
-                             _("Failed to set permissions for device %s"),
+                             _("Failed to set permissions for device %1$s"),
                              data->file);
         goto cleanup;
     }
@@ -1105,7 +1105,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
         virFileSetACLs(data->file, data->acl) < 0 &&
         errno != ENOTSUP) {
         virReportSystemError(errno,
-                             _("Unable to set ACLs on %s"), data->file);
+                             _("Unable to set ACLs on %1$s"), data->file);
         goto cleanup;
     }
 
@@ -1116,7 +1116,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data)
         if (errno != EOPNOTSUPP && errno != ENOTSUP) {
         VIR_WARNINGS_RESET
             virReportSystemError(errno,
-                                 _("Unable to set SELinux label on %s"),
+                                 _("Unable to set SELinux label on %1$s"),
                                  data->file);
             goto cleanup;
         }
@@ -1196,7 +1196,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *item,
             return -2;
 
         virReportSystemError(errno,
-                             _("Unable to access %s"), file);
+                             _("Unable to access %1$s"), file);
         return -1;
     }
 
@@ -1213,7 +1213,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *item,
 
         if (!(target = g_file_read_link(file, &gerr))) {
             virReportError(VIR_ERR_SYSTEM_ERROR,
-                           _("failed to resolve symlink %s: %s"), file, gerr->message);
+                           _("failed to resolve symlink %1$s: %2$s"), file, gerr->message);
             return -1;
         }
 
@@ -1238,7 +1238,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *item,
         virFileGetACLs(file, &item->acl) < 0 &&
         errno != ENOTSUP) {
         virReportSystemError(errno,
-                             _("Unable to get ACLs on %s"), file);
+                             _("Unable to get ACLs on %1$s"), file);
         return -1;
     }
 
@@ -1246,7 +1246,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *item,
     if (lgetfilecon_raw(file, &item->tcon) < 0 &&
         (errno != ENOTSUP && errno != ENODATA)) {
         virReportSystemError(errno,
-                             _("Unable to get SELinux label from %s"), file);
+                             _("Unable to get SELinux label from %1$s"), file);
         return -1;
     }
 # endif
@@ -1307,7 +1307,7 @@ qemuNamespacePrepareOneItem(qemuNamespaceMknodData *data,
 
         if (ttl-- == 0) {
             virReportSystemError(ELOOP,
-                                 _("Too many levels of symbolic links: %s"),
+                                 _("Too many levels of symbolic links: %1$s"),
                                  next);
             return -1;
         }
@@ -1413,7 +1413,7 @@ qemuNamespaceUnlinkHelper(pid_t pid G_GNUC_UNUSED,
         VIR_DEBUG("Unlinking %s", path);
         if (unlink(path) < 0 && errno != ENOENT) {
             virReportSystemError(errno,
-                                 _("Unable to remove device %s"), path);
+                                 _("Unable to remove device %1$s"), path);
             return -1;
         }
     }
diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c
index 0afa8bdb3a..e7dfc8ce61 100644
--- a/src/qemu/qemu_passt.c
+++ b/src/qemu/qemu_passt.c
@@ -229,7 +229,7 @@ qemuPasstStart(virDomainObj *vm,
         } else {
             /* validation guarantees this will never happen */
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid portForward proto value %u"), pf->proto);
+                           _("Invalid portForward proto value %1$u"), pf->proto);
             return -1;
         }
 
diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
index 500d3c50b3..184c0a965f 100644
--- a/src/qemu/qemu_qapi.c
+++ b/src/qemu/qemu_qapi.c
@@ -498,11 +498,11 @@ virQEMUQAPISchemaPathGet(const char *query,
 
     if (rc == -2) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("malformed QAPI schema when querying '%s' of '%s'"),
+                       _("malformed QAPI schema when querying '%1$s' of '%2$s'"),
                        NULLSTR(ctxt.prevquery), query);
     } else if (rc == -3) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("terminal QAPI query component '%s' of '%s' must not have followers"),
+                       _("terminal QAPI query component '%1$s' of '%2$s' must not have followers"),
                        NULLSTR(ctxt.prevquery), query);
     }
 
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index ef62303728..41310d6a9a 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -172,14 +172,14 @@ virQEMUSaveDataWrite(virQEMUSaveData *data,
 
     if (safewrite(fd, header, sizeof(*header)) != sizeof(*header)) {
         virReportSystemError(errno,
-                             _("failed to write header to domain save file '%s'"),
+                             _("failed to write header to domain save file '%1$s'"),
                              path);
         return -1;
     }
 
     if (safewrite(fd, data->xml, xml_len) != xml_len) {
         virReportSystemError(errno,
-                             _("failed to write domain xml to '%s'"),
+                             _("failed to write domain xml to '%1$s'"),
                              path);
         return -1;
     }
@@ -187,14 +187,14 @@ virQEMUSaveDataWrite(virQEMUSaveData *data,
     if (data->cookie &&
         safewrite(fd, data->cookie, cookie_len) != cookie_len) {
         virReportSystemError(errno,
-                             _("failed to write cookie to '%s'"),
+                             _("failed to write cookie to '%1$s'"),
                              path);
         return -1;
     }
 
     if (safewrite(fd, zeros, zerosLen) != zerosLen) {
         virReportSystemError(errno,
-                             _("failed to write padding to '%s'"),
+                             _("failed to write padding to '%1$s'"),
                              path);
         return -1;
     }
@@ -215,7 +215,7 @@ virQEMUSaveDataFinish(virQEMUSaveData *data,
     if (safewrite(*fd, header, sizeof(*header)) != sizeof(*header) ||
         VIR_CLOSE(*fd) < 0) {
         virReportSystemError(errno,
-                             _("failed to write header to domain save file '%s'"),
+                             _("failed to write header to domain save file '%1$s'"),
                              path);
         return -1;
     }
@@ -232,7 +232,7 @@ qemuSaveImageGetCompressionCommand(virQEMUSaveFormat compression)
 
     if (!prog) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Invalid compressed save format %d"),
+                       _("Invalid compressed save format %1$d"),
                        compression);
         return NULL;
     }
@@ -304,7 +304,7 @@ qemuSaveImageCreate(virQEMUDriver *driver,
      * trigger a single page of file system cache pollution, but
      * that's acceptable.  */
     if (VIR_CLOSE(fd) < 0) {
-        virReportSystemError(errno, _("unable to close %s"), path);
+        virReportSystemError(errno, _("unable to close %1$s"), path);
         goto cleanup;
     }
 
@@ -387,8 +387,7 @@ qemuSaveImageGetCompressionProgram(const char *imageFormat,
                      styleFormat);
         else
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("Invalid %s image format specified "
-                             "in configuration file"),
+                           _("Invalid %1$s image format specified in configuration file"),
                            styleFormat);
     } else {
         if (use_raw_on_fail)
@@ -397,8 +396,7 @@ qemuSaveImageGetCompressionProgram(const char *imageFormat,
                      styleFormat);
         else
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("Compression program for %s image format "
-                             "in configuration file isn't available"),
+                           _("Compression program for %1$s image format in configuration file isn't available"),
                            styleFormat);
     }
 
@@ -473,7 +471,7 @@ qemuSaveImageOpen(virQEMUDriver *driver,
         if (unlink_corrupt) {
             if (unlink(path) < 0) {
                 virReportSystemError(errno,
-                                     _("cannot remove corrupt file: %s"),
+                                     _("cannot remove corrupt file: %1$s"),
                                      path);
                 return -1;
             } else {
@@ -491,7 +489,7 @@ qemuSaveImageOpen(virQEMUDriver *driver,
             if (unlink_corrupt) {
                 if (unlink(path) < 0) {
                     virReportSystemError(errno,
-                                         _("cannot remove corrupt file: %s"),
+                                         _("cannot remove corrupt file: %1$s"),
                                          path);
                     return -1;
                 } else {
@@ -516,14 +514,14 @@ qemuSaveImageOpen(virQEMUDriver *driver,
 
     if (header->version > QEMU_SAVE_VERSION) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("image version is not supported (%d > %d)"),
+                       _("image version is not supported (%1$d > %2$d)"),
                        header->version, QEMU_SAVE_VERSION);
         return -1;
     }
 
     if (header->data_len <= 0) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("invalid header data length: %d"), header->data_len);
+                       _("invalid header data length: %1$d"), header->data_len);
         return -1;
     }
 
@@ -654,7 +652,7 @@ qemuSaveImageStartVM(virConnectPtr conn,
         virErrorRestore(&orig_err);
     }
     if (VIR_CLOSE(*fd) < 0) {
-        virReportSystemError(errno, _("cannot close file: %s"), path);
+        virReportSystemError(errno, _("cannot close file: %1$s"), path);
         rc = -1;
     }
 
diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c
index 9697542cd3..972d1f45c1 100644
--- a/src/qemu/qemu_slirp.c
+++ b/src/qemu/qemu_slirp.c
@@ -101,7 +101,7 @@ qemuSlirpNewForHelper(const char *helper)
     slirp = qemuSlirpNew();
     if (!slirp) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to allocate slirp for '%s'"), helper);
+                       _("Failed to allocate slirp for '%1$s'"), helper);
         return NULL;
     }
 
@@ -113,7 +113,7 @@ qemuSlirpNewForHelper(const char *helper)
     if (!(doc = virJSONValueFromString(output)) ||
         !(featuresJSON = virJSONValueObjectGetArray(doc, "features"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to parse json capabilities '%s'"),
+                       _("unable to parse json capabilities '%1$s'"),
                        helper);
         return NULL;
     }
@@ -331,7 +331,7 @@ qemuSlirpStart(virDomainObj *vm,
     rc = virPidFileReadPath(pidfile, &pid);
     if (rc < 0) {
         virReportSystemError(-rc,
-                             _("Unable to read slirp pidfile '%s'"),
+                             _("Unable to read slirp pidfile '%1$s'"),
                              pidfile);
         goto error;
     }
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 7aa4195f04..1a013d792a 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -84,7 +84,7 @@ qemuSnapObjFromName(virDomainObj *vm,
     snap = virDomainSnapshotFindByName(vm->snapshots, name);
     if (!snap)
         virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
-                       _("no domain snapshot with matching name '%s'"),
+                       _("no domain snapshot with matching name '%1$s'"),
                        name);
 
     return snap;
@@ -347,8 +347,8 @@ qemuSnapshotPrepareDiskShared(virDomainSnapshotDiskDef *snapdisk,
 
     if (!qemuBlockStorageSourceSupportsConcurrentAccess(snapdisk->src)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("shared access for disk '%s' requires use of "
-                         "supported storage format"), domdisk->dst);
+                       _("shared access for disk '%1$s' requires use of supported storage format"),
+                       domdisk->dst);
         return -1;
     }
 
@@ -386,8 +386,7 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk,
         case VIR_STORAGE_NET_PROTOCOL_NFS:
         case VIR_STORAGE_NET_PROTOCOL_LAST:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("external inactive snapshots are not supported on "
-                             "'network' disks using '%s' protocol"),
+                           _("external inactive snapshots are not supported on 'network' disks using '%1$s' protocol"),
                            virStorageNetProtocolTypeToString(domdisk->src->protocol));
             return -1;
         }
@@ -400,8 +399,8 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk,
     case VIR_STORAGE_TYPE_NONE:
     case VIR_STORAGE_TYPE_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("external inactive snapshots are not supported on "
-                         "'%s' disks"), virStorageTypeToString(domDiskType));
+                       _("external inactive snapshots are not supported on '%1$s' disks"),
+                       virStorageTypeToString(domDiskType));
         return -1;
     }
 
@@ -418,8 +417,8 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapshotDiskDef *snapdisk,
     case VIR_STORAGE_TYPE_NONE:
     case VIR_STORAGE_TYPE_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("external inactive snapshots are not supported on "
-                         "'%s' disks"), virStorageTypeToString(snapDiskType));
+                       _("external inactive snapshots are not supported on '%1$s' disks"),
+                       virStorageTypeToString(snapDiskType));
         return -1;
     }
 
@@ -462,8 +461,8 @@ qemuSnapshotPrepareDiskExternalActive(virDomainSnapshotDiskDef *snapdisk,
     case VIR_STORAGE_TYPE_NONE:
     case VIR_STORAGE_TYPE_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("external active snapshots are not supported on "
-                         "'%s' disks"), virStorageTypeToString(actualType));
+                       _("external active snapshots are not supported on '%1$s' disks"),
+                       virStorageTypeToString(actualType));
         return -1;
     }
 
@@ -510,21 +509,21 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk,
         if (rc < 0) {
             if (err != ENOENT) {
                 virReportSystemError(err,
-                                     _("unable to stat for disk %s: %s"),
+                                     _("unable to stat for disk %1$s: %2$s"),
                                      snapdisk->name, snapdisk->src->path);
                 return -1;
             }
 
             if (reuse) {
                 virReportSystemError(err,
-                                     _("missing existing file for disk %s: %s"),
+                                     _("missing existing file for disk %1$s: %2$s"),
                                      snapdisk->name, snapdisk->src->path);
                 return -1;
             }
 
             if (snapdisk->src->type == VIR_STORAGE_TYPE_BLOCK) {
                 virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                               _("block device snapshot target '%s' doesn't exist"),
+                               _("block device snapshot target '%1$s' doesn't exist"),
                                snapdisk->src->path);
                 return -1;
             }
@@ -533,7 +532,7 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk,
             if ((snapdisk->src->type == VIR_STORAGE_TYPE_BLOCK && !S_ISBLK(st.st_mode)) ||
                 (snapdisk->src->type == VIR_STORAGE_TYPE_FILE && !S_ISREG(st.st_mode))) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("mismatch between configured type for snapshot disk '%s' and the type of existing file '%s'"),
+                               _("mismatch between configured type for snapshot disk '%1$s' and the type of existing file '%2$s'"),
                                snapdisk->name, snapdisk->src->path);
                 return -1;
             }
@@ -542,7 +541,7 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk,
                 snapdisk->src->type == VIR_STORAGE_TYPE_FILE &&
                 st.st_size > 0) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("external snapshot file for disk %s already exists and is not a block device: %s"),
+                               _("external snapshot file for disk %1$s already exists and is not a block device: %2$s"),
                                snapdisk->name, snapdisk->src->path);
                 return -1;
             }
@@ -591,8 +590,7 @@ qemuSnapshotPrepareDiskInternal(virDomainDiskDef *disk,
         case VIR_STORAGE_NET_PROTOCOL_NFS:
         case VIR_STORAGE_NET_PROTOCOL_LAST:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("internal inactive snapshots are not supported on "
-                             "'network' disks using '%s' protocol"),
+                           _("internal inactive snapshots are not supported on 'network' disks using '%1$s' protocol"),
                            virStorageNetProtocolTypeToString(disk->src->protocol));
             return -1;
         }
@@ -605,8 +603,8 @@ qemuSnapshotPrepareDiskInternal(virDomainDiskDef *disk,
     case VIR_STORAGE_TYPE_NONE:
     case VIR_STORAGE_TYPE_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("internal inactive snapshots are not supported on "
-                         "'%s' disks"), virStorageTypeToString(actualType));
+                       _("internal inactive snapshots are not supported on '%1$s' disks"),
+                       virStorageTypeToString(actualType));
         return -1;
     }
 
@@ -641,8 +639,7 @@ qemuSnapshotPrepare(virDomainObj *vm,
 
             if (def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && active) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("active qemu domains require external disk "
-                                 "snapshots; disk %s requested internal"),
+                               _("active qemu domains require external disk snapshots; disk %1$s requested internal"),
                                disk->name);
                 return -1;
             }
@@ -654,8 +651,7 @@ qemuSnapshotPrepare(virDomainObj *vm,
             if (dom_disk->src->format > 0 &&
                 dom_disk->src->format != VIR_STORAGE_FILE_QCOW2) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("internal snapshot for disk %s unsupported "
-                                 "for storage type %s"),
+                               _("internal snapshot for disk %1$s unsupported for storage type %2$s"),
                                disk->name,
                                virStorageFileFormatTypeToString(dom_disk->src->format));
                 return -1;
@@ -668,8 +664,7 @@ qemuSnapshotPrepare(virDomainObj *vm,
             } else if (disk->src->format != VIR_STORAGE_FILE_QCOW2 &&
                        disk->src->format != VIR_STORAGE_FILE_QED) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("external snapshot format for disk %s "
-                                 "is unsupported: %s"),
+                               _("external snapshot format for disk %1$s is unsupported: %2$s"),
                                disk->name,
                                virStorageFileFormatTypeToString(disk->src->format));
                 return -1;
@@ -1030,7 +1025,7 @@ qemuSnapshotDiskPrepareOne(qemuSnapshotDiskContext *snapctxt,
             /* pre-create the image file so that we can label it before handing it to qemu */
             if (dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
                 if (virStorageSourceCreate(dd->src) < 0) {
-                    virReportSystemError(errno, _("failed to create image file '%s'"),
+                    virReportSystemError(errno, _("failed to create image file '%1$s'"),
                                          NULLSTR(dd->src->path));
                     return -1;
                 }
@@ -1112,7 +1107,7 @@ qemuSnapshotGetTransientDiskDef(virDomainDiskDef *domdisk,
 
     if (virFileExists(snapdisk->src->path)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("Overlay file '%s' for transient disk '%s' already exists"),
+                       _("Overlay file '%1$s' for transient disk '%2$s' already exists"),
                        snapdisk->src->path, domdisk->dst);
         return NULL;
     }
@@ -1461,16 +1456,14 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm,
     if (!(flags & VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA)) {
         if (strchr(def->parent.name, '/')) {
             virReportError(VIR_ERR_XML_DETAIL,
-                           _("invalid snapshot name '%s': "
-                             "name can't contain '/'"),
+                           _("invalid snapshot name '%1$s': name can't contain '/'"),
                            def->parent.name);
             return -1;
         }
 
         if (def->parent.name[0] == '.') {
             virReportError(VIR_ERR_XML_DETAIL,
-                           _("invalid snapshot name '%s': "
-                             "name can't start with '.'"),
+                           _("invalid snapshot name '%1$s': name can't start with '.'"),
                            def->parent.name);
             return -1;
         }
@@ -1499,7 +1492,7 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm,
 
     case VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT:
         if (!redefine) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %s"),
+            virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %1$s"),
                            virDomainSnapshotStateTypeToString(state));
             return -1;
         }
@@ -1515,7 +1508,7 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm,
     case VIR_DOMAIN_SNAPSHOT_NOSTATE:
     case VIR_DOMAIN_SNAPSHOT_BLOCKED: /* invalid state, unused in qemu */
     case VIR_DOMAIN_SNAPSHOT_LAST:
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %1$s"),
                        virDomainSnapshotStateTypeToString(state));
         return -1;
     }
@@ -1595,7 +1588,7 @@ qemuSnapshotCreateWriteMetadata(virDomainObj *vm,
                                         driver->xmlopt,
                                         cfg->snapshotDir) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to save metadata for snapshot %s"),
+                       _("unable to save metadata for snapshot %1$s"),
                        snap->def->name);
         return -1;
     }
@@ -1821,7 +1814,7 @@ qemuSnapshotRevertValidate(virDomainObj *vm,
 
     if (!snap->def->dom) {
         virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY,
-                       _("snapshot '%s' lacks domain '%s' rollback info"),
+                       _("snapshot '%1$s' lacks domain '%2$s' rollback info"),
                        snap->def->name, vm->def->name);
         return -1;
     }
@@ -2219,8 +2212,7 @@ qemuSnapshotRevert(virDomainObj *vm,
     case VIR_DOMAIN_SNAPSHOT_BLOCKED:
     case VIR_DOMAIN_SNAPSHOT_LAST:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Invalid target domain state '%s'. Refusing "
-                         "snapshot reversion"),
+                       _("Invalid target domain state '%1$s'. Refusing snapshot reversion"),
                        virDomainSnapshotStateTypeToString(snapdef->state));
         goto endjob;
     }
@@ -2319,7 +2311,7 @@ qemuSnapshotDeleteExternalPrepare(virDomainObj *vm,
 
         if (snapDisk->snapshotDeleteInProgress) {
             virReportError(VIR_ERR_OPERATION_INVALID,
-                           _("snapshot disk '%s' was target of not completed snapshot delete"),
+                           _("snapshot disk '%1$s' was target of not completed snapshot delete"),
                            snapDisk->name);
             return -1;
         }
@@ -2335,7 +2327,7 @@ qemuSnapshotDeleteExternalPrepare(virDomainObj *vm,
                                                     data->snapDisk->name);
         if (!data->parentDomDisk) {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("failed to find disk '%s' in snapshot VM XML"),
+                           _("failed to find disk '%1$s' in snapshot VM XML"),
                            snapDisk->name);
             return -1;
         }
@@ -2727,7 +2719,7 @@ qemuSnapshotDiscardExternal(virDomainObj *vm,
 
         if (data->job->state == QEMU_BLOCKJOB_STATE_FAILED) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("block commit failed while deleting disk '%s' snapshot: '%s'"),
+                           _("block commit failed while deleting disk '%1$s' snapshot: '%2$s'"),
                            data->snapDisk->name, data->job->errmsg);
             goto error;
         }
@@ -2749,7 +2741,7 @@ qemuSnapshotDiscardExternal(virDomainObj *vm,
 
         if (data->job->state == QEMU_BLOCKJOB_STATE_FAILED) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("finishing block job failed while deleting disk '%s' snapshot: '%s'"),
+                           _("finishing block job failed while deleting disk '%1$s' snapshot: '%2$s'"),
                            data->snapDisk->name, data->job->errmsg);
             goto error;
         }
@@ -3079,7 +3071,7 @@ qemuSnapshotDeleteValidate(virDomainObj *vm,
 
             if (!virStorageSourceIsSameLocation(vmdisk->src, disk->src)) {
                 virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                               _("disk image '%s' for internal snapshot '%s' is not the same as disk image currently used by VM"),
+                               _("disk image '%1$s' for internal snapshot '%2$s' is not the same as disk image currently used by VM"),
                                snapDisk->name, snap->def->name);
                 return -1;
             }
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
index f4344de663..4d72c936dc 100644
--- a/src/qemu/qemu_tpm.c
+++ b/src/qemu/qemu_tpm.c
@@ -179,7 +179,7 @@ qemuTPMEmulatorCreateStorage(virDomainTPMDef *tpm,
     /* allow others to cd into this dir */
     if (g_mkdir_with_parents(swtpmStorageDir, 0711) < 0) {
         virReportSystemError(errno,
-                             _("Could not create TPM directory %s"),
+                             _("Could not create TPM directory %1$s"),
                              swtpmStorageDir);
         return -1;
     }
@@ -192,7 +192,7 @@ qemuTPMEmulatorCreateStorage(virDomainTPMDef *tpm,
     if (virDirCreate(storagepath, 0700, swtpm_user, swtpm_group,
                      VIR_DIR_CREATE_ALLOW_EXIST) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not create directory %s as %u:%d"),
+                       _("Could not create directory %1$s as %2$u:%3$d"),
                        storagepath, swtpm_user, swtpm_group);
         return -1;
     }
@@ -294,8 +294,7 @@ qemuTPMCreateConfigFiles(const char *swtpm_setup)
         return -1;
     if (exitstatus != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not run '%s' to create config files. "
-                         "exitstatus: %d;\nError: %s"),
+                       _("Could not run '%1$s' to create config files. exitstatus: %2$d;\nError: %3$s"),
                           swtpm_setup, exitstatus, errbuf);
         return -1;
     }
@@ -323,8 +322,8 @@ qemuTPMVirCommandAddEncryption(virCommand *cmd,
 
     if (!virTPMSwtpmSetupCapsGet(VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_PWDFILE_FD)) {
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-            _("%s does not support passing a passphrase using a file "
-              "descriptor"), swtpm_setup);
+                       _("%1$s does not support passing a passphrase using a file descriptor"),
+                       swtpm_setup);
         return -1;
     }
 
@@ -436,8 +435,7 @@ qemuTPMEmulatorRunSetup(const char *storagepath,
 
     if (virCommandRun(cmd, &exitstatus) < 0 || exitstatus != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not run '%s'. exitstatus: %d; "
-                         "Check error log '%s' for details."),
+                       _("Could not run '%1$s'. exitstatus: %2$d; Check error log '%3$s' for details."),
                           swtpm_setup, exitstatus, logfile);
         return -1;
     }
@@ -523,8 +521,7 @@ qemuTPMEmulatorReconfigure(const char *storagepath,
 
     if (virCommandRun(cmd, &exitstatus) < 0 || exitstatus != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not run '%s --reconfigure'. exitstatus: %d; "
-                         "Check error log '%s' for details."),
+                       _("Could not run '%1$s --reconfigure'. exitstatus: %2$d; Check error log '%3$s' for details."),
                           swtpm_setup, exitstatus, logfile);
         return -1;
     }
@@ -636,8 +633,8 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
     if (tpm->data.emulator.hassecretuuid) {
         if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD)) {
             virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                  _("%s does not support passing passphrase via file descriptor"),
-                  swtpm);
+                           _("%1$s does not support passing passphrase via file descriptor"),
+                           swtpm);
             goto error;
         }
 
@@ -674,8 +671,8 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
          */
         if (incomingMigration && on_shared_storage) {
             virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                _("%s (on destination side) does not support the --migration option needed for migration with shared storage"),
-                   swtpm);
+                           _("%1$s (on destination side) does not support the --migration option needed for migration with shared storage"),
+                           swtpm);
             goto error;
         }
     }
@@ -809,7 +806,7 @@ qemuTPMEmulatorPrepareHost(virDomainTPMDef *tpm,
     /* ... and make sure it can be accessed by swtpm_user */
     if (chown(tpm->data.emulator.logfile, swtpm_user, swtpm_group) < 0) {
         virReportSystemError(errno,
-                             _("Could not chown on swtpm logfile %s"),
+                             _("Could not chown on swtpm logfile %1$s"),
                              tpm->data.emulator.logfile);
         return -1;
     }
@@ -988,7 +985,7 @@ qemuTPMEmulatorStart(virQEMUDriver *driver,
                                  _("swtpm died unexpectedly"));
         } else {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("swtpm died and reported: %s"), errbuf);
+                           _("swtpm died and reported: %1$s"), errbuf);
         }
         goto error;
     }
diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c
index 7539afd50a..0294daab80 100644
--- a/src/qemu/qemu_vhost_user.c
+++ b/src/qemu/qemu_vhost_user.c
@@ -150,7 +150,7 @@ qemuVhostUserTypeParse(const char *path,
 
     if ((tmp = qemuVhostUserTypeTypeFromString(type)) <= 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unknown vhost-user type: '%s'"),
+                       _("unknown vhost-user type: '%1$s'"),
                        type);
         return -1;
     }
@@ -189,7 +189,7 @@ qemuVhostUserParse(const char *path)
 
     if (!(doc = virJSONValueFromString(cont))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unable to parse json file '%s'"),
+                       _("unable to parse json file '%1$s'"),
                        path);
         return NULL;
     }
@@ -285,7 +285,7 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu,
 
     if (!(featuresJSON = virJSONValueObjectGetArray(doc, "features"))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get features from '%s'"),
+                       _("failed to get features from '%1$s'"),
                        vu->binary);
         return -1;
     }
@@ -359,7 +359,7 @@ qemuVhostUserFillDomainGPU(virQEMUDriver *driver,
 
         if (!(doc = virJSONValueFromString(output))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("unable to parse json capabilities '%s'"),
+                           _("unable to parse json capabilities '%1$s'"),
                            vu->binary);
             continue;
         }
diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c
index 5b49ef4e28..dbac4a2153 100644
--- a/src/qemu/qemu_vhost_user_gpu.c
+++ b/src/qemu/qemu_vhost_user_gpu.c
@@ -158,7 +158,7 @@ int qemuExtVhostUserGPUStart(virQEMUDriver *driver,
     rc = virPidFileReadPath(pidfile, &pid);
     if (rc < 0) {
         virReportSystemError(-rc,
-                             _("Unable to read vhost-user-gpu pidfile '%s'"),
+                             _("Unable to read vhost-user-gpu pidfile '%1$s'"),
                              pidfile);
         goto cleanup;
     }
diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
index cd947bebfd..230f85c291 100644
--- a/src/qemu/qemu_virtiofs.c
+++ b/src/qemu/qemu_virtiofs.c
@@ -190,14 +190,14 @@ qemuVirtioFSStart(virQEMUDriver *driver,
 
     if (!virFileIsExecutable(fs->binary)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("virtiofsd binary '%s' is not executable"),
+                       _("virtiofsd binary '%1$s' is not executable"),
                        fs->binary);
         return -1;
     }
 
     if (!virFileExists(fs->src->path)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("the virtiofs export directory '%s' does not exist"),
+                       _("the virtiofs export directory '%1$s' does not exist"),
                        fs->src->path);
         return -1;
     }
@@ -228,12 +228,12 @@ qemuVirtioFSStart(virQEMUDriver *driver,
             goto error;
     } else {
         if ((logfd = open(logpath, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)) < 0) {
-            virReportSystemError(errno, _("failed to create logfile %s"),
+            virReportSystemError(errno, _("failed to create logfile %1$s"),
                                  logpath);
             goto error;
         }
         if (virSetCloseExec(logfd) < 0) {
-            virReportSystemError(errno, _("failed to set close-on-exec flag on %s"),
+            virReportSystemError(errno, _("failed to set close-on-exec flag on %1$s"),
                                  logpath);
             goto error;
         }
@@ -276,7 +276,7 @@ qemuVirtioFSStart(virQEMUDriver *driver,
     rc = virPidFileReadPath(pidfile, &pid);
     if (rc < 0) {
         virReportSystemError(-rc,
-                             _("Unable to read virtiofsd pidfile '%s'"),
+                             _("Unable to read virtiofsd pidfile '%1$s'"),
                              pidfile);
         goto error;
     }
-- 
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