Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/vmware/vmware_conf.c | 16 ++++++++--------
src/vmware/vmware_driver.c | 26 ++++++++++++++------------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index 5703ce717e..8303591a9b 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -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;
}
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 3c578434f3..259d00cacd 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -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;
}
--
2.39.2