From nobody Sun Feb 8 23:16:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678464681; cv=none; d=zohomail.com; s=zohoarc; b=OPjMYZKDaJD75nFSkPM0QVFlYjUw+fRmGv6ZmovG0VPY5o54VD9dwzD1d8By49XoMBpco7I/a48vl9Ri2arhK2T9gIm0xKRfVNK5NUrxAU9PIz3q5WSuIr6W3BbNKgMRUL6Gt8GWIHDHSAOMPdmLbo4D39sfFyBjy+ysMtLLK+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464681; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ndkHM81xI2EOhtbfH/ucay7XgPWelEj3LlOSSlNLF5I=; b=XUx1NMMtZg8LUJMBj4Ngdhnm0ZFNyXFTXeh66iBMAcJwPdQQrPGFarbOQ4jISeoJDdNTifphRtmkGHXfqHylrZpxG3ipzgT+hVFJ7VqNnjIueT0DJlb0cezCGQY6YAgEcIUQo7lphPzZSqTdqmrQMzBdBj8uxK761qj1YtT3fmE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678464681885206.97329523371468; Fri, 10 Mar 2023 08:11:21 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-359-KPUN6cHEPKO1Zt_R2S02kg-1; Fri, 10 Mar 2023 11:11:08 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4393183B3D3; Fri, 10 Mar 2023 16:10:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C525B440E1; Fri, 10 Mar 2023 16:10:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B44C21946A63; Fri, 10 Mar 2023 16:10:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C00F21946587 for ; Fri, 10 Mar 2023 16:10:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B4557492B00; Fri, 10 Mar 2023 16:10:30 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21F7C492C3E for ; Fri, 10 Mar 2023 16:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464680; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ndkHM81xI2EOhtbfH/ucay7XgPWelEj3LlOSSlNLF5I=; b=c/8x+9kGZ/CFedVvlZi2aD/MGkF5VLU9iLYhs5aYDVATgxoTd9r87EI6s/MzEUlz31EGmx Q95YTCyWwtvii/e4TnpbBzZaS3hBRK+BiJrYToocE7odw67nNJAX12c6y0KHC4YjNXIsbw nqhIgsBl6IY6+xiYtRGHeOqvCBIBcQU= X-MC-Unique: KPUN6cHEPKO1Zt_R2S02kg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 12/51] esx: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:28 +0100 Message-Id: <4314dad90914b871162fc2003eda2b32c5508781.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678464683148100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/esx/esx_driver.c | 106 ++++++++-------- src/esx/esx_network_driver.c | 21 ++-- src/esx/esx_storage_backend_iscsi.c | 6 +- src/esx/esx_storage_backend_vmfs.c | 32 ++--- src/esx/esx_storage_driver.c | 8 +- src/esx/esx_stream.c | 4 +- src/esx/esx_util.c | 29 ++--- src/esx/esx_vi.c | 189 ++++++++++++++-------------- src/esx/esx_vi_types.c | 48 ++++--- 9 files changed, 211 insertions(+), 232 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 9dc5489411..c86e1e7470 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -208,8 +208,8 @@ esxParseVMXFileName(const char *fileName, !(datastoreName =3D strtok_r(tmp, "/", &saveptr)) || !(directoryAndFileName =3D strtok_r(NULL, "", &saveptr))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File name '%s' doesn't have expected format " - "'/vmfs/volumes//'"), fileNa= me); + _("File name '%1$s' doesn't have expected forma= t '/vmfs/volumes//'"), + fileName); goto cleanup; } =20 @@ -226,7 +226,7 @@ esxParseVMXFileName(const char *fileName, ret =3D 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File name '%s' refers to non-existing da= tastore '%s'"), + _("File name '%1$s' refers to non-existing = datastore '%2$s'"), fileName, datastoreName); } goto cleanup; @@ -243,7 +243,7 @@ esxParseVMXFileName(const char *fileName, =20 if (!*out) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not handle file name '%s'"), fileName); + _("Could not handle file name '%1$s'"), fileName); goto cleanup; } =20 @@ -334,7 +334,7 @@ esxFormatVMXFileName(const char *fileName, void *opaque) tmpResult =3D g_strdup(fileName); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not handle file name '%s'"), fileName); + _("Could not handle file name '%1$s'"), fileName); goto cleanup; } =20 @@ -381,7 +381,7 @@ esxAutodetectSCSIControllerModel(virDomainDiskDef *def,= int *model, =20 if (!vmDiskFileInfo || !vmDiskFileInfo->controllerType) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup controller model for '%s'"), sr= c); + _("Could not lookup controller model for '%1$s'"), = src); goto cleanup; } =20 @@ -399,7 +399,7 @@ esxAutodetectSCSIControllerModel(virDomainDiskDef *def,= int *model, *model =3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Found unexpected controller model '%s' for disk = '%s'"), + _("Found unexpected controller model '%1$s' for dis= k '%2$s'"), vmDiskFileInfo->controllerType, src); goto cleanup; } @@ -462,10 +462,8 @@ esxSupportsLongMode(esxPrivate *priv) priv->supportsLongMode =3D esxVI_Boolean_False; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Bit 29 (Long Mode) of HostSystem= property " - "'hardware.cpuFeature[].edx' with= value '%s' " - "has unexpected value '%c', expec= ting '0' " - "or '1'"), hostCpuIdInfo->edx, ed= xLongModeBit); + _("Bit 29 (Long Mode) of HostSystem= property 'hardware.cpuFeature[].edx' with value '%1$s' has unexpected valu= e '%2$c', expecting '0' or '1'"), + hostCpuIdInfo->edx, edxLongModeBit); goto cleanup; } =20 @@ -637,7 +635,7 @@ esxConnectToHost(esxPrivate *priv, =20 if (priv->host->productLine !=3D expectedProductLine) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting '%s' to be a %s host but found a %s ho= st"), + _("Expecting '%1$s' to be a %2$s host but found a %= 3$s host"), conn->uri->server, esxVI_ProductLineToDisplayName(expectedProductLine), esxVI_ProductLineToDisplayName(priv->host->productL= ine)); @@ -720,7 +718,7 @@ esxConnectToVCenter(esxPrivate *priv, =20 if (priv->vCenter->productLine !=3D esxVI_ProductLine_VPX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting '%s' to be a %s host but found a %s ho= st"), + _("Expecting '%1$s' to be a %2$s host but found a %= 3$s host"), hostname, esxVI_ProductLineToDisplayName(esxVI_ProductLine_VP= X), esxVI_ProductLineToDisplayName(priv->vCenter->produ= ctLine)); @@ -867,9 +865,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr au= th, if (potentialVCenterIPAddress && STRNEQ(vCenterIPAddress, potentialVCenterIPAddress)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("This host is managed by a vCenter wi= th IP " - "address %s, but a mismatching vCente= r '%s' " - "(%s) has been specified"), + _("This host is managed by a vCenter wi= th IP address %1$s, but a mismatching vCenter '%2$s' (%3$s) has been specif= ied"), potentialVCenterIPAddress, priv->parsed= Uri->vCenter, vCenterIPAddress); goto cleanup; @@ -1031,7 +1027,7 @@ esxConnectSupportsFeature(virConnectPtr conn, int fea= ture) case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER: case VIR_DRV_FEATURE_FD_PASSING: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Global feature %d should have already been handl= ed"), + _("Global feature %1$d should have already been han= dled"), feature); return -1; =20 @@ -1258,7 +1254,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nod= einfo) dynamicProperty->val->string[sizeof(nodeinfo->model) - 1] =3D = '\0'; if (virStrcpyStatic(nodeinfo->model, dynamicProperty->val->str= ing) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU Model %s too long for destination"), + _("CPU Model %1$s too long for destination"= ), dynamicProperty->val->string); goto cleanup; } @@ -1338,7 +1334,7 @@ esxConnectListDomains(virConnectPtr conn, int *ids, i= nt maxids) &ids[count]) < 0 || ids[count] <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse positive integer from '%s'"), + _("Failed to parse positive integer from '%1$s'= "), virtualMachine->obj->value); goto cleanup; } @@ -1430,7 +1426,7 @@ esxDomainLookupByID(virConnectPtr conn, int id) } =20 if (!domain) - virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %d"), id); + virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %1$d"), id); =20 cleanup: esxVI_String_Free(&propertyNameList); @@ -1562,7 +1558,7 @@ esxDomainSuspend(virDomainPtr domain) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not suspend domain= : %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not suspend domain= : %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1617,7 +1613,7 @@ esxDomainResume(virDomainPtr domain) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not resume domain:= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not resume domain:= %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1774,7 +1770,7 @@ esxDomainDestroyFlags(virDomainPtr domain, } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not destroy domain= : %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not destroy domain= : %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1835,7 +1831,7 @@ esxDomainGetMaxMemory(virDomainPtr domain) =20 if (dynamicProperty->val->int32 < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Got invalid memory size %d"), + _("Got invalid memory size %1$d"), dynamicProperty->val->int32); } else { memoryMB =3D dynamicProperty->val->int32; @@ -1907,7 +1903,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned l= ong memory) =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not set max-memory to %lu kilobytes: %s"),= memory, + _("Could not set max-memory to %1$lu kilobytes: %2$= s"), memory, taskInfoErrorMessage); goto cleanup; } @@ -1965,7 +1961,7 @@ esxDomainSetMemoryFlags(virDomainPtr domain, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not set memory to %lu kilobytes: %s"), mem= ory, + _("Could not set memory to %1$lu kilobytes: %2$s"),= memory, taskInfoErrorMessage); goto cleanup; } @@ -2200,7 +2196,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPt= r info) =20 if (!perfEntityMetric) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QueryPerf returned object with unexp= ected type '%s'"), + _("QueryPerf returned object with unexp= ected type '%1$s'"), esxVI_Type_ToString(perfEntityMetricBas= e->_type)); goto cleanup; } @@ -2210,7 +2206,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPt= r info) =20 if (!perfMetricIntSeries) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QueryPerf returned object with unexp= ected type '%s'"), + _("QueryPerf returned object with unexp= ected type '%1$s'"), esxVI_Type_ToString(perfEntityMetric->v= alue->_type)); goto cleanup; } @@ -2413,8 +2409,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned = int nvcpus, =20 if (nvcpus > maxVcpus) { virReportError(VIR_ERR_INVALID_ARG, - _("Requested number of virtual CPUs is greater than= max " - "allowable number of virtual CPUs for the domain:= %d > %d"), + _("Requested number of virtual CPUs is greater than= max allowable number of virtual CPUs for the domain: %1$d > %2$d"), nvcpus, maxVcpus); return -1; } @@ -2440,7 +2435,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned = int nvcpus, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not set number of virtual CPUs to %d: %s")= , nvcpus, + _("Could not set number of virtual CPUs to %1$d: %2= $s"), nvcpus, taskInfoErrorMessage); goto cleanup; } @@ -2636,7 +2631,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, con= st char *nativeFormat, =20 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; } =20 @@ -2679,7 +2674,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const= char *nativeFormat, =20 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; } =20 @@ -2837,7 +2832,7 @@ esxDomainCreateWithFlags(virDomainPtr domain, unsigne= d int flags) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not start domain: = %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not start domain: = %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -2999,8 +2994,8 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const cha= r *xml, unsigned int flags) =20 if (!virStringHasCaseSuffix(src, ".vmdk")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting source '%s' of first file-based harddi= sk to " - "be a VMDK image"), src); + _("Expecting source '%1$s' of first file-based hard= disk to be a VMDK image"), + src); goto cleanup; } =20 @@ -3056,7 +3051,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const cha= r *xml, unsigned int flags) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not define domain:= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not define domain:= %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -3522,8 +3517,8 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr dom= ain, =20 if (params[i].value.l < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not set reservation to %lld MHz, e= xpecting " - "positive value"), params[i].value.l); + _("Could not set reservation to %1$lld MHz,= expecting positive value"), + params[i].value.l); goto cleanup; } =20 @@ -3534,8 +3529,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr dom= ain, =20 if (params[i].value.l < -1) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not set limit to %lld MHz, expecti= ng " - "positive value or -1 (unlimited)"), + _("Could not set limit to %1$lld MHz, expec= ting positive value or -1 (unlimited)"), params[i].value.l); goto cleanup; } @@ -3573,8 +3567,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr dom= ain, =20 default: virReportError(VIR_ERR_INVALID_ARG, - _("Could not set shares to %d, expectin= g positive " - "value or -1 (low), -2 (normal) or -3= (high)"), + _("Could not set shares to %1$d, expect= ing positive value or -1 (low), -2 (normal) or -3 (high)"), params[i].value.i); goto cleanup; } @@ -3593,7 +3586,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr dom= ain, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not change scheduler parameters: %s"), + _("Could not change scheduler parameters: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -3744,8 +3737,8 @@ esxDomainMigratePerform(virDomainPtr domain, */ if (eventList->fullFormattedMessage) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not migrate domain, validation reporte= d a " - "problem: %s"), eventList->fullFormattedMessa= ge); + _("Could not migrate domain, validation reporte= d a problem: %1$s"), + eventList->fullFormattedMessage); } else { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not migrate domain, validation reporte= d a " @@ -3770,8 +3763,7 @@ esxDomainMigratePerform(virDomainPtr domain, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not migrate domain, migration task finishe= d with " - "an error: %s"), + _("Could not migrate domain, migration task finishe= d with an error: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -4024,7 +4016,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const= char *xmlDesc, =20 if (snapshotTree) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Snapshot '%s' already exists"), def->parent.name= ); + _("Snapshot '%1$s' already exists"), def->parent.na= me); goto cleanup; } =20 @@ -4041,7 +4033,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const= char *xmlDesc, } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not create snapsho= t: %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not create snapsho= t: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -4373,7 +4365,7 @@ esxDomainSnapshotGetParent(virDomainSnapshotPtr snaps= hot, unsigned int flags) =20 if (!snapshotTreeParent) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("snapshot '%s' does not have a parent"), + _("snapshot '%1$s' does not have a parent"), snapshotTree->name); goto cleanup; } @@ -4517,7 +4509,7 @@ esxDomainRevertToSnapshot(virDomainSnapshotPtr snapsh= ot, unsigned int flags) =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not revert to snapshot '%s': %s"), snapsho= t->name, + _("Could not revert to snapshot '%1$s': %2$s"), sna= pshot->name, taskInfoErrorMessage); goto cleanup; } @@ -4579,7 +4571,7 @@ esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot= , unsigned int flags) =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not delete snapshot '%s': %s"), snapshot->= name, + _("Could not delete snapshot '%1$s': %2$s"), snapsh= ot->name, taskInfoErrorMessage); goto cleanup; } @@ -4646,7 +4638,7 @@ esxDomainSetMemoryParameters(virDomainPtr domain, vir= TypedParameterPtr params, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not change memory parameters: %s"), + _("Could not change memory parameters: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -4967,7 +4959,7 @@ esxDomainHasManagedSaveImage(virDomainPtr domain, uns= igned int flags) =20 if (!managedObjectReference) { virReportError(VIR_ERR_NO_DOMAIN, - _("Could not find domain with UUID '%s'"), + _("Could not find domain with UUID '%1$s'"), uuid_string); goto cleanup; } @@ -5084,7 +5076,7 @@ esxDomainInterfaceAddresses(virDomainPtr domain, virCheckFlags(0, -1); if (source !=3D VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unknown IP address data source %d"), + _("Unknown IP address data source %1$d"), source); return -1; } @@ -5120,7 +5112,7 @@ esxDomainInterfaceAddresses(virDomainPtr domain, =20 if (!guestNicInfoList) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing property '%s' in answer"), + _("Missing property '%1$s' in answer"), "guest.net"); goto cleanup; } diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 1261b3f1fa..273147af40 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -148,7 +148,7 @@ esxNetworkLookupByUUID(virConnectPtr conn, const unsign= ed char *uuid) virUUIDFormat(uuid, uuid_string); =20 virReportError(VIR_ERR_NO_NETWORK, - _("Could not find HostVirtualSwitch with UUID '%s'"= ), + _("Could not find HostVirtualSwitch with UUID '%1$s= '"), uuid_string); =20 goto cleanup; @@ -337,7 +337,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char= *xml, case VIR_NETWORK_FORWARD_PASSTHROUGH: case VIR_NETWORK_FORWARD_HOSTDEV: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported forward mode '%s'"), + _("Unsupported forward mode '%1$s'"), virNetworkForwardTypeToString(def->forward.type)); goto cleanup; =20 @@ -357,7 +357,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char= *xml, hostPortGroup =3D hostPortGroup->_next) { if (STREQ(def->portGroups[i].name, hostPortGroup->spec->na= me)) { virReportError(VIR_ERR_NETWORK_EXIST, - _("HostPortGroup with name '%s' exists = already"), + _("HostPortGroup with name '%1$s' exist= s already"), def->portGroups[i].name); goto cleanup; } @@ -390,8 +390,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char= *xml, if (def->forward.ifs[i].type !=3D VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_NETDEV) { virReportError(VIR_ERR_NO_SUPPORT, - _("unsupported device type in network %s " - "interface pool"), + _("unsupported device type in network %1$s = interface pool"), def->name); goto cleanup; } @@ -412,7 +411,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char= *xml, =20 if (! found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find PhysicalNic with name '%s= '"), + _("Could not find PhysicalNic with name '%1= $s'"), def->forward.ifs[i].device.dev); goto cleanup; } @@ -537,7 +536,7 @@ esxNetworkUndefine(virNetworkPtr network) hostPortGroupPort =3D hostPortGroupPort->_next) { if (STRNEQ(hostPortGroupPort->type, "virtualMachine"))= { virReportError(VIR_ERR_OPERATION_INVALID, - _("Cannot undefine HostVirtualSwitc= h that has a '%s' port"), + _("Cannot undefine HostVirtualSwitc= h that has a '%1$s' port"), hostPortGroupPort->type); goto cleanup; } @@ -550,7 +549,7 @@ esxNetworkUndefine(virNetworkPtr network) =20 if (! found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find HostPortGroup for key '%s'"), + _("Could not find HostPortGroup for key '%1$s'"= ), hostPortGroupKey->value); goto cleanup; } @@ -578,7 +577,7 @@ esxNetworkUndefine(virNetworkPtr network) =20 if (! found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find HostPortGroup for key '%s'"), + _("Could not find HostPortGroup for key '%1$s'"= ), hostPortGroupKey->value); goto cleanup; } @@ -714,7 +713,7 @@ esxNetworkGetXMLDesc(virNetworkPtr network_, unsigned i= nt flags) =20 if (! found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find PhysicalNic with key '%s'= "), + _("Could not find PhysicalNic with key '%1$= s'"), physicalNicKey->value); goto cleanup; } @@ -787,7 +786,7 @@ esxNetworkGetXMLDesc(virNetworkPtr network_, unsigned i= nt flags) =20 if (! found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find HostPortGroup with key '%= s'"), + _("Could not find HostPortGroup with key '%= 1$s'"), hostPortGroupKey->value); goto cleanup; } diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_back= end_iscsi.c index 7be0444f1b..087365392b 100644 --- a/src/esx/esx_storage_backend_iscsi.c +++ b/src/esx/esx_storage_backend_iscsi.c @@ -320,7 +320,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsign= ed int flags) if (!target) { /* pool not found */ virReportError(VIR_ERR_NO_STORAGE_POOL, - _("Could not find storage pool with name '%s'"), + _("Could not find storage pool with name '%1$s'"), pool->name); goto cleanup; } @@ -638,7 +638,7 @@ esxStorageVolGetInfo(virStorageVolPtr volume, =20 if (!hostScsiDisk) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("Could not find volume with name: %s"), + _("Could not find volume with name: %1$s"), volume->name); goto cleanup; } @@ -693,7 +693,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume, =20 if (!scsiLun) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("Could find volume with name: %s"), volume->name); + _("Could find volume with name: %1$s"), volume->nam= e); goto cleanup; } =20 diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backe= nd_vmfs.c index 4efcc2fc75..f00c7eec4e 100644 --- a/src/esx/esx_storage_backend_vmfs.c +++ b/src/esx/esx_storage_backend_vmfs.c @@ -522,7 +522,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsign= ed int flags) def.source.format =3D VIR_STORAGE_POOL_NETFS_CIFS; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Datastore has unexpected type '%s'"), + _("Datastore has unexpected type '%1$s'"), nasInfo->nas->type); goto cleanup; } @@ -877,15 +877,15 @@ esxStorageVolCreateXML(virStoragePoolPtr pool, =20 if (!tmp || *def->name =3D=3D '/' || tmp[1] =3D=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Volume name '%s' doesn't have expected format " - "'/'"), def->name); + _("Volume name '%1$s' doesn't have expected format = '/'"), + def->name); goto cleanup; } =20 if (!virStringHasCaseSuffix(def->name, ".vmdk")) { virReportError(VIR_ERR_NO_SUPPORT, - _("Volume name '%s' has unsupported suffix, " - "expecting '.vmdk'"), def->name); + _("Volume name '%1$s' has unsupported suffix, expec= ting '.vmdk'"), + def->name); goto cleanup; } =20 @@ -980,7 +980,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not create volume: %s"), + _("Could not create volume: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1002,7 +1002,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool, } } else { virReportError(VIR_ERR_NO_SUPPORT, - _("Creation of %s volumes is not supported"), + _("Creation of %1$s volumes is not supported"), virStorageFileFormatTypeToString(def->target.format= )); goto cleanup; } @@ -1079,15 +1079,15 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool, =20 if (!tmp || *def->name =3D=3D '/' || tmp[1] =3D=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Volume name '%s' doesn't have expected format " - "'/'"), def->name); + _("Volume name '%1$s' doesn't have expected format = '/'"), + def->name); goto cleanup; } =20 if (!virStringHasCaseSuffix(def->name, ".vmdk")) { virReportError(VIR_ERR_NO_SUPPORT, - _("Volume name '%s' has unsupported suffix, " - "expecting '.vmdk'"), def->name); + _("Volume name '%1$s' has unsupported suffix, expec= ting '.vmdk'"), + def->name); goto cleanup; } =20 @@ -1148,7 +1148,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool, } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not copy volum= e: %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not copy volum= e: %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1170,7 +1170,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool, } } else { virReportError(VIR_ERR_NO_SUPPORT, - _("Creation of %s volumes is not supported"), + _("Creation of %1$s volumes is not supported"), virStorageFileFormatTypeToString(def->target.format= )); goto cleanup; } @@ -1211,7 +1211,7 @@ esxStorageVolDelete(virStorageVolPtr volume, unsigned= int flags) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not delete volume:= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not delete volume:= %1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1250,7 +1250,7 @@ esxStorageVolWipe(virStorageVolPtr volume, unsigned i= nt flags) } =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not wipe volume: %= s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not wipe volume: %= 1$s"), taskInfoErrorMessage); goto cleanup; } @@ -1372,7 +1372,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume, def.target.format =3D VIR_STORAGE_FILE_RAW; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s' has unknown type"), datastorePath); + _("File '%1$s' has unknown type"), datastorePath); goto cleanup; } =20 diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c index 7ce2efe855..085650f0fb 100644 --- a/src/esx/esx_storage_driver.c +++ b/src/esx/esx_storage_driver.c @@ -154,7 +154,7 @@ esxStoragePoolLookupByName(virConnectPtr conn, const ch= ar *name) } =20 virReportError(VIR_ERR_NO_STORAGE_POOL, - _("Could not find storage pool with name '%s'"), name); + _("Could not find storage pool with name '%1$s'"), name= ); =20 return NULL; } @@ -182,7 +182,7 @@ esxStoragePoolLookupByUUID(virConnectPtr conn, const un= signed char *uuid) =20 virUUIDFormat(uuid, uuid_string); virReportError(VIR_ERR_NO_STORAGE_POOL, - _("Could not find storage pool with uuid '%s'"), + _("Could not find storage pool with uuid '%1$s'"), uuid_string); =20 return NULL; @@ -349,7 +349,7 @@ esxStorageVolLookupByPath(virConnectPtr conn, const cha= r *path) return backends[ISCSI]->storageVolLookupByPath(conn, path); } else { virReportError(VIR_ERR_INVALID_ARG, - _("Unexpected volume path format: %s"), path); + _("Unexpected volume path format: %1$s"), path); =20 return NULL; } @@ -375,7 +375,7 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char= *key) } =20 virReportError(VIR_ERR_NO_STORAGE_VOL, - _("Could not find storage volume with key '%s'"), + _("Could not find storage volume with key '%1$s'"), key); =20 return NULL; diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c index 85fef53339..1439940330 100644 --- a/src/esx/esx_stream.c +++ b/src/esx/esx_stream.c @@ -176,14 +176,14 @@ esxStreamTransfer(esxStreamPrivate *priv, bool blocki= ng) =20 if (status < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not complete transfer: %s (%d)"), + _("Could not complete transfer: %1$s (%2$d)"), curl_easy_strerror(errorCode), errorCode); return -1; } =20 if (responseCode !=3D 200 && responseCode !=3D 206) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected HTTP response code %lu"), + _("Unexpected HTTP response code %1$lu"), responseCode); return -1; } diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 89d5517262..fbbf226555 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -59,8 +59,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *u= ri) if (STRNEQ((*parsedUri)->transport, "http") && STRNEQ((*parsedUri)->transport, "https")) { virReportError(VIR_ERR_INVALID_ARG, - _("Query parameter 'transport' has unexpect= ed value " - "'%s' (should be http|https)"), + _("Query parameter 'transport' has unexpect= ed value '%1$s' (should be http|https)"), (*parsedUri)->transport); goto cleanup; } @@ -72,8 +71,8 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *u= ri) if (virStrToLong_i(queryParam->value, NULL, 10, &noVerify) < 0= || (noVerify !=3D 0 && noVerify !=3D 1)) { virReportError(VIR_ERR_INVALID_ARG, - _("Query parameter 'no_verify' has unexpect= ed value " - "'%s' (should be 0 or 1)"), queryParam->v= alue); + _("Query parameter 'no_verify' has unexpect= ed value '%1$s' (should be 0 or 1)"), + queryParam->value); goto cleanup; } =20 @@ -82,8 +81,8 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *u= ri) if (virStrToLong_i(queryParam->value, NULL, 10, &autoAnswer) <= 0 || (autoAnswer !=3D 0 && autoAnswer !=3D 1)) { virReportError(VIR_ERR_INVALID_ARG, - _("Query parameter 'auto_answer' has unexpe= cted " - "value '%s' (should be 0 or 1)"), queryPa= ram->value); + _("Query parameter 'auto_answer' has unexpe= cted value '%1$s' (should be 0 or 1)"), + queryParam->value); goto cleanup; } =20 @@ -108,8 +107,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI = *uri) *tmp =3D '\0'; =20 virReportError(VIR_ERR_INVALID_ARG, - _("Query parameter 'proxy' contains unexpec= ted " - "type '%s' (should be (http|socks(|4|4a|5= ))"), + _("Query parameter 'proxy' contains unexpec= ted type '%1$s' (should be (http|socks(|4|4a|5))"), queryParam->value); goto cleanup; } else { @@ -133,8 +131,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI = *uri) (*parsedUri)->proxy_port < 1 || (*parsedUri)->proxy_port > 65535) { virReportError(VIR_ERR_INVALID_ARG, - _("Query parameter 'proxy' has unexpect= ed " - "port value '%s' (should be [1..65535= ])"), + _("Query parameter 'proxy' has unexpect= ed port value '%1$s' (should be [1..65535])"), tmp); goto cleanup; } @@ -223,8 +220,8 @@ esxUtil_ParseDatastorePath(const char *datastorePath, c= har **datastoreName, if (!(tmp =3D STRSKIP(copyOfDatastorePath, "[")) || *tmp =3D=3D ']' || !(preliminaryDatastoreName =3D strtok_r(tmp, "]", &saveptr))) { virReportError(VIR_ERR_INVALID_ARG, - _("Datastore path '%s' doesn't have expected format= " - "'[] '"), datastorePath); + _("Datastore path '%1$s' doesn't have expected form= at '[] '"), + datastorePath); goto cleanup; } =20 @@ -291,14 +288,14 @@ esxUtil_ResolveHostname(const char *hostname, char **= ipAddress) =20 if (errcode !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IP address lookup for host '%s' failed: %s"), ho= stname, + _("IP address lookup for host '%1$s' failed: %2$s")= , hostname, gai_strerror(errcode)); return -1; } =20 if (!result) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No IP address for host '%s' found: %s"), hostnam= e, + _("No IP address for host '%1$s' found: %2$s"), hos= tname, gai_strerror(errcode)); return -1; } @@ -310,7 +307,7 @@ esxUtil_ResolveHostname(const char *hostname, char **ip= Address) =20 if (errcode !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Formatting IP address for host '%s' failed: %s")= , hostname, + _("Formatting IP address for host '%1$s' failed: %2= $s"), hostname, gai_strerror(errcode)); return -1; } @@ -329,7 +326,7 @@ esxUtil_ReformatUuid(const char *input, char *output) =20 if (virUUIDParse(input, uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), input); return -1; } diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index b56d84fc43..122e5bed2e 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -235,7 +235,7 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url) =20 if (errorCode !=3D CURLE_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("curl_easy_perform() returned an error: %s (%d) := %s"), + _("curl_easy_perform() returned an error: %1$s (%2$= d) : %3$s"), curl_easy_strerror(errorCode), errorCode, curl->err= or); return -1; } @@ -245,8 +245,8 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url) =20 if (errorCode !=3D CURLE_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) return= ed an " - "error: %s (%d) : %s"), curl_easy_strerror(errorC= ode), + _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) return= ed an error: %1$s (%2$d) : %3$s"), + curl_easy_strerror(errorCode), errorCode, curl->error); return -1; } @@ -264,13 +264,13 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url) =20 if (errorCode !=3D CURLE_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("curl_easy_getinfo(CURLINFO_REDIRECT_URL) ret= urned " - "an error: %s (%d) : %s"), + _("curl_easy_getinfo(CURLINFO_REDIRECT_URL) ret= urned an error: %1$s (%2$d) : %3$s"), curl_easy_strerror(errorCode), errorCode, curl->error); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("The server redirects from '%s' to '%s'"), ur= l, + _("The server redirects from '%1$s' to '%2$s'"), + url, redirectUrl); } =20 @@ -394,7 +394,7 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, = char **content, return -1; } else if (responseCode !=3D 200 && responseCode !=3D 206) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HTTP response code %d for download from '%s'"), + _("HTTP response code %1$d for download from '%2$s'= "), responseCode, url); return -1; } @@ -434,7 +434,7 @@ esxVI_CURL_Upload(esxVI_CURL *curl, const char *url, co= nst char *content) return -1; } else if (responseCode !=3D 200 && responseCode !=3D 201) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HTTP response code %d for upload to '%s'"), + _("HTTP response code %1$d for upload to '%2$s'"), responseCode, url); return -1; } @@ -469,7 +469,7 @@ esxVI_SharedCURL_Lock(CURL *handle G_GNUC_UNUSED, curl_= lock_data data, break; =20 default: - VIR_ERROR(_("Trying to lock unknown SharedCURL lock %d"), (int)dat= a); + VIR_ERROR(_("Trying to lock unknown SharedCURL lock %1$d"), (int)d= ata); return; } =20 @@ -497,7 +497,7 @@ esxVI_SharedCURL_Unlock(CURL *handle G_GNUC_UNUSED, cur= l_lock_data data, break; =20 default: - VIR_ERROR(_("Trying to unlock unknown SharedCURL lock %d"), (int)d= ata); + VIR_ERROR(_("Trying to unlock unknown SharedCURL lock %1$d"), (int= )data); return; } =20 @@ -717,7 +717,7 @@ esxVI_MultiCURL_Wait(esxVI_MultiCURL *multi, int *runni= ngHandles) =20 if (errorCode !=3D CURLM_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not wait for transfer: %s (%d)"), + _("Could not wait for transfer: %1$s (%2$d)"), curl_multi_strerror(errorCode), errorCode); return -1; } @@ -736,7 +736,7 @@ esxVI_MultiCURL_Perform(esxVI_MultiCURL *multi, int *ru= nningHandles) =20 if (errorCode !=3D CURLM_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not transfer data: %s (%d)"), + _("Could not transfer data: %1$s (%2$d)"), curl_multi_strerror(errorCode), errorCode); return -1; } @@ -851,22 +851,22 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char = *url, if (STRNEQ(ctx->service->about->apiType, "HostAgent") && STRNEQ(ctx->service->about->apiType, "VirtualCenter")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VI API type 'HostAgent' or 'VirtualCen= ter' " - "but found '%s'"), ctx->service->about->apiType); + _("Expecting VI API type 'HostAgent' or 'VirtualCen= ter' but found '%1$s'"), + ctx->service->about->apiType); return -1; } =20 if (virStringParseVersion(&ctx->apiVersion, ctx->service->about->apiVersion, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse VI API version '%s'"), + _("Could not parse VI API version '%1$s'"), ctx->service->about->apiVersion); return -1; } =20 if (ctx->apiVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Minimum supported %s version is %s but found ver= sion '%s'"), + _("Minimum supported %1$s version is %2$s but found= version '%3$s'"), "VI API", "2.5", ctx->service->about->apiVersion); return -1; } @@ -874,7 +874,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *u= rl, if (virStringParseVersion(&ctx->productVersion, ctx->service->about->version, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse product version '%s'"), + _("Could not parse product version '%1$s'"), ctx->service->about->version); return -1; } @@ -882,7 +882,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *u= rl, if (STREQ(ctx->service->about->productLineId, "gsx")) { if (ctx->productVersion < 1000000 * 2 + 1000 * 0 /* 2.0 */) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Minimum supported %s version is %s but found= version '%s'"), + _("Minimum supported %1$s version is %2$s but f= ound version '%3$s'"), esxVI_ProductLineToDisplayName(esxVI_ProductLin= e_GSX), "2.0", ctx->service->about->version); return -1; @@ -893,7 +893,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *u= rl, STREQ(ctx->service->about->productLineId, "embeddedEsx")) { if (ctx->productVersion < 1000000 * 3 + 1000 * 5 /* 3.5 */) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Minimum supported %s version is %s but found= version '%s'"), + _("Minimum supported %1$s version is %2$s but f= ound version '%3$s'"), esxVI_ProductLineToDisplayName(esxVI_ProductLin= e_ESX), "3.5", ctx->service->about->version); return -1; @@ -903,7 +903,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *u= rl, } else if (STREQ(ctx->service->about->productLineId, "vpx")) { if (ctx->productVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Minimum supported %s version is %s but found= version '%s'"), + _("Minimum supported %1$s version is %2$s but f= ound version '%3$s'"), esxVI_ProductLineToDisplayName(esxVI_ProductLin= e_VPX), "2.5", ctx->service->about->version); return -1; @@ -912,8 +912,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *u= rl, ctx->productLine =3D esxVI_ProductLine_VPX; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting product 'gsx' or 'esx' or 'embeddedEsx= ' " - "or 'vpx' but found '%s'"), + _("Expecting product 'gsx' or 'esx' or 'embeddedEsx= ' or 'vpx' but found '%1$s'"), ctx->service->about->productLineId); return -1; } @@ -1000,7 +999,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context= *ctx, const char *path) =20 if (!item) { virReportError(VIR_ERR_INVALID_ARG, - _("Path '%s' does not specify a datacenter"), path); + _("Path '%1$s' does not specify a datacenter"), pat= h); goto cleanup; } =20 @@ -1041,7 +1040,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) =20 if (!ctx->datacenter) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find datacenter specified in '%s'"), p= ath); + _("Could not find datacenter specified in '%1$s'"),= path); goto cleanup; } =20 @@ -1050,7 +1049,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) /* Lookup (Cluster)ComputeResource */ if (!item) { virReportError(VIR_ERR_INVALID_ARG, - _("Path '%s' does not specify a compute resource"),= path); + _("Path '%1$s' does not specify a compute resource"= ), path); goto cleanup; } =20 @@ -1095,7 +1094,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) =20 if (!ctx->computeResource) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find compute resource specified in '%s= '"), + _("Could not find compute resource specified in '%1= $s'"), path); goto cleanup; } @@ -1113,7 +1112,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) "ClusterComputeResource")) { if (!item) { virReportError(VIR_ERR_INVALID_ARG, - _("Path '%s' does not specify a host system"), = path); + _("Path '%1$s' does not specify a host system")= , path); goto cleanup; } =20 @@ -1124,7 +1123,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) =20 if (item) { virReportError(VIR_ERR_INVALID_ARG, - _("Path '%s' ends with an excess item"), path); + _("Path '%1$s' ends with an excess item"), path); goto cleanup; } =20 @@ -1139,7 +1138,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Contex= t *ctx, const char *path) =20 if (!ctx->hostSystem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find host system specified in '%s'"), = path); + _("Could not find host system specified in '%1$s'")= , path); goto cleanup; } =20 @@ -1255,23 +1254,21 @@ esxVI_Context_Execute(esxVI_Context *ctx, const cha= r *methodName, =20 if (!(*response)->node) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HTTP response code %d for call to '%s'. " - "Fault is unknown, XPath evaluation faile= d"), + _("HTTP response code %1$d for call to '%2$= s'. Fault is unknown, XPath evaluation failed"), (*response)->responseCode, methodName); goto cleanup; } =20 if (esxVI_Fault_Deserialize((*response)->node, &fault) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HTTP response code %d for call to '%s'. " - "Fault is unknown, deserialization failed= "), + _("HTTP response code %1$d for call to '%2$= s'. Fault is unknown, deserialization failed"), (*response)->responseCode, methodName); goto cleanup; } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("HTTP response code %d for call to '%s'. " - "Fault: %s - %s"), (*response)->responseCode, + _("HTTP response code %1$d for call to '%2$s'. = Fault: %3$s - %4$s"), + (*response)->responseCode, methodName, fault->faultcode, fault->faultstrin= g); =20 /* FIXME: Dump raw response until detail part gets deserialize= d */ @@ -1288,8 +1285,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, =20 if (!responseNode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("XPath evaluation of response for call to= '%s' " - "failed"), methodName); + _("XPath evaluation of response for call to= '%1$s' failed"), + methodName); goto cleanup; } =20 @@ -1300,13 +1297,13 @@ esxVI_Context_Execute(esxVI_Context *ctx, const cha= r *methodName, case esxVI_Occurrence_RequiredItem: if (!(*response)->node) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Call to '%s' returned an empty resul= t, " - "expecting a non-empty result"), meth= odName); + _("Call to '%1$s' returned an empty res= ult, expecting a non-empty result"), + methodName); goto cleanup; } else if ((*response)->node->next) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Call to '%s' returned a list, expect= ing " - "exactly one item"), methodName); + _("Call to '%1$s' returned a list, expe= cting exactly one item"), + methodName); goto cleanup; } =20 @@ -1315,8 +1312,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, case esxVI_Occurrence_RequiredList: if (!(*response)->node) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Call to '%s' returned an empty resul= t, " - "expecting a non-empty result"), meth= odName); + _("Call to '%1$s' returned an empty res= ult, expecting a non-empty result"), + methodName); goto cleanup; } =20 @@ -1326,8 +1323,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, if ((*response)->node && (*response)->node->next) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Call to '%s' returned a list, expect= ing " - "exactly one item"), methodName); + _("Call to '%1$s' returned a list, expe= cting exactly one item"), + methodName); goto cleanup; } =20 @@ -1340,8 +1337,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, case esxVI_Occurrence_None: if ((*response)->node) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Call to '%s' returned something, exp= ecting " - "an empty result"), methodName); + _("Call to '%1$s' returned something, e= xpecting an empty result"), + methodName); goto cleanup; } =20 @@ -1355,7 +1352,7 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, } } else { virReportError(VIR_ERR_HTTP_ERROR, - _("HTTP response code %d for call to '%s'"), + _("HTTP response code %1$d for call to '%2$s'"), (*response)->responseCode, methodName); goto cleanup; } @@ -1409,7 +1406,7 @@ esxVI_Enumeration_CastFromAnyType(const esxVI_Enumera= tion *enumeration, =20 if (anyType->type !=3D enumeration->type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting type '%s' but found '%s'"), + _("Expecting type '%1$s' but found '%2$s'"), esxVI_Type_ToString(enumeration->type), esxVI_AnyType_TypeToString(anyType)); return -1; @@ -1423,7 +1420,7 @@ esxVI_Enumeration_CastFromAnyType(const esxVI_Enumera= tion *enumeration, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown value '%s' for %s"), anyType->value, + _("Unknown value '%1$s' for %2$s"), anyType->value, esxVI_Type_ToString(enumeration->type)); =20 return -1; @@ -1494,7 +1491,7 @@ esxVI_Enumeration_Deserialize(const esxVI_Enumeration= *enumeration, } =20 if (result < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown value '%s' for %= s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown value '%1$s' for= %2$s"), name, esxVI_Type_ToString(enumeration->type)); } =20 @@ -1580,7 +1577,7 @@ esxVI_List_CastFromAnyType(esxVI_AnyType *anyType, es= xVI_List **list, =20 if (! STRPREFIX(anyType->other, "ArrayOf")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting type to begin with 'ArrayOf' but found= '%s'"), + _("Expecting type to begin with 'ArrayOf' but found= '%1$s'"), anyType->other); return -1; } @@ -1589,7 +1586,7 @@ esxVI_List_CastFromAnyType(esxVI_AnyType *anyType, es= xVI_List **list, childNode =3D childNode->next) { if (childNode->type !=3D XML_ELEMENT_NODE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Wrong XML element type %d"), childNode->type= ); + _("Wrong XML element type %1$d"), childNode->ty= pe); goto cleanup; } =20 @@ -1658,7 +1655,7 @@ esxVI_List_Deserialize(xmlNodePtr node, esxVI_List **= list, for (; node; node =3D node->next) { if (node->type !=3D XML_ELEMENT_NODE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Wrong XML element type %d"), node->type); + _("Wrong XML element type %1$d"), node->type); goto failure; } =20 @@ -1960,7 +1957,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx, objectSpec->selectSet =3D ctx->selectSet_folderToChildEnti= ty; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid lookup of '%s' from '%s'"), + _("Invalid lookup of '%1$s' from '%2$s'"), type, root->type); goto cleanup; } @@ -1972,7 +1969,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx, objectSpec->selectSet =3D ctx->selectSet_computeResourceTo= ParentToParent; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid lookup of '%s' from '%s'"), + _("Invalid lookup of '%1$s' from '%2$s'"), type, root->type); goto cleanup; } @@ -1986,7 +1983,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx, objectSpec->selectSet =3D ctx->selectSet_hostSystemToDatas= tore; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid lookup of '%s' from '%s'"), + _("Invalid lookup of '%1$s' from '%2$s'"), type, root->type); goto cleanup; } @@ -1995,13 +1992,13 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx, objectSpec->selectSet =3D ctx->selectSet_datacenterToNetwo= rk; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid lookup of '%s' from '%s'"), + _("Invalid lookup of '%1$s' from '%2$s'"), type, root->type); goto cleanup; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid lookup from '%s'"), root->type); + _("Invalid lookup from '%1$s'"), root->type); goto cleanup; } } @@ -2041,13 +2038,13 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx, =20 case esxVI_Occurrence_RequiredItem: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup '%s' from '%s'"), + _("Could not lookup '%1$s' from '%2$s'"), type, root->type); break; =20 case esxVI_Occurrence_RequiredList: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup '%s' list from '%s'"), + _("Could not lookup '%1$s' list from '%2$s'"), type, root->type); break; =20 @@ -2106,8 +2103,8 @@ esxVI_GetManagedEntityStatus(esxVI_ObjectContent *obj= ectContent, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property while looking for " - "ManagedEntityStatus"), propertyName); + _("Missing '%1$s' property while looking for ManagedEnt= ityStatus"), + propertyName); =20 return -1; } @@ -2201,7 +2198,7 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, = const char *propertyName, if (*value =3D=3D esxVI_Boolean_Undefined && occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property"), propertyName); + _("Missing '%1$s' property"), propertyName); return -1; } =20 @@ -2230,7 +2227,7 @@ esxVI_GetInt(esxVI_ObjectContent *objectContent, cons= t char *propertyName, =20 if (!(*value) && occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property"), propertyName); + _("Missing '%1$s' property"), propertyName); return -1; } =20 @@ -2259,7 +2256,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, con= st char *propertyName, =20 if (!(*value) && occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property"), propertyName); + _("Missing '%1$s' property"), propertyName); return -1; } =20 @@ -2292,7 +2289,7 @@ esxVI_GetStringValue(esxVI_ObjectContent *objectConte= nt, =20 if (!(*value) && occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property"), propertyName); + _("Missing '%1$s' property"), propertyName); return -1; } =20 @@ -2325,7 +2322,7 @@ esxVI_GetManagedObjectReference(esxVI_ObjectContent *= objectContent, =20 if (!(*value) && occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '%s' property"), propertyName); + _("Missing '%1$s' property"), propertyName); return -1; } =20 @@ -2404,7 +2401,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *= virtualMachine, if (esxUtil_ParseVirtualMachineIDString (virtualMachine->obj->value, id) < 0 || *id <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse positive integer from '%s'"), + _("Could not parse positive integer from '%1$s'= "), virtualMachine->obj->value); goto failure; } @@ -2473,7 +2470,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *= virtualMachine, =20 if (virUUIDParse(uuid_string, uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"= ), uuid_string); goto failure; } @@ -2602,7 +2599,7 @@ esxVI_GetSnapshotTreeByName return 0; } else { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("Could not find snapshot with name '%s'"), name); + _("Could not find snapshot with name '%1$s'"), name= ); =20 return -1; } @@ -2634,7 +2631,7 @@ esxVI_GetSnapshotTreeBySnapshot } =20 virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("Could not find domain snapshot with internal name '%= s'"), + _("Could not find domain snapshot with internal name '%= 1$s'"), snapshot->value); =20 return -1; @@ -2697,7 +2694,7 @@ esxVI_LookupVirtualMachineByUuid(esxVI_Context *ctx, = const unsigned char *uuid, goto cleanup; } else { virReportError(VIR_ERR_NO_DOMAIN, - _("Could not find domain with UUID '%s'"), + _("Could not find domain with UUID '%1$s'"), uuid_string); goto cleanup; } @@ -2761,7 +2758,7 @@ esxVI_LookupVirtualMachineByName(esxVI_Context *ctx, = const char *name, =20 if (!(*virtualMachine) && occurrence !=3D esxVI_Occurrence_OptionalIte= m) { virReportError(VIR_ERR_NO_DOMAIN, - _("Could not find domain with name '%s'"), name); + _("Could not find domain with name '%1$s'"), name); goto cleanup; } =20 @@ -2888,7 +2885,7 @@ esxVI_LookupDatastoreByName(esxVI_Context *ctx, const= char *name, =20 if (!(*datastore) && occurrence !=3D esxVI_Occurrence_OptionalItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find datastore with name '%s'"), name); + _("Could not find datastore with name '%1$s'"), nam= e); goto cleanup; } =20 @@ -2970,7 +2967,7 @@ esxVI_LookupDatastoreByAbsolutePath(esxVI_Context *ct= x, =20 if (!(*datastore) && occurrence !=3D esxVI_Occurrence_OptionalItem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find datastore containing absolute pat= h '%s'"), + _("Could not find datastore containing absolute pat= h '%1$s'"), absolutePath); goto cleanup; } @@ -3379,7 +3376,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ct= x, if (directoryAndFileName[length] !=3D '/' || directoryAndFileName[length + 1] =3D=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Datastore path '%s' doesn't reference a file= "), + _("Datastore path '%1$s' doesn't reference a fi= le"), datastorePath); goto cleanup; } @@ -3466,7 +3463,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ct= x, =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not search in datastore '%s': %s"), + _("Could not search in datastore '%1$s': %2$s"), datastoreName, taskInfoErrorMessage); goto cleanup; } @@ -3485,7 +3482,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ct= x, goto cleanup; } else { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("No storage volume with key or path '%s'"), + _("No storage volume with key or path '%1$s'"), datastorePath); goto cleanup; } @@ -3604,7 +3601,7 @@ esxVI_LookupDatastoreContentByDatastoreName =20 if (taskInfoState !=3D esxVI_TaskInfoState_Success) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not search in datastore '%s': %s"), + _("Could not search in datastore '%1$s': %2$s"), datastoreName, taskInfoErrorMessage); goto cleanup; } @@ -3853,7 +3850,7 @@ esxVI_LookupPhysicalNicByName(esxVI_Context *ctx, con= st char *name, =20 if (!(*physicalNic) && occurrence !=3D esxVI_Occurrence_OptionalItem) { virReportError(VIR_ERR_NO_INTERFACE, - _("Could not find physical NIC with name '%s'"), na= me); + _("Could not find physical NIC with name '%1$s'"), = name); goto cleanup; } =20 @@ -3897,7 +3894,7 @@ esxVI_LookupPhysicalNicByMACAddress(esxVI_Context *ct= x, const char *mac, =20 if (!(*physicalNic) && occurrence !=3D esxVI_Occurrence_OptionalItem) { virReportError(VIR_ERR_NO_INTERFACE, - _("Could not find physical NIC with MAC address '%s= '"), mac); + _("Could not find physical NIC with MAC address '%1= $s'"), mac); goto cleanup; } =20 @@ -3985,7 +3982,7 @@ esxVI_LookupHostVirtualSwitchByName(esxVI_Context *ct= x, const char *name, if (!(*hostVirtualSwitch) && occurrence !=3D esxVI_Occurrence_OptionalItem) { virReportError(VIR_ERR_NO_NETWORK, - _("Could not find HostVirtualSwitch with name '%s'"= ), + _("Could not find HostVirtualSwitch with name '%1$s= '"), name); goto cleanup; } @@ -4098,17 +4095,15 @@ esxVI_HandleVirtualMachineQuestion if (autoAnswer) { if (!possibleAnswers) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Pending question blocks virtual machine exec= ution, " - "question is '%s', no possible answers"), + _("Pending question blocks virtual machine exec= ution, question is '%1$s', no possible answers"), questionInfo->text); =20 *blocked =3D true; return -1; } else if (!answerChoice) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Pending question blocks virtual machine exec= ution, " - "question is '%s', possible answers are %s, b= ut no " - "default answer is specified"), questionInfo-= >text, + _("Pending question blocks virtual machine exec= ution, question is '%1$s', possible answers are %2$s, but no default answer= is specified"), + questionInfo->text, possibleAnswers); =20 *blocked =3D true; @@ -4127,13 +4122,11 @@ esxVI_HandleVirtualMachineQuestion } else { if (possibleAnswers) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Pending question blocks virtual machine exec= ution, " - "question is '%s', possible answers are %s"), + _("Pending question blocks virtual machine exec= ution, question is '%1$s', possible answers are %2$s"), questionInfo->text, possibleAnswers); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Pending question blocks virtual machine exec= ution, " - "question is '%s', no possible answers"), + _("Pending question blocks virtual machine exec= ution, question is '%1$s', no possible answers"), questionInfo->text); } =20 @@ -4348,7 +4341,7 @@ esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *p= arsedHostCpuIdInfo, for (r =3D 0; r < 4; ++r) { if (strlen(input[r]) !=3D expectedLength) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HostCpuIdInfo register '%s' has an unexpecte= d length"), + _("HostCpuIdInfo register '%1$s' has an unexpec= ted length"), name[r]); return -1; } @@ -4362,7 +4355,7 @@ esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *p= arsedHostCpuIdInfo, =20 if (i + 4 < expectedLength && input[r][i + 4] !=3D ':') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("HostCpuIdInfo register '%s' has an unexp= ected format"), + _("HostCpuIdInfo register '%1$s' has an une= xpected format"), name[r]); return -1; } @@ -4499,7 +4492,7 @@ esxVI_LookupHostInternetScsiHbaStaticTargetByName if (!candidate) { if (occurrence =3D=3D esxVI_Occurrence_RequiredItem) { virReportError(VIR_ERR_NO_STORAGE_POOL, - _("Could not find storage pool with name: %s"),= name); + _("Could not find storage pool with name: %1$s"= ), name); } =20 goto cleanup; @@ -4939,7 +4932,7 @@ esxVI_LookupManagedObjectHelper(esxVI_Context *ctx, =20 if (!esxVI_String_ListContainsValue(propertyNameList, "name")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing 'name' property in %s lookup"), type); + _("Missing 'name' property in %1$s lookup"), type); goto cleanup; } =20 @@ -4978,10 +4971,10 @@ esxVI_LookupManagedObjectHelper(esxVI_Context *ctx, if (occurrence !=3D esxVI_Occurrence_OptionalItem) { if (name) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find %s with name '%s'"), type= , name); + _("Could not find %1$s with name '%2$s'"), = type, name); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find %s"), type); + _("Could not find %1$s"), type); } =20 goto cleanup; diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 15f8f957e2..96c131f618 100644 --- a/src/esx/esx_vi_types.c +++ b/src/esx/esx_vi_types.c @@ -80,7 +80,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); if (item->_type <=3D esxVI_Type_Undefined || \ item->_type >=3D esxVI_Type_Other) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("%s object has invalid dynamic type"), typeNa= me);\ + _("%1$s object has invalid dynamic type"), type= Name);\ return -1; \ } \ \ @@ -206,8 +206,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); { \ if (anyType->type !=3D esxVI_Type_##_type) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Call to %s for unexpected type '%s', " \ - "expected '%s'"), \ + _("Call to %1$s for unexpected type '%2$s', exp= ected '%3$s'"), \ __FUNCTION__, anyType->other, \ esxVI_Type_ToString(esxVI_Type_##_type)); \ return -1; \ @@ -221,8 +220,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); { \ if (anyType->type !=3D esxVI_Type_##_type) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Call to %s for unexpected type '%s', " \ - "expected '%s'"), \ + _("Call to %1$s for unexpected type '%2$s', exp= ected '%3$s'"), \ __FUNCTION__, anyType->other, \ esxVI_Type_ToString(esxVI_Type_##_type)); \ return -1; \ @@ -294,7 +292,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); childNode =3D childNode->next) { \ if (childNode->type !=3D XML_ELEMENT_NODE) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Wrong XML element type %d"), \ + _("Wrong XML element type %1$d"), \ childNode->type); \ goto failure; \ } \ @@ -346,21 +344,21 @@ VIR_LOG_INIT("esx.esx_vi_types"); \ if (!string) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("XML node doesn't contain text, expecting an = %s "\ - "value"), _xsdType); \ + _("XML node doesn't contain text, expecting an = %1$s value"), \ + _xsdType); \ goto cleanup; \ } \ \ if (virStrToLong_ll(string, NULL, 10, &value) < 0) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Unknown value '%s' for %s"), string, _xsdTyp= e); \ + _("Unknown value '%1$s' for %2$s"), string, _xs= dType); \ goto cleanup; \ } \ \ if (((_min) !=3D INT64_MIN && value < (_min)) \ || ((_max) !=3D INT64_MAX && value > (_max))) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Value '%s' is not representable as %s"), \ + _("Value '%1$s' is not representable as %2$s"),= \ string, _xsdType); \ goto cleanup; \ } \ @@ -483,7 +481,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); #define ESX_VI__TEMPLATE__PROPERTY__REQUIRE(_name) \ if (item->_name =3D=3D 0) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("%s object is missing the required '%s' property"= ), \ + _("%1$s object is missing the required '%2$s' prope= rty"), \ typeName, #_name); \ return -1; \ } @@ -540,7 +538,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); \ default: \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Call to %s for unexpected type '%s'"), \ + _("Call to %1$s for unexpected type '%2$s'"), \ __FUNCTION__, _actual_type_name); \ return _error_return; \ } @@ -686,7 +684,7 @@ VIR_LOG_INIT("esx.esx_vi_types"); \ default: \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Call to %s for unexpected type '%s'"), \ + _("Call to %1$s for unexpected type '%2$s'"), \ __FUNCTION__, esxVI_Type_ToString(type)); \ return -1; \ }, \ @@ -720,7 +718,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type b= aseType, =20 if (*actualType =3D=3D esxVI_Type_Undefined || *actualType =3D=3D esxV= I_Type_Other) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown value '%s' for %s 'type' property"), + _("Unknown value '%1$s' for %2$s 'type' property"), type, esxVI_Type_ToString(baseType)); return -1; } @@ -740,7 +738,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type b= aseType, if (item->_name =3D=3D 0 && \ esxVI_String_ListContainsValue(selectedPropertyNameList, #_name)) = { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("%s object is missing the required '%s' property"= ), \ + _("%1$s object is missing the required '%2$s' prope= rty"), \ typeName, #_name); \ return -1; \ } @@ -757,7 +755,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type b= aseType, if (item->_type <=3D esxVI_Type_Undefined || \ item->_type >=3D esxVI_Type_Other) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("%s object has invalid dynamic type"), typeNa= me);\ + _("%1$s object has invalid dynamic type"), type= Name);\ return -1; \ } \ \ @@ -910,7 +908,7 @@ esxVI_AnyType_ExpectType(esxVI_AnyType *anyType, esxVI_= Type type) { if (anyType->type !=3D type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting type '%s' but found '%s'"), + _("Expecting type '%1$s' but found '%2$s'"), esxVI_Type_ToString(type), esxVI_AnyType_TypeToString(anyType)); return -1; @@ -1014,7 +1012,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyT= ype **anyType) =20 if ((*anyType)->type =3D=3D esxVI_Type_Undefined) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown value '%s' for AnyType 'type' property"), + _("Unknown value '%1$s' for AnyType 'type' property= "), (*anyType)->other); goto failure; } @@ -1029,7 +1027,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyT= ype **anyType) do { \ if (virStrToLong_ll((*anyType)->value, NULL, 10, &number) < 0)= { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Unknown value '%s' for %s"), \ + _("Unknown value '%1$s' for %2$s"), \ (*anyType)->value, _xsdType); \ goto failure; \ } \ @@ -1037,7 +1035,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyT= ype **anyType) if (((_min) !=3D INT64_MIN && number < (_min)) \ || ((_max) !=3D INT64_MAX && number > (_max))) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Value '%s' is out of %s range"), \ + _("Value '%1$s' is out of %2$s range"), \ (*anyType)->value, _xsdType); \ goto failure; \ } \ @@ -1053,7 +1051,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyT= ype **anyType) (*anyType)->boolean =3D esxVI_Boolean_False; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown value '%s' for xsd:boolean"), + _("Unknown value '%1$s' for xsd:boolean"), (*anyType)->value); goto failure; } @@ -1499,7 +1497,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *= dateTime, /* second */ virStrToLong_i(tmp+1, &tmp, 10, &sec) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("xsd:dateTime value '%s' has unexpected format"), + _("xsd:dateTime value '%1$s' has unexpected format"= ), dateTime->value); return -1; } @@ -1509,7 +1507,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *= dateTime, if (*tmp =3D=3D '.' && virStrToLong_i(tmp + 1, &tmp, 10, &milliseconds) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("xsd:dateTime value '%s' has unexpected forma= t"), + _("xsd:dateTime value '%1$s' has unexpected for= mat"), dateTime->value); return -1; } @@ -1521,7 +1519,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *= dateTime, tz =3D g_time_zone_new_utc(); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("xsd:dateTime value '%s' has unexpected forma= t"), + _("xsd:dateTime value '%1$s' has unexpected for= mat"), dateTime->value); return -1; } @@ -1771,7 +1769,7 @@ ESX_VI__TEMPLATE__DESERIALIZE_EXTRA(Event, /* nothing= */, =20 if (!(*ptrptr)->_actualType) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s is missing 'type' property"), + _("%1$s is missing 'type' property"), esxVI_Type_ToString((*ptrptr)->_type)); goto failure; } --=20 2.39.2