From nobody Fri Dec 19 15:51:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1678464671; cv=none; d=zohomail.com; s=zohoarc; b=X7yZLPLkF6Sl68ZRQ/yaQ6ISNBA5byo4mdckPrYRd4cUuwPlDhrTRlhujQpq4XwN3SLcVYVkAwQHDFHFNUysvMwVLoqFyRYz2g9eat5ihJx9LuBwe8KFwSNARXNibPJDO9Qz5EELK+Vmqkw65SwtENYNkf6IdAaaH/Gwg3ZNuwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464671; 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=MFzs2q0Pyo2Vv1wLZ1kFWd3fCSewsNqESlW6LkcKEhA=; b=ddzN6gvvuiyAq9kW7Rmwku4+Ym/7N0Nq6GBkLUMMj3rLwN4MWeF7bnfZZJk+17Kb9/hsNney9fRAtvAmNQZlrUOS1EkLgOcnIjsSX7mqIGTRbnNk3KF79N0v3Aa9z6MzhJQqtYlBENJ4YaWuYP+tn2bXR6sFcWgPDREwYRfOs2c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1678464671734796.9820777972834; Fri, 10 Mar 2023 08:11:11 -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-184-y7Fcgn99NsqiaQd8UW_MNA-1; Fri, 10 Mar 2023 11:11:01 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E24742806063; Fri, 10 Mar 2023 16:10:37 +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 CA7A1492B00; Fri, 10 Mar 2023 16:10:37 +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 A8EA61946A72; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4BA1F1946A73 for ; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3E5B440C83B6; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCB9A40CE2A7 for ; Fri, 10 Mar 2023 16:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464670; 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=MFzs2q0Pyo2Vv1wLZ1kFWd3fCSewsNqESlW6LkcKEhA=; b=M1S69i76PfinzQ0fKk+teMSjuCrOrH//1ugJRI8zBQLyrA4enWGlKSUvAt6OB2x1TIY2Pp tNuJOKsxJjyTAr7NSODg7kJNPGXllA4l0uFjtZ7yTQHkfF0ixy0v3rk7WkWihPY6whQZ0d D8Kyz6VpNlzIJCOKsawlWG5PbncL2UE= X-MC-Unique: y7Fcgn99NsqiaQd8UW_MNA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 15/51] interface: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:31 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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.10 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: 1678464672995100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/interface/interface_backend_netcf.c | 50 ++++++------ src/interface/interface_backend_udev.c | 100 ++++++++++++------------ 2 files changed, 76 insertions(+), 74 deletions(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interf= ace_backend_netcf.c index 7bd3e7e1e2..d4a11157cc 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -117,7 +117,7 @@ netcfStateInitialize(bool privileged, } =20 if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create state directory '%s'"= ), + virReportSystemError(errno, _("cannot create state directory '%1$s= '"), driver->stateDir); goto error; } @@ -299,12 +299,12 @@ static struct netcf_if *interfaceDriverGetNetcfIF(str= uct netcf *ncf, virInterfac int errcode =3D ncf_error(ncf, &errmsg, &details); if (errcode !=3D NETCF_NOERROR) { virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface named '%s': %s%s%s"), + _("couldn't find interface named '%1$s': %2$s%3= $s%4$s"), ifinfo->name, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); } else { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface named '%s'"), + _("couldn't find interface named '%1$s'"), ifinfo->name); } } @@ -323,7 +323,7 @@ netcfInterfaceObjIsActive(struct netcf_if *iface, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to get status of interface %s: %s%s%s"), + _("failed to get status of interface %1$s: %2$s%3$s= %4$s"), ncf_if_name(iface), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -355,7 +355,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPt= r conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to get number of host interfaces: %s%s%s"= ), + _("failed to get number of host interfaces: %1$s%2$= s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -372,7 +372,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPt= r conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to list host interfaces: %s%s%s"), + _("failed to list host interfaces: %1$s%2$s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -388,7 +388,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPt= r conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); if (errcode !=3D NETCF_NOERROR) { virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface named '%s': %s%s= %s"), + _("couldn't find interface named '%1$s': %2= $s%3$s%4$s"), names[i], errmsg, details ? " - " : "", NULLSTR_EMPTY(details= )); goto cleanup; @@ -441,7 +441,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr= conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to get number of host interfaces: %s%s%s"= ), + _("failed to get number of host interfaces: %1$s%2$= s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -458,7 +458,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr= conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to list host interfaces: %s%s%s"), + _("failed to list host interfaces: %1$s%2$s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -479,7 +479,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr= conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); if (errcode !=3D NETCF_NOERROR) { virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface named '%s': %s%s= %s"), + _("couldn't find interface named '%1$s': %2= $s%3$s%4$s"), allnames[i], errmsg, details ? " - " : "", NULLSTR_EMPTY(details= )); goto cleanup; @@ -624,7 +624,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); =20 virReportError(netcf_to_vir_err(errcode), - _("failed to get number of host interfaces: %s%s%s"= ), + _("failed to get number of host interfaces: %1$s%2$= s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -643,7 +643,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); =20 virReportError(netcf_to_vir_err(errcode), - _("failed to list host interfaces: %s%s%s"), + _("failed to list host interfaces: %1$s%2$s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -661,7 +661,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); if (errcode !=3D NETCF_NOERROR) { virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface named '%s': %s%s= %s"), + _("couldn't find interface named '%1$s': %2= $s%3$s%4$s"), names[i], errmsg, details ? " - " : "", NULLSTR_EMPTY(details= )); goto cleanup; @@ -735,12 +735,12 @@ static virInterfacePtr netcfInterfaceLookupByName(vir= ConnectPtr conn, int errcode =3D ncf_error(driver->netcf, &errmsg, &details); if (errcode !=3D NETCF_NOERROR) { virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface named '%s': %s%s%s"), + _("couldn't find interface named '%1$s': %2$s%3= $s%4$s"), name, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); } else { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface named '%s'"), name); + _("couldn't find interface named '%1$s'"), name= ); } goto cleanup; } @@ -773,14 +773,14 @@ static virInterfacePtr netcfInterfaceLookupByMACStrin= g(virConnectPtr conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("couldn't find interface with MAC address '%s': %= s%s%s"), + _("couldn't find interface with MAC address '%1$s':= %2$s%3$s%4$s"), macstr, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; } if (niface =3D=3D 0) { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface with MAC address '%s'"), + _("couldn't find interface with MAC address '%1$s'"= ), macstr); goto cleanup; } @@ -834,7 +834,7 @@ static char *netcfInterfaceGetXMLDesc(virInterfacePtr i= finfo, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("could not get interface XML description: %s%s%s"= ), + _("could not get interface XML description: %1$s%2$= s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -893,7 +893,7 @@ static virInterfacePtr netcfInterfaceDefineXML(virConne= ctPtr conn, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("could not get interface XML description: %s%s%s"= ), + _("could not get interface XML description: %1$s%2$= s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -932,7 +932,7 @@ static int netcfInterfaceUndefine(virInterfacePtr ifinf= o) const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to undefine interface %s: %s%s%s"), + _("failed to undefine interface %1$s: %2$s%3$s%4$s"= ), ifinfo->name, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -981,7 +981,7 @@ static int netcfInterfaceCreate(virInterfacePtr ifinfo, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to create (start) interface %s: %s%s%s"), + _("failed to create (start) interface %1$s: %2$s%3$= s%4$s"), ifinfo->name, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -1030,7 +1030,7 @@ static int netcfInterfaceDestroy(virInterfacePtr ifin= fo, const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to destroy (stop) interface %s: %s%s%s"), + _("failed to destroy (stop) interface %1$s: %2$s%3$= s%4$s"), ifinfo->name, errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); goto cleanup; @@ -1086,7 +1086,7 @@ static int netcfInterfaceChangeBegin(virConnectPtr co= nn, unsigned int flags) const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to begin transaction: %s%s%s"), + _("failed to begin transaction: %1$s%2$s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); } @@ -1110,7 +1110,7 @@ static int netcfInterfaceChangeCommit(virConnectPtr c= onn, unsigned int flags) const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to commit transaction: %s%s%s"), + _("failed to commit transaction: %1$s%2$s%3$s"), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); } @@ -1134,7 +1134,7 @@ static int netcfInterfaceChangeRollback(virConnectPtr= conn, unsigned int flags) const char *errmsg, *details; int errcode =3D ncf_error(driver->netcf, &errmsg, &details); virReportError(netcf_to_vir_err(errcode), - _("failed to rollback transaction: %s%s%s"), + _("failed to rollback transaction: %1$s%2$s%3$s= "), errmsg, details ? " - " : "", NULLSTR_EMPTY(details)); } diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index cba14f91f8..a0485ddd21 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -148,7 +148,7 @@ udevNumOfInterfacesByStatus(virConnectPtr conn, virUdev= Status status, =20 if (!enumerate) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get number of %s interfaces on host"), + _("failed to get number of %1$s interfaces on host"= ), virUdevStatusString(status)); count =3D -1; goto cleanup; @@ -200,7 +200,7 @@ udevListInterfacesByStatus(virConnectPtr conn, =20 if (!enumerate) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get list of %s interfaces on host"), + _("failed to get list of %1$s interfaces on host"), virUdevStatusString(status)); udev_unref(udev); return -1; @@ -314,7 +314,7 @@ udevConnectListAllInterfaces(virConnectPtr conn, =20 if (!enumerate) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get list of %s interfaces on host"), + _("failed to get list of %1$s interfaces on host"), virUdevStatusString(status)); goto cleanup; } @@ -414,7 +414,7 @@ udevInterfaceLookupByName(virConnectPtr conn, const cha= r *name) dev =3D udev_device_new_from_subsystem_sysname(udev, "net", name); if (!dev) { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface named '%s'"), + _("couldn't find interface named '%1$s'"), name); goto cleanup; } @@ -448,7 +448,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, cons= t char *macstr) =20 if (!enumerate) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to lookup interface with MAC address '%s'= "), + _("failed to lookup interface with MAC address '%1$= s'"), macstr); goto cleanup; } @@ -465,7 +465,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, cons= t char *macstr) /* Check that we got something back */ if (!dev_entry) { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface with MAC address '%s'"), + _("couldn't find interface with MAC address '%1$s'"= ), macstr); goto cleanup; } @@ -473,7 +473,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, cons= t char *macstr) /* Check that we didn't get multiple items back */ if (udev_list_entry_get_next(dev_entry)) { virReportError(VIR_ERR_MULTIPLE_INTERFACES, - _("the MAC address '%s' matches multiple interfaces= "), + _("the MAC address '%1$s' matches multiple interfac= es"), macstr); goto cleanup; } @@ -568,12 +568,12 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/downdelay"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/downdelay' for '%s'"), name= ); + _("Could not retrieve 'bonding/downdelay' for '%1$s'"), na= me); goto error; } if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/downdelay' '%s' for '%s'"), + _("Could not parse 'bonding/downdelay' '%1$s' for '%2$s'"), tmp_str, name); goto error; } @@ -582,12 +582,12 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/updelay"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/updelay' for '%s'"), name); + _("Could not retrieve 'bonding/updelay' for '%1$s'"), name= ); goto error; } if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/updelay' '%s' for '%s'"), + _("Could not parse 'bonding/updelay' '%1$s' for '%2$s'"), tmp_str, name); goto error; } @@ -596,12 +596,12 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/miimon"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/miimon' for '%s'"), name); + _("Could not retrieve 'bonding/miimon' for '%1$s'"), name); goto error; } if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/miimon' '%s' for '%s'"), + _("Could not parse 'bonding/miimon' '%1$s' for '%2$s'"), tmp_str, name); goto error; } @@ -610,12 +610,12 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/arp_interval"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/arp_interval' for '%s'"), n= ame); + _("Could not retrieve 'bonding/arp_interval' for '%1$s'"),= name); goto error; } if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/arp_interval' '%s' for '%s'"), + _("Could not parse 'bonding/arp_interval' '%1$s' for '%2$s= '"), tmp_str, name); goto error; } @@ -629,24 +629,24 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/mode"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/mode' for '%s'"), name); + _("Could not retrieve 'bonding/mode' for '%1$s'"), name); goto error; } tmp_str =3D strchr(tmp_str, ' '); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid format for 'bonding/mode' for '%s'"), name); + _("Invalid format for 'bonding/mode' for '%1$s'"), name); goto error; } if (strlen(tmp_str) < 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find correct value in 'bonding/mode' for '%s'= "), + _("Unable to find correct value in 'bonding/mode' for '%1$= s'"), name); goto error; } if (virStrToLong_i(tmp_str + 1, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/mode' '%s' for '%s'"), + _("Could not parse 'bonding/mode' '%1$s' for '%2$s'"), tmp_str, name); goto error; } @@ -659,24 +659,24 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/arp_validate"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/arp_validate' for '%s'"), n= ame); + _("Could not retrieve 'bonding/arp_validate' for '%1$s'"),= name); goto error; } tmp_str =3D strchr(tmp_str, ' '); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid format for 'bonding/arp_validate' for '%s'"), n= ame); + _("Invalid format for 'bonding/arp_validate' for '%1$s'"),= name); goto error; } if (strlen(tmp_str) < 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find correct value in 'bonding/arp_validate' " - "for '%s'"), name); + _("Unable to find correct value in 'bonding/arp_validate' = for '%1$s'"), + name); goto error; } if (virStrToLong_i(tmp_str + 1, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/arp_validate' '%s' for '%s'"), + _("Could not parse 'bonding/arp_validate' '%1$s' for '%2$s= '"), tmp_str, name); goto error; } @@ -686,12 +686,12 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/use_carrier"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/use_carrier' for '%s'"), na= me); + _("Could not retrieve 'bonding/use_carrier' for '%1$s'"), = name); goto error; } if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bonding/use_carrier' '%s' for '%s'"), + _("Could not parse 'bonding/use_carrier' '%1$s' for '%2$s'= "), tmp_str, name); goto error; } @@ -711,7 +711,7 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bonding/arp_ip_target"= ); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bonding/arp_ip_target' for '%s'"), = name); + _("Could not retrieve 'bonding/arp_ip_target' for '%1$s'")= , name); goto error; } ifacedef->data.bond.target =3D g_strdup(tmp_str); @@ -723,7 +723,7 @@ udevGetIfaceDefBond(struct udev *udev, =20 if (slave_count < 0) { virReportSystemError(errno, - _("Could not get slaves of bond '%s'"), name); + _("Could not get slaves of bond '%1$s'"), nam= e); goto error; } =20 @@ -739,8 +739,8 @@ udevGetIfaceDefBond(struct udev *udev, tmp_str =3D strchr(slave_list[i]->d_name, '_'); if (!tmp_str || strlen(tmp_str) < 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid enslaved interface name '%s' seen fo= r " - "bond '%s'"), slave_list[i]->d_name, name); + _("Invalid enslaved interface name '%1$s' seen = for bond '%2$s'"), + slave_list[i]->d_name, name); goto error; } /* go past the _ */ @@ -750,8 +750,8 @@ udevGetIfaceDefBond(struct udev *udev, udevGetIfaceDef(udev, tmp_str); if (!ifacedef->data.bond.itf[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get interface information for '%s', which is " - "a enslaved in bond '%s'"), slave_list[i]->d_name, name); + _("Could not get interface information for '%1$= s', which is a enslaved in bond '%2$s'"), + slave_list[i]->d_name, name); goto error; } VIR_FREE(slave_list[i]); @@ -791,7 +791,8 @@ udevGetIfaceDefBridge(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bridge/forward_delay"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bridge/forward_delay' for '%s'"), n= ame); + _("Could not retrieve 'bridge/forward_delay' for '%= 1$s'"), + name); goto error; } =20 @@ -801,14 +802,15 @@ udevGetIfaceDefBridge(struct udev *udev, tmp_str =3D udev_device_get_sysattr_value(dev, "bridge/stp_state"); if (!tmp_str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not retrieve 'bridge/stp_state' for '%s'"), name); + _("Could not retrieve 'bridge/stp_state' for '%1$s'= "), + name); goto error; } =20 if (virStrToLong_i(tmp_str, NULL, 10, &stp) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse 'bridge/stp_state' '%s' for '%s'"), - tmp_str, name); + _("Could not parse 'bridge/stp_state' '%1$s' for '%= 2$s'"), + tmp_str, name); goto error; } =20 @@ -820,8 +822,8 @@ udevGetIfaceDefBridge(struct udev *udev, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid STP state value %d received for '%s'. Must be " - "-1, 0, or 1."), stp, name); + _("Invalid STP state value %1$d received for '%2$s'= . Must be -1, 0, or 1."), + stp, name); goto error; } =20 @@ -837,7 +839,7 @@ udevGetIfaceDefBridge(struct udev *udev, =20 if (member_count < 0) { virReportSystemError(errno, - _("Could not get members of bridge '%s'"), + _("Could not get members of bridge '%1$s'"), name); goto error; } @@ -852,8 +854,8 @@ udevGetIfaceDefBridge(struct udev *udev, udevGetIfaceDef(udev, member_list[i]->d_name); if (!ifacedef->data.bridge.itf[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get interface information for '%s', which is " - "a member of bridge '%s'"), member_list[i]->d_name, name= ); + _("Could not get interface information for '%1$s', which i= s a member of bridge '%2$s'"), + member_list[i]->d_name, name); goto error; } VIR_FREE(member_list[i]); @@ -893,7 +895,7 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED, =20 if ((vid_pos =3D strstr(buf, vid_prefix)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find the VID for the VLAN device '%s'"= ), + _("failed to find the VID for the VLAN device '%1$s= '"), name); return -1; } @@ -902,14 +904,14 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED, if ((vid_len =3D strspn(vid_pos, "0123456789")) =3D=3D 0 || !g_ascii_isspace(vid_pos[vid_len])) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find the VID for the VLAN device '%s'"= ), + _("failed to find the VID for the VLAN device '%1$s= '"), name); return -1; } =20 if ((dev_pos =3D strstr(vid_pos + vid_len, dev_prefix)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find the real device for the VLAN devi= ce '%s'"), + _("failed to find the real device for the VLAN devi= ce '%1$s'"), name); return -1; } @@ -917,7 +919,7 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED, =20 if ((dev_len =3D strcspn(dev_pos, "\n")) =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find the real device for the VLAN devi= ce '%s'"), + _("failed to find the real device for the VLAN devi= ce '%1$s'"), name); return -1; } @@ -949,7 +951,7 @@ udevGetIfaceDef(struct udev *udev, const char *name) dev =3D udev_device_new_from_subsystem_sysname(udev, "net", name); if (!dev) { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface named '%s'"), name); + _("couldn't find interface named '%1$s'"), name); goto error; } =20 @@ -964,7 +966,7 @@ udevGetIfaceDef(struct udev *udev, const char *name) mtu_str =3D udev_device_get_sysattr_value(dev, "mtu"); if (virStrToLong_ui(mtu_str, NULL, 10, &mtu) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse MTU value '%s'"), mtu_str); + _("Could not parse MTU value '%1$s'"), mtu_str); goto error; } ifacedef->mtu =3D mtu; @@ -1075,7 +1077,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo) ifinfo->name); if (!dev) { virReportError(VIR_ERR_NO_INTERFACE, - _("couldn't find interface named '%s'"), + _("couldn't find interface named '%1$s'"), ifinfo->name); goto cleanup; } @@ -1130,7 +1132,7 @@ udevStateInitialize(bool privileged, } =20 if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create state directory '%s'"= ), + virReportSystemError(errno, _("cannot create state directory '%1$s= '"), driver->stateDir); goto cleanup; } --=20 2.39.2