From nobody Fri Dec 19 04:17:20 2025 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=1678464738; cv=none; d=zohomail.com; s=zohoarc; b=SlIiwIhoOV0LtA+7gqghvfIDZ4tzfgT0fFgSRpBO6sF/fRrgV+5y6ULLMXdjLmI5U56bUKkVbkhmdi1RDXlT0zWePB7KADoW7GkOBnuImC1lkkJdtoxS5dSLoYQOmWLDlxQdXJvQFkY4lypb+Vt6Myp6ycSMOxvBF7mUetuxHWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464738; 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=JoK15mXWHyMo8Htkmx1Fr6xwBU1CyCwVCtQuIbWlGFE=; b=e/ymVVcirEW2DEAec2cwYn9xbnDaeya9b5O9zsStor+xDnFVAau09XL6q6nKVhz2k1fRq8H2ttFft0aHvc86hYtSS1byFLBWWoXJJIO8r/nKxMqN9axqZf5znFaFAPej50utDavUrSByVOXDdu5Y0VCeHED9AC/1rtEnmJPvG4s= 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 1678464738302450.06048122681295; Fri, 10 Mar 2023 08:12:18 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-BvQy1SenM76A5zL_1aVXOQ-1; Fri, 10 Mar 2023 11:11:42 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 253883C58C6C; Fri, 10 Mar 2023 16:11:18 +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 0CFA01121333; Fri, 10 Mar 2023 16:11:18 +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 E54F61946A5E; Fri, 10 Mar 2023 16:11:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C174E1946587 for ; Fri, 10 Mar 2023 16:11:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B134DC15BAD; Fri, 10 Mar 2023 16:11:13 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B57CC15BA0 for ; Fri, 10 Mar 2023 16:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464737; 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=JoK15mXWHyMo8Htkmx1Fr6xwBU1CyCwVCtQuIbWlGFE=; b=aI73t0GQ5GWNZThZBorfHC87RP2CwLix9vKH4wolgrfnpt4gQIHt2cSXL1UMDfcbRDvbZG NSOPaBDx8gL7fbNZe2dv42e7ZhsK3VZ81jW/104G/BB5aSDThPq25Ta5e6BZI8x+iHykYF ySmkF5d5EEPR3zVxGAEfTJAdQGUsKkA= X-MC-Unique: BvQy1SenM76A5zL_1aVXOQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 47/51] src: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:10:03 +0100 Message-Id: <07f795ce7767cfedc7fa08507a31fc73ce493046.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.3 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: 1678464739315100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/driver.c | 6 ++---- src/internal.h | 20 +++++++++---------- src/libvirt-domain.c | 44 +++++++++++++++++++++--------------------- src/libvirt-host.c | 6 ++---- src/libvirt-lxc.c | 11 +++++------ src/libvirt-network.c | 8 ++++---- src/libvirt-nodedev.c | 4 ++-- src/libvirt-nwfilter.c | 2 +- src/libvirt-qemu.c | 4 ++-- src/libvirt-secret.c | 6 +++--- src/libvirt-storage.c | 13 ++++++------- src/libvirt.c | 24 +++++++++++------------ 12 files changed, 70 insertions(+), 78 deletions(-) diff --git a/src/driver.c b/src/driver.c index 04cbbcd3ef..c7a9c2659f 100644 --- a/src/driver.c +++ b/src/driver.c @@ -297,16 +297,14 @@ virConnectValidateURIPath(const char *uriPath, =20 if (STRNEQ(uriPath, "/system") && !compatSessionRoot) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected %s URI path '%s', try " - "%s:///system"), + _("unexpected %1$s URI path '%2$s', try %3$s://= /system"), entityName, uriPath, entityName); return false; } } else { if (STRNEQ(uriPath, "/session")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected %s URI path '%s', try " - "%s:///session"), + _("unexpected %1$s URI path '%2$s', try %3$s://= /session"), entityName, uriPath, entityName); return false; } diff --git a/src/internal.h b/src/internal.h index 9dc34a0bf5..5a9e1c7cd0 100644 --- a/src/internal.h +++ b/src/internal.h @@ -273,13 +273,13 @@ unsigned int __unsuppflags =3D flags & ~(supported); \ if (__uiflags !=3D flags) { \ virReportInvalidArg(flags, \ - _("unsupported use of long flags in functi= on %s"), \ + _("unsupported use of long flags in functi= on %1$s"), \ __FUNCTION__); \ return retval; \ } \ if (__unsuppflags) { \ virReportInvalidArg(flags, \ - _("unsupported flags (0x%x) in function %s= "), \ + _("unsupported flags (0x%1$x) in function = %2$s"), \ __unsuppflags, __FUNCTION__); \ return retval; \ } \ @@ -302,13 +302,13 @@ unsigned int __unsuppflags =3D flags & ~(supported); \ if (__uiflags !=3D flags) { \ virReportInvalidArg(flags, \ - _("unsupported use of long flags in functi= on %s"), \ + _("unsupported use of long flags in functi= on %1$s"), \ __FUNCTION__); \ goto label; \ } \ if (__unsuppflags) { \ virReportInvalidArg(flags, \ - _("unsupported flags (0x%x) in function %s= "), \ + _("unsupported flags (0x%1$x) in function = %2$s"), \ __unsuppflags, __FUNCTION__); \ goto label; \ } \ @@ -333,8 +333,7 @@ do { \ if ((flags & FLAG1) && (flags & FLAG2)) { \ virReportInvalidArg(ctl, \ - _("Flags '%s' and '%s' are mutually " \ - "exclusive"), \ + _("Flags '%1$s' and '%2$s' are mutually ex= clusive"), \ #FLAG1, #FLAG2); \ return RET; \ } \ @@ -357,8 +356,7 @@ do { \ if ((flags & FLAG1) && (flags & FLAG2)) { \ virReportInvalidArg(ctl, \ - _("Flags '%s' and '%s' are mutually " \ - "exclusive"), \ + _("Flags '%1$s' and '%2$s' are mutually ex= clusive"), \ #FLAG1, #FLAG2); \ goto LABEL; \ } \ @@ -383,7 +381,7 @@ do { \ if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \ virReportInvalidArg(ctl, \ - _("Flag '%s' is required by flag '%s'"), \ + _("Flag '%1$s' is required by flag '%2$s'"= ), \ #FLAG2, #FLAG1); \ return RET; \ } \ @@ -405,7 +403,7 @@ do { \ if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \ virReportInvalidArg(ctl, \ - _("Flag '%s' is required by flag '%s'"), \ + _("Flag '%1$s' is required by flag '%2$s'"= ), \ #FLAG2, #FLAG1); \ goto LABEL; \ } \ @@ -481,7 +479,7 @@ #define virCheckReadOnlyGoto(flags, label) \ do { \ if ((flags) & VIR_CONNECT_RO) { \ - virReportRestrictedError(_("read only access prevents %s"), \ + virReportRestrictedError(_("read only access prevents %1$s"), \ __FUNCTION__); \ goto label; \ } \ diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 379057d9a7..9fd13250b1 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -1490,7 +1490,7 @@ virDomainCoreDumpWithFormat(virDomainPtr domain, cons= t char *to, virCheckNonNullArgGoto(to, error); =20 if (dumpformat >=3D VIR_DOMAIN_CORE_DUMP_FORMAT_LAST) { - virReportInvalidArg(flags, _("dumpformat '%d' is not supported"), + virReportInvalidArg(flags, _("dumpformat '%1$d' is not supported"), dumpformat); goto error; } @@ -1569,7 +1569,7 @@ virDomainScreenshot(virDomainPtr domain, =20 if (domain->conn !=3D stream->conn) { virReportInvalidArg(stream, - _("stream must match connection of domain '%s'= "), + _("stream must match connection of domain '%1$= s'"), domain->name); goto error; } @@ -1991,7 +1991,7 @@ virDomainGetMaxMemory(virDomainPtr domain) if (ret =3D=3D 0) goto error; if ((unsigned long) ret !=3D ret) { - virReportError(VIR_ERR_OVERFLOW, _("result too large: %llu"), + virReportError(VIR_ERR_OVERFLOW, _("result too large: %1$llu"), ret); goto error; } @@ -2040,7 +2040,7 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned l= ong memory) virCheckNonZeroArgGoto(memory, error); =20 if (virMemoryMaxValue(true) / 1024 <=3D memory) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"), memory); goto error; } @@ -2095,7 +2095,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long= memory) virCheckNonZeroArgGoto(memory, error); =20 if (virMemoryMaxValue(true) / 1024 <=3D memory) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"), memory); goto error; } @@ -2160,7 +2160,7 @@ virDomainSetMemoryFlags(virDomainPtr domain, unsigned= long memory, virCheckNonZeroArgGoto(memory, error); =20 if (virMemoryMaxValue(true) / 1024 <=3D memory) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"), memory); goto error; } @@ -5835,7 +5835,7 @@ virDomainBlockStats(virDomainPtr dom, const char *dis= k, virCheckNonNullArgGoto(stats, error); if (size > sizeof(stats2)) { virReportInvalidArg(size, - _("size must not exceed %zu"), + _("size must not exceed %1$zu"), sizeof(stats2)); goto error; } @@ -5990,7 +5990,7 @@ virDomainInterfaceStats(virDomainPtr dom, const char = *device, virCheckNonNullArgGoto(stats, error); if (size > sizeof(stats2)) { virReportInvalidArg(size, - _("size must not exceed %zu"), + _("size must not exceed %1$zu"), sizeof(stats2)); goto error; } @@ -7358,14 +7358,14 @@ virDomainSendKey(virDomainPtr domain, =20 if (codeset >=3D VIR_KEYCODE_SET_LAST) { virReportInvalidArg(codeset, - _("Unsupported codeset '%d'"), + _("Unsupported codeset '%1$d'"), codeset); goto error; } =20 if (nkeycodes > VIR_DOMAIN_SEND_KEY_MAX_KEYS) { virReportInvalidArg(nkeycodes, - _("nkeycodes must be <=3D %d"), + _("nkeycodes must be <=3D %1$d"), VIR_DOMAIN_SEND_KEY_MAX_KEYS); goto error; } @@ -7830,7 +7830,7 @@ virDomainGetVcpuPinInfo(virDomainPtr domain, int ncpu= maps, virCheckPositiveArgGoto(maplen, error); =20 if (VIR_INT_MULTIPLY_OVERFLOW(ncpumaps, maplen)) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %d * %d"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$d * %2$d"), ncpumaps, maplen); goto error; } @@ -8036,7 +8036,7 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr= info, int maxinfo, virCheckZeroArgGoto(maplen, error); =20 if (cpumaps && VIR_INT_MULTIPLY_OVERFLOW(maxinfo, maplen)) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %d * %d"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$d * %2$d"), maxinfo, maplen); goto error; } @@ -9943,7 +9943,7 @@ virConnectDomainEventRegisterAny(virConnectPtr conn, virCheckDomainGoto(dom, error); if (dom->conn !=3D conn) { virReportInvalidArg(dom, - _("domain '%s' must match connection"), + _("domain '%1$s' must match connection"), dom->name); goto error; } @@ -9952,7 +9952,7 @@ virConnectDomainEventRegisterAny(virConnectPtr conn, virCheckNonNegativeArgGoto(eventID, error); if (eventID >=3D VIR_DOMAIN_EVENT_ID_LAST) { virReportInvalidArg(eventID, - _("eventID must be less than %d"), + _("eventID must be less than %1$d"), VIR_DOMAIN_EVENT_ID_LAST); goto error; } @@ -10328,7 +10328,7 @@ virDomainOpenConsole(virDomainPtr dom, =20 if (conn !=3D st->conn) { virReportInvalidArg(st, - _("stream must match connection of domain '%s'= "), + _("stream must match connection of domain '%1$= s'"), dom->name); goto error; } @@ -10394,7 +10394,7 @@ virDomainOpenChannel(virDomainPtr dom, =20 if (conn !=3D st->conn) { virReportInvalidArg(st, - _("stream must match connection of domain '%s'= "), + _("stream must match connection of domain '%1$= s'"), dom->name); goto error; } @@ -11295,14 +11295,14 @@ virDomainOpenGraphics(virDomainPtr dom, =20 if (fstat(fd, &sb) < 0) { virReportSystemError(errno, - _("Unable to access file descriptor %d"), fd); + _("Unable to access file descriptor %1$d"), f= d); goto error; } =20 #ifndef WIN32 if (!S_ISSOCK(sb.st_mode)) { virReportInvalidArg(fd, - _("fd %d must be a socket"), + _("fd %1$d must be a socket"), fd); goto error; } @@ -11672,7 +11672,7 @@ virDomainGetCPUStats(virDomainPtr domain, virCheckNullArgGoto(params, error); =20 if (nparams && ncpus > UINT_MAX / nparams) { - virReportError(VIR_ERR_OVERFLOW, _("input too large: %u * %u"), + virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$u * %2$u"), nparams, ncpus); goto error; } @@ -12673,7 +12673,7 @@ virDomainListGetStats(virDomainPtr *doms, =20 if (!*doms) { virReportError(VIR_ERR_INVALID_ARG, - _("doms array in %s must contain at least one domai= n"), + _("doms array in %1$s must contain at least one dom= ain"), __FUNCTION__); goto cleanup; } @@ -13381,13 +13381,13 @@ int virDomainSetLifecycleAction(virDomainPtr doma= in, =20 if (type >=3D VIR_DOMAIN_LIFECYCLE_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid lifecycle type '%u'"), type); + _("invalid lifecycle type '%1$u'"), type); goto error; } =20 if (action >=3D VIR_DOMAIN_LIFECYCLE_ACTION_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid lifecycle action '%u'"), action); + _("invalid lifecycle action '%1$u'"), action); goto error; } =20 diff --git a/src/libvirt-host.c b/src/libvirt-host.c index a2ba347d54..e67b36812e 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c @@ -565,8 +565,7 @@ virNodeGetCPUStats(virConnectPtr conn, virCheckNonNegativeArgGoto(*nparams, error); if (cpuNum < 0 && cpuNum !=3D VIR_NODE_CPU_STATS_ALL_CPUS) { virReportInvalidArg(cpuNum, - _("cpuNum in %s only accepts %d as a negative " - "value"), + _("cpuNum in %1$s only accepts %2$d as a negat= ive value"), __FUNCTION__, VIR_NODE_CPU_STATS_ALL_CPUS); goto error; } @@ -654,8 +653,7 @@ virNodeGetMemoryStats(virConnectPtr conn, virCheckNonNegativeArgGoto(*nparams, error); if (cellNum < 0 && cellNum !=3D VIR_NODE_MEMORY_STATS_ALL_CELLS) { virReportInvalidArg(cpuNum, - _("cellNum in %s only accepts %d as a negative= " - "value"), + _("cellNum in %1$s only accepts %2$d as a nega= tive value"), __FUNCTION__, VIR_NODE_MEMORY_STATS_ALL_CELLS); goto error; } diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c index ab7e88c1c5..ecc1207ca9 100644 --- a/src/libvirt-lxc.c +++ b/src/libvirt-lxc.c @@ -215,15 +215,14 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr mo= del, =20 if (getcon(&ctx) < 0) { virReportSystemError(errno, - _("unable to get PID %d security cont= ext"), + _("unable to get PID %1$d security co= ntext"), getpid()); goto error; } =20 if (virStrcpy(oldlabel->label, ctx, VIR_SECURITY_LABEL_BUFLEN)= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label exceeds " - "maximum length: %d"), + _("security label exceeds maximum length: %= 1$d"), VIR_SECURITY_LABEL_BUFLEN - 1); freecon(ctx); goto error; @@ -239,7 +238,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr mode= l, =20 if (setexeccon(label->label) < 0) { virReportSystemError(errno, - _("Cannot set context %s"), + _("Cannot set context %1$s"), label->label); goto error; } @@ -251,7 +250,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr mode= l, } else if (STREQ(model->model, "apparmor")) { #ifdef WITH_APPARMOR if (aa_change_profile(label->label) < 0) { - virReportSystemError(errno, _("error changing profile to %s"), + virReportSystemError(errno, _("error changing profile to %1$s"= ), label->label); goto error; } @@ -264,7 +263,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr mode= l, /* nothing todo */ } else { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Security model %s cannot be entered"), + _("Security model %1$s cannot be entered"), model->model); goto error; } diff --git a/src/libvirt-network.c b/src/libvirt-network.c index 50c4108641..236dfe2f5d 100644 --- a/src/libvirt-network.c +++ b/src/libvirt-network.c @@ -392,7 +392,7 @@ virNetworkLookupByUUIDString(virConnectPtr conn, const = char *uuidstr) =20 if (virUUIDParse(uuidstr, uuid) < 0) { virReportInvalidArg(uuidstr, - _("uuidstr in %s must be a valid UUID"), + _("uuidstr in %1$s must be a valid UUID"), __FUNCTION__); goto error; } @@ -1211,7 +1211,7 @@ virConnectNetworkEventRegisterAny(virConnectPtr conn, virCheckNetworkGoto(net, error); if (net->conn !=3D conn) { virReportInvalidArg(net, - _("network '%s' in %s must match connectio= n"), + _("network '%1$s' in %2$s must match conne= ction"), net->name, __FUNCTION__); goto error; } @@ -1221,7 +1221,7 @@ virConnectNetworkEventRegisterAny(virConnectPtr conn, =20 if (eventID >=3D VIR_NETWORK_EVENT_ID_LAST) { virReportInvalidArg(eventID, - _("eventID in %s must be less than %d"), + _("eventID in %1$s must be less than %2$d"), __FUNCTION__, VIR_NETWORK_EVENT_ID_LAST); goto error; } @@ -1485,7 +1485,7 @@ virNetworkPortLookupByUUIDString(virNetworkPtr net, =20 if (virUUIDParse(uuidstr, uuid) < 0) { virReportInvalidArg(uuidstr, - _("uuidstr in %s must be a valid UUID"), + _("uuidstr in %1$s must be a valid UUID"), __FUNCTION__); goto error; } diff --git a/src/libvirt-nodedev.c b/src/libvirt-nodedev.c index 366d2cfdbe..f0f99bc020 100644 --- a/src/libvirt-nodedev.c +++ b/src/libvirt-nodedev.c @@ -952,7 +952,7 @@ virConnectNodeDeviceEventRegisterAny(virConnectPtr conn, virCheckNodeDeviceGoto(dev, error); if (dev->conn !=3D conn) { virReportInvalidArg(dev, - _("node device '%s' in %s must match conne= ction"), + _("node device '%1$s' in %2$s must match c= onnection"), dev->name, __FUNCTION__); goto error; } @@ -962,7 +962,7 @@ virConnectNodeDeviceEventRegisterAny(virConnectPtr conn, =20 if (eventID >=3D VIR_NODE_DEVICE_EVENT_ID_LAST) { virReportInvalidArg(eventID, - _("eventID in %s must be less than %d"), + _("eventID in %1$s must be less than %2$d"), __FUNCTION__, VIR_NODE_DEVICE_EVENT_ID_LAST); goto error; } diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c index b0b53cb132..ff82cc3b7f 100644 --- a/src/libvirt-nwfilter.c +++ b/src/libvirt-nwfilter.c @@ -265,7 +265,7 @@ virNWFilterLookupByUUIDString(virConnectPtr conn, const= char *uuidstr) =20 if (virUUIDParse(uuidstr, uuid) < 0) { virReportInvalidArg(uuidstr, - _("uuidstr in %s must be a valid UUID"), + _("uuidstr in %1$s must be a valid UUID"), __FUNCTION__); goto error; } diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c index ace91e8ada..2898b71983 100644 --- a/src/libvirt-qemu.c +++ b/src/libvirt-qemu.c @@ -236,7 +236,7 @@ virDomainQemuAttach(virConnectPtr conn, virCheckNonZeroArgGoto(pid_value, error); if (pid !=3D pid_value) { virReportInvalidArg(pid_value, - _("pid_value in %s is too large"), + _("pid_value in %1$s is too large"), __FUNCTION__); goto error; } @@ -380,7 +380,7 @@ virConnectDomainQemuMonitorEventRegister(virConnectPtr = conn, virCheckDomainGoto(dom, error); if (dom->conn !=3D conn) { virReportInvalidArg(dom, - _("domain '%s' in %s must match connection= "), + _("domain '%1$s' in %2$s must match connec= tion"), dom->name, __FUNCTION__); goto error; } diff --git a/src/libvirt-secret.c b/src/libvirt-secret.c index fa00570043..4d0c88745d 100644 --- a/src/libvirt-secret.c +++ b/src/libvirt-secret.c @@ -269,7 +269,7 @@ virSecretLookupByUUIDString(virConnectPtr conn, const c= har *uuidstr) =20 if (virUUIDParse(uuidstr, uuid) < 0) { virReportInvalidArg(uuidstr, - _("uuidstr in %s must be a valid UUID"), + _("uuidstr in %1$s must be a valid UUID"), __FUNCTION__); goto error; } @@ -787,7 +787,7 @@ virConnectSecretEventRegisterAny(virConnectPtr conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(secret->uuid, uuidstr); virReportInvalidArg(secret, - _("secret '%s' in %s must match connection= "), + _("secret '%1$s' in %2$s must match connec= tion"), uuidstr, __FUNCTION__); goto error; } @@ -797,7 +797,7 @@ virConnectSecretEventRegisterAny(virConnectPtr conn, =20 if (eventID >=3D VIR_SECRET_EVENT_ID_LAST) { virReportInvalidArg(eventID, - _("eventID in %s must be less than %d"), + _("eventID in %1$s must be less than %2$d"), __FUNCTION__, VIR_SECRET_EVENT_ID_LAST); goto error; } diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c index 84900340a7..db7660aac4 100644 --- a/src/libvirt-storage.c +++ b/src/libvirt-storage.c @@ -474,7 +474,7 @@ virStoragePoolLookupByUUIDString(virConnectPtr conn, =20 if (virUUIDParse(uuidstr, uuid) < 0) { virReportInvalidArg(uuidstr, - _("uuidstr in %s must be a valid UUID"), + _("uuidstr in %1$s must be a valid UUID"), __FUNCTION__); goto error; } @@ -1713,7 +1713,7 @@ virStorageVolDownload(virStorageVolPtr vol, =20 if (vol->conn !=3D stream->conn) { virReportInvalidArg(stream, - _("stream in %s must match connection of volum= e '%s'"), + _("stream in %1$s must match connection of vol= ume '%2$s'"), __FUNCTION__, vol->name); goto error; } @@ -1798,7 +1798,7 @@ virStorageVolUpload(virStorageVolPtr vol, =20 if (vol->conn !=3D stream->conn) { virReportInvalidArg(stream, - _("stream in %s must match connection of volum= e '%s'"), + _("stream in %1$s must match connection of vol= ume '%2$s'"), __FUNCTION__, vol->name); goto error; } @@ -2258,8 +2258,7 @@ virStorageVolResize(virStorageVolPtr vol, if (capacity =3D=3D 0 && !((flags & VIR_STORAGE_VOL_RESIZE_DELTA) || (flags & VIR_STORAGE_VOL_RESIZE_SHRINK))) { virReportInvalidArg(capacity, - _("capacity in %s cannot be zero without 'delt= a' " - "or 'shrink' flags set"), + _("capacity in %1$s cannot be zero without 'de= lta' or 'shrink' flags set"), __FUNCTION__); goto error; } @@ -2403,7 +2402,7 @@ virConnectStoragePoolEventRegisterAny(virConnectPtr c= onn, virCheckStoragePoolGoto(pool, error); if (pool->conn !=3D conn) { virReportInvalidArg(pool, - _("storage pool '%s' in %s must match conn= ection"), + _("storage pool '%1$s' in %2$s must match = connection"), pool->name, __FUNCTION__); goto error; } @@ -2413,7 +2412,7 @@ virConnectStoragePoolEventRegisterAny(virConnectPtr c= onn, =20 if (eventID >=3D VIR_STORAGE_POOL_EVENT_ID_LAST) { virReportInvalidArg(eventID, - _("eventID in %s must be less than %d"), + _("eventID in %1$s must be less than %2$d"), __FUNCTION__, VIR_STORAGE_POOL_EVENT_ID_LAST); goto error; } diff --git a/src/libvirt.c b/src/libvirt.c index 748f2d8ba0..03e878300f 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -519,7 +519,7 @@ virRegisterConnectDriver(virConnectDriver *driver, virCheckNonNullArgReturn(driver, -1); if (virConnectDriverTabCount >=3D MAX_DRIVERS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many drivers, cannot register %s"), + _("Too many drivers, cannot register %1$s"), driver->hypervisorDriver->name); return -1; } @@ -589,7 +589,7 @@ virRegisterStateDriver(virStateDriver *driver) =20 if (virStateDriverTabCount >=3D MAX_DRIVERS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many drivers, cannot register %s"), + _("Too many drivers, cannot register %1$s"), driver->name); return -1; } @@ -657,13 +657,13 @@ virStateInitialize(bool privileged, opaque); VIR_DEBUG("State init result %d (mandatory=3D%d)", ret, mandat= ory); if (ret =3D=3D VIR_DRV_STATE_INIT_ERROR) { - VIR_ERROR(_("Initialization of %s state driver failed: %s"= ), + VIR_ERROR(_("Initialization of %1$s state driver failed: %= 2$s"), virStateDriverTab[i]->name, virGetLastErrorMessage()); return -1; } if (ret =3D=3D VIR_DRV_STATE_INIT_SKIPPED && mandatory) { - VIR_ERROR(_("Initialization of mandatory %s state driver s= kipped"), + VIR_ERROR(_("Initialization of mandatory %1$s state driver= skipped"), virStateDriverTab[i]->name); return -1; } @@ -869,7 +869,7 @@ virConnectCheckURIMissingSlash(const char *uristr, virU= RI *uri) if (STREQ(uri->server, "session") || STREQ(uri->server, "system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid URI %s (maybe you want %s:///%s)"), + _("invalid URI %1$s (maybe you want %2$s:///%3$s)"), uristr, uri->scheme, uri->server); return -1; } @@ -968,7 +968,7 @@ virConnectOpenInternal(const char *name, =20 if (ret->uri->scheme =3D=3D NULL) { virReportError(VIR_ERR_NO_CONNECT, - _("URI '%s' does not include a driver name"), + _("URI '%1$s' does not include a driver name"), name); return NULL; } @@ -986,7 +986,7 @@ virConnectOpenInternal(const char *name, if (strspn(ret->uri->scheme, "abcdefghijklmnopqrstuvwxyz") != =3D strlen(ret->uri->scheme)) { virReportError(VIR_ERR_NO_CONNECT, - _("URI scheme '%s' for embedded driver is n= ot valid"), + _("URI scheme '%1$s' for embedded driver is= not valid"), ret->uri->scheme); return NULL; } @@ -1056,7 +1056,7 @@ virConnectOpenInternal(const char *name, false)) { virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_CONFIG_UNSUPPORTED, __FILE__, __FUNCTION__, __LINE__, - _("libvirt was built without the '%s' dri= ver"), + _("libvirt was built without the '%1$s' d= river"), ret->uri->scheme); return NULL; } @@ -1106,7 +1106,7 @@ virConnectOpenInternal(const char *name, =20 if (embed && !virConnectDriverTab[i]->embeddable) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Driver %s cannot be used in embedded mode"), + _("Driver %1$s cannot be used in embedded mode"= ), virConnectDriverTab[i]->hypervisorDriver->name); return NULL; } @@ -1341,7 +1341,7 @@ virTypedParameterValidateSet(virConnectPtr conn, if (strnlen(params[i].field, VIR_TYPED_PARAM_FIELD_LENGTH) =3D=3D VIR_TYPED_PARAM_FIELD_LENGTH) { virReportInvalidArg(params, - _("string parameter name '%.*s' too long"), + _("string parameter name '%2$.*1$s' too lo= ng"), VIR_TYPED_PARAM_FIELD_LENGTH, params[i].field); return -1; @@ -1350,13 +1350,13 @@ virTypedParameterValidateSet(virConnectPtr conn, if (string_okay) { if (!params[i].value.s) { virReportInvalidArg(params, - _("NULL string parameter '%s'"), + _("NULL string parameter '%1$s'"), params[i].field); return -1; } } else { virReportInvalidArg(params, - _("string parameter '%s' unsupported"), + _("string parameter '%1$s' unsupported= "), params[i].field); return -1; } --=20 2.39.2