]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vmware: Update format strings in translated messages
authorJiri Denemark <jdenemar@redhat.com>
Thu, 9 Mar 2023 14:22:56 +0000 (15:22 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Sat, 1 Apr 2023 09:40:35 +0000 (11:40 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/vmware/vmware_conf.c
src/vmware/vmware_driver.c

index 5703ce717e389164f3eb7208a50f6f8049646e3f..8303591a9b089b3741ed75adfadb431e606ac803 100644 (file)
@@ -212,19 +212,19 @@ vmwareParseVersionStr(int type, const char *verbuf, unsigned long *version)
             break;
         default:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid driver type: %d"), type);
+                           _("Invalid driver type: %1$d"), type);
             return -1;
     }
 
     if ((tmp = strstr(verbuf, pattern)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("cannot find version pattern \"%s\""), pattern);
+                       _("cannot find version pattern \"%1$s\""), pattern);
         return -1;
     }
 
     if ((tmp = STRSKIP(tmp, pattern)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to parse %sversion"), pattern);
+                       _("failed to parse %1$sversion"), pattern);
         return -1;
     }
 
@@ -311,7 +311,7 @@ vmwareParsePath(const char *path, char **directory, char **filename)
 
         if (*separator == '\0') {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("path '%s' doesn't reference a file"), path);
+                           _("path '%1$s' doesn't reference a file"), path);
             return -1;
         }
 
@@ -385,8 +385,8 @@ vmwareVmxPath(virDomainDef *vmdef, char **vmxPath)
 
     if (!virStringHasCaseSuffix(fileName, ".vmdk")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting source '%s' of first file-based harddisk "
-                         "to be a VMDK image"), src);
+                       _("Expecting source '%1$s' of first file-based harddisk to be a VMDK image"),
+                       src);
         return -1;
     }
 
@@ -401,7 +401,7 @@ vmwareMoveFile(char *srcFile, char *dstFile)
     g_autoptr(virCommand) cmd = NULL;
 
     if (!virFileExists(srcFile)) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("file %s does not exist"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("file %1$s does not exist"),
                        srcFile);
         return -1;
     }
@@ -413,7 +413,7 @@ vmwareMoveFile(char *srcFile, char *dstFile)
 
     if (virCommandRun(cmd, NULL) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to move file to %s "), dstFile);
+                       _("failed to move file to %1$s "), dstFile);
         return -1;
     }
 
index 3c578434f3636205ffa46ca4f88b0d4e15dbf39d..259d00cacda8cf8447891b33616526b7043b8826 100644 (file)
@@ -57,7 +57,7 @@ vmwareDomObjFromDomainLocked(struct vmware_driver *driver,
         virUUIDFormat(uuid, uuidstr);
 
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("no domain with matching uuid '%s'"), uuidstr);
+                       _("no domain with matching uuid '%1$s'"), uuidstr);
         return NULL;
     }
 
@@ -158,7 +158,7 @@ vmwareConnectOpen(virConnectPtr conn,
     /* If path isn't /session, then they typoed, so tell them correct path */
     if (STRNEQ(conn->uri->path, "/session")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("unexpected VMware URI path '%s', try vmwareplayer:///session, vmwarews:///session or vmwarefusion:///session"),
+                       _("unexpected VMware URI path '%1$s', try vmwareplayer:///session, vmwarews:///session or vmwarefusion:///session"),
                        NULLSTR(conn->uri->path));
         return VIR_DRV_OPEN_ERROR;
     }
@@ -177,7 +177,7 @@ vmwareConnectOpen(virConnectPtr conn,
         if (vmrun == NULL)
             continue;
         if (virFileResolveLink(vmrun, &driver->vmrun) < 0) {
-            virReportSystemError(errno, _("unable to resolve symlink '%s'"), vmrun);
+            virReportSystemError(errno, _("unable to resolve symlink '%1$s'"), vmrun);
             goto cleanup;
         }
         VIR_FREE(vmrun);
@@ -196,8 +196,9 @@ vmwareConnectOpen(virConnectPtr conn,
         goto cleanup;
 
     if ((tmp = STRSKIP(conn->uri->scheme, "vmware")) == NULL) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to parse URI "
-                       "scheme '%s'"), conn->uri->scheme);
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       _("unable to parse URI scheme '%1$s'"),
+                       conn->uri->scheme);
         goto cleanup;
     }
 
@@ -205,8 +206,9 @@ vmwareConnectOpen(virConnectPtr conn,
     driver->type = vmwareDriverTypeFromString(tmp);
 
     if (driver->type == -1) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to find valid "
-                       "requested VMware backend '%s'"), tmp);
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       _("unable to find valid requested VMware backend '%1$s'"),
+                       tmp);
         goto cleanup;
     }
 
@@ -407,7 +409,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
     /* create vmx file */
     if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to write vmx file '%s'"), vmxPath);
+                       _("Failed to write vmx file '%1$s'"), vmxPath);
         goto cleanup;
     }
 
@@ -652,7 +654,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
     /* create vmx file */
     if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to write vmx file '%s'"), vmxPath);
+                       _("Failed to write vmx file '%1$s'"), vmxPath);
         goto cleanup;
     }
 
@@ -775,7 +777,7 @@ vmwareDomainLookupByID(virConnectPtr conn, int id)
 
     if (!vm) {
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("no domain with matching id '%d'"), id);
+                       _("no domain with matching id '%1$d'"), id);
         goto cleanup;
     }
 
@@ -832,7 +834,7 @@ vmwareDomainLookupByName(virConnectPtr conn, const char *name)
 
     if (!vm) {
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("no domain with matching name '%s'"), name);
+                       _("no domain with matching name '%1$s'"), name);
         goto cleanup;
     }
 
@@ -910,7 +912,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
 
     if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Unsupported config format '%s'"), nativeFormat);
+                       _("Unsupported config format '%1$s'"), nativeFormat);
         return NULL;
     }