From nobody Fri Apr 19 05:30:58 2024 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=1678464631; cv=none; d=zohomail.com; s=zohoarc; b=O7IjKbzvgQhzFNtA935435dkVpcJWJaF11+EaRmOn7sVoE3tjIP8kHTZABlYnht/3jEblsQ2DzRZ83wTLH+CVgN9woYHIST7PA592HzBZYi6QOZOfqH4cPEjGZxm9fN6Y3NIyQ2WbQifQ1uemUy3aomDAx0qWRVh3Nm7qvFlOGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464631; 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=+5X2mBfJvw59vsc+mpDttFu796vt28YaqC1tN7KvryU=; b=VIW/uwbsINkLommR1IKPj0+GiTC2OrXcDtH/belW0qgBO4lM9yuJ5bygTxX/6z1OXCRN5E34Na7HOzcj0covfmxJZVExFD+y7DY+5PboGGbObxlVXeWtTdBSRukCIo9c8qZ7UK8qMLBidlbF8NMO/apmF+cV0cmy0WjRg9o37A0= 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 1678464631139972.2049232643142; Fri, 10 Mar 2023 08:10:31 -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-539-rbkgUOweOz6Iz4iweTq1LA-1; Fri, 10 Mar 2023 11:10:25 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2EB287A9E6; Fri, 10 Mar 2023 16:10:19 +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 9774B2166B26; Fri, 10 Mar 2023 16:10: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 DABD41946A6F; Fri, 10 Mar 2023 16:10:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2B60E1946587 for ; Fri, 10 Mar 2023 16:10:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1C0B02166B2A; Fri, 10 Mar 2023 16:10:17 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id D25272166B26 for ; Fri, 10 Mar 2023 16:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464630; 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=+5X2mBfJvw59vsc+mpDttFu796vt28YaqC1tN7KvryU=; b=Dh4NKcbR4Z3mgUZS57/SkkEhgXdWzWdB3wqv15yjXvXMnCuI20kQazu0PeI3szL0xId9ZP k46OG0VNS/vSEpORDCUIPO6JXDmM47FowSpFh+Fme4/CDYYXCfZLph2COIdypQOtyl5cPM UlLNiuq3UNBcduZTKiqYwzLsuXbuHUo= X-MC-Unique: rbkgUOweOz6Iz4iweTq1LA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 01/51] docs: Document requirements on format strings in translated messages Date: Fri, 10 Mar 2023 17:09:17 +0100 Message-Id: <6701b4b04a46fa4129a5ed09c4e3883ff54cd61e.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.6 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: 1678464632713100005 Content-Type: text/plain; charset="utf-8" Preserving the order of format strings (%s, ...) when translating messages may be very hard or even impossible depending on the target language. On the other hand, reordering them requires understanding the C-format strings which is not something we should expect from translators. And even if someone reorders format strings in the right way (by addressing arguments directly using N$), someone else may use a translation tool that requires format strings in msgid and msgstr to match exactly and forces these correct formats to be reverted. As a result of this, we had several reported crashes in some locales because integers were formatted as strings. So to make such crashes less likely to happen and to make translating our messages easier, we now require all messages that are marked for translation to use format strings that always refer to the same argument no matter where they appear in a message (e.g., %1$s, %5$llu). Signed-off-by: Jiri Denemark --- docs/coding-style.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index 02d99330bf..92f6099d82 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -918,24 +918,28 @@ Error messages visible to the user should be short and descriptive. All error messages are translated using gettext and thus must be wrapped in ``_()`` macro. To simplify the translation work, the error message must not be concatenated from various -parts. To simplify searching for the error message in the code the -strings should not be broken even if they result into a line -longer than 80 columns and any formatting modifier should be -enclosed by quotes or other obvious separator. If a string used -with ``%s`` can be NULL the NULLSTR macro must be used. +parts and all format strings must be permutable by directly +addressing each argument using ``%N$...`` syntax. For example, +``%1$s``, ``%2$llu`` or ``%4$s`` to format the first argument as +string, the second argument as unsigned long long, and the fourth +argument as string, respectively. To simplify searching for the error +message in the code the strings should not be broken even if they +result into a line longer than 80 columns and any formatting modifier +should be enclosed by quotes or other obvious separator. If a string +used with ``%N$s`` can be NULL the NULLSTR macro must be used. =20 :: =20 GOOD: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to connect to remote host '%s'"), hostnam= e) + _("Failed to connect to remote host '%1$s'"), hostn= ame) =20 BAD: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to %s to remote host '%s'"), + _("Failed to %1$s to remote host '%2$s'"), "connect", hostname); =20 BAD: virReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to connect " - "to remote host '%s'), + "to remote host '%1$s'), hostname); =20 Use of goto --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464628; cv=none; d=zohomail.com; s=zohoarc; b=W/IXaIhFjwtoXnoguPSUYB5dKjC+DfPVWibeEGghzilXfkUByBlYSx/uJ6MdgReNfRfIylpnbg1jh0Uf5b9MvF8zctC4HF2lGCLWraz93QY9x3B5JlQqDMcIicwE0mWiJ4jc8nAu7djuy2Gdf/VIafSkFPlV52Jbke3OiaSieUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464628; 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=qKPR9jToCE18C2IFaLL4X8ZjZRuzwe7V0UikZ91KIXk=; b=kkBMrA+arvgoAHw/APdGZas/T1NBqAKeW65GQvox+CrELK6J5WXHr/+lwbzy4E48MU7Cl63n3GnllrRbrKpUNnmkMFNfBxmmTvoDBGoSLdbVRuODAvT/wni7EDr1eqGWN/N17oAtMBHCS+6QvkuQjhPlXmPVd4rK1ZRXKUYNsko= 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 1678464628977884.3860016413053; Fri, 10 Mar 2023 08:10:28 -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-85-VtmuNr44PUCI4vd6ODpUhg-1; Fri, 10 Mar 2023 11:10:24 -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 C739D3802BBE; Fri, 10 Mar 2023 16:10:19 +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 AE349440E0; Fri, 10 Mar 2023 16:10:19 +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 237A01946A54; Fri, 10 Mar 2023 16:10:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1A92B19472C2 for ; Fri, 10 Mar 2023 16:10:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0DEC92166B2A; Fri, 10 Mar 2023 16:10:18 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id C41722166B26 for ; Fri, 10 Mar 2023 16:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464628; 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=qKPR9jToCE18C2IFaLL4X8ZjZRuzwe7V0UikZ91KIXk=; b=dp4AauZzvwfB31GYDiEVD4prNC1vaHP4Pmtti9ZU5RcOAWqtLGaZDCKxjpL8Hwtst/D6PC ehl2xC8XKyKCxCXvqz+QFb1S9I3hbpHfx0wG10i4CqjBWy6I4d1jKm0PUCiCez8eadOank GgITEyFfeQxYCFwTBayyZkDdAaME0kc= X-MC-Unique: VtmuNr44PUCI4vd6ODpUhg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 02/51] access: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:18 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678464630650100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/access/viraccessdriverpolkit.c | 2 +- src/access/viraccessmanager.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdrive= rpolkit.c index 2473bd6258..c7ff81ee86 100644 --- a/src/access/viraccessdriverpolkit.c +++ b/src/access/viraccessdriverpolkit.c @@ -75,7 +75,7 @@ virAccessDriverPolkitGetCaller(const char *actionid, =20 if (!identity) { virAccessError(VIR_ERR_ACCESS_DENIED, - _("Policy kit denied action %s from "), + _("Policy kit denied action %1$s from "), actionid); return -1; } diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c index 6ce8a31f2f..481528c3b9 100644 --- a/src/access/viraccessmanager.c +++ b/src/access/viraccessmanager.c @@ -141,7 +141,7 @@ virAccessManager *virAccessManagerNew(const char *name) =20 if (!(drv =3D virAccessManagerFindDriver(name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find security driver '%s'"), + _("Cannot find security driver '%1$s'"), name); return NULL; } @@ -207,7 +207,7 @@ virAccessManagerSanitizeError(int ret, if (ret < 0) { virResetLastError(); virAccessError(VIR_ERR_ACCESS_DENIED, - _("'%s' denied access"), driverName); + _("'%1$s' denied access"), driverName); } =20 return ret; --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464672; cv=none; d=zohomail.com; s=zohoarc; b=i8w6WTIAoEC8fu9RaDU9H3yCGRqF9ZUQwiH6cs3U3UZR/WThnLOnOIOMcXPcAcvk8t8+v/rg/h0fkkx97VdKp+I1zb0ikPpmgzu2eib4p05apcj+ioU13wbMo7QVgXCOpdcw/6cCl1YvifN6D18mJNrCtdL+afRMNgfIZ3rDlVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464672; 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=FVvWt2jaHdntKCbJMZSL/efRcaQ28AYgjx6SHcBO+Zo=; b=PJ2bW6dNMtRQq7EJoiAnCXSs6aGmV1tB2COM6HYKGeDWllPFndL34kxCz7/rvmFKtCqsaPnj1xdgyVh7R2csPejdDtWbOfdsuRI7fkS88vqde/Ytpnlg+znyiUUjACkkHpAHN1Qmg0yakZHWo5mFhgVo5PhTCuU0wVTrCSFsJXE= 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 1678464672042582.4935854108813; Fri, 10 Mar 2023 08:11:12 -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-643-6vvo7Tj5Ozi8JfEYHtmhMQ-1; Fri, 10 Mar 2023 11:10:25 -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 54577811E6E; Fri, 10 Mar 2023 16:10:21 +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 3E93D492B00; Fri, 10 Mar 2023 16:10:21 +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 139861946A4A; Fri, 10 Mar 2023 16:10:21 +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 565681946A74 for ; Fri, 10 Mar 2023 16:10:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2ADAE4024CA1; Fri, 10 Mar 2023 16:10:19 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0E6F40C83B6 for ; Fri, 10 Mar 2023 16:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464671; 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=FVvWt2jaHdntKCbJMZSL/efRcaQ28AYgjx6SHcBO+Zo=; b=DcDdC5CX4zz9oAJcb3wXZbPwuF4s6hDGseNzCbbIK6ZWteMNu5OLOj0nEQ19/9cYHIi2+c nYxNGk3KwnGLApJ+74grrty9IvUPl2Fybjd6B2/rMdbIuXufVkbNBAGwKZUL2x2luOXzvZ ZXnLyUs6v55+kotbMTfU7aF5PGV2K7E= X-MC-Unique: 6vvo7Tj5Ozi8JfEYHtmhMQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 03/51] admin: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:19 +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: 1678464673007100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/admin/admin_server_dispatch.c | 10 +++++----- src/admin/libvirt-admin.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dis= patch.c index b3e7be8965..ae8a8d4fa6 100644 --- a/src/admin/admin_server_dispatch.c +++ b/src/admin/admin_server_dispatch.c @@ -78,7 +78,7 @@ remoteAdmClientNew(virNetServerClient *client G_GNUC_UNUS= ED, (long long)clientuid); =20 if (geteuid() !=3D clientuid) { - virReportRestrictedError(_("Disallowing client %lld with uid %lld"= ), + virReportRestrictedError(_("Disallowing client %1$lld with uid %2$= lld"), (long long)clientpid, (long long)clientuid); return NULL; @@ -258,7 +258,7 @@ adminDispatchServerSetThreadpoolParameters(virNetServer= *server G_GNUC_UNUSED, =20 if (!(srv =3D virNetDaemonGetServer(priv->dmn, args->srv.name))) { virReportError(VIR_ERR_NO_SERVER, - _("no server with matching name '%s' found"), + _("no server with matching name '%1$s' found"), args->srv.name); goto cleanup; } @@ -303,14 +303,14 @@ adminDispatchClientGetInfo(virNetServer *server G_GNU= C_UNUSED, =20 if (!(srv =3D virNetDaemonGetServer(priv->dmn, args->clnt.srv.name))) { virReportError(VIR_ERR_NO_SERVER, - _("no server with matching name '%s' found"), + _("no server with matching name '%1$s' found"), args->clnt.srv.name); goto cleanup; } =20 if (!(clnt =3D virNetServerGetClient(srv, args->clnt.id))) { virReportError(VIR_ERR_NO_CLIENT, - _("no client with matching id '%llu' found"), + _("no client with matching id '%1$llu' found"), (unsigned long long) args->clnt.id); goto cleanup; } @@ -390,7 +390,7 @@ adminDispatchServerSetClientLimits(virNetServer *server= G_GNUC_UNUSED, =20 if (!(srv =3D virNetDaemonGetServer(priv->dmn, args->srv.name))) { virReportError(VIR_ERR_NO_SERVER, - _("no server with matching name '%s' found"), + _("no server with matching name '%1$s' found"), args->srv.name); goto cleanup; } diff --git a/src/admin/libvirt-admin.c b/src/admin/libvirt-admin.c index 1786a283e5..3c756eb376 100644 --- a/src/admin/libvirt-admin.c +++ b/src/admin/libvirt-admin.c @@ -116,7 +116,7 @@ getSocketPath(virURI *uri) sock_path =3D g_strdup(param->value); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown URI parameter '%s'"), param->name); + _("Unknown URI parameter '%1$s'"), param->name); return NULL; } } @@ -134,7 +134,7 @@ getSocketPath(virURI *uri) legacy =3D true; } else if (!STRPREFIX(uri->scheme, "virt")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported URI scheme '%s'"), + _("Unsupported URI scheme '%1$s'"), uri->scheme); return NULL; } @@ -151,7 +151,7 @@ getSocketPath(virURI *uri) sock_path =3D g_strdup_printf("%s/%s", rundir, sockbase); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid URI path '%s', try '/system'"), + _("Invalid URI path '%1$s', try '/system'"), NULLSTR_EMPTY(uri->path)); return NULL; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464635; cv=none; d=zohomail.com; s=zohoarc; b=RRiJnlXF7nlwzuZ/9ibGVg6OHaRKnhp5/2CIT30bBOQROx8yAS4GvRYPPDbB+/5FoStuMkWOtDRHlw/DgO8BtG0amldo7+oUQxmiUnGEYnBn6QotlIYyvSivw10ykSl3wWqfQp4+xdlHy5RI2Zmd0kQl84OOVEu+qdAzK0ygbzo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464635; 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=O1VA+xUESLq8pa4Wpwxyrcx0DW5PEeWBdMDnvjUm2RM=; b=VTC2tlrqAu1T3T6iIXk+a+XKAgdmuN37vooUB10TmcPttvnrE4IWd+QHsMPElhnwGhV4pObdQ10sLFvNpnuA64WXS9cvgHLW1aDoKA9wVCWxdNLFHjIoPnX5LzM1H6v2ZaBWXaX2c99BiDZNYaC0CYZUmgE1Qpbx/Rq9sBuDi3w= 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 1678464635308226.7696318567264; Fri, 10 Mar 2023 08:10:35 -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-84-HLXJ4nFiOiOWJEe2VpMS2g-1; Fri, 10 Mar 2023 11:10:32 -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 129FD2A5954E; Fri, 10 Mar 2023 16:10:26 +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 EFC1B1121315; Fri, 10 Mar 2023 16:10:25 +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 E4F4E1946A4A; Fri, 10 Mar 2023 16:10:25 +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 52C781946587 for ; Fri, 10 Mar 2023 16:10:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4869E492C3E; Fri, 10 Mar 2023 16:10:20 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id E280F492B02 for ; Fri, 10 Mar 2023 16:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464634; 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=O1VA+xUESLq8pa4Wpwxyrcx0DW5PEeWBdMDnvjUm2RM=; b=fOgYhPLkXwVpgSGZJVCPXLffUl5Kp5QW79ZvTx4Yrct6e6MVWFqcBirM48bsskBWTT9Sbn PKF3v1M43PyOpsKlo9gCz4Jmuco7U1LcqSIG9TGXrkVzBedyVMEx6r1wBfnlLES+2DgKW5 8r8vjX+6Hlq1wnf6Jvf8SQRZRlytAIw= X-MC-Unique: HLXJ4nFiOiOWJEe2VpMS2g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 04/51] bhyve: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:20 +0100 Message-Id: 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.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: 1678464636739100010 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/bhyve/bhyve_command.c | 18 ++++++++-------- src/bhyve/bhyve_domain.c | 2 +- src/bhyve/bhyve_driver.c | 38 ++++++++++++++++----------------- src/bhyve/bhyve_firmware.c | 4 ++-- src/bhyve/bhyve_monitor.c | 6 +++--- src/bhyve/bhyve_parse_command.c | 17 +++++++-------- src/bhyve/bhyve_process.c | 20 ++++++++--------- 7 files changed, 52 insertions(+), 53 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 1c0f2e2bfb..563651336e 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -74,7 +74,7 @@ bhyveBuildNetArgStr(const virDomainDef *def, brname =3D g_strdup(virDomainNetGetActualBridgeName(net)); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Network type %d is not supported"), + _("Network type %1$d is not supported"), virDomainNetGetActualType(net)); goto cleanup; } @@ -553,7 +553,7 @@ bhyveBuildSoundArgStr(const virDomainDef *def G_GNUC_UN= USED, case VIR_DOMAIN_AUDIO_TYPE_FILE: case VIR_DOMAIN_AUDIO_TYPE_DBUS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported audio backend '%s'"), + _("unsupported audio backend '%1$s'"), virDomainAudioTypeTypeToString(audio->type)); return -1; case VIR_DOMAIN_AUDIO_TYPE_LAST: @@ -589,7 +589,7 @@ bhyveBuildFSArgStr(const virDomainDef *def G_GNUC_UNUSE= D, case VIR_DOMAIN_FS_TYPE_VOLUME: case VIR_DOMAIN_FS_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported filesystem type '%s'"), + _("unsupported filesystem type '%1$s'"), virDomainFSTypeToString(fs->type)); return -1; } @@ -606,7 +606,7 @@ bhyveBuildFSArgStr(const virDomainDef *def G_GNUC_UNUSE= D, case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP: case VIR_DOMAIN_FS_DRIVER_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported filesystem driver '%s'"), + _("unsupported filesystem driver '%1$s'"), virDomainFSDriverTypeToString(fs->fsdriver)); return -1; } @@ -620,7 +620,7 @@ bhyveBuildFSArgStr(const virDomainDef *def G_GNUC_UNUSE= D, case VIR_DOMAIN_FS_ACCESSMODE_DEFAULT: case VIR_DOMAIN_FS_ACCESSMODE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported filesystem accessmode '%s'"), + _("unsupported filesystem accessmode '%1$s'"), virDomainFSAccessModeTypeToString(fs->accessmode)); return -1; } @@ -723,7 +723,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver,= virDomainDef *def, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset '%s'"), + _("unsupported clock offset '%1$s'"), virDomainClockOffsetTypeToString(def->clock.offset= )); return NULL; } @@ -874,7 +874,7 @@ virBhyveProcessBuildCustomLoaderCmd(virDomainDef *def) =20 if (def->os.bootloaderArgs =3D=3D NULL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Custom loader requires explicit %s configuration= "), + _("Custom loader requires explicit %1$s configurati= on"), "bootloader_args"); return NULL; } @@ -1059,7 +1059,7 @@ virBhyveGetBootDisk(virDomainDef *def) case VIR_DOMAIN_BOOT_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot boot from device %s"), + _("Cannot boot from device %1$s"), virDomainBootTypeToString(def->os.bootDevs[0])); return NULL; } @@ -1080,7 +1080,7 @@ virBhyveGetBootDisk(virDomainDef *def) =20 if (match =3D=3D NULL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot find boot device of requested type %s= "), + _("Cannot find boot device of requested type %1= $s"), virDomainBootTypeToString(def->os.bootDevs[0])); return NULL; } diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index a1d1ebc706..a8b1f97790 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -114,7 +114,7 @@ bhyveDomainDiskDefAssignAddress(struct _bhyveConn *driv= er, =20 if (idx < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Unknown disk name '%s' and no address specified"= ), + _("Unknown disk name '%1$s' and no address specifie= d"), def->dst); return -1; } diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index e7d9c2adf3..9ece06447d 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -83,7 +83,7 @@ bhyveAutostartDomain(virDomainObj *vm, void *opaque) VIR_DOMAIN_RUNNING_BOOTED, 0); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart VM '%s': %s"), + _("Failed to autostart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); } } @@ -153,7 +153,7 @@ bhyveDomObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); return NULL; } @@ -183,7 +183,7 @@ bhyveConnectOpen(virConnectPtr conn, =20 if (STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected bhyve URI path '%s', try bhyve:///sys= tem"), + _("Unexpected bhyve URI path '%1$s', try bhyve:///s= ystem"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -257,7 +257,7 @@ bhyveConnectGetVersion(virConnectPtr conn, unsigned lon= g *version) =20 if (virStringParseVersion(version, ver.release, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown release: %s"), ver.release); + _("Unknown release: %1$s"), ver.release); return -1; } =20 @@ -369,21 +369,21 @@ bhyveDomainSetAutostart(virDomainPtr domain, int auto= start) if (autostart) { if (g_mkdir_with_parents(BHYVE_AUTOSTART_DIR, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = %s"), + _("cannot create autostart directory = %1$s"), BHYVE_AUTOSTART_DIR); goto cleanup; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s' to '= %s'"), + _("Failed to create symlink '%1$s' to= '%2$s'"), autostartLink, configFile); goto cleanup; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno != =3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto cleanup; } @@ -669,7 +669,7 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn, =20 if (STRNEQ(format, BHYVE_CONFIG_FORMAT_ARGV)) { virReportError(VIR_ERR_INVALID_ARG, - _("Unsupported config type %s"), format); + _("Unsupported config type %1$s"), format); return NULL; } =20 @@ -742,7 +742,7 @@ bhyveDomainLookupByUUID(virConnectPtr conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching uuid '%s'"), uuidstr); + _("No domain with matching uuid '%1$s'"), uuidstr); goto cleanup; } =20 @@ -767,7 +767,7 @@ static virDomainPtr bhyveDomainLookupByName(virConnectP= tr conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -793,7 +793,7 @@ bhyveDomainLookupByID(virConnectPtr conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching ID '%d'"), id); + _("No domain with matching ID '%1$d'"), id); goto cleanup; } =20 @@ -1234,14 +1234,14 @@ bhyveStateInitialize(bool privileged, =20 if (g_mkdir_with_parents(BHYVE_LOG_DIR, 0777) < 0) { virReportSystemError(errno, - _("Failed to mkdir %s"), + _("Failed to mkdir %1$s"), BHYVE_LOG_DIR); goto cleanup; } =20 if (g_mkdir_with_parents(BHYVE_STATE_DIR, 0777) < 0) { virReportSystemError(errno, - _("Failed to mkdir %s"), + _("Failed to mkdir %1$s"), BHYVE_STATE_DIR); goto cleanup; } @@ -1309,7 +1309,7 @@ bhyveConnectGetMaxVcpus(virConnectPtr conn, if (!type || STRCASEEQ(type, "bhyve")) return 16; =20 - virReportError(VIR_ERR_INVALID_ARG, _("unknown type '%s'"), type); + virReportError(VIR_ERR_INVALID_ARG, _("unknown type '%1$s'"), type); return -1; } =20 @@ -1543,7 +1543,7 @@ bhyveConnectDomainXMLFromNative(virConnectPtr conn, =20 if (STRNEQ(nativeFormat, BHYVE_CONFIG_FORMAT_ARGV)) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return NULL; } =20 @@ -1576,28 +1576,28 @@ bhyveConnectGetDomainCapabilities(virConnectPtr con= n, if (virttype_str && (virttype =3D virDomainVirtTypeFromString(virttype_str)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (virttype !=3D VIR_DOMAIN_VIRT_BHYVE) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (arch_str && (arch =3D virArchFromString(arch_str)) =3D=3D VIR_ARCH= _NONE) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown architecture: %s"), + _("unknown architecture: %1$s"), arch_str); goto cleanup; } =20 if (!ARCH_IS_X86(arch)) { virReportError(VIR_ERR_NO_SUPPORT, - _("unsupported architecture: %s"), + _("unsupported architecture: %1$s"), virArchToString(arch)); goto cleanup; } diff --git a/src/bhyve/bhyve_firmware.c b/src/bhyve/bhyve_firmware.c index ff131efa41..57ab9c7a82 100644 --- a/src/bhyve/bhyve_firmware.c +++ b/src/bhyve/bhyve_firmware.c @@ -69,7 +69,7 @@ bhyveFirmwareFillDomain(bhyveConn *driver, if (!matching_firmware) { if (!first_found) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no firmwares found in %s"), + _("no firmwares found in %1$s"), firmware_dir); return -1; } else { @@ -82,7 +82,7 @@ bhyveFirmwareFillDomain(bhyveConn *driver, =20 if (def->os.loader->format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported loader format '%s'"), + _("Unsupported loader format '%1$s'"), virStorageFileFormatTypeToString(def->os.loader->fo= rmat)); return -1; } diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index ae602b5c39..8cf4b41ca3 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -120,7 +120,7 @@ bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNU= SED, void *opaque) =20 if (watch !=3D mon->watch || kq !=3D mon->kq) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("event from unexpected fd %d!=3D%d / watch %d!=3D= %d"), + _("event from unexpected fd %1$d!=3D%2$d / watch %3= $d!=3D%4$d"), mon->kq, kq, mon->watch, watch); return; } @@ -142,7 +142,7 @@ bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNU= SED, void *opaque) if (kev.filter =3D=3D EVFILT_PROC && (kev.fflags & NOTE_EXIT) !=3D 0) { if ((pid_t)kev.ident !=3D vm->pid) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("event from unexpected proc %ju!=3D%ju"), + _("event from unexpected proc %1$ju!=3D%2$ju"), (uintmax_t)vm->pid, (uintmax_t)kev.ident); return; } @@ -151,7 +151,7 @@ bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNU= SED, void *opaque) status =3D kev.data; if (WIFSIGNALED(status) && WCOREDUMP(status)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Guest %s got signal %d and crashed"), + _("Guest %1$s got signal %2$d and crashed"), name, WTERMSIG(status)); virBhyveProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED); } else if (WIFEXITED(status)) { diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman= d.c index 2a5959ba1d..394e043c45 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -281,8 +281,8 @@ bhyveParseBhyveLPCArg(virDomainDef *def, =20 if (!STRPREFIX(param, "/dev/nmdm")) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to set com port %s: does not start wi= th " - "'/dev/nmdm'."), type); + _("Failed to set com port %1$s: does not start = with '/dev/nmdm'."), + type); goto error; } =20 @@ -301,8 +301,7 @@ bhyveParseBhyveLPCArg(virDomainDef *def, break; default: virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to set slave for %s: last letter = not " - "'A' or 'B'"), + _("Failed to set slave for %1$s: last lette= r not 'A' or 'B'"), NULLSTR(chr->source->data.nmdm.master)); goto error; } @@ -314,8 +313,8 @@ bhyveParseBhyveLPCArg(virDomainDef *def, break; default: virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to parse %s: only com1 and com2" - " supported."), type); + _("Failed to parse %1$s: only com1 and com2 sup= ported."), + type); goto error; break; } @@ -515,7 +514,7 @@ bhyveParsePCINet(virDomainDef *def, =20 if (virMacAddrParse(mac, &net->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse mac address '%s'"), + _("unable to parse mac address '%1$s'"), mac); goto cleanup; } @@ -716,7 +715,7 @@ bhyveParseBhyvePCIArg(virDomainDef *def, =20 #define CONSUME_ARG(var) \ if ((opti + 1) =3D=3D argc) { \ - virReportError(VIR_ERR_INVALID_ARG, _("Missing argument for '%s'")= , \ + virReportError(VIR_ERR_INVALID_ARG, _("Missing argument for '%1$s'= "), \ argv[opti]); \ return -1; \ } \ @@ -800,7 +799,7 @@ bhyveParseBhyveCommandLine(virDomainDef *def, CONSUME_ARG(arg); if (virUUIDParse(arg, def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse UUID '%s'"), arg); + _("Cannot parse UUID '%1$s'"), arg); return -1; } break; diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index eee0c4bf1d..5b0fd7658a 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -129,7 +129,7 @@ virBhyveProcessStartImpl(struct _bhyveConn *driver, if ((logfd =3D open(logfile, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { virReportSystemError(errno, - _("Failed to open '%s'"), + _("Failed to open '%1$s'"), logfile); goto cleanup; } @@ -145,7 +145,7 @@ virBhyveProcessStartImpl(struct _bhyveConn *driver, if (unlink(driver->pidfile) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Cannot remove state PID file %s"), + _("Cannot remove state PID file %1$s"), driver->pidfile); goto cleanup; } @@ -180,7 +180,7 @@ virBhyveProcessStartImpl(struct _bhyveConn *driver, rc =3D virFileWriteStr(devmap_file, devicemap, 0644); if (rc) { virReportSystemError(errno, - _("Cannot write device.map '%s'"), + _("Cannot write device.map '%1$s'"), devmap_file); goto cleanup; } @@ -204,7 +204,7 @@ virBhyveProcessStartImpl(struct _bhyveConn *driver, =20 if (virPidFileReadPath(driver->pidfile, &vm->pid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Domain %s didn't show up"), vm->def->name); + _("Domain %1$s didn't show up"), vm->def->name); goto cleanup; } =20 @@ -225,7 +225,7 @@ virBhyveProcessStartImpl(struct _bhyveConn *driver, if (devicemap !=3D NULL) { rc =3D unlink(devmap_file); if (rc < 0 && errno !=3D ENOENT) - virReportSystemError(errno, _("cannot unlink file '%s'"), + virReportSystemError(errno, _("cannot unlink file '%1$s'"), devmap_file); } =20 @@ -293,7 +293,7 @@ virBhyveProcessStop(struct _bhyveConn *driver, =20 if (vm->pid =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid PID %d for VM"), + _("Invalid PID %1$d for VM"), (int)vm->pid); return -1; } @@ -343,7 +343,7 @@ virBhyveProcessShutdown(virDomainObj *vm) { if (vm->pid =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid PID %d for VM"), + _("Invalid PID %1$d for VM"), (int)vm->pid); return -1; } @@ -386,7 +386,7 @@ virBhyveGetDomainTotalCpuStats(virDomainObj *vm, =20 if ((kd =3D kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) =3D=3D = NULL) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to get kvm descriptor: %s"), + _("Unable to get kvm descriptor: %1$s"), errbuf); return -1; =20 @@ -395,7 +395,7 @@ virBhyveGetDomainTotalCpuStats(virDomainObj *vm, kp =3D kvm_getprocs(kd, KERN_PROC_PID, vm->pid, &nprocs); if (kp =3D=3D NULL || nprocs !=3D 1) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to obtain information about pid: %d"), + _("Unable to obtain information about pid: %1$d"), (int)vm->pid); goto cleanup; } @@ -485,7 +485,7 @@ virBhyveProcessReconnectAll(struct _bhyveConn *driver) =20 if ((kd =3D kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) =3D=3D = NULL) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to get kvm descriptor: %s"), + _("Unable to get kvm descriptor: %1$s"), errbuf); return; =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464633; cv=none; d=zohomail.com; s=zohoarc; b=HheyN3LCnyaUV+5KuoHxRQ28jaqlMvyYP/5mKZoPd4sO1LtteuGFD9UzEtQTLVXKz8J6MiVCaFvsllCXeu2vru/gq28RCcU7MaE2Fo1SX+6YgX7LMdnwBc1ufRbiT5ZmNRsasxXghh8QVhKpChluSVjdHCxPqvIcXLfftVGgEyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464633; 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=+++Zws+XEt5D7RAvMmjBvdX8DNBNtgmESDdhBU75M7c=; b=SeS32qCahnsbvCN5eKPFwQwxKNhTDz8tgIfl509pQdmRcAXHnC6Lki2Z2IDbEl0w0nuolCUBNjJ7eyLobsu5P4Jlo/+j6YEbg6YkYF1sEvF5TNrGjkxyXJCHBsY37j2KvyWoqHn3cVNQGAihLrzC2X662DGjaue0NfNm0DLsbYw= 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 1678464633094790.4846439349274; Fri, 10 Mar 2023 08:10:33 -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-373-T8jvP13LNveuq4fS9JmUIw-1; Fri, 10 Mar 2023 11:10:29 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 97F821C0896E; Fri, 10 Mar 2023 16:10:22 +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 7FA5340C945A; Fri, 10 Mar 2023 16:10:22 +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 605B11946A6F; Fri, 10 Mar 2023 16:10:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 62A111946A4A for ; Fri, 10 Mar 2023 16:10:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 55AC32166B2B; Fri, 10 Mar 2023 16:10:21 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id F03882166B26 for ; Fri, 10 Mar 2023 16:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464632; 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=+++Zws+XEt5D7RAvMmjBvdX8DNBNtgmESDdhBU75M7c=; b=QI0zK5AwDuEl1yzcr4Wt05JF2rYdpVM9O/1y154P02DCS1hBUKjmrhOXNBajiyrKvGWr3H 89vK3MpuoWb4S5PZBBDrt0gH/EVmd97d45oHjpkMQ726PPZ1O4dhJPYzEXQ8J+XE2g8uq5 yNqE5/H5FJOgEHvGp4artPOsyQBO4I4= X-MC-Unique: T8jvP13LNveuq4fS9JmUIw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 05/51] ch: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:21 +0100 Message-Id: <83c567e3c6529185b3185c533d84ec12b4184071.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.2 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: 1678464634703100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/ch/ch_conf.c | 2 +- src/ch/ch_domain.c | 4 ++-- src/ch/ch_driver.c | 20 ++++++++++---------- src/ch/ch_monitor.c | 27 ++++++++++++++------------- src/ch/ch_process.c | 6 +++--- 5 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/ch/ch_conf.c b/src/ch/ch_conf.c index 0d07fa270c..2bb2eaf820 100644 --- a/src/ch/ch_conf.c +++ b/src/ch/ch_conf.c @@ -202,7 +202,7 @@ chExtractVersion(virCHDriver *driver) =20 if (virStringParseVersion(&version, tmp, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse cloud-hypervisor version: %s"), = tmp); + _("Unable to parse cloud-hypervisor version: %1$s")= , tmp); return -1; } =20 diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index cf98654479..35e3471cba 100644 --- a/src/ch/ch_domain.c +++ b/src/ch/ch_domain.c @@ -176,7 +176,7 @@ chValidateDomainDeviceDef(const virDomainDeviceDef *dev, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cloud-Hypervisor doesn't support '%s' device"), + _("Cloud-Hypervisor doesn't support '%1$s' device"), virDomainDeviceTypeToString(dev->type)); return -1; =20 @@ -340,7 +340,7 @@ virCHDomainObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); return NULL; } diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index 12fbe31c24..72fe3198b2 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -631,7 +631,7 @@ static virDomainPtr chDomainLookupByID(virConnectPtr co= nn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id '%d'"), id); + _("no domain with matching id '%1$d'"), id); goto cleanup; } =20 @@ -656,7 +656,7 @@ static virDomainPtr chDomainLookupByName(virConnectPtr = conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -683,7 +683,7 @@ static virDomainPtr chDomainLookupByUUID(virConnectPtr = conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); goto cleanup; } =20 @@ -817,14 +817,14 @@ chDomainOpenConsole(virDomainPtr dom, } =20 if (!chr) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find character = device %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find character = device %1$s"), NULLSTR(dev_name)); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), + _("character device %1$s is not using a PTY"), dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -930,7 +930,7 @@ chConnectSupportsFeature(virConnectPtr conn, 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 h= andled"), + _("Global feature %1$d should have already been= handled"), feature); return -1; case VIR_DRV_FEATURE_MIGRATION_V2: @@ -1158,7 +1158,7 @@ chDomainPinVcpuLive(virDomainObj *vm, =20 if (!(vcpuinfo =3D virDomainDefGetVcpu(def, vcpu))) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %d is out of range of live cpu count %d"), + _("vcpu %1$d is out of range of live cpu count %2$d= "), vcpu, virDomainDefGetVcpusMax(def)); return -1; } @@ -1228,7 +1228,7 @@ chDomainPinVcpuFlags(virDomainPtr dom, if (persistentDef && !(vcpuinfo =3D virDomainDefGetVcpu(persistentDef, vcpu))) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %d is out of range of persistent cpu count = %d"), + _("vcpu %1$d is out of range of persistent cpu coun= t %2$d"), vcpu, virDomainDefGetVcpus(persistentDef)); goto endjob; } @@ -1609,7 +1609,7 @@ chDomainSetNumaParameters(virDomainPtr dom, =20 if (mode < 0 || mode >=3D VIR_DOMAIN_NUMATUNE_MEM_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported numatune mode: '%d'"), mode); + _("unsupported numatune mode: '%1$d'"), mod= e); goto cleanup; } =20 @@ -1620,7 +1620,7 @@ chDomainSetNumaParameters(virDomainPtr dom, =20 if (virBitmapIsAllClear(nodeset)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Invalid nodeset of 'numatune': %s"), + _("Invalid nodeset of 'numatune': %1$s"), param->value.s); goto cleanup; } diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 7b8f0a8077..d902bc6959 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@ -176,7 +176,8 @@ virCHMonitorBuildDiskJson(virJSONValue *disks, virDomai= nDiskDef *diskdef) } if (diskdef->bus !=3D VIR_DOMAIN_DISK_BUS_VIRTIO) { virReportError(VIR_ERR_INVALID_ARG, - _("Only virtio bus types are supported for '%s'= "), diskdef->src->path); + _("Only virtio bus types are supported for '%1$= s'"), + diskdef->src->path); return -1; } if (virJSONValueObjectAppendString(disk, "path", diskdef->src->pat= h) < 0) @@ -253,7 +254,7 @@ virCHMonitorBuildNetJson(virJSONValue *nets, =20 if (virSocketAddrPrefixToNetmask(ip->prefix, &netmask, AF_= INET) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to translate net prefix %d to= netmask"), + _("Failed to translate net prefix %1$d = to netmask"), ip->prefix); return -1; } @@ -331,7 +332,7 @@ virCHMonitorBuildNetJson(virJSONValue *nets, if (netdef->driver.virtio.rx_queue_size || netdef->driver.virtio.tx_qu= eue_size) { if (netdef->driver.virtio.rx_queue_size !=3D netdef->driver.virtio= .tx_queue_size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio rx_queue_size option %d is not same with tx_queue= _size %d"), + _("virtio rx_queue_size option %1$d is not same with tx_que= ue_size %2$d"), netdef->driver.virtio.rx_queue_size, netdef->driver.virtio.tx_queue_size); return -1; @@ -388,7 +389,7 @@ virCHMonitorBuildDeviceJson(virJSONValue *devices, path =3D g_strdup_printf("/sys/bus/pci/devices/%s/", name); if (!virFileExists(path)) { virReportError(VIR_ERR_DEVICE_MISSING, - _("host pci device %s not found"), path); + _("host pci device %1$s not found"), path); return -1; } if (virJSONValueObjectAppendString(device, "path", path) < 0) @@ -481,28 +482,28 @@ chMonitorCreateSocket(const char *socket_path) addr.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.sun_path, socket_path) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("UNIX socket path '%s' too long"), + _("UNIX socket path '%1$s' too long"), socket_path); goto error; } =20 if (unlink(socket_path) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to unlink %s"), + _("Unable to unlink %1$s"), socket_path); goto error; } =20 if (bind(fd, (struct sockaddr *)&addr, addrlen) < 0) { virReportSystemError(errno, - _("Unable to bind to UNIX socket path '%s'"), + _("Unable to bind to UNIX socket path '%1$s'"= ), socket_path); goto error; } =20 if (listen(fd, 1) < 0) { virReportSystemError(errno, - _("Unable to listen to UNIX socket path '%s'"= ), + _("Unable to listen to UNIX socket path '%1$s= '"), socket_path); goto error; } @@ -543,7 +544,7 @@ virCHMonitorNew(virDomainObj *vm, const char *socketdir) mon->socketpath =3D g_strdup_printf("%s/%s-socket", socketdir, vm->def= ->name); if (g_mkdir_with_parents(socketdir, 0777) < 0) { virReportSystemError(errno, - _("Cannot create socket directory '%s'"), + _("Cannot create socket directory '%1$s'"), socketdir); return NULL; } @@ -553,7 +554,7 @@ virCHMonitorNew(virDomainObj *vm, const char *socketdir) socket_fd =3D chMonitorCreateSocket(mon->socketpath); if (socket_fd < 0) { virReportSystemError(errno, - _("Cannot create socket '%s'"), + _("Cannot create socket '%1$s'"), mon->socketpath); return NULL; } @@ -619,7 +620,7 @@ virCHMonitorCurlPerform(CURL *handle) =20 if (errorCode !=3D CURLE_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("curl_easy_perform() returned an error: %s (%d)"), + _("curl_easy_perform() returned an error: %1$s (%2$= d)"), curl_easy_strerror(errorCode), errorCode); return -1; } @@ -629,8 +630,8 @@ virCHMonitorCurlPerform(CURL *handle) =20 if (errorCode !=3D CURLE_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) return= ed an " - "error: %s (%d)"), curl_easy_strerror(errorCode), + _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) return= ed an error: %1$s (%2$d)"), + curl_easy_strerror(errorCode), errorCode); return -1; } diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 77f55e777b..c145a78496 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -67,7 +67,7 @@ virCHProcessUpdateConsoleDevice(virDomainObj *vm, dev =3D virJSONValueObjectGet(config, device); if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing '%s' in 'config' from cloud-hypervisor"), + _("missing '%1$s' in 'config' from cloud-hypervisor= "), device); return; } @@ -75,7 +75,7 @@ virCHProcessUpdateConsoleDevice(virDomainObj *vm, file =3D virJSONValueObjectGet(dev, "file"); if (!file) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'file' in '%s' from cloud-hypervisor"), + _("missing 'file' in '%1$s' from cloud-hypervisor"), device); return; } @@ -83,7 +83,7 @@ virCHProcessUpdateConsoleDevice(virDomainObj *vm, path =3D virJSONValueGetString(file); if (!path) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse contents of 'file' field in '%s'= from cloud-hypervisor"), + _("unable to parse contents of 'file' field in '%1$= s' from cloud-hypervisor"), device); return; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464635; cv=none; d=zohomail.com; s=zohoarc; b=lHol8mq8XZqlQ4QSYBiTC17Y++5dACajc5YN0Xl0iBJoRTE64WLqCvyT4mso/IaVhHu1DA+Y7AJMMo+YN8AHYx1c1/wmTjtAQiGETSuf1WwRtlxjAjYi5R4N7JD6lVkXKwzeaZuCO6wKIiQvv3f41OTRlXbL5tMvMldD2qZ3V7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464635; 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=S5M6db977d8qH245VUNK3S+oph00vqfgagvHWohjaJA=; b=bq6vNaa5bVJ1LyN4iOpgG1jw/Pq7ScGgEhKkr6naCqTBDqTcmk4qAq9VaA1lv/QuVJIxnPg2VXuKaesaEk2X/nqbB9JrnCtk8h8kh0KpiWo3kPucyFB9rAR0MeTY7K3PxpvoJW+zrmqPYjFXCuAbe3iigjBZmCH21OdICjn1xIo= 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 1678464635122484.71578362166997; Fri, 10 Mar 2023 08:10:35 -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-526-wECdgDydM_W1xHQsa1o14w-1; Fri, 10 Mar 2023 11:10:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87C5087A9E1; Fri, 10 Mar 2023 16:10:24 +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 6C2BC2166B2A; Fri, 10 Mar 2023 16:10:24 +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 5CEFE1946A54; Fri, 10 Mar 2023 16:10:24 +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 E805D1946A54 for ; Fri, 10 Mar 2023 16:10:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D96F4C15BAE; Fri, 10 Mar 2023 16:10:22 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 29B3CC15BA0 for ; Fri, 10 Mar 2023 16:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464633; 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=S5M6db977d8qH245VUNK3S+oph00vqfgagvHWohjaJA=; b=dJu3kQDWaAK1P+Qu6LfJfcxVi2a+DbpKZIlRJUnpvwIRo5f6OTW8yOMtr7vBBSjFFQ6ESt U5Rf2pafP9qqX5rRsfgedYbN6f3onpsAA/15KstDML/GOaatMscfE//9oY9blWUONH7xEB IrTM/GgW6uOGVMFhA+XubsEPzvmQ2dE= X-MC-Unique: wECdgDydM_W1xHQsa1o14w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 06/51] conf/domain_conf: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:22 +0100 Message-Id: <31fd4ff69b1fd4c8578e3a029d96aa84d3355e57.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.6 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: 1678464636863100013 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/domain_conf.c | 874 ++++++++++++++++++----------------------- 1 file changed, 391 insertions(+), 483 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 783d3a5fff..00c3b11dc2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1637,8 +1637,7 @@ virDomainKeyWrapCipherDefParseXML(virDomainKeyWrapDef= *keywrap, case VIR_DOMAIN_KEY_WRAP_CIPHER_NAME_AES: if (keywrap->aes !=3D VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("A domain definition can have no more than " - "one cipher node with name %s"), + _("A domain definition can have no more than on= e cipher node with name %1$s"), virDomainKeyWrapCipherNameTypeToString(name)); =20 return -1; @@ -1649,8 +1648,7 @@ virDomainKeyWrapCipherDefParseXML(virDomainKeyWrapDef= *keywrap, case VIR_DOMAIN_KEY_WRAP_CIPHER_NAME_DEA: if (keywrap->dea !=3D VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("A domain definition can have no more than " - "one cipher node with name %s"), + _("A domain definition can have no more than on= e cipher node with name %1$s"), virDomainKeyWrapCipherNameTypeToString(name)); =20 return -1; @@ -1874,14 +1872,14 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root, if ((weight =3D virXPathString("string(./weight)", ctxt)) && (virStrToLong_ui(weight, NULL, 10, &dev->weight) < 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not parse weight %s"), weight); + _("could not parse weight %1$s"), weight); return -1; } =20 if ((read_bytes_sec =3D virXPathString("string(./read_bytes_sec)", ctx= t)) && (virStrToLong_ull(read_bytes_sec, NULL, 10, &dev->rbps) < 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not parse read bytes sec %s"), + _("could not parse read bytes sec %1$s"), read_bytes_sec); return -1; } @@ -1889,7 +1887,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root, if ((write_bytes_sec =3D virXPathString("string(./write_bytes_sec)", c= txt)) && (virStrToLong_ull(write_bytes_sec, NULL, 10, &dev->wbps) < 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not parse write bytes sec %s"), + _("could not parse write bytes sec %1$s"), write_bytes_sec); return -1; } @@ -1897,7 +1895,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root, if ((read_iops_sec =3D virXPathString("string(./read_iops_sec)", ctxt)= ) && (virStrToLong_ui(read_iops_sec, NULL, 10, &dev->riops) < 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not parse read iops sec %s"), + _("could not parse read iops sec %1$s"), read_iops_sec); return -1; } @@ -1905,7 +1903,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root, if ((write_iops_sec =3D virXPathString("string(./write_iops_sec)", ctx= t)) && (virStrToLong_ui(write_iops_sec, NULL, 10, &dev->wiops) < 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not parse write iops sec %s"), + _("could not parse write iops sec %1$s"), write_iops_sec); return -1; } @@ -2220,7 +2218,7 @@ virDomainDefGetVcpuSched(virDomainDef *def, =20 if (!(vcpuinfo =3D virDomainDefGetVcpu(def, vcpu))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vCPU '%u' is not present in domain definition"), + _("vCPU '%1$u' is not present in domain definition"= ), vcpu); return NULL; } @@ -2322,7 +2320,7 @@ virDomainDefGetVcpusTopology(const virDomainDef *def, (tmp *=3D def->cpu->cores) > UINT_MAX || (tmp *=3D def->cpu->threads) > UINT_MAX) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cpu topology results in more than %u cpus"), UIN= T_MAX); + _("cpu topology results in more than %1$u cpus"), U= INT_MAX); return -1; } =20 @@ -5216,7 +5214,7 @@ virDomainDefLifecycleActionAllowed(virDomainLifecycle= type, } =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Lifecycle event '%s' doesn't support '%s' action"), + _("Lifecycle event '%1$s' doesn't support '%2$s' action= "), virDomainLifecycleTypeToString(type), virDomainLifecycleActionTypeToString(action)); return false; @@ -5249,14 +5247,14 @@ virDomainDeviceLoadparmIsValid(const char *loadparm) { if (virStringIsEmpty(loadparm) || !STRLIM(loadparm, 8)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("loadparm value '%s' must be between 1 and 8 char= acters"), + _("loadparm value '%1$s' must be between 1 and 8 ch= aracters"), loadparm); return false; } =20 if (strspn(loadparm, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv= wxyz0123456789. ") !=3D strlen(loadparm)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid loadparm value '%s', expecting chars in = set of [a-zA-Z0-9.] and blank spaces"), + _("invalid loadparm value '%1$s', expecting chars i= n set of [a-zA-Z0-9.] and blank spaces"), loadparm); return false; } @@ -5472,7 +5470,7 @@ virDomainDeviceBootParseXML(xmlNodePtr node, if (loadparm) { if (virStringToUpper(&info->loadparm, loadparm) !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert loadparm '%s' to upper cas= e"), + _("Failed to convert loadparm '%1$s' to upper c= ase"), loadparm); return -1; } @@ -5533,7 +5531,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address, =20 if ((info->type =3D virDomainDeviceAddressTypeFromString(type)) <=3D 0= ) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown address type '%s'"), type); + _("unknown address type '%1$s'"), type); return -1; } =20 @@ -5802,7 +5800,7 @@ virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node, =20 if ((state =3D virDomainHostdevPCIOrigstateTypeFromString(= (const char *) nodes[i]->name)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported element '%s' of 'origsta= tes'"), + _("unsupported element '%1$s' of 'origs= tates'"), (const char *) nodes[i]->name); return -1; } @@ -5832,7 +5830,7 @@ virDomainStorageNetworkParseHost(xmlNodePtr hostnode, host->transport =3D virStorageNetHostTransportTypeFromString(trans= port); if (host->transport < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown protocol transport type '%s'"), + _("unknown protocol transport type '%1$s'"), transport); goto cleanup; } @@ -5850,8 +5848,7 @@ virDomainStorageNetworkParseHost(xmlNodePtr hostnode, if (host->transport !=3D VIR_STORAGE_NET_HOST_TRANS_UNIX && host->socket !=3D NULL) { virReportError(VIR_ERR_XML_ERROR, - _("transport '%s' does not support " - "socket attribute"), + _("transport '%1$s' does not support socket attribu= te"), transport); goto cleanup; } @@ -6021,13 +6018,13 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodeP= tr sourcenode, return -1; if ((auth_secret_usage =3D virSecretUsageTypeFromString(authdef->s= ecrettype)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid secret type %s"), + _("invalid secret type %1$s"), authdef->secrettype); return -1; } if (auth_secret_usage !=3D VIR_SECRET_USAGE_TYPE_ISCSI) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("hostdev invalid secret type '%s'"), + _("hostdev invalid secret type '%1$s'"), authdef->secrettype); return -1; } @@ -6060,7 +6057,7 @@ virDomainHostdevSubsysSCSIDefParseXML(xmlNodePtr sour= cenode, virDomainHostdevSubsysSCSIProtocolTypeFromString(protocol); if (scsisrc->protocol < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown SCSI subsystem protocol '%s'"), + _("Unknown SCSI subsystem protocol '%1$s'"), protocol); return -1; } @@ -6101,7 +6098,7 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr= sourcenode, if ((hostsrc->protocol =3D virDomainHostdevSubsysSCSIHostProtocolTypeFromString(protocol)) <= =3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown scsi_host subsystem protocol '%s'"), + _("Unknown scsi_host subsystem protocol '%1$s'"), protocol); return -1; } @@ -6124,7 +6121,7 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr= sourcenode, case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_NONE: case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_LAST: virReportError(VIR_ERR_XML_ERROR, - _("Invalid hostdev protocol '%s'"), + _("Invalid hostdev protocol '%1$s'"), virDomainHostdevSubsysSCSIHostProtocolTypeToString(= hostsrc->protocol)); return -1; } @@ -6209,7 +6206,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, =20 if ((def->source.subsys.type =3D virDomainHostdevSubsysTypeFromString(= type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown host device source address type '%s'"), + _("unknown host device source address type '%1$s'"), type); return -1; } @@ -6259,8 +6256,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, def->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_H= OST) { if (model) { virReportError(VIR_ERR_XML_ERROR, - _("'model' attribute in is only suppo= rted " - "when type=3D'%s'"), + _("'model' attribute in is only suppo= rted when type=3D'%1$s'"), virDomainHostdevSubsysTypeToString(def->source.= subsys.type)); return -1; } @@ -6325,7 +6321,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("address type=3D'%s' not supported in hostdev int= erfaces"), + _("address type=3D'%1$s' not supported in hostdev i= nterfaces"), virDomainHostdevSubsysTypeToString(def->source.subs= ys.type)); return -1; } @@ -6363,7 +6359,7 @@ virDomainNetIPParseXML(xmlNodePtr node) =20 if (virSocketAddrParse(&ip->address, address, family) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid address '%s' in "), + _("Invalid address '%1$s' in "), address); return NULL; } @@ -6374,7 +6370,7 @@ virDomainNetIPParseXML(xmlNodePtr node) (family =3D=3D AF_INET6 && prefixValue > 128) || (family =3D=3D AF_INET && prefixValue > 32))) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid prefix value '%s' in "), + _("Invalid prefix value '%1$s' in "), prefixStr); return NULL; } @@ -6383,7 +6379,7 @@ virDomainNetIPParseXML(xmlNodePtr node) if ((peer =3D virXMLPropString(node, "peer")) !=3D NULL && virSocketAddrParse(&ip->peer, peer, family) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid peer '%s' in "), peer); + _("Invalid peer '%1$s' in "), peer); return NULL; } =20 @@ -6458,15 +6454,14 @@ virDomainNetDefCoalesceParseXML(xmlNodePtr node, =20 if (virStrToLong_ullp(str, NULL, 10, &tmp) < 0) { virReportError(VIR_ERR_XML_DETAIL, - _("cannot parse value '%s' for coalesce parameter"), + _("cannot parse value '%1$s' for coalesce parameter= "), str); return -1; } =20 if (tmp > UINT32_MAX) { virReportError(VIR_ERR_OVERFLOW, - _("value '%llu' is too big for coalesce " - "parameter, maximum is '%lu'"), + _("value '%1$llu' is too big for coalesce parameter= , maximum is '%2$lu'"), tmp, (unsigned long) UINT32_MAX); return -1; } @@ -6523,7 +6518,7 @@ virDomainHostdevDefParseXMLCaps(xmlNodePtr node G_GNU= C_UNUSED, =20 if ((def->source.caps.type =3D virDomainHostdevCapsTypeFromString(type= )) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown host device source address type '%s'"), + _("unknown host device source address type '%1$s'"), type); return -1; } @@ -6564,7 +6559,7 @@ virDomainHostdevDefParseXMLCaps(xmlNodePtr node G_GNU= C_UNUSED, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("address type=3D'%s' not supported in hostdev int= erfaces"), + _("address type=3D'%1$s' not supported in hostdev i= nterfaces"), virDomainHostdevCapsTypeToString(def->source.caps.t= ype)); return -1; } @@ -6596,7 +6591,7 @@ virDomainDiskDefAssignAddress(virDomainXMLOption *xml= opt G_GNUC_UNUSED, int idx =3D virDiskNameToIndex(def->dst); if (idx < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Unknown disk name '%s' and no address specified"= ), + _("Unknown disk name '%1$s' and no address specifie= d"), def->dst); return -1; } @@ -6635,9 +6630,7 @@ virDomainDiskDefAssignAddress(virDomainXMLOption *xml= opt G_GNUC_UNUSED, VIR_DOMAIN_HOSTDEV_SUBSYS= _TYPE_SCSI, &addr)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("using disk target name '%s' conflicts with " - "SCSI host device address controller=3D'%u' " - "bus=3D'%u' target=3D'%u' unit=3D'%u"), + _("using disk target name '%1$s' conflicts with= SCSI host device address controller=3D'%2$u' bus=3D'%3$u' target=3D'%4$u' = unit=3D'%5$u"), def->dst, controller, 0, 0, unit); return -1; } @@ -6745,7 +6738,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, } else { if (seclabel->type !=3D VIR_DOMAIN_SECLABEL_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported type=3D'%s' to model 'none'"= ), + _("unsupported type=3D'%1$s' to model 'none= '"), virDomainSeclabelTypeToString(seclabel->typ= e)); return NULL; } @@ -6824,7 +6817,7 @@ virSecurityLabelDefsParseXML(virDomainDef *def, for (j =3D 0; j < i; j++) { if (STREQ_NULLABLE(seclabel->model, def->seclabels[j]->model))= { virReportError(VIR_ERR_XML_DETAIL, - _("seclabel for model %s is already provide= d"), + _("seclabel for model %1$s is already provi= ded"), seclabel->model); virSecurityLabelDefFree(seclabel); goto error; @@ -6926,7 +6919,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLa= belDef ***seclabels_rtn, for (j =3D 0; j < i; j++) { if (STREQ_NULLABLE(model, seclabels[j]->model)) { virReportError(VIR_ERR_XML_DETAIL, - _("seclabel for model %s is already pro= vided"), model); + _("seclabel for model %1$s is already p= rovided"), model); goto error; } } @@ -6956,9 +6949,8 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLa= belDef ***seclabels_rtn, =20 if (seclabels[i]->label && !seclabels[i]->relabel) { virReportError(VIR_ERR_XML_ERROR, - _("Cannot specify a label if relabelling is " - "turned off. model=3D%s"), - NULLSTR(seclabels[i]->model)); + _("Cannot specify a label if relabelling is tur= ned off. model=3D%1$s"), + NULLSTR(seclabels[i]->model)); goto error; } } @@ -7060,7 +7052,7 @@ virDomainDiskSourcePoolDefParse(xmlNodePtr node, if (mode && (source->mode =3D virStorageSourcePoolModeTypeFromString(mode)) <= =3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown source mode '%s' for volume type disk"), + _("unknown source mode '%1$s' for volume type disk"= ), mode); goto cleanup; } @@ -7091,7 +7083,7 @@ virDomainStorageNetCookieParse(xmlNodePtr node, } =20 if (!(cookie->value =3D virXPathString("string(.)", ctxt))) { - virReportError(VIR_ERR_XML_ERROR, _("missing value for cookie '%s'= "), + virReportError(VIR_ERR_XML_ERROR, _("missing value for cookie '%1$= s'"), cookie->name); return NULL; } @@ -7184,8 +7176,8 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node, if (!(tmp =3D strchr(src->path, '/')) || tmp =3D=3D src->path) { virReportError(VIR_ERR_XML_ERROR, - _("can't split path '%s' into pool name and ima= ge " - "name"), src->path); + _("can't split path '%1$s' into pool name and i= mage name"), + src->path); return -1; } =20 @@ -7268,7 +7260,7 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, =20 if (STRNEQ(type, "pci")) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported source type '%s'"), + _("unsupported source type '%1$s'"), type); return -1; } @@ -7281,7 +7273,7 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, =20 if (virStrToLong_ull(namespc, NULL, 10, &nvme->namespc) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("malformed namespace '%s'"), + _("malformed namespace '%1$s'"), namespc); return -1; } @@ -7380,7 +7372,7 @@ virDomainStorageSourceParseBase(const char *type, int tmp; if ((tmp =3D virStorageTypeFromString(type)) <=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown storage source type '%s'"), type); + _("unknown storage source type '%1$s'"), type); return NULL; } =20 @@ -7390,14 +7382,14 @@ virDomainStorageSourceParseBase(const char *type, if (format && (src->format =3D virStorageFileFormatTypeFromString(format)) <=3D = 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown storage source format '%s'"), format); + _("unknown storage source format '%1$s'"), format); return NULL; } =20 if (index && virStrToLong_uip(index, NULL, 10, &src->id) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid storage source index '%s'"), index); + _("invalid storage source index '%1$s'"), index); return NULL; } =20 @@ -7425,14 +7417,14 @@ virDomainStorageSourceParseSlice(xmlNodePtr node, =20 if (virStrToLong_ullp(offset, NULL, 10, &ret->offset) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("malformed value '%s' of 'offset' attribute of sl= ice"), + _("malformed value '%1$s' of 'offset' attribute of = slice"), offset); return NULL; } =20 if (virStrToLong_ullp(size, NULL, 10, &ret->size) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("malformed value '%s' of 'size' attribute of slic= e"), + _("malformed value '%1$s' of 'size' attribute of sl= ice"), size); return NULL; } @@ -7510,7 +7502,7 @@ virDomainStorageSourceParse(xmlNodePtr node, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk type %s"), + _("unexpected disk type %1$s"), virStorageTypeToString(src->type)); return -1; } @@ -7614,7 +7606,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctx= t, if (virXPathULongLong("string(./iotune/" #val ")", \ ctxt, &def->blkdeviotune.val) =3D=3D -2) { \ virReportError(VIR_ERR_XML_ERROR, \ - _("disk iotune field '%s' must be an integer"), #va= l); \ + _("disk iotune field '%1$s' must be an integer"), #= val); \ return -1; \ } =20 @@ -7673,7 +7665,7 @@ virDomainDiskDefMirrorParse(virDomainDiskDef *def, if ((blockJob =3D virXMLPropString(cur, "job"))) { if ((def->mirrorJob =3D virDomainBlockJobTypeFromString(blockJob))= <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown mirror job type '%s'"), blockJob); + _("unknown mirror job type '%1$s'"), blockJob); return -1; } } else { @@ -7723,7 +7715,7 @@ virDomainDiskDefMirrorParse(virDomainDiskDef *def, if ((ready =3D virXMLPropString(cur, "ready")) && (def->mirrorState =3D virDomainDiskMirrorStateTypeFromString(ready= )) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown mirror ready state %s"), ready); + _("unknown mirror ready state %1$s"), ready); return -1; } =20 @@ -7783,7 +7775,7 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, =20 if (def->rerror_policy =3D=3D VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid disk read error policy: '%s'"), + _("Invalid disk read error policy: '%1$s'"), virDomainDiskErrorPolicyTypeToString(def->rerror_po= licy)); return -1; } @@ -7843,7 +7835,7 @@ virDomainDiskDefDriverSourceParseXML(virStorageSource= *src, } else { if ((src->format =3D virStorageFileFormatTypeFromString(tmp)) = <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown driver format value '%s'"), tmp); + _("unknown driver format value '%1$s'"), tm= p); return -1; } } @@ -7910,7 +7902,7 @@ virDomainDiskDefParseSourceXML(virDomainXMLOption *xm= lopt, if ((sourceindex =3D virXMLPropString(tmp, "index")) && virStrToLong_uip(sourceindex, NULL, 10, &src->id) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid disk index '%s'"), sourceindex); + _("invalid disk index '%1$s'"), sourceindex= ); return NULL; } } @@ -8352,7 +8344,7 @@ virDomainControllerDefParseXML(virDomainXMLOption *xm= lopt, if ((model =3D virXMLPropString(node, "model"))) { if ((def->model =3D virDomainControllerModelTypeFromString(def, mo= del)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown model type '%s'"), model); + _("Unknown model type '%1$s'"), model); return NULL; } } @@ -8601,7 +8593,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, } else if (rv > 0) { if (def->fmode > 0777) { virReportError(VIR_ERR_XML_ERROR, - _("invalid fmode: '0%o'"), def->fmode); + _("invalid fmode: '0%1$o'"), def->fmode); goto error; } } @@ -8613,7 +8605,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, } else if (rv > 0) { if (def->dmode > 0777) { virReportError(VIR_ERR_XML_ERROR, - _("invalid dmode: '0%o'"), def->dmode); + _("invalid dmode: '0%1$o'"), def->dmode); goto error; } } @@ -8680,7 +8672,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, if ((format =3D virXMLPropString(driver_node, "format")) && ((def->format =3D virStorageFileFormatTypeFromString(format)) = <=3D 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown driver format value '%s'"), format); + _("unknown driver format value '%1$s'"), format= ); goto error; } =20 @@ -8699,7 +8691,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, =20 if (queue_size && virStrToLong_ull(queue_size, NULL, 10, &def->que= ue_size) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("cannot parse queue size '%s' for virtiofs"), + _("cannot parse queue size '%1$s' for virtiofs"= ), queue_size); goto error; } @@ -8707,7 +8699,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, if (thread_pool_size && virStrToLong_i(thread_pool_size, NULL, 10, &def->thread_pool_s= ize) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("cannot parse thread pool size '%s' for virti= ofs"), + _("cannot parse thread pool size '%1$s' for vir= tiofs"), thread_pool_size); goto error; } @@ -8758,7 +8750,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt, } if (virStrToLong_ull(usage, NULL, 10, &def->usage) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("cannot parse usage '%s' for RAM filesystem"), + _("cannot parse usage '%1$s' for RAM filesystem= "), usage); goto error; } @@ -8812,7 +8804,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node, actual->type !=3D VIR_DOMAIN_NET_TYPE_HOSTDEV && actual->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported type '%s' in interface's el= ement"), + _("unsupported type '%1$s' in interface's = element"), virDomainNetTypeToString(actual->type)); goto error; } @@ -8837,8 +8829,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node, } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _(" element unsupported for type= =3D'%s'" - " in interface's element"), + _(" element unsupported for type= =3D'%1$s' in interface's element"), virDomainNetTypeToString(actual->type)); goto error; } @@ -8888,7 +8879,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node, if (class_id && virStrToLong_ui(class_id, NULL, 10, &actual->class_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse class id '%s'"), + _("Unable to parse class id '%1$s'"), class_id); goto error; } @@ -8909,8 +8900,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node, (actual->data.bridge.macTableManager =3D virNetworkBridgeMACTableManagerTypeFromString(macTabl= eManager)) <=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid macTableManager setting '%s' " - "in domain interface's element"), + _("Invalid macTableManager setting '%1$s' i= n domain interface's element"), macTableManager); goto error; } @@ -8983,7 +8973,7 @@ virDomainNetTeamingInfoParseXML(xmlXPathContextPtr ct= xt, =20 if ((tmpType =3D virDomainNetTeamingTypeFromString(typeStr)) <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown teaming type '%s'"), + _("unknown teaming type '%1$s'"), typeStr); return -1; } @@ -9222,7 +9212,7 @@ virDomainNetPortForwardDefParseXML(xmlNodePtr node, address =3D virXMLPropString(node, "address"); if (address && virSocketAddrParse(&def->address, address, AF_UNSPEC) <= 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid address '%s' in "), address= ); + _("Invalid address '%1$s' in "), addre= ss); return NULL; } =20 @@ -9268,7 +9258,7 @@ virDomainNetDefParseXMLRequireSource(virDomainNetDef = *def, { if (!source_node) { virReportError(VIR_ERR_XML_ERROR, - _("interface type=3D'%s' requires a 'source' elemen= t"), + _("interface type=3D'%1$s' requires a 'source' elem= ent"), virDomainNetTypeToString(def->type)); return -1; } @@ -9453,7 +9443,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, =20 if (STRNEQ_NULLABLE(vhostuser_type, "unix")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Type=3D'%s' unsupported for "), + _("Type=3D'%1$s' unsupported for "), vhostuser_type); return NULL; } @@ -9576,7 +9566,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, if ((virtualport_node =3D virXPathNode("./virtualport", ctxt))) { if (virtualport_flags =3D=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" element unsupported for "), + _(" element unsupported for "), virDomainNetTypeToString(def->type)); return NULL; } @@ -9624,13 +9614,13 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, if ((macaddr =3D virXMLPropString(mac_node, "address"))) { if (virMacAddrParse((const char *)macaddr, &def->mac) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("unable to parse mac address '%s'"), + _("unable to parse mac address '%1$s'"), (const char *)macaddr); return NULL; } if (virMacAddrIsMulticast(&def->mac)) { virReportError(VIR_ERR_XML_ERROR, - _("expected unicast mac address, found mult= icast '%s'"), + _("expected unicast mac address, found mult= icast '%1$s'"), (const char *)macaddr); return NULL; } @@ -9686,7 +9676,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, if (linkstate !=3D NULL) { if ((def->linkstate =3D virDomainNetInterfaceLinkStateTypeFromStri= ng(linkstate)) <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown interface link state '%s'"), + _("unknown interface link state '%1$s'"), linkstate); return NULL; } @@ -9731,7 +9721,7 @@ virDomainChrDefaultTargetType(int devtype) switch ((virDomainChrDeviceType) devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: virReportError(VIR_ERR_XML_ERROR, - _("target type must be specified for %s device"), + _("target type must be specified for %1$s device"), virDomainChrDeviceTypeToString(devtype)); return -1; =20 @@ -9827,7 +9817,7 @@ virDomainChrDefParseTargetXML(virDomainChrDef *def, virDomainChrTargetTypeFromString(def->deviceType, targetType)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown target type '%s' specified for character= device"), + _("unknown target type '%1$s' specified for charact= er device"), targetType); return -1; } @@ -9838,7 +9828,7 @@ virDomainChrDefParseTargetXML(virDomainChrDef *def, virDomainChrTargetModelFromString(def->deviceType, targetModel)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown target model '%s' specified for characte= r device"), + _("unknown target model '%1$s' specified for charac= ter device"), targetModel); return -1; } @@ -9900,7 +9890,7 @@ virDomainChrDefParseTargetXML(virDomainChrDef *def, =20 if (virStrToLong_ui(portStr, NULL, 10, &port) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid port number: %s"), + _("Invalid port number: %1$s"), portStr); return -1; } @@ -10029,7 +10019,7 @@ virDomainChrSourceDefParseProtocol(virDomainChrSour= ceDef *def, (def->data.tcp.protocol =3D virDomainChrTcpProtocolTypeFromString(prot)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown protocol '%s'"), prot); + _("Unknown protocol '%1$s'"), prot); return -1; } =20 @@ -10341,7 +10331,7 @@ virDomainChrDefParseXML(virDomainXMLOption *xmlopt, def->source->type =3D VIR_DOMAIN_CHR_TYPE_PTY; } else if ((def->source->type =3D virDomainChrTypeFromString(type)) < = 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown type presented to host for character dev= ice: %s"), + _("unknown type presented to host for character dev= ice: %1$s"), type); goto error; } @@ -10349,7 +10339,7 @@ virDomainChrDefParseXML(virDomainXMLOption *xmlopt, nodeName =3D (const char *) node->name; if ((def->deviceType =3D virDomainChrDeviceTypeFromString(nodeName)) <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown character device type: %s"), + _("unknown character device type: %1$s"), nodeName); goto error; } @@ -10440,7 +10430,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOption *x= mlopt, =20 if (*def->data.cert.database !=3D '/') { virReportError(VIR_ERR_XML_ERROR, - _("expecting absolute path: %s"), + _("expecting absolute path: %1$s"), def->data.cert.database); return NULL; } @@ -10461,8 +10451,8 @@ virDomainSmartcardDefParseXML(virDomainXMLOption *x= mlopt, =20 if ((def->data.passthru->type =3D virDomainChrTypeFromString(type)= ) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown type presented to host for " - "character device: %s"), type); + _("unknown type presented to host for character= device: %1$s"), + type); return NULL; } =20 @@ -10597,7 +10587,7 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt, if (secretuuid) { if (virUUIDParse(secretuuid, def->data.emulator.secretuuid) < = 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse secret uuid '%s'"), secr= etuuid); + _("Unable to parse secret uuid '%1$s'"), se= cretuuid); goto error; } def->data.emulator.hassecretuuid =3D true; @@ -10620,7 +10610,7 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt, for (i =3D 0; i < nnodes; i++) { if ((bank =3D virDomainTPMPcrBankTypeFromString((const char *)= nodes[i]->name)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported PCR banks '%s'"), + _("Unsupported PCR banks '%1$s'"), nodes[i]->name); goto error; } @@ -10640,7 +10630,7 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt, def->data.external.source->type =3D virDomainChrTypeFromString(typ= e); if (def->data.external.source->type < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown backend source type '%s' for externa= l TPM"), + _("unknown backend source type '%1$s' for exter= nal TPM"), type); goto error; } @@ -10690,7 +10680,7 @@ virDomainPanicDefParseXML(virDomainXMLOption *xmlop= t, if (model !=3D NULL && (panic->model =3D virDomainPanicModelTypeFromString(model)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown panic model '%s'"), model); + _("unknown panic model '%1$s'"), model); goto error; } =20 @@ -10732,7 +10722,7 @@ virDomainInputDefParseXML(virDomainXMLOption *xmlop= t, =20 if ((def->type =3D virDomainInputTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown input device type '%s'"), type); + _("unknown input device type '%1$s'"), type); goto error; } =20 @@ -10740,14 +10730,14 @@ virDomainInputDefParseXML(virDomainXMLOption *xml= opt, ((def->model =3D virDomainInputModelTypeFromString(model)) < 0 || def->model =3D=3D VIR_DOMAIN_INPUT_MODEL_DEFAULT)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown input model '%s'"), model); + _("unknown input model '%1$s'"), model); goto error; } =20 if (bus) { if ((def->bus =3D virDomainInputBusTypeFromString(bus)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown input bus type '%s'"), bus); + _("unknown input bus type '%1$s'"), bus); goto error; } =20 @@ -10857,7 +10847,7 @@ virDomainHubDefParseXML(virDomainXMLOption *xmlopt, =20 if ((def->type =3D virDomainHubTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown hub device type '%s'"), type); + _("unknown hub device type '%1$s'"), type); goto error; } =20 @@ -10960,7 +10950,7 @@ virDomainGraphicsAuthDefParseXML(xmlNodePtr node, /* second */ virStrToLong_i(tmp+1, &tmp, 10, &sec) < 0 || *tmp !=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse password validity time '%s', ex= pect YYYY-MM-DDTHH:MM:SS"), + _("cannot parse password validity time '%1$s', = expect YYYY-MM-DDTHH:MM:SS"), validTo); VIR_FREE(def->passwd); return -1; @@ -10975,7 +10965,7 @@ virDomainGraphicsAuthDefParseXML(xmlNodePtr node, int action =3D virDomainGraphicsAuthConnectedTypeFromString(connec= ted); if (action <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown connected value %s"), + _("unknown connected value %1$s"), connected); return -1; } @@ -11038,8 +11028,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphic= sListenDef *def, if (graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_VNC && graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("listen type 'socket' is not available for " - "graphics type '%s'"), graphicsType); + _("listen type 'socket' is not available for gr= aphics type '%1$s'"), + graphicsType); goto error; } break; @@ -11047,8 +11037,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphic= sListenDef *def, if (graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_SPICE && graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_VNC) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("listen type 'none' is not available for " - "graphics type '%s'"), graphicsType); + _("listen type 'none' is not available for grap= hics type '%1$s'"), + graphicsType); goto error; } break; @@ -11061,9 +11051,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphic= sListenDef *def, if (def->type =3D=3D VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS) { if (address && addressCompat && STRNEQ(address, addressCompat)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("graphics 'listen' attribute '%s' must match " - "'address' attribute of first listen element " - "(found '%s')"), addressCompat, address); + _("graphics 'listen' attribute '%1$s' must matc= h 'address' attribute of first listen element (found '%2$s')"), + addressCompat, address); goto error; } =20 @@ -11074,9 +11063,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphic= sListenDef *def, if (def->type =3D=3D VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET) { if (socketPath && socketCompat && STRNEQ(socketPath, socketCompat)= ) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("graphics 'socket' attribute '%s' must match " - "'socket' attribute of first listen element " - "(found '%s')"), socketCompat, socketPath); + _("graphics 'socket' attribute '%1$s' must matc= h 'socket' attribute of first listen element (found '%2$s')"), + socketCompat, socketPath); goto error; } =20 @@ -11122,7 +11110,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphic= sListenDef *def, flags & VIR_DOMAIN_DEF_PARSE_STATUS) { if (virStringParseYesNo(autoGenerated, &def->autoGenerated) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid autoGenerated value: %s"), + _("Invalid autoGenerated value: %1$s"), autoGenerated); goto error; } @@ -11233,7 +11221,7 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDe= f *def, if (port) { if (virStrToLong_i(port, NULL, 10, &def->data.vnc.port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse vnc port %s"), port); + _("cannot parse vnc port %1$s"), port); return -1; } /* Legacy compat syntax, used -1 for auto-port */ @@ -11336,7 +11324,7 @@ virDomainGraphicsDefParseXMLRDP(virDomainGraphicsDe= f *def, if (port) { if (virStrToLong_i(port, NULL, 10, &def->data.rdp.port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse rdp port %s"), port); + _("cannot parse rdp port %1$s"), port); return -1; } /* Legacy compat syntax, used -1 for auto-port */ @@ -11700,7 +11688,7 @@ virDomainSoundCodecDefParseXML(xmlNodePtr node) type =3D virXMLPropString(node, "type"); if ((def->type =3D virDomainSoundCodecTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown codec type '%s'"), type); + _("unknown codec type '%1$s'"), type); goto error; } =20 @@ -12036,7 +12024,7 @@ virDomainAudioDefParseXML(virDomainXMLOption *xmlop= t G_GNUC_UNUSED, if (dspPolicySet !=3D 0) { if (def->backend.oss.dspPolicy < 0) { virReportError(VIR_ERR_XML_ERROR, - _("cannot parse 'dspPolicy' value '%i'"), + _("cannot parse 'dspPolicy' value '%1$i'"), def->backend.oss.dspPolicy); goto error; } @@ -12120,7 +12108,7 @@ virDomainWatchdogDefParseXML(virDomainXMLOption *xm= lopt, def->model =3D virDomainWatchdogModelTypeFromString(model); if (def->model < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown watchdog model '%s'"), model); + _("unknown watchdog model '%1$s'"), model); goto error; } =20 @@ -12131,7 +12119,7 @@ virDomainWatchdogDefParseXML(virDomainXMLOption *xm= lopt, def->action =3D virDomainWatchdogActionTypeFromString(action); if (def->action < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown watchdog action '%s'"), action); + _("unknown watchdog action '%1$s'"), action); goto error; } } @@ -12169,7 +12157,7 @@ virDomainRNGDefParseXML(virDomainXMLOption *xmlopt, } =20 if ((def->model =3D virDomainRNGModelTypeFromString(model)) < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown RNG model '%= s'"), model); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown RNG model '%= 1$s'"), model); goto error; } =20 @@ -12205,7 +12193,7 @@ virDomainRNGDefParseXML(virDomainXMLOption *xmlopt, =20 if ((def->backend =3D virDomainRNGBackendTypeFromString(backend)) < 0)= { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown RNG backend model '%s'"), backend); + _("unknown RNG backend model '%1$s'"), backend); goto error; } =20 @@ -12227,7 +12215,7 @@ virDomainRNGDefParseXML(virDomainXMLOption *xmlopt, def->source.chardev->type =3D virDomainChrTypeFromString(type); if (def->source.chardev->type < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown backend type '%s' for egd"), + _("unknown backend type '%1$s' for egd"), type); goto error; } @@ -12977,7 +12965,7 @@ virDomainHostdevDefParseXML(virDomainXMLOption *xml= opt, if (mode) { if ((def->mode =3D virDomainHostdevModeTypeFromString(mode)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown hostdev mode '%s'"), mode); + _("unknown hostdev mode '%1$s'"), mode); goto error; } } else { @@ -12997,7 +12985,7 @@ virDomainHostdevDefParseXML(virDomainXMLOption *xml= opt, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected hostdev mode %d"), def->mode); + _("Unexpected hostdev mode %1$d"), def->mode); goto error; } =20 @@ -13055,7 +13043,7 @@ virDomainRedirdevDefParseXML(virDomainXMLOption *xm= lopt, if (bus) { if ((def->bus =3D virDomainRedirdevBusTypeFromString(bus)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown redirdev bus '%s'"), bus); + _("unknown redirdev bus '%1$s'"), bus); goto error; } } else { @@ -13066,7 +13054,7 @@ virDomainRedirdevDefParseXML(virDomainXMLOption *xm= lopt, if (type) { if ((def->source->type =3D virDomainChrTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown redirdev character device type '%s'"= ), type); + _("unknown redirdev character device type '%1$s= '"), type); goto error; } } else { @@ -13139,7 +13127,7 @@ virDomainRedirFilterUSBVersionHelper(const char *ve= rsion, =20 error: virReportError(VIR_ERR_XML_ERROR, - _("Cannot parse USB device version %s"), version); + _("Cannot parse USB device version %1$s"), version); return -1; } =20 @@ -13157,7 +13145,7 @@ virDomainRedirFilterUSBDevDefParseXML(xmlNodePtr no= de) =20 if (def->usbClass !=3D -1 && def->usbClass &~ 0xFF) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid USB Class code 0x%x"), def->usbClass); + _("Invalid USB Class code 0x%1$x"), def->usbClass); return NULL; } =20 @@ -13236,7 +13224,7 @@ virDomainEventActionParseXML(xmlXPathContextPtr ctx= t, *val =3D convFunc(tmp); if (*val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown %s action: %s"), name, tmp); + _("unknown %1$s action: %2$s"), name, tmp); return -1; } } @@ -13272,7 +13260,7 @@ virDomainPerfEventDefParseXML(virDomainPerfDef *per= f, =20 if (perf->events[name] !=3D VIR_TRISTATE_BOOL_ABSENT) { virReportError(VIR_ERR_XML_ERROR, - _("perf event '%s' was already specified"), + _("perf event '%1$s' was already specified"), virPerfEventTypeToString(name)); return -1; } @@ -13325,7 +13313,7 @@ virDomainMemorySourceDefParseXML(xmlNodePtr node, =20 if (virBitmapIsAllClear(def->sourceNodes)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodemask': %s"), nodem= ask); + _("Invalid value of 'nodemask': %1$s"), nod= emask); return -1; } } @@ -13355,7 +13343,7 @@ virDomainMemorySourceDefParseXML(xmlNodePtr node, =20 if (virBitmapIsAllClear(def->sourceNodes)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodemask': %s"), nodem= ask); + _("Invalid value of 'nodemask': %1$s"), nod= emask); return -1; } } @@ -13506,7 +13494,7 @@ virDomainSecDefParseXML(xmlNodePtr lsecNode, case VIR_DOMAIN_LAUNCH_SECURITY_LAST: default: virReportError(VIR_ERR_XML_ERROR, - _("unsupported launch security type '%s'"), + _("unsupported launch security type '%1$s'"), virDomainLaunchSecurityTypeToString(sec->sectype)); return NULL; } @@ -13757,7 +13745,7 @@ virDomainDeviceDefParseType(const char *typestr, =20 if ((tmp =3D virDomainDeviceTypeFromString(typestr)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown device type '%s'"), typestr); + _("unknown device type '%1$s'"), typestr); return -1; } =20 @@ -14494,7 +14482,7 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNet= Def *net) */ if (MACAddrSpecified) { virReportError(VIR_ERR_OPERATION_FAILED, - _("multiple devices matching MAC address %s= found"), + _("multiple devices matching MAC address %1= $s found"), macAddr); } else { virReportError(VIR_ERR_OPERATION_FAILED, "%s", @@ -14521,8 +14509,7 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNet= Def *net) addr =3D g_strdup(_("()")); =20 virReportError(VIR_ERR_DEVICE_MISSING, - _("no device found at address '%s' matching MAC address" - " '%s' and alias '%s'"), + _("no device found at address '%1$s' matching MAC addre= ss '%2$s' and alias '%3$s'"), addr, macAddr, alias); return -1; } @@ -14865,7 +14852,7 @@ virDomainControllerAliasFind(const virDomainDef *de= f, =20 if (!contTypeStr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown controller type %d"), + _("Unknown controller type %1$d"), type); return NULL; } @@ -14873,15 +14860,13 @@ virDomainControllerAliasFind(const virDomainDef *= def, contIndex =3D virDomainControllerFind(def, type, idx); if (contIndex < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find %s controller with index %d " - "required for device"), + _("Could not find %1$s controller with index %2$d r= equired for device"), contTypeStr, idx); return NULL; } if (!def->controllers[contIndex]->info.alias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device alias was not set for %s controller " - "with index %d "), + _("Device alias was not set for %1$s controller wit= h index %2$d"), contTypeStr, idx); return NULL; } @@ -15114,7 +15099,7 @@ virDomainChrGetDomainPtrsInternal(virDomainDef *vmd= ef, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown char device type: %d"), type); + _("Unknown char device type: %1$d"), type); return -1; } =20 @@ -15851,7 +15836,7 @@ virDomainDefParseIOThreads(virDomainDef *def, tmp =3D virXPathString("string(./iothreads[1])", ctxt); if (tmp && virStrToLong_uip(tmp, NULL, 10, &iothreads) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid iothreads count '%s'"), tmp); + _("invalid iothreads count '%1$s'"), tmp); return -1; } =20 @@ -15876,7 +15861,7 @@ virDomainDefParseIOThreads(virDomainDef *def, =20 if (virDomainIOThreadIDFind(def, iothrid->iothread_id)) { virReportError(VIR_ERR_XML_ERROR, - _("duplicate iothread id '%u' found"), + _("duplicate iothread id '%1$u' found"), iothrid->iothread_id); return -1; } @@ -15916,7 +15901,7 @@ virDomainVcpuPinDefParseXML(virDomainDef *def, =20 if (vcpu->cpumask) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("duplicate vcpupin for vcpu '%d'"), vcpuid); + _("duplicate vcpupin for vcpu '%1$d'"), vcpuid); return -1; } =20 @@ -15925,7 +15910,7 @@ virDomainVcpuPinDefParseXML(virDomainDef *def, =20 if (virBitmapIsAllClear(vcpu->cpumask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'cpuset': %s"), tmp); + _("Invalid value of 'cpuset': %1$s"), tmp); return -1; } =20 @@ -15953,7 +15938,7 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node, =20 if (!(iothrid =3D virDomainIOThreadIDFind(def, iothreadid))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot find 'iothread' : %u"), + _("Cannot find 'iothread' : %1$u"), iothreadid); return -1; } @@ -15969,14 +15954,14 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node, =20 if (virBitmapIsAllClear(cpumask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'cpuset': %s"), + _("Invalid value of 'cpuset': %1$s"), tmp); return -1; } =20 if (iothrid->cpumask) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("duplicate iothreadpin for same iothread '%u'"), + _("duplicate iothreadpin for same iothread '%1$u'"), iothreadid); return -1; } @@ -16007,7 +15992,7 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node) =20 if (virBitmapIsAllClear(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'cpuset': %s"), tmp); + _("Invalid value of 'cpuset': %1$s"), tmp); return NULL; } =20 @@ -16159,7 +16144,7 @@ virDomainHugepagesParseXML(xmlNodePtr node, =20 if (virBitmapIsAllClear(hugepage->nodemask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodeset': %s"), nodeset); + _("Invalid value of 'nodeset': %1$s"), nodeset); return -1; } } @@ -16215,7 +16200,7 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def, feature =3D virDomainHypervTypeFromString((const char *)node->name= ); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported HyperV Enlightenment feature: %s= "), + _("unsupported HyperV Enlightenment feature: %1= $s"), node->name); return -1; } @@ -16249,7 +16234,7 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def, while (child) { if (STRNEQ((const char *)child->name, "direct")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported Hyper-V stimer feature: = %s"), + _("unsupported Hyper-V stimer feature: = %1$s"), child->name); return -1; } @@ -16289,7 +16274,7 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def, =20 if (!STRLIM(def->hyperv_vendor_id, VIR_DOMAIN_HYPERV_VENDOR_ID= _MAX)) { virReportError(VIR_ERR_XML_ERROR, - _("HyperV vendor_id value must not be more = than %d characters."), + _("HyperV vendor_id value must not be more = than %1$d characters."), VIR_DOMAIN_HYPERV_VENDOR_ID_MAX); return -1; } @@ -16329,7 +16314,7 @@ virDomainFeaturesKVMDefParse(virDomainDef *def, feature =3D virDomainKVMTypeFromString((const char *)node->name); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported KVM feature: %s"), + _("unsupported KVM feature: %1$s"), node->name); return -1; } @@ -16383,7 +16368,7 @@ virDomainFeaturesXENDefParse(virDomainDef *def, feature =3D virDomainXenTypeFromString((const char *)node->name); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported Xen feature: %s"), + _("unsupported Xen feature: %1$s"), node->name); return -1; } @@ -16440,7 +16425,7 @@ virDomainFeaturesCapabilitiesDefParse(virDomainDef = *def, int val =3D virDomainProcessCapsFeatureTypeFromString((const char = *)node->name); if (val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected capability feature '%s'"), node->= name); + _("unexpected capability feature '%1$s'"), node= ->name); return -1; } =20 @@ -16498,7 +16483,7 @@ virDomainFeaturesDefParse(virDomainDef *def, int val =3D virDomainFeatureTypeFromString((const char *)nodes[i]-= >name); if (val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected feature '%s'"), nodes[i]->name); + _("unexpected feature '%1$s'"), nodes[i]->name); return -1; } =20 @@ -16772,7 +16757,7 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef = *loader, if (format !=3D VIR_STORAGE_FILE_RAW && format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_XML_ERROR, - _("Unsupported nvram format '%s'"), + _("Unsupported nvram format '%1$s'"), virStorageFileFormatTypeToString(format)); return -1; } @@ -16861,7 +16846,7 @@ virDomainLoaderDefParseXMLLoader(virDomainLoaderDef= *loader, if (format !=3D VIR_STORAGE_FILE_RAW && format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_XML_ERROR, - _("Unsupported loader format '%s'"), + _("Unsupported loader format '%1$s'"), virStorageFileFormatTypeToString(format)); return -1; } @@ -16891,7 +16876,7 @@ virDomainLoaderDefParseXML(virDomainLoaderDef *load= er, =20 if (loader->nvram && loader->format !=3D loader->nvram->format) { virReportError(VIR_ERR_XML_ERROR, - _("Format mismatch: loader.format=3D'%s' nvram.form= at=3D'%s'"), + _("Format mismatch: loader.format=3D'%1$s' nvram.fo= rmat=3D'%2$s'"), virStorageFileFormatTypeToString(loader->format), virStorageFileFormatTypeToString(loader->nvram->for= mat)); return -1; @@ -16951,7 +16936,7 @@ virDomainSchedulerParse(xmlNodePtr node, =20 if (!(tmp =3D virXMLPropString(node, attributeName))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing attribute '%s' in element '%s'"), + _("Missing attribute '%1$s' in element '%2$s'"), attributeName, elementName); return NULL; } @@ -16961,7 +16946,7 @@ virDomainSchedulerParse(xmlNodePtr node, =20 if (virBitmapIsAllClear(ret)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' scheduler bitmap '%s' is empty"), + _("'%1$s' scheduler bitmap '%2$s' is empty"), attributeName, tmp); return NULL; } @@ -16996,7 +16981,7 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, =20 if (sched->policy !=3D VIR_PROC_POLICY_NONE) { virReportError(VIR_ERR_XML_DETAIL, - _("'%s' attributes '%s' must not overlap"), + _("'%1$s' attributes '%2$s' must not overlap"), elementName, attributeName); return -1; } @@ -17029,7 +17014,7 @@ virDomainDefGetIOThreadSched(virDomainDef *def, =20 if (!(iothrinfo =3D virDomainIOThreadIDFind(def, iothread))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot find 'iothread' : %u"), + _("Cannot find 'iothread' : %1$u"), iothread); return NULL; } @@ -17093,7 +17078,7 @@ virDomainVcpuParse(virDomainDef *def, =20 if (virBitmapIsAllClear(def->cpumask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'cpuset': %s"), tmp= ); + _("Invalid value of 'cpuset': %1$s"), t= mp); return -1; } =20 @@ -17122,8 +17107,8 @@ virDomainVcpuParse(virDomainDef *def, =20 if (id >=3D def->maxvcpus) { virReportError(VIR_ERR_XML_ERROR, - _("vcpu id '%u' is out of range of maximum " - "vcpu count"), id); + _("vcpu id '%1$u' is out of range of maximu= m vcpu count"), + id); return -1; } =20 @@ -17198,7 +17183,7 @@ virDomainDefParseBootInitOptions(virDomainDef *def, if (!nodes[i]->children || !nodes[i]->children->content) { virReportError(VIR_ERR_XML_ERROR, - _("No value supplied for = element"), + _("No value supplied for element"), name); return -1; } @@ -17269,7 +17254,7 @@ virDomainDefParseBootFirmwareOptions(virDomainDef *= def, =20 if (fw <=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown firmware value %s"), + _("unknown firmware value %1$s"), firmware); return -1; } @@ -17338,7 +17323,7 @@ virDomainDefParseBootAcpiOptions(virDomainDef *def, def->os.slic_table =3D virFileSanitizePath(tmp); } else { virReportError(VIR_ERR_XML_ERROR, - _("Unknown acpi table type: %s"), + _("Unknown acpi table type: %1$s"), tmp); return -1; } @@ -17415,13 +17400,13 @@ virDomainResctrlParseVcpus(virDomainDef *def, =20 vcpus_str =3D virXMLPropString(node, "vcpus"); if (!vcpus_str) { - virReportError(VIR_ERR_XML_ERROR, _("Missing %s attribute 'vcpus'"= ), + virReportError(VIR_ERR_XML_ERROR, _("Missing %1$s attribute 'vcpus= '"), node->name); return -1; } if (virBitmapParse(vcpus_str, vcpus, VIR_DOMAIN_CPUMASK_LEN) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid %s attribute 'vcpus' value '%s'"), + _("Invalid %1$s attribute 'vcpus' value '%2$s'"), node->name, vcpus_str); return -1; } @@ -17612,7 +17597,7 @@ virDomainResctrlMonDefParse(virDomainDef *def, =20 if (level !=3D VIR_DOMAIN_RESCTRL_MONITOR_CACHELEVEL) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid monitor cache level '%d'"), + _("Invalid monitor cache level '%1$d'"), level); goto cleanup; } @@ -17867,7 +17852,7 @@ virDomainDefParseCaps(virDomainDef *def, } if ((def->virtType =3D virDomainVirtTypeFromString(virttype)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid domain type %s"), virttype); + _("invalid domain type %1$s"), virttype); return -1; } =20 @@ -17882,7 +17867,7 @@ virDomainDefParseCaps(virDomainDef *def, } else { if ((def->os.type =3D virDomainOSTypeFromString(ostype)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown OS type '%s'"), ostype); + _("unknown OS type '%1$s'"), ostype); return -1; } } @@ -17899,7 +17884,7 @@ virDomainDefParseCaps(virDomainDef *def, =20 if (arch && !(def->os.arch =3D virArchFromString(arch))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown architecture %s"), arch); + _("Unknown architecture %1$s"), arch); return -1; } =20 @@ -17954,7 +17939,7 @@ virDomainDefParseMemory(virDomainDef *def, if (tmp) { if ((def->mem.source =3D virDomainMemorySourceTypeFromString(tmp))= <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown memoryBacking/source/type '%s'"), tm= p); + _("unknown memoryBacking/source/type '%1$s'"), = tmp); return -1; } VIR_FREE(tmp); @@ -17964,7 +17949,7 @@ virDomainDefParseMemory(virDomainDef *def, if (tmp) { if ((def->mem.access =3D virDomainMemoryAccessTypeFromString(tmp))= <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown memoryBacking/access/mode '%s'"), tm= p); + _("unknown memoryBacking/access/mode '%1$s'"), = tmp); return -1; } VIR_FREE(tmp); @@ -17974,7 +17959,7 @@ virDomainDefParseMemory(virDomainDef *def, if (tmp) { if ((def->mem.allocation =3D virDomainMemoryAllocationTypeFromStri= ng(tmp)) <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown memoryBacking/allocation/mode '%s'")= , tmp); + _("unknown memoryBacking/allocation/mode '%1$s'= "), tmp); return -1; } VIR_FREE(tmp); @@ -18422,7 +18407,7 @@ virDomainDefClockParse(virDomainDef *def, if ((tmp =3D virXPathString("string(./clock/@offset)", ctxt)) && (def->clock.offset =3D virDomainClockOffsetTypeFromString(tmp)) < = 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown clock offset '%s'"), tmp); + _("unknown clock offset '%1$s'"), tmp); return -1; } VIR_FREE(tmp); @@ -18438,7 +18423,7 @@ virDomainDefClockParse(virDomainDef *def, if (virStrToLong_ll(tmp, NULL, 10, &def->clock.data.variable.adjustment) = < 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown clock adjustment '%s'"), + _("unknown clock adjustment '%1$s'"), tmp); return -1; } @@ -18469,7 +18454,7 @@ virDomainDefClockParse(virDomainDef *def, if (tmp) { if ((def->clock.data.variable.basis =3D virDomainClockBasisTyp= eFromString(tmp)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown clock basis '%s'"), tmp); + _("unknown clock basis '%1$s'"), tmp); return -1; } VIR_FREE(tmp); @@ -19317,7 +19302,7 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt, =20 if ((mode =3D virDomainSmbiosModeTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown smbios mode '%s'"), tmp); + _("unknown smbios mode '%1$s'"), tmp); return NULL; } def->os.smbios_mode =3D mode; @@ -19387,7 +19372,7 @@ virDomainObjParseXML(xmlXPathContextPtr ctxt, if ((tmp =3D virXMLPropString(ctxt->node, "reason"))) { if ((reason =3D virDomainStateReasonFromString(state, tmp)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid domain state reason '%s'"), tmp); + _("invalid domain state reason '%1$s'"), tmp); return NULL; } } @@ -19531,7 +19516,7 @@ virDomainTimerDefCheckABIStability(virDomainTimerDe= f *src, { if (src->name !=3D dst->name) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target timer %s does not match source %s"), + _("Target timer %1$s does not match source %2$s"), virDomainTimerNameTypeToString(dst->name), virDomainTimerNameTypeToString(src->name)); return false; @@ -19539,7 +19524,7 @@ virDomainTimerDefCheckABIStability(virDomainTimerDe= f *src, =20 if (src->present !=3D dst->present) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target timer presence '%s' does not match source= '%s'"), + _("Target timer presence '%1$s' does not match sour= ce '%2$s'"), virTristateBoolTypeToString(dst->present), virTristateBoolTypeToString(src->present)); return false; @@ -19548,14 +19533,14 @@ virDomainTimerDefCheckABIStability(virDomainTimer= Def *src, if (src->name =3D=3D VIR_DOMAIN_TIMER_NAME_TSC) { if (src->frequency !=3D dst->frequency) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target TSC frequency %llu does not match sou= rce %llu"), + _("Target TSC frequency %1$llu does not match s= ource %2$llu"), dst->frequency, src->frequency); return false; } =20 if (src->mode !=3D dst->mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target TSC mode %s does not match source %s"= ), + _("Target TSC mode %1$s does not match source %= 2$s"), virDomainTimerModeTypeToString(dst->mode), virDomainTimerModeTypeToString(src->mode)); return false; @@ -19572,7 +19557,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, { if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device address type %s does not match sou= rce %s"), + _("Target device address type %1$s does not match s= ource %2$s"), virDomainDeviceAddressTypeToString(dst->type), virDomainDeviceAddressTypeToString(src->type)); return false; @@ -19585,8 +19570,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, src->addr.pci.slot !=3D dst->addr.pci.slot || src->addr.pci.function !=3D dst->addr.pci.function) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device PCI address " VIR_PCI_DEVICE_A= DDRESS_FMT - "does not match source " VIR_PCI_DEVICE_ADDRE= SS_FMT), + _("Target device PCI address %1$04x:%2$02x:%3$0= 2x.%4$d does not match source %5$04x:%6$02x:%7$02x.%8$d"), dst->addr.pci.domain, dst->addr.pci.bus, dst->addr.pci.slot, dst->addr.pci.function, src->addr.pci.domain, src->addr.pci.bus, @@ -19600,8 +19584,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, src->addr.drive.bus !=3D dst->addr.drive.bus || src->addr.drive.unit !=3D dst->addr.drive.unit) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device drive address %d:%d:%d " - "does not match source %d:%d:%d"), + _("Target device drive address %1$d:%2$d:%3$d d= oes not match source %4$d:%5$d:%6$d"), dst->addr.drive.controller, dst->addr.drive.bus, dst->addr.drive.unit, src->addr.drive.controller, src->addr.drive.bus, @@ -19615,8 +19598,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, src->addr.vioserial.bus !=3D dst->addr.vioserial.bus || src->addr.vioserial.port !=3D dst->addr.vioserial.port) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device virtio serial address %d:%d:%d= " - "does not match source %d:%d:%d"), + _("Target device virtio serial address %1$d:%2$= d:%3$d does not match source %4$d:%5$d:%6$d"), dst->addr.vioserial.controller, dst->addr.viose= rial.bus, dst->addr.vioserial.port, src->addr.vioserial.controller, src->addr.viose= rial.bus, @@ -19629,8 +19611,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, if (src->addr.ccid.controller !=3D dst->addr.ccid.controller || src->addr.ccid.slot !=3D dst->addr.ccid.slot) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device ccid address %d:%d " - "does not match source %d:%d"), + _("Target device ccid address %1$d:%2$d does no= t match source %3$d:%4$d"), dst->addr.ccid.controller, dst->addr.ccid.slot, src->addr.ccid.controller, @@ -19643,8 +19624,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, if (src->addr.isa.iobase !=3D dst->addr.isa.iobase || src->addr.isa.irq !=3D dst->addr.isa.irq) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device isa address %d:%d " - "does not match source %d:%d"), + _("Target device isa address %1$d:%2$d does not= match source %3$d:%4$d"), dst->addr.isa.iobase, dst->addr.isa.irq, src->addr.isa.iobase, @@ -19656,8 +19636,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM: if (src->addr.dimm.slot !=3D dst->addr.dimm.slot) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device dimm slot %u does not match " - "source %u"), + _("Target device dimm slot %1$u does not match = source %2$u"), dst->addr.dimm.slot, src->addr.dimm.slot); return false; @@ -19665,8 +19644,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, =20 if (src->addr.dimm.base !=3D dst->addr.dimm.base) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device dimm base address '%llx' does " - "not match source '%llx'"), + _("Target device dimm base address '%1$llx' doe= s not match source '%2$llx'"), dst->addr.dimm.base, src->addr.dimm.base); return false; @@ -19686,7 +19664,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfo *src, =20 if (src->acpiIndex !=3D dst->acpiIndex) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target ACPI index '%u' does not match source '%u= '"), + _("Target ACPI index '%1$u' does not match source '= %2$u'"), dst->acpiIndex, src->acpiIndex); return false; } @@ -19710,32 +19688,28 @@ virDomainVirtioOptionsCheckABIStability(virDomain= VirtioOptions *src, =20 if (src->iommu !=3D dst->iommu) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device iommu option '%s' does not " - "match source '%s'"), + _("Target device iommu option '%1$s' does not match= source '%2$s'"), virTristateSwitchTypeToString(dst->iommu), virTristateSwitchTypeToString(src->iommu)); return false; } if (src->ats !=3D dst->ats) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device ats option '%s' does not " - "match source '%s'"), + _("Target device ats option '%1$s' does not match s= ource '%2$s'"), virTristateSwitchTypeToString(dst->ats), virTristateSwitchTypeToString(src->ats)); return false; } if (src->packed !=3D dst->packed) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device packed option '%s' does not " - "match source '%s'"), + _("Target device packed option '%1$s' does not matc= h source '%2$s'"), virTristateSwitchTypeToString(dst->packed), virTristateSwitchTypeToString(src->packed)); return false; } if (src->page_per_vq !=3D dst->page_per_vq) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target device page_per_vq option '%s' does not " - "match source '%s'"), + _("Target device page_per_vq option '%1$s' does not= match source '%2$s'"), virTristateSwitchTypeToString(dst->page_per_vq), virTristateSwitchTypeToString(src->page_per_vq)); return false; @@ -19750,7 +19724,7 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef = *src, { if (src->device !=3D dst->device) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk device %s does not match source %s"), + _("Target disk device %1$s does not match source %2= $s"), virDomainDiskDeviceTypeToString(dst->device), virDomainDiskDeviceTypeToString(src->device)); return false; @@ -19758,7 +19732,7 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef = *src, =20 if (src->bus !=3D dst->bus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk bus %s does not match source %s"), + _("Target disk bus %1$s does not match source %2$s"= ), virDomainDiskBusTypeToString(dst->bus), virDomainDiskBusTypeToString(src->bus)); return false; @@ -19766,21 +19740,21 @@ virDomainDiskDefCheckABIStability(virDomainDiskDe= f *src, =20 if (STRNEQ(src->dst, dst->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk %s does not match source %s"), + _("Target disk %1$s does not match source %2$s"), dst->dst, src->dst); return false; } =20 if (STRNEQ_NULLABLE(src->serial, dst->serial)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk serial %s does not match source %s"), + _("Target disk serial %1$s does not match source %2= $s"), NULLSTR(dst->serial), NULLSTR(src->serial)); return false; } =20 if (STRNEQ_NULLABLE(src->wwn, dst->wwn)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk wwn '%s' does not match source '%s'"= ), + _("Target disk wwn '%1$s' does not match source '%2= $s'"), NULLSTR(dst->wwn), NULLSTR(src->wwn)); return false; =20 @@ -19794,7 +19768,7 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef = *src, =20 if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk model %s does not match source %s"), + _("Target disk model %1$s does not match source %2$= s"), virDomainDiskModelTypeToString(dst->model), virDomainDiskModelTypeToString(src->model)); return false; @@ -19802,21 +19776,21 @@ virDomainDiskDefCheckABIStability(virDomainDiskDe= f *src, =20 if (src->rotation_rate !=3D dst->rotation_rate) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk rotation rate %u RPM does not match = source %u RPM"), + _("Target disk rotation rate %1$u RPM does not matc= h source %2$u RPM"), dst->rotation_rate, src->rotation_rate); return false; } =20 if (src->queues !=3D dst->queues) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk queue count %u does not match source= %u"), + _("Target disk queue count %1$u does not match sour= ce %2$u"), dst->queues, src->queues); return false; } =20 if (src->queue_size !=3D dst->queue_size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target disk queue size %u does not match source = %u"), + _("Target disk queue size %1$u does not match sourc= e %2$u"), dst->queues, src->queues); return false; } @@ -19837,7 +19811,7 @@ virDomainControllerDefCheckABIStability(virDomainCo= ntrollerDef *src, { if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller type %s does not match source = %s"), + _("Target controller type %1$s does not match sourc= e %2$s"), virDomainControllerTypeToString(dst->type), virDomainControllerTypeToString(src->type)); return false; @@ -19845,14 +19819,14 @@ virDomainControllerDefCheckABIStability(virDomain= ControllerDef *src, =20 if (src->idx !=3D dst->idx) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller index %d does not match source= %d"), + _("Target controller index %1$d does not match sour= ce %2$d"), dst->idx, src->idx); return false; } =20 if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller model %d does not match source= %d"), + _("Target controller model %1$d does not match sour= ce %2$d"), dst->model, src->model); return false; } @@ -19860,21 +19834,21 @@ virDomainControllerDefCheckABIStability(virDomain= ControllerDef *src, if (src->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) { if (src->opts.vioserial.ports !=3D dst->opts.vioserial.ports) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller ports %d does not match so= urce %d"), + _("Target controller ports %1$d does not match = source %2$d"), dst->opts.vioserial.ports, src->opts.vioserial.= ports); return false; } =20 if (src->opts.vioserial.vectors !=3D dst->opts.vioserial.vectors) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller vectors %d does not match = source %d"), + _("Target controller vectors %1$d does not matc= h source %2$d"), dst->opts.vioserial.vectors, src->opts.vioseria= l.vectors); return false; } } else if (src->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) { if (src->opts.usbopts.ports !=3D dst->opts.usbopts.ports) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target controller ports %d does not match so= urce %d"), + _("Target controller ports %1$d does not match = source %2$d"), dst->opts.usbopts.ports, src->opts.usbopts.port= s); return false; } @@ -19896,7 +19870,7 @@ virDomainFsDefCheckABIStability(virDomainFSDef *src, { if (STRNEQ_NULLABLE(src->dst, dst->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target filesystem guest target %s does not match= source %s"), + _("Target filesystem guest target %1$s does not mat= ch source %2$s"), dst->dst, src->dst); return false; } @@ -19946,8 +19920,7 @@ virDomainNetDefCheckABIStability(virDomainNetDef *s= rc, =20 if (virMacAddrCmp(&src->mac, &dst->mac) !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target network card mac %s" - " does not match source %s"), + _("Target network card mac %1$s does not match sour= ce %2$s"), virMacAddrFormat(&dst->mac, dstmac), virMacAddrFormat(&src->mac, srcmac)); return false; @@ -19955,14 +19928,14 @@ virDomainNetDefCheckABIStability(virDomainNetDef = *src, =20 if (STRNEQ_NULLABLE(src->modelstr, dst->modelstr)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target network card model %s does not match sour= ce %s"), + _("Target network card model %1$s does not match so= urce %2$s"), NULLSTR(dst->modelstr), NULLSTR(src->modelstr)); return false; } =20 if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target network card model %s does not match sour= ce %s"), + _("Target network card model %1$s does not match so= urce %2$s"), virDomainNetModelTypeToString(dst->model), virDomainNetModelTypeToString(src->model)); return false; @@ -19970,7 +19943,7 @@ virDomainNetDefCheckABIStability(virDomainNetDef *s= rc, =20 if (src->mtu !=3D dst->mtu) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target network card MTU %d does not match source= %d"), + _("Target network card MTU %1$d does not match sour= ce %2$d"), dst->mtu, src->mtu); return false; } @@ -19991,7 +19964,7 @@ virDomainInputDefCheckABIStability(virDomainInputDe= f *src, { if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target input device type %s does not match sourc= e %s"), + _("Target input device type %1$s does not match sou= rce %2$s"), virDomainInputTypeToString(dst->type), virDomainInputTypeToString(src->type)); return false; @@ -19999,7 +19972,7 @@ virDomainInputDefCheckABIStability(virDomainInputDe= f *src, =20 if (src->bus !=3D dst->bus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target input device bus %s does not match source= %s"), + _("Target input device bus %1$s does not match sour= ce %2$s"), virDomainInputBusTypeToString(dst->bus), virDomainInputBusTypeToString(src->bus)); return false; @@ -20007,7 +19980,7 @@ virDomainInputDefCheckABIStability(virDomainInputDe= f *src, =20 if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target input model %s does not match source %s"), + _("Target input model %1$s does not match source %2= $s"), virDomainInputBusTypeToString(dst->model), virDomainInputBusTypeToString(src->model)); return false; @@ -20029,7 +20002,7 @@ virDomainSoundDefCheckABIStability(virDomainSoundDe= f *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target sound card model %s does not match source= %s"), + _("Target sound card model %1$s does not match sour= ce %2$s"), virDomainSoundModelTypeToString(dst->model), virDomainSoundModelTypeToString(src->model)); return false; @@ -20048,7 +20021,7 @@ virDomainVideoDefCheckABIStability(virDomainVideoDe= f *src, { if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card model %s does not match source= %s"), + _("Target video card model %1$s does not match sour= ce %2$s"), virDomainVideoTypeToString(dst->type), virDomainVideoTypeToString(src->type)); return false; @@ -20056,35 +20029,35 @@ virDomainVideoDefCheckABIStability(virDomainVideo= Def *src, =20 if (src->ram !=3D dst->ram) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card ram %u does not match source %= u"), + _("Target video card ram %1$u does not match source= %2$u"), dst->ram, src->ram); return false; } =20 if (src->vram !=3D dst->vram) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card vram %u does not match source = %u"), + _("Target video card vram %1$u does not match sourc= e %2$u"), dst->vram, src->vram); return false; } =20 if (src->vram64 !=3D dst->vram64) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card vram64 %u does not match sourc= e %u"), + _("Target video card vram64 %1$u does not match sou= rce %2$u"), dst->vram64, src->vram64); return false; } =20 if (src->vgamem !=3D dst->vgamem) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card vgamem %u does not match sourc= e %u"), + _("Target video card vgamem %1$u does not match sou= rce %2$u"), dst->vgamem, src->vgamem); return false; } =20 if (src->heads !=3D dst->heads) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card heads %u does not match source= %u"), + _("Target video card heads %1$u does not match sour= ce %2$u"), dst->heads, src->heads); return false; } @@ -20099,14 +20072,14 @@ virDomainVideoDefCheckABIStability(virDomainVideo= Def *src, if (src->accel) { if (src->accel->accel2d !=3D dst->accel->accel2d) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card 2d accel %u does not match= source %u"), + _("Target video card 2d accel %1$u does not mat= ch source %2$u"), dst->accel->accel2d, src->accel->accel2d); return false; } =20 if (src->accel->accel3d !=3D dst->accel->accel3d) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target video card 3d accel %u does not match= source %u"), + _("Target video card 3d accel %1$u does not mat= ch source %2$u"), dst->accel->accel3d, src->accel->accel3d); return false; } @@ -20128,7 +20101,7 @@ virDomainHostdevDefCheckABIStability(virDomainHostd= evDef *src, { if (src->mode !=3D dst->mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target host device mode %s does not match source= %s"), + _("Target host device mode %1$s does not match sour= ce %2$s"), virDomainHostdevModeTypeToString(dst->mode), virDomainHostdevModeTypeToString(src->mode)); return false; @@ -20137,7 +20110,7 @@ virDomainHostdevDefCheckABIStability(virDomainHostd= evDef *src, if (src->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && src->source.subsys.type !=3D dst->source.subsys.type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target host device subsystem %s does not match s= ource %s"), + _("Target host device subsystem %1$s does not match= source %2$s"), virDomainHostdevSubsysTypeToString(dst->source.subs= ys.type), virDomainHostdevSubsysTypeToString(src->source.subs= ys.type)); return false; @@ -20167,7 +20140,7 @@ virDomainSerialDefCheckABIStability(virDomainChrDef= *src, { if (src->targetType !=3D dst->targetType) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target serial type %s does not match source %s"), + _("Target serial type %1$s does not match source %2= $s"), virDomainChrSerialTargetTypeToString(dst->targetTyp= e), virDomainChrSerialTargetTypeToString(src->targetTyp= e)); return false; @@ -20175,7 +20148,7 @@ virDomainSerialDefCheckABIStability(virDomainChrDef= *src, =20 if (src->targetModel !=3D dst->targetModel) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target serial model %s does not match source %s"= ), + _("Target serial model %1$s does not match source %= 2$s"), virDomainChrSerialTargetModelTypeToString(dst->targ= etModel), virDomainChrSerialTargetModelTypeToString(src->targ= etModel)); return false; @@ -20183,7 +20156,7 @@ virDomainSerialDefCheckABIStability(virDomainChrDef= *src, =20 if (src->target.port !=3D dst->target.port) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target serial port %d does not match source %d"), + _("Target serial port %1$d does not match source %2= $d"), dst->target.port, src->target.port); return false; } @@ -20201,7 +20174,7 @@ virDomainParallelDefCheckABIStability(virDomainChrD= ef *src, { if (src->target.port !=3D dst->target.port) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target parallel port %d does not match source %d= "), + _("Target parallel port %1$d does not match source = %2$d"), dst->target.port, src->target.port); return false; } @@ -20219,7 +20192,7 @@ virDomainChannelDefCheckABIStability(virDomainChrDe= f *src, { if (src->targetType !=3D dst->targetType) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target channel type %s does not match source %s"= ), + _("Target channel type %1$s does not match source %= 2$s"), virDomainChrChannelTargetTypeToString(dst->targetTy= pe), virDomainChrChannelTargetTypeToString(src->targetTy= pe)); return false; @@ -20231,7 +20204,7 @@ virDomainChannelDefCheckABIStability(virDomainChrDe= f *src, case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO: if (STRNEQ_NULLABLE(src->target.name, dst->target.name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target channel name %s does not match source= %s"), + _("Target channel name %1$s does not match sour= ce %2$s"), NULLSTR(dst->target.name), NULLSTR(src->target.= name)); return false; } @@ -20251,7 +20224,7 @@ virDomainChannelDefCheckABIStability(virDomainChrDe= f *src, g_autofree char *saddr =3D virSocketAddrFormatFull(src->target= .addr, true, ":"); g_autofree char *daddr =3D virSocketAddrFormatFull(dst->target= .addr, true, ":"); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target channel addr %s does not match source= %s"), + _("Target channel addr %1$s does not match sour= ce %2$s"), NULLSTR(daddr), NULLSTR(saddr)); return false; } @@ -20271,7 +20244,7 @@ virDomainConsoleDefCheckABIStability(virDomainChrDe= f *src, { if (src->targetType !=3D dst->targetType) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target console type %s does not match source %s"= ), + _("Target console type %1$s does not match source %= 2$s"), virDomainChrConsoleTargetTypeToString(dst->targetTy= pe), virDomainChrConsoleTargetTypeToString(src->targetTy= pe)); return false; @@ -20290,7 +20263,7 @@ virDomainWatchdogDefCheckABIStability(virDomainWatc= hdogDef *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target watchdog model %s does not match source %= s"), + _("Target watchdog model %1$s does not match source= %2$s"), virDomainWatchdogModelTypeToString(dst->model), virDomainWatchdogModelTypeToString(src->model)); return false; @@ -20309,7 +20282,7 @@ virDomainMemballoonDefCheckABIStability(virDomainMe= mballoonDef *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target balloon model %s does not match source %s= "), + _("Target balloon model %1$s does not match source = %2$s"), virDomainMemballoonModelTypeToString(dst->model), virDomainMemballoonModelTypeToString(src->model)); return false; @@ -20317,8 +20290,7 @@ virDomainMemballoonDefCheckABIStability(virDomainMe= mballoonDef *src, =20 if (src->autodeflate !=3D dst->autodeflate) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target balloon autodeflate attribute value " - "'%s' does not match source '%s'"), + _("Target balloon autodeflate attribute value '%1$s= ' does not match source '%2$s'"), virTristateSwitchTypeToString(dst->autodeflate), virTristateSwitchTypeToString(src->autodeflate)); return false; @@ -20326,8 +20298,7 @@ virDomainMemballoonDefCheckABIStability(virDomainMe= mballoonDef *src, =20 if (src->free_page_reporting !=3D dst->free_page_reporting) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target balloon freePageReporting attribute value= " - "'%s' does not match source '%s'"), + _("Target balloon freePageReporting attribute value= '%1$s' does not match source '%2$s'"), virTristateSwitchTypeToString(dst->free_page_report= ing), virTristateSwitchTypeToString(src->free_page_report= ing)); return false; @@ -20349,7 +20320,7 @@ virDomainRNGDefCheckABIStability(virDomainRNGDef *s= rc, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target RNG model '%s' does not match source '%s'= "), + _("Target RNG model '%1$s' does not match source '%= 2$s'"), virDomainRNGModelTypeToString(dst->model), virDomainRNGModelTypeToString(src->model)); return false; @@ -20371,7 +20342,7 @@ virDomainHubDefCheckABIStability(virDomainHubDef *s= rc, { if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target hub device type %s does not match source = %s"), + _("Target hub device type %1$s does not match sourc= e %2$s"), virDomainHubTypeToString(dst->type), virDomainHubTypeToString(src->type)); return false; @@ -20390,8 +20361,7 @@ virDomainRedirdevDefCheckABIStability(virDomainRedi= rdevDef *src, { if (src->bus !=3D dst->bus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target redirected device bus %s does not match " - "source %s"), + _("Target redirected device bus %1$s does not match= source %2$s"), virDomainRedirdevBusTypeToString(dst->bus), virDomainRedirdevBusTypeToString(src->bus)); return false; @@ -20401,8 +20371,7 @@ virDomainRedirdevDefCheckABIStability(virDomainRedi= rdevDef *src, case VIR_DOMAIN_REDIRDEV_BUS_USB: if (src->source->type !=3D dst->source->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target redirected device source type %s does= " - "not match source device source type %s"), + _("Target redirected device source type %1$s do= es not match source device source type %2$s"), virDomainChrTypeToString(dst->source->type), virDomainChrTypeToString(src->source->type)); return false; @@ -20427,8 +20396,7 @@ virDomainRedirFilterDefCheckABIStability(virDomainR= edirFilterDef *src, =20 if (src->nusbdevs !=3D dst->nusbdevs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target USB redirection filter rule " - "count %zu does not match source %zu"), + _("Target USB redirection filter rule count %1$zu d= oes not match source %2$zu"), dst->nusbdevs, src->nusbdevs); return false; } @@ -20462,7 +20430,7 @@ virDomainRedirFilterDefCheckABIStability(virDomainR= edirFilterDef *src, =20 if (srcUSBDev->allow !=3D dstUSBDev->allow) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target USB allow '%s' does not match source = '%s'"), + _("Target USB allow '%1$s' does not match sourc= e '%2$s'"), dstUSBDev->allow ? "yes" : "no", srcUSBDev->allow ? "yes" : "no"); return false; @@ -20501,8 +20469,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_CCF_ASSIST: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s', destination: '%s'"), + _("State of feature '%1$s' differs: source:= '%2$s', destination: '%3$s'"), featureName, virTristateSwitchTypeToString(src->features= [i]), virTristateSwitchTypeToString(dst->features= [i])); @@ -20513,8 +20480,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_CAPABILITIES: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s=3D%s', destination: '%s=3D%s= '"), + _("State of feature '%1$s' differs: source:= '%2$s=3D%3$s', destination: '%4$s=3D%5$s'"), featureName, "policy", virDomainCapabilitiesPolicyTypeToString(src= ->features[i]), @@ -20528,8 +20494,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, if (src->features[i] !=3D dst->features[i] || src->gic_version !=3D dst->gic_version) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s,%s=3D%s', destination: '%s,%= s=3D%s'"), + _("State of feature '%1$s' differs: source:= '%2$s,%3$s=3D%4$s', destination: '%5$s,%6$s=3D%7$s'"), featureName, virTristateSwitchTypeToString(src->features= [i]), "version", virGICVersionTypeToString(src->g= ic_version), @@ -20544,8 +20509,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, src->hpt_resizing !=3D dst->hpt_resizing || src->hpt_maxpagesize !=3D dst->hpt_maxpagesize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s,%s=3D%s,%s=3D%llu', destinat= ion: '%s,%s=3D%s,%s=3D%llu'"), + _("State of feature '%1$s' differs: source:= '%2$s,%3$s=3D%4$s,%5$s=3D%6$llu', destination: '%7$s,%8$s=3D%9$s,%10$s=3D%= 11$llu'"), featureName, virTristateSwitchTypeToString(src->features= [i]), "resizing", virDomainHPTResizingTypeToStrin= g(src->hpt_resizing), @@ -20561,8 +20525,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, if (src->features[i] !=3D dst->features[i] || src->apic_eoi !=3D dst->apic_eoi) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s,%s=3D%s', destination: '%s,%= s=3D%s'"), + _("State of feature '%1$s' differs: source:= '%2$s,%3$s=3D%4$s', destination: '%5$s,%6$s=3D%7$s'"), featureName, virTristateSwitchTypeToString(src->features= [i]), "eoi", virTristateSwitchTypeToString(src->a= pic_eoi), @@ -20575,8 +20538,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_IOAPIC: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s=3D%s', destination: '%s=3D%s= '"), + _("State of feature '%1$s' differs: source:= '%2$s=3D%3$s', destination: '%4$s=3D%5$s'"), featureName, "driver", virDomainIOAPICTypeToString(src->= features[i]), "driver", virDomainIOAPICTypeToString(dst->= features[i])); @@ -20587,8 +20549,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_CFPC: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s=3D%s', destination: '%s=3D%s= '"), + _("State of feature '%1$s' differs: source:= '%2$s=3D%3$s', destination: '%4$s=3D%5$s'"), featureName, "value", virDomainCFPCTypeToString(src->fea= tures[i]), "value", virDomainCFPCTypeToString(dst->fea= tures[i])); @@ -20599,8 +20560,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_SBBC: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s=3D%s', destination: '%s=3D%s= '"), + _("State of feature '%1$s' differs: source:= '%2$s=3D%3$s', destination: '%4$s=3D%5$s'"), featureName, "value", virDomainSBBCTypeToString(src->fea= tures[i]), "value", virDomainSBBCTypeToString(dst->fea= tures[i])); @@ -20611,8 +20571,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_FEATURE_IBS: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of feature '%s' differs: " - "source: '%s=3D%s', destination: '%s=3D%s= '"), + _("State of feature '%1$s' differs: source:= '%2$s=3D%3$s', destination: '%4$s=3D%5$s'"), featureName, "value", virDomainIBSTypeToString(src->feat= ures[i]), "value", virDomainIBSTypeToString(dst->feat= ures[i])); @@ -20646,9 +20605,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_HYPERV_AVIC: if (src->hyperv_features[i] !=3D dst->hyperv_features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of HyperV enlightenment " - "feature '%s' differs: " - "source: '%s', destination: '%s'"), + _("State of HyperV enlightenment featur= e '%1$s' differs: source: '%2$s', destination: '%3$s'"), virDomainHypervTypeToString(i), virTristateSwitchTypeToString(src->hype= rv_features[i]), virTristateSwitchTypeToString(dst->hype= rv_features[i])); @@ -20661,8 +20618,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, /* spinlock count matters! */ if (src->hyperv_spinlocks !=3D dst->hyperv_spinlocks) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("HyperV spinlock retry count differs:= " - "source: '%u', destination: '%u'"), + _("HyperV spinlock retry count differs:= source: '%1$u', destination: '%2$u'"), src->hyperv_spinlocks, dst->hyperv_spinlocks); return false; @@ -20672,8 +20628,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_HYPERV_VENDOR_ID: if (STRNEQ_NULLABLE(src->hyperv_vendor_id, dst->hyperv_ven= dor_id)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("HyperV vendor_id differs: " - "source: '%s', destination: '%s'"), + _("HyperV vendor_id differs: source: '%= 1$s', destination: '%2$s'"), src->hyperv_vendor_id, dst->hyperv_vendor_id); return false; @@ -20689,8 +20644,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, if (src->hyperv_features[VIR_DOMAIN_HYPERV_STIMER] =3D=3D VIR_TRISTATE= _SWITCH_ON) { if (src->hyperv_stimer_direct !=3D dst->hyperv_stimer_direct) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of HyperV stimer direct feature differ= s: " - "source: '%s', destination: '%s'"), + _("State of HyperV stimer direct feature differ= s: source: '%1$s', destination: '%2$s'"), virTristateSwitchTypeToString(src->hyperv_stime= r_direct), virTristateSwitchTypeToString(dst->hyperv_stime= r_direct)); return false; @@ -20702,8 +20656,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, for (i =3D 0; i < VIR_DOMAIN_XEN_LAST; i++) { if (src->xen_features[i] !=3D dst->xen_features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of Xen feature '%s' differs: " - "source: '%s', destination: '%s'"), + _("State of Xen feature '%1$s' differs: sou= rce: '%2$s', destination: '%3$s'"), virDomainXenTypeToString(i), virTristateSwitchTypeToString(src->xen_feat= ures[i]), virTristateSwitchTypeToString(dst->xen_feat= ures[i])); @@ -20716,8 +20669,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_XEN_PASSTHROUGH: if (src->xen_passthrough_mode !=3D dst->xen_passthrough_mo= de) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'mode' of Xen passthrough feature di= ffers: " - "source: '%s', destination: '%s'"), + _("'mode' of Xen passthrough feature di= ffers: source: '%1$s', destination: '%2$s'"), virDomainXenPassthroughModeTypeToString= (src->xen_passthrough_mode), virDomainXenPassthroughModeTypeToString= (dst->xen_passthrough_mode)); return false; @@ -20741,8 +20693,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_KVM_DIRTY_RING: if (src->kvm_features->features[i] !=3D dst->kvm_features-= >features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of KVM feature '%s' differs: " - "source: '%s', destination: '%s'"), + _("State of KVM feature '%1$s' differs:= source: '%2$s', destination: '%3$s'"), virDomainKVMTypeToString(i), virTristateSwitchTypeToString(src->kvm_= features->features[i]), virTristateSwitchTypeToString(dst->kvm_= features->features[i])); @@ -20758,8 +20709,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, =20 if (src->kvm_features->dirty_ring_size !=3D dst->kvm_features->dir= ty_ring_size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("dirty ring size of KVM feature '%s' differs:= " - "source: '%d', destination: '%d'"), + _("dirty ring size of KVM feature '%1$s' differ= s: source: '%2$d', destination: '%3$d'"), virDomainKVMTypeToString(i), src->kvm_features->dirty_ring_size, dst->kvm_features->dirty_ring_size); @@ -20771,7 +20721,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, if (src->features[VIR_DOMAIN_FEATURE_SMM] =3D=3D VIR_TRISTATE_SWITCH_O= N) { if (src->tseg_specified !=3D dst->tseg_specified) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("SMM TSEG differs: source: %s, destination: '= %s'"), + _("SMM TSEG differs: source: %1$s, destination:= '%2$s'"), src->tseg_specified ? _("specified") : _("not s= pecified"), dst->tseg_specified ? _("specified") : _("not s= pecified")); return false; @@ -20786,8 +20736,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, &unit_d= st); =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Size of SMM TSEG size differs: " - "source: '%llu %s', destination: '%llu %s'"), + _("Size of SMM TSEG size differs: source: '%1$l= lu %2$s', destination: '%3$llu %4$s'"), short_size_src, unit_src, short_size_dst, unit_dst); return false; @@ -20803,7 +20752,7 @@ virDomainPanicDefCheckABIStability(virDomainPanicDe= f *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target panic model '%s' does not match source '%= s'"), + _("Target panic model '%1$s' does not match source = '%2$s'"), virDomainPanicModelTypeToString(dst->model), virDomainPanicModelTypeToString(src->model)); return false; @@ -20819,8 +20768,7 @@ virDomainShmemDefCheckABIStability(virDomainShmemDe= f *src, { if (src->role !=3D dst->role) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target shared memory role '%s' does not match " - "source role '%s'"), + _("Target shared memory role '%1$s' does not match = source role '%2$s'"), virDomainShmemRoleTypeToString(dst->role), virDomainShmemRoleTypeToString(src->role)); return false; @@ -20828,8 +20776,7 @@ virDomainShmemDefCheckABIStability(virDomainShmemDe= f *src, =20 if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target shared memory model '%s' does not match " - "source model '%s'"), + _("Target shared memory model '%1$s' does not match= source model '%2$s'"), virDomainShmemModelTypeToString(dst->model), virDomainShmemModelTypeToString(src->model)); return false; @@ -20837,8 +20784,8 @@ virDomainShmemDefCheckABIStability(virDomainShmemDe= f *src, =20 if (src->size !=3D dst->size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target shared memory size '%llu' does not match " - "source size '%llu'"), dst->size, src->size); + _("Target shared memory size '%1$llu' does not matc= h source size '%2$llu'"), + dst->size, src->size); return false; } =20 @@ -20911,8 +20858,7 @@ virDomainMemtuneCheckABIStability(const virDomainDe= f *src, { if (virDomainDefGetMemoryInitial(src) !=3D virDomainDefGetMemoryInitia= l(dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain max memory %lld " - "does not match source %lld"), + _("Target domain max memory %1$lld does not match s= ource %2$lld"), virDomainDefGetMemoryInitial(dst), virDomainDefGetMemoryInitial(src)); return false; @@ -20921,8 +20867,7 @@ virDomainMemtuneCheckABIStability(const virDomainDe= f *src, if (!(flags & VIR_DOMAIN_DEF_ABI_CHECK_SKIP_VOLATILE) && src->mem.cur_balloon !=3D dst->mem.cur_balloon) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain current memory %lld " - "does not match source %lld"), + _("Target domain current memory %1$lld does not mat= ch source %2$lld"), dst->mem.cur_balloon, src->mem.cur_balloon); return false; @@ -20930,8 +20875,7 @@ virDomainMemtuneCheckABIStability(const virDomainDe= f *src, =20 if (src->mem.max_memory !=3D dst->mem.max_memory) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target maximum memory size '%llu' " - "doesn't match source '%llu'"), + _("Target maximum memory size '%1$llu' doesn't matc= h source '%2$llu'"), dst->mem.max_memory, src->mem.max_memory); return false; @@ -20939,8 +20883,7 @@ virDomainMemtuneCheckABIStability(const virDomainDe= f *src, =20 if (src->mem.memory_slots !=3D dst->mem.memory_slots) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain memory slots " - "count '%u' doesn't match source '%u'"), + _("Target domain memory slots count '%1$u' doesn't = match source '%2$u'"), dst->mem.memory_slots, src->mem.memory_slots); return false; @@ -20956,8 +20899,7 @@ virDomainMemoryDefCheckABIStability(virDomainMemory= Def *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device model '%s' " - "doesn't match source model '%s'"), + _("Target memory device model '%1$s' doesn't match = source model '%2$s'"), virDomainMemoryModelTypeToString(dst->model), virDomainMemoryModelTypeToString(src->model)); return false; @@ -20965,32 +20907,28 @@ virDomainMemoryDefCheckABIStability(virDomainMemo= ryDef *src, =20 if (src->targetNode !=3D dst->targetNode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device targetNode '%d' " - "doesn't match source targetNode '%d'"), + _("Target memory device targetNode '%1$d' doesn't m= atch source targetNode '%2$d'"), dst->targetNode, src->targetNode); return false; } =20 if (src->size !=3D dst->size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device size '%llu' doesn't match " - "source memory device size '%llu'"), + _("Target memory device size '%1$llu' doesn't match= source memory device size '%2$llu'"), dst->size, src->size); return false; } =20 if (src->blocksize !=3D dst->blocksize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device block size '%llu' doesn't m= atch " - "source memory device block size '%llu'"), + _("Target memory device block size '%1$llu' doesn't= match source memory device block size '%2$llu'"), dst->blocksize, src->blocksize); return false; } =20 if (src->requestedsize !=3D dst->requestedsize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device requested size '%llu' doesn= 't match " - "source memory device requested size '%llu'"), + _("Target memory device requested size '%1$llu' doe= sn't match source memory device requested size '%2$llu'"), dst->requestedsize, src->requestedsize); return false; } @@ -20998,16 +20936,14 @@ virDomainMemoryDefCheckABIStability(virDomainMemo= ryDef *src, if (src->model =3D=3D VIR_DOMAIN_MEMORY_MODEL_NVDIMM) { if (src->labelsize !=3D dst->labelsize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NVDIMM label size '%llu' doesn't matc= h " - "source NVDIMM label size '%llu'"), + _("Target NVDIMM label size '%1$llu' doesn't ma= tch source NVDIMM label size '%2$llu'"), src->labelsize, dst->labelsize); return false; } =20 if (src->alignsize !=3D dst->alignsize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NVDIMM alignment '%llu' doesn't match= " - "source NVDIMM alignment '%llu'"), + _("Target NVDIMM alignment '%1$llu' doesn't mat= ch source NVDIMM alignment '%2$llu'"), src->alignsize, dst->alignsize); return false; } @@ -21045,48 +20981,42 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMU= Def *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device model '%s' " - "does not match source '%s'"), + _("Target domain IOMMU device model '%1$s' does not= match source '%2$s'"), virDomainIOMMUModelTypeToString(dst->model), virDomainIOMMUModelTypeToString(src->model)); return false; } if (src->intremap !=3D dst->intremap) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device intremap value '%s' " - "does not match source '%s'"), + _("Target domain IOMMU device intremap value '%1$s'= does not match source '%2$s'"), virTristateSwitchTypeToString(dst->intremap), virTristateSwitchTypeToString(src->intremap)); return false; } if (src->caching_mode !=3D dst->caching_mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device caching mode '%s' " - "does not match source '%s'"), + _("Target domain IOMMU device caching mode '%1$s' d= oes not match source '%2$s'"), virTristateSwitchTypeToString(dst->caching_mode), virTristateSwitchTypeToString(src->caching_mode)); return false; } if (src->eim !=3D dst->eim) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device eim value '%s' " - "does not match source '%s'"), + _("Target domain IOMMU device eim value '%1$s' does= not match source '%2$s'"), virTristateSwitchTypeToString(dst->eim), virTristateSwitchTypeToString(src->eim)); return false; } if (src->iotlb !=3D dst->iotlb) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device iotlb value '%s' " - "does not match source '%s'"), + _("Target domain IOMMU device iotlb value '%1$s' do= es not match source '%2$s'"), virTristateSwitchTypeToString(dst->iotlb), virTristateSwitchTypeToString(src->iotlb)); return false; } if (src->aw_bits !=3D dst->aw_bits) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain IOMMU device aw_bits value '%d' " - "does not match source '%d'"), + _("Target domain IOMMU device aw_bits value '%1$d' = does not match source '%2$d'"), dst->aw_bits, src->aw_bits); return false; } @@ -21101,8 +21031,7 @@ virDomainVsockDefCheckABIStability(virDomainVsockDe= f *src, { if (src->model !=3D dst->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain vsock device model '%s' " - "does not match source '%s'"), + _("Target domain vsock device model '%1$s' does not= match source '%2$s'"), virDomainVsockModelTypeToString(dst->model), virDomainVsockModelTypeToString(src->model)); return false; @@ -21126,7 +21055,7 @@ virDomainDefVcpuCheckAbiStability(virDomainDef *src, =20 if (src->maxvcpus !=3D dst->maxvcpus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain vCPU max %zu does not match source= %zu"), + _("Target domain vCPU max %1$zu does not match sour= ce %2$zu"), dst->maxvcpus, src->maxvcpus); return false; } @@ -21137,15 +21066,15 @@ virDomainDefVcpuCheckAbiStability(virDomainDef *s= rc, =20 if (svcpu->online !=3D dvcpu->online) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of vCPU '%zu' differs between source a= nd " - "destination definitions"), i); + _("State of vCPU '%1$zu' differs between source= and destination definitions"), + i); return false; } =20 if (svcpu->order !=3D dvcpu->order) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu enable order of vCPU '%zu' differs betw= een " - "source and destination definitions"), i); + _("vcpu enable order of vCPU '%1$zu' differs be= tween source and destination definitions"), + i); return false; } } @@ -21171,7 +21100,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->virtType !=3D dst->virtType) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain virt type %s does not match source= %s"), + _("Target domain virt type %1$s does not match sour= ce %2$s"), virDomainVirtTypeToString(dst->virtType), virDomainVirtTypeToString(src->virtType)); goto error; @@ -21183,7 +21112,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, virUUIDFormat(src->uuid, uuidsrc); virUUIDFormat(dst->uuid, uuiddst); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain uuid %s does not match source %s"), + _("Target domain uuid %1$s does not match source %2= $s"), uuiddst, uuidsrc); goto error; } @@ -21202,7 +21131,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, virUUIDFormat(src->genid, guidsrc); virUUIDFormat(dst->genid, guiddst); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain genid %s does not match source %s"= ), + _("Target domain genid %1$s does not match source %= 2$s"), guiddst, guidsrc); goto error; } @@ -21213,7 +21142,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, */ if (STRNEQ_NULLABLE(src->name, dst->name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain name '%s' does not match source '%= s'"), + _("Target domain name '%1$s' does not match source = '%2$s'"), dst->name, src->name); goto error; } @@ -21229,28 +21158,28 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *= src, =20 if (src->os.type !=3D dst->os.type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain OS type %s does not match source %= s"), + _("Target domain OS type %1$s does not match source= %2$s"), virDomainOSTypeToString(dst->os.type), virDomainOSTypeToString(src->os.type)); goto error; } if (src->os.arch !=3D dst->os.arch) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain architecture %s does not match sou= rce %s"), + _("Target domain architecture %1$s does not match s= ource %2$s"), virArchToString(dst->os.arch), virArchToString(src->os.arch)); goto error; } if (STRNEQ_NULLABLE(src->os.machine, dst->os.machine)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain machine type %s does not match source= %s"), + _("Target domain machine type %1$s does not match sour= ce %2$s"), dst->os.machine, src->os.machine); goto error; } =20 if (src->os.smbios_mode !=3D dst->os.smbios_mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain SMBIOS mode %s does not match sour= ce %s"), + _("Target domain SMBIOS mode %1$s does not match so= urce %2$s"), virDomainSmbiosModeTypeToString(dst->os.smbios_mode= ), virDomainSmbiosModeTypeToString(src->os.smbios_mode= )); goto error; @@ -21287,7 +21216,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->ndisks !=3D dst->ndisks) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain disk count %zu does not match sour= ce %zu"), + _("Target domain disk count %1$zu does not match so= urce %2$zu"), dst->ndisks, src->ndisks); goto error; } @@ -21298,8 +21227,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->ncontrollers !=3D dst->ncontrollers) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain controller count %zu " - "does not match source %zu"), + _("Target domain controller count %1$zu does not ma= tch source %2$zu"), dst->ncontrollers, src->ncontrollers); goto error; } @@ -21311,8 +21239,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nfss !=3D dst->nfss) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain filesystem count %zu " - "does not match source %zu"), + _("Target domain filesystem count %1$zu does not ma= tch source %2$zu"), dst->nfss, src->nfss); goto error; } @@ -21323,8 +21250,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nnets !=3D dst->nnets) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain net card count %zu " - "does not match source %zu"), + _("Target domain net card count %1$zu does not matc= h source %2$zu"), dst->nnets, src->nnets); goto error; } @@ -21335,8 +21261,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->ninputs !=3D dst->ninputs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain input device count %zu " - "does not match source %zu"), + _("Target domain input device count %1$zu does not = match source %2$zu"), dst->ninputs, src->ninputs); goto error; } @@ -21347,8 +21272,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nsounds !=3D dst->nsounds) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain sound card count %zu " - "does not match source %zu"), + _("Target domain sound card count %1$zu does not ma= tch source %2$zu"), dst->nsounds, src->nsounds); goto error; } @@ -21359,8 +21283,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nvideos !=3D dst->nvideos) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain video card count %zu " - "does not match source %zu"), + _("Target domain video card count %1$zu does not ma= tch source %2$zu"), dst->nvideos, src->nvideos); goto error; } @@ -21371,8 +21294,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nhostdevs !=3D dst->nhostdevs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain host device count %zu " - "does not match source %zu"), + _("Target domain host device count %1$zu does not m= atch source %2$zu"), dst->nhostdevs, src->nhostdevs); goto error; } @@ -21384,8 +21306,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nsmartcards !=3D dst->nsmartcards) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain smartcard count %zu " - "does not match source %zu"), + _("Target domain smartcard count %1$zu does not mat= ch source %2$zu"), dst->nsmartcards, src->nsmartcards); goto error; } @@ -21397,8 +21318,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nserials !=3D dst->nserials) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain serial port count %zu " - "does not match source %zu"), + _("Target domain serial port count %1$zu does not m= atch source %2$zu"), dst->nserials, src->nserials); goto error; } @@ -21410,8 +21330,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nparallels !=3D dst->nparallels) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain parallel port count %zu " - "does not match source %zu"), + _("Target domain parallel port count %1$zu does not= match source %2$zu"), dst->nparallels, src->nparallels); goto error; } @@ -21423,8 +21342,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nchannels !=3D dst->nchannels) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain channel count %zu " - "does not match source %zu"), + _("Target domain channel count %1$zu does not match= source %2$zu"), dst->nchannels, src->nchannels); goto error; } @@ -21436,8 +21354,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nconsoles !=3D dst->nconsoles) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain console count %zu " - "does not match source %zu"), + _("Target domain console count %1$zu does not match= source %2$zu"), dst->nconsoles, src->nconsoles); goto error; } @@ -21449,8 +21366,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nhubs !=3D dst->nhubs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain hub device count %zu " - "does not match source %zu"), + _("Target domain hub device count %1$zu does not ma= tch source %2$zu"), dst->nhubs, src->nhubs); goto error; } @@ -21461,8 +21377,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nredirdevs !=3D dst->nredirdevs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain redirected devices count %zu " - "does not match source %zu"), + _("Target domain redirected devices count %1$zu doe= s not match source %2$zu"), dst->nredirdevs, src->nredirdevs); goto error; } @@ -21476,8 +21391,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, if ((!src->redirfilter && dst->redirfilter) || (src->redirfilter && !dst->redirfilter)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain USB redirection filter count %d " - "does not match source %d"), + _("Target domain USB redirection filter count %1$d = does not match source %2$d"), dst->redirfilter ? 1 : 0, src->redirfilter ? 1 : 0); goto error; } @@ -21490,7 +21404,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nwatchdogs !=3D dst->nwatchdogs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain watchdog device count %zu does not= match source %zu"), + _("Target domain watchdog device count %1$zu does n= ot match source %2$zu"), dst->nwatchdogs, src->nwatchdogs); goto error; } @@ -21503,8 +21417,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, if ((!src->memballoon && dst->memballoon) || (src->memballoon && !dst->memballoon)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain memory balloon count %d " - "does not match source %d"), + _("Target domain memory balloon count %1$d does not= match source %2$d"), dst->memballoon ? 1 : 0, src->memballoon ? 1 : 0); goto error; } @@ -21516,8 +21429,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nrngs !=3D dst->nrngs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain RNG device count %zu " - "does not match source %zu"), dst->nrngs, src->nr= ngs); + _("Target domain RNG device count %1$zu does not ma= tch source %2$zu"), + dst->nrngs, src->nrngs); goto error; } =20 @@ -21527,8 +21440,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->npanics !=3D dst->npanics) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain panic device count %zu " - "does not match source %zu"), dst->npanics, src->= npanics); + _("Target domain panic device count %1$zu does not = match source %2$zu"), + dst->npanics, src->npanics); goto error; } =20 @@ -21539,8 +21452,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nshmems !=3D dst->nshmems) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain shared memory device count %zu " - "does not match source %zu"), dst->nshmems, src->= nshmems); + _("Target domain shared memory device count %1$zu d= oes not match source %2$zu"), + dst->nshmems, src->nshmems); goto error; } =20 @@ -21551,8 +21464,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->ntpms !=3D dst->ntpms) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain TPM device count %zu " - "does not match source %zu"), + _("Target domain TPM device count %1$zu does not ma= tch source %2$zu"), dst->ntpms, src->ntpms); goto error; } @@ -21564,8 +21476,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDef *sr= c, =20 if (src->nmems !=3D dst->nmems) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target domain memory device count %zu " - "does not match source %zu"), dst->nmems, src->nm= ems); + _("Target domain memory device count %1$zu does not= match source %2$zu"), + dst->nmems, src->nmems); goto error; } =20 @@ -21912,7 +21824,7 @@ virDomainEventActionDefFormat(virBuffer *buf, const char *typeStr =3D convFunc(type); if (!typeStr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected %s action: %d"), name, type); + _("unexpected %1$s action: %2$d"), name, type); return -1; } =20 @@ -22331,7 +22243,7 @@ virDomainDiskSourceFormat(virBuffer *buf, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk type %d"), src->type); + _("unexpected disk type %1$d"), src->type); return -1; } =20 @@ -22399,7 +22311,7 @@ virDomainDiskBackingStoreFormat(virBuffer *buf, =20 if (backingStore->format <=3D 0 || backingStore->format >=3D VIR_STORA= GE_FILE_LAST) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk backing store format %d"), + _("unexpected disk backing store format %1$d"), backingStore->format); return -1; } @@ -22661,22 +22573,22 @@ virDomainDiskDefFormat(virBuffer *buf, =20 if (!type || !def->src->type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk type %d"), def->src->type); + _("unexpected disk type %1$d"), def->src->type); return -1; } if (!device) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk device %d"), def->device); + _("unexpected disk device %1$d"), def->device); return -1; } if (!bus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk bus %d"), def->bus); + _("unexpected disk bus %1$d"), def->bus); return -1; } if (!sgio) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected disk sgio mode '%d'"), def->sgio); + _("Unexpected disk sgio mode '%1$d'"), def->sgio); return -1; } =20 @@ -22851,7 +22763,7 @@ virDomainControllerDefFormatPCI(virBuffer *buf, const char *modelName =3D virDomainControllerPCIModelNameTypeToStr= ing(def->opts.pciopts.modelName); if (!modelName) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected model name value %d"), + _("unexpected model name value %1$d"), def->opts.pciopts.modelName); return -1; } @@ -22893,7 +22805,7 @@ virDomainControllerDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected controller type %d"), def->type); + _("unexpected controller type %1$d"), def->type); return -1; } =20 @@ -22902,7 +22814,7 @@ virDomainControllerDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected model type %d"), def->model); + _("unexpected model type %1$d"), def->model); return -1; } } @@ -23008,19 +22920,19 @@ virDomainFSDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected filesystem type %d"), def->type); + _("unexpected filesystem type %1$d"), def->type); return -1; } =20 if (!accessmode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected accessmode %d"), def->accessmode); + _("unexpected accessmode %1$d"), def->accessmode); return -1; } =20 if (!multidevs) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected multidevs %d"), def->multidevs); + _("unexpected multidevs %1$d"), def->multidevs); return -1; } =20 @@ -23263,7 +23175,7 @@ virDomainHostdevDefFormatSubsysPCI(virBuffer *buf, =20 if (!backend) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected pci hostdev driver name type %d"), + _("unexpected pci hostdev driver name type %1$d= "), pcisrc->backend); return -1; } @@ -23430,7 +23342,7 @@ virDomainHostdevDefFormatCaps(virBuffer *buf, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), + _("unexpected hostdev type %1$d"), def->source.caps.type); return -1; } @@ -23509,7 +23421,7 @@ virDomainActualNetDefContentsFormat(virBuffer *buf, mode =3D virNetDevMacVLanModeTypeToString(virDomainNetGetActua= lDirectMode(def)); if (!mode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected source mode %d"), + _("unexpected source mode %1$d"), virDomainNetGetActualDirectMode(def)); return -1; } @@ -23556,7 +23468,7 @@ virDomainActualNetDefFormat(virBuffer *buf, =20 if (!typeStr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected net type %d"), def->type); + _("unexpected net type %1$d"), def->type); return -1; } =20 @@ -23841,7 +23753,7 @@ virDomainNetDefFormat(virBuffer *buf, if (publicActual) { if (!(typeStr =3D virDomainNetTypeToString(actualType))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected actual net type %d"), actualType); + _("unexpected actual net type %1$d"), actualTyp= e); return -1; } if (actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) @@ -23849,7 +23761,7 @@ virDomainNetDefFormat(virBuffer *buf, } else { if (!(typeStr =3D virDomainNetTypeToString(def->type))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected net type %d"), def->type); + _("unexpected net type %1$d"), def->type); return -1; } if (def->type =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) @@ -24129,7 +24041,7 @@ virDomainChrAttrsDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected char type %d"), def->type); + _("unexpected char type %1$d"), def->type); return -1; } =20 @@ -24386,7 +24298,7 @@ virDomainChrTargetDefFormat(virBuffer *buf, =20 case VIR_DOMAIN_CHR_DEVICE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected char device type %d"), + _("unexpected char device type %1$d"), def->deviceType); return -1; } @@ -24404,7 +24316,7 @@ virDomainChrDefFormat(virBuffer *buf, =20 if (!elementName) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected char device type %d"), + _("unexpected char device type %1$d"), def->deviceType); return -1; } @@ -24445,7 +24357,7 @@ virDomainSmartcardDefFormat(virBuffer *buf, =20 if (!mode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected smartcard type %d"), def->type); + _("unexpected smartcard type %1$d"), def->type); return -1; } =20 @@ -24492,7 +24404,7 @@ virDomainSoundCodecDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected codec type %d"), def->type); + _("unexpected codec type %1$d"), def->type); return -1; } =20 @@ -24603,7 +24515,7 @@ virDomainSoundDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected sound model %d"), def->model); + _("unexpected sound model %1$d"), def->model); return -1; } =20 @@ -24754,7 +24666,7 @@ virDomainAudioDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected audio type %d"), def->type); + _("unexpected audio type %1$d"), def->type); return -1; } =20 @@ -24851,7 +24763,7 @@ virDomainMemballoonDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected memballoon model %d"), def->model); + _("unexpected memballoon model %1$d"), def->model); return -1; } =20 @@ -24904,13 +24816,13 @@ virDomainWatchdogDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected watchdog model %d"), def->model); + _("unexpected watchdog model %1$d"), def->model); return -1; } =20 if (!action) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected watchdog action %d"), def->action); + _("unexpected watchdog action %1$d"), def->action); return -1; } =20 @@ -25261,7 +25173,7 @@ virDomainVideoDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected video model %d"), def->type); + _("unexpected video model %1$d"), def->type); return -1; } =20 @@ -25342,12 +25254,12 @@ virDomainInputDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected input type %d"), def->type); + _("unexpected input type %1$d"), def->type); return -1; } if (!bus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected input bus type %d"), def->bus); + _("unexpected input bus type %1$d"), def->bus); return -1; } =20 @@ -25360,7 +25272,7 @@ virDomainInputDefFormat(virBuffer *buf, =20 if (!model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected input model %d"), def->model); + _("unexpected input model %1$d"), def->model); return -1; } =20 @@ -25609,7 +25521,7 @@ virDomainGraphicsDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected net type %d"), def->type); + _("unexpected net type %1$d"), def->type); return -1; } =20 @@ -25964,7 +25876,7 @@ virDomainHostdevDefFormat(virBuffer *buf, =20 if (!mode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev mode %d"), def->mode); + _("unexpected hostdev mode %1$d"), def->mode); return -1; } =20 @@ -25973,7 +25885,7 @@ virDomainHostdevDefFormat(virBuffer *buf, type =3D virDomainHostdevSubsysTypeToString(def->source.subsys.typ= e); if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), + _("unexpected hostdev type %1$d"), def->source.subsys.type); return -1; } @@ -25982,14 +25894,14 @@ virDomainHostdevDefFormat(virBuffer *buf, type =3D virDomainHostdevCapsTypeToString(def->source.caps.type); if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), + _("unexpected hostdev type %1$d"), def->source.caps.type); return -1; } break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev mode %d"), def->mode); + _("unexpected hostdev mode %1$d"), def->mode); return -1; } =20 @@ -26130,7 +26042,7 @@ virDomainHubDefFormat(virBuffer *buf, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hub type %d"), def->type); + _("unexpected hub type %1$d"), def->type); return -1; } =20 @@ -27037,7 +26949,7 @@ virDomainDefFormatFeatures(virBuffer *buf, case VIR_TRISTATE_SWITCH_LAST: case VIR_TRISTATE_SWITCH_OFF: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected state of feature '%s'"), name); + _("Unexpected state of feature '%1$s'"), name= ); return -1; break; } @@ -27391,7 +27303,7 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, =20 if (!(type =3D virDomainVirtTypeToString(def->virtType))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain type %d"), def->virtType); + _("unexpected domain type %1$d"), def->virtType); return -1; } =20 @@ -27560,7 +27472,7 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, virDomainBootTypeToString(def->os.bootDevs[n]); if (!boottype) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected boot device type %d"), + _("unexpected boot device type %1$d"), def->os.bootDevs[n]); return -1; } @@ -27593,7 +27505,7 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, mode =3D virDomainSmbiosModeTypeToString(def->os.smbios_mode); if (mode =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected smbios mode %d"), def->os.smbios_= mode); + _("unexpected smbios mode %1$d"), def->os.smbio= s_mode); return -1; } virBufferAsprintf(buf, "\n", mode); @@ -27956,7 +27868,7 @@ virDomainDeviceInfoCheckBootIndex(virDomainDef *def= G_GNUC_UNUSED, =20 if (info->bootIndex =3D=3D data->newInfo->bootIndex) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("boot order %u is already used by another device"= ), + _("boot order %1$u is already used by another devic= e"), data->newInfo->bootIndex); return -1; } @@ -28030,8 +27942,7 @@ virDomainDefCompatibleDevice(virDomainDef *def, if (action =3D=3D VIR_DOMAIN_DEVICE_ACTION_ATTACH && (virDomainDefGetMemoryTotal(def) + sz) > def->mem.max_memory) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Attaching memory device with size '%llu' wou= ld " - "exceed domain's maxMemory config size '%llu'= "), + _("Attaching memory device with size '%1$llu' w= ould exceed domain's maxMemory config size '%2$llu'"), sz, def->mem.max_memory); return -1; } @@ -28056,7 +27967,7 @@ virDomainDefSaveXML(virDomainDef *def, =20 if (g_mkdir_with_parents(configDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory '%s'"), + _("cannot create config directory '%1$s'"), configDir); return -1; } @@ -28121,7 +28032,7 @@ virDomainDeleteConfig(const char *configDir, if (unlink(configFile) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("cannot remove config %s"), + _("cannot remove config %1$s"), configFile); return -1; } @@ -28517,7 +28428,7 @@ virDomainObjSetState(virDomainObj *dom, virDomainSt= ate state, int reason) break; case VIR_DOMAIN_LAST: default: - VIR_ERROR(_("invalid domain state: %d"), state); + VIR_ERROR(_("invalid domain state: %1$d"), state); return; } =20 @@ -28899,7 +28810,7 @@ virDomainNetFind(virDomainDef *def, const char *dev= ice) } =20 virReportError(VIR_ERR_INVALID_ARG, - _("'%s' is not a known interface"), device); + _("'%1$s' is not a known interface"), device); return NULL; } =20 @@ -29001,7 +28912,7 @@ virDomainDefFindDevice(virDomainDef *def, if (dev->type =3D=3D VIR_DOMAIN_DEVICE_NONE) { if (reportError) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no device found with alias %s"), devAlias); + _("no device found with alias %1$s"), devAlias); } else { VIR_DEBUG("no device found with alias %s", devAlias); } @@ -29207,7 +29118,7 @@ virDomainObjGetMetadata(virDomainObj *vm, =20 if (type >=3D VIR_DOMAIN_METADATA_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown metadata type '%d'"), type); + _("unknown metadata type '%1$d'"), type); return NULL; } =20 @@ -29256,7 +29167,7 @@ virDomainDefSetMetadata(virDomainDef *def, =20 if (type >=3D VIR_DOMAIN_METADATA_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown metadata type '%d'"), type); + _("unknown metadata type '%1$d'"), type); return -1; } =20 @@ -29380,7 +29291,7 @@ virDomainDiskDefCheckDuplicateInfo(const virDomainD= iskDef *a, { if (STREQ(a->dst, b->dst)) { virReportError(VIR_ERR_XML_ERROR, - _("target '%s' duplicated for disk sources '%s' and= '%s'"), + _("target '%1$s' duplicated for disk sources '%2$s'= and '%3$s'"), a->dst, NULLSTR(virDomainDiskGetSource(a)), NULLSTR(virDomainDiskGetSource(b))); @@ -29599,7 +29510,7 @@ virDomainNetDefToNetworkPort(virDomainDef *dom, =20 if (iface->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expected an interface of type 'network' not '%s'= "), + _("Expected an interface of type 'network' not '%1$= s'"), virDomainNetTypeToString(iface->type)); return NULL; } @@ -29641,7 +29552,7 @@ virDomainNetDefActualFromNetworkPort(virDomainNetDe= f *iface, =20 if (iface->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expected an interface of type 'network' not '%s'= "), + _("Expected an interface of type 'network' not '%1$= s'"), virDomainNetTypeToString(iface->type)); return -1; } @@ -29749,7 +29660,7 @@ virDomainNetDefActualToNetworkPort(virDomainDef *do= m, =20 if (!iface->data.network.actual) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing actual data for interface '%s'"), + _("Missing actual data for interface '%1$s'"), iface->ifname); return NULL; } @@ -29758,7 +29669,7 @@ virDomainNetDefActualToNetworkPort(virDomainDef *do= m, =20 if (iface->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expected an interface of type 'network' not '%s'= "), + _("Expected an interface of type 'network' not '%1$= s'"), virDomainNetTypeToString(iface->type)); return NULL; } @@ -29804,7 +29715,7 @@ virDomainNetDefActualToNetworkPort(virDomainDef *do= m, if (actual->data.hostdev.def.mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUB= SYS || actual->data.hostdev.def.source.subsys.type !=3D VIR_DOMAIN_HO= STDEV_SUBSYS_TYPE_PCI) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Actual interface '%s' hostdev was not a PCI = device"), + _("Actual interface '%1$s' hostdev was not a PC= I device"), iface->ifname); return NULL; } @@ -29849,7 +29760,7 @@ virDomainNetDefActualToNetworkPort(virDomainDef *do= m, case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unexpected network port type %s"), + _("Unexpected network port type %1$s"), virDomainNetTypeToString(virDomainNetGetActualType(= iface))); return NULL; =20 @@ -30204,7 +30115,7 @@ virDomainDiskAddISCSIPoolSourceHost(virStorageSourc= e *src, =20 if (g_strv_length(tokens) !=3D 4) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected iscsi volume name '%s'"), + _("unexpected iscsi volume name '%1$s'"), src->srcpool->volume); return -1; } @@ -30290,8 +30201,7 @@ virDomainStorageSourceTranslateSourcePool(virStorag= eSource *src, =20 if (virStoragePoolIsActive(pool) !=3D 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("storage pool '%s' containing volume '%s' " - "is not active"), + _("storage pool '%1$s' containing volume '%2$s' is = not active"), src->srcpool->pool, src->srcpool->volume); return -1; } @@ -30356,8 +30266,7 @@ virDomainStorageSourceTranslateSourcePool(virStorag= eSource *src, case VIR_STORAGE_VOL_NETWORK: case VIR_STORAGE_VOL_NETDIR: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected storage volume type '%s' " - "for storage pool type '%s'"), + _("unexpected storage volume type '%1$s' for st= orage pool type '%2$s'"), virStorageVolTypeToString(info.type), virStoragePoolTypeToString(pooldef->type)); return -1; @@ -30396,8 +30305,7 @@ virDomainStorageSourceTranslateSourcePool(virStorag= eSource *src, case VIR_STORAGE_POOL_GLUSTER: case VIR_STORAGE_POOL_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("using '%s' pools for backing 'volume' disks " - "isn't yet supported"), + _("using '%1$s' pools for backing 'volume' disks is= n't yet supported"), virStoragePoolTypeToString(pooldef->type)); return -1; } @@ -30811,7 +30719,7 @@ virDomainObjGetMessages(virDomainObj *vm, for (i =3D 0; i < VIR_DOMAIN_TAINT_LAST; i++) { if (vm->taint & (1 << i)) { (*msgs)[n++] =3D g_strdup_printf( - _("tainted: %s"), + _("tainted: %1$s"), _(virDomainTaintMessageTypeToString(i))); } } @@ -30823,7 +30731,7 @@ virDomainObjGetMessages(virDomainObj *vm, =20 for (i =3D 0; i < vm->ndeprecations; i++) { (*msgs)[n++] =3D g_strdup_printf( - _("deprecated configuration: %s"), + _("deprecated configuration: %1$s"), vm->deprecations[i]); } } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464634; cv=none; d=zohomail.com; s=zohoarc; b=WP9uCIjEPTpqZPrXEIoyiyQybuPekGWCdVAlVp0i2rVLyu+CtOokQodkyvh73KUuK+WeA85AsGkcBwzi4ZDxnHhhMYSTpE2qh1VkZgO5gM29eN9bLHWnPkJHEULrLUmVPfYVAzqmkgC31Sd+e3Y3/hRCK69Aoqhtgb91lexDfx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464634; 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=Gg9fcQNXXK0hJoCiCAB6PO/NaCuFHMgRWikOnwHLtVw=; b=LjYFMwr8Cp9Yoh5ZwkFw0649YREinMXSb/e/ELFK72SwVTxYfgn0PpenLhDb1rwtH4PJ5dvxWso0eOD4iRfhApv6+WaN1z0kZvrEdmOprehl5Ba8v3OOtHEXMLj17K/oDz+xq+EFysBe0MLAfYU0xP9D13Hnvhr1+KP5le7EzZc= 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 167846463475853.948809639008914; Fri, 10 Mar 2023 08:10:34 -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-584-7l8EdrZqNoeML05TES0e-g-1; Fri, 10 Mar 2023 11:10:31 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 303D0100F91C; Fri, 10 Mar 2023 16:10:25 +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 0892EC1602B; Fri, 10 Mar 2023 16:10:25 +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 A41941946A73; Fri, 10 Mar 2023 16:10:24 +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 5A0B81946587 for ; Fri, 10 Mar 2023 16:10:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 30D744024CA1; Fri, 10 Mar 2023 16:10:24 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFA7E40CE2A7 for ; Fri, 10 Mar 2023 16:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464633; 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=Gg9fcQNXXK0hJoCiCAB6PO/NaCuFHMgRWikOnwHLtVw=; b=HzDZPqBf9RoHlKI5PpPWWgC9VaDURZh10NLiDizunk1nvEPpBxQSoYtefFn0oiGWWAylgR GW1KgT3aedVNNLlQ+Sv8SCNBvnhUoi6nTQspp6bfYqFl+6NU8hTbbSAplYiQqoGLpEri1/ rGQit2byQOoeXggCFQE6ZixNUHPsDXM= X-MC-Unique: 7l8EdrZqNoeML05TES0e-g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 07/51] conf/domain_validate: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:23 +0100 Message-Id: <15e968680ce0d70ea1b0531d0648210f1f9fc887.1678463799.git.jdenemar@redhat.com> 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.8 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: 1678464636715100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/domain_validate.c | 136 +++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 74 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 5fb2d4971c..d30bb31dda 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -76,7 +76,7 @@ virDomainDefResourceValidate(const virDomainDef *def) len =3D strlen(def->resource->appid); if (len < APPID_LEN_MIN || len > APPID_LEN_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("Fibre Channel 'appid' string length must be = between [%d, %d]"), + _("Fibre Channel 'appid' string length must be = between [%1$d, %2$d]"), APPID_LEN_MIN, APPID_LEN_MAX); return -1; } @@ -277,7 +277,7 @@ virDomainDiskAddressDiskBusCompatibility(virDomainDiskB= us bus, } =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected bus type '%d'"), + _("unexpected bus type '%1$d'"), bus); return true; } @@ -508,7 +508,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorage= Source *src) case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_NFS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("authentication is not supported for protocol= '%s'"), + _("authentication is not supported for protocol= '%1$s'"), virStorageNetProtocolTypeToString(src->protocol= )); return -1; =20 @@ -519,7 +519,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorage= Source *src) =20 if ((actUsage =3D virSecretUsageTypeFromString(authdef->secrettype= )) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown secret type '%s'"), + _("unknown secret type '%1$s'"), NULLSTR(authdef->secrettype)); return -1; } @@ -529,7 +529,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorage= Source *src) (src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_RBD && actUsage !=3D VIR_SECRET_USAGE_TYPE_CEPH)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid secret type '%s'"), + _("invalid secret type '%1$s'"), virSecretUsageTypeToString(actUsage)); return -1; } @@ -603,7 +603,7 @@ virDomainDiskDefSourceLUNValidate(const virStorageSourc= e *src) if (virStorageSourceGetActualType(src) =3D=3D VIR_STORAGE_TYPE_NETWORK= ) { if (src->protocol !=3D VIR_STORAGE_NET_PROTOCOL_ISCSI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk device=3D'lun' is not supported for pro= tocol=3D'%s'"), + _("disk device=3D'lun' is not supported for pro= tocol=3D'%1$s'"), virStorageNetProtocolTypeToString(src->protocol= )); return -1; } @@ -649,7 +649,7 @@ virDomainDiskDefValidateStartupPolicy(const virDomainDi= skDef *disk) if (virStorageSourceGetActualType(disk->src) !=3D VIR_STORAGE_TYPE_VOL= UME && !virStorageSourceIsLocalStorage(disk->src)) { virReportError(VIR_ERR_XML_ERROR, - _("disk startupPolicy '%s' is not allowed for disk = of '%s' type"), + _("disk startupPolicy '%1$s' is not allowed for dis= k of '%2$s' type"), virDomainStartupPolicyTypeToString(disk->startupPol= icy), virStorageTypeToString(disk->src->type)); return -1; @@ -676,7 +676,7 @@ virDomainDiskDefValidate(const virDomainDef *def, /* disk target is used widely in other code so it must be validated fi= rst */ if (!disk->dst) { if (disk->src->srcpool) { - virReportError(VIR_ERR_NO_TARGET, _("pool =3D '%s', volume =3D= '%s'"), + virReportError(VIR_ERR_NO_TARGET, _("pool =3D '%1$s', volume = =3D '%2$s'"), disk->src->srcpool->pool, disk->src->srcpool->volume); } else { @@ -764,7 +764,7 @@ virDomainDiskDefValidate(const virDomainDef *def, */ if (!virDomainDiskAddressDiskBusCompatibility(disk->bus, disk->info.ty= pe)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid address type '%s' for the disk '%s' with= the bus type '%s'"), + _("Invalid address type '%1$s' for the disk '%2$s' = with the bus type '%3$s'"), virDomainDeviceAddressTypeToString(disk->info.type), disk->dst, virDomainDiskBusTypeToString(disk->bus)); @@ -776,7 +776,7 @@ virDomainDiskDefValidate(const virDomainDef *def, disk->model =3D=3D VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL || disk->model =3D=3D VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITION= AL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk model '%s' not supported for bus '%s'"), + _("disk model '%1$s' not supported for bus '%2$= s'"), virDomainDiskModelTypeToString(disk->model), virDomainDiskBusTypeToString(disk->bus)); return -1; @@ -843,7 +843,7 @@ virDomainDiskDefValidate(const virDomainDef *def, =20 if (strlen(disk->vendor) > VENDOR_LEN) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk vendor is more than %d characters"), + _("disk vendor is more than %1$d characters"), VENDOR_LEN); return -1; } @@ -858,7 +858,7 @@ virDomainDiskDefValidate(const virDomainDef *def, =20 if (strlen(disk->product) > PRODUCT_LEN) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk product is more than %d characters"), + _("disk product is more than %1$d characters"), PRODUCT_LEN); return -1; } @@ -867,7 +867,7 @@ virDomainDiskDefValidate(const virDomainDef *def, if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY && disk->bus !=3D VIR_DOMAIN_DISK_BUS_FDC) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid bus type '%s' for floppy disk"), + _("Invalid bus type '%1$s' for floppy disk"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -875,7 +875,7 @@ virDomainDiskDefValidate(const virDomainDef *def, if (disk->device !=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY && disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_FDC) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid bus type '%s' for disk"), + _("Invalid bus type '%1$s' for disk"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -901,14 +901,14 @@ virDomainDiskDefValidate(const virDomainDef *def, !STRPREFIX(disk->dst, "xvd") && !STRPREFIX(disk->dst, "ubd")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid harddisk device name: %s"), disk->dst); + _("Invalid harddisk device name: %1$s"), disk->dst); return -1; } =20 if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY && !STRPREFIX(disk->dst, "fd")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid floppy device name: %s"), disk->dst); + _("Invalid floppy device name: %1$s"), disk->dst); return -1; } =20 @@ -1115,7 +1115,7 @@ virDomainDefTunablesValidate(const virDomainDef *def) if (STREQ(def->blkio.devices[j].path, def->blkio.devices[i].path)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("duplicate blkio device path '%s'"), + _("duplicate blkio device path '%1$s'"), def->blkio.devices[i].path); return -1; } @@ -1143,7 +1143,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) =20 if (controller->idx > 255) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller index %d too high, maximum is= 255"), + _("PCI controller index %1$d too high, maximum = is 255"), controller->idx); return -1; } @@ -1153,7 +1153,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) =20 if (opts->targetIndex < 0 || opts->targetIndex > 30) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller target index '%d' out of = range - must be 0-30"), + _("PCI controller target index '%1$d' out o= f range - must be 0-30"), opts->targetIndex); return -1; } @@ -1169,7 +1169,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) if (opts->chassisNr !=3D -1) { if (opts->chassisNr < 1 || opts->chassisNr > 255) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller chassisNr '%d' out of ran= ge - must be 1-255"), + _("PCI controller chassisNr '%1$d' out of r= ange - must be 1-255"), opts->chassisNr); return -1; } @@ -1178,7 +1178,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) if (opts->chassis !=3D -1) { if (opts->chassis < 0 || opts->chassis > 255) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller chassis '%d' out of range= - must be 0-255"), + _("PCI controller chassis '%1$d' out of ran= ge - must be 0-255"), opts->chassis); return -1; } @@ -1187,7 +1187,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) if (opts->port !=3D -1) { if (opts->port < 0 || opts->port > 255) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller port '%d' out of range - = must be 0-255"), + _("PCI controller port '%1$d' out of range = - must be 0-255"), opts->port); return -1; } @@ -1196,7 +1196,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) if (opts->busNr !=3D -1) { if (opts->busNr < 1 || opts->busNr > 254) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller busNr '%d' out of range -= must be 1-254"), + _("PCI controller busNr '%1$d' out of range= - must be 1-254"), opts->busNr); return -1; } @@ -1321,9 +1321,7 @@ virDomainDefDuplicateDriveAddressesValidate(const vir= DomainDef *def) =20 if (virDomainDeviceInfoAddressIsEqual(disk_info_i, disk_info_j= )) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Found duplicate drive address for disk w= ith " - "target name '%s' controller=3D'%u' bus= =3D'%u' " - "target=3D'%u' unit=3D'%u'"), + _("Found duplicate drive address for disk w= ith target name '%1$s' controller=3D'%2$u' bus=3D'%3$u' target=3D'%4$u' uni= t=3D'%5$u'"), disk_i->dst, disk_info_i->addr.drive.controller, disk_info_i->addr.drive.bus, @@ -1363,9 +1361,7 @@ virDomainDefDuplicateDriveAddressesValidate(const vir= DomainDef *def) =20 if (virDomainDeviceInfoAddressIsEqual(hdev_info_i, hdev_info_j= )) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("SCSI host address controller=3D'%u' " - "bus=3D'%u' target=3D'%u' unit=3D'%u' in " - "use by another SCSI host device"), + _("SCSI host address controller=3D'%1$u' bu= s=3D'%2$u' target=3D'%3$u' unit=3D'%4$u' in use by another SCSI host device= "), hdev_addr_i->bus, hdev_addr_i->controller, hdev_addr_i->target, @@ -1377,9 +1373,7 @@ virDomainDefDuplicateDriveAddressesValidate(const vir= DomainDef *def) if (virDomainDriveAddressIsUsedByDisk(def, VIR_DOMAIN_DISK_BUS_SCS= I, hdev_addr_i)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("SCSI host address controller=3D'%u' " - "bus=3D'%u' target=3D'%u' unit=3D'%u' in " - "use by another SCSI disk"), + _("SCSI host address controller=3D'%1$u' bus=3D= '%2$u' target=3D'%3$u' unit=3D'%4$u' in use by another SCSI disk"), hdev_addr_i->bus, hdev_addr_i->controller, hdev_addr_i->target, @@ -1427,7 +1421,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDe= f *def, =20 if (virHashLookup(data->aliases, alias)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("non unique alias detected: %s"), + _("non unique alias detected: %1$s"), alias); return -1; } @@ -1487,7 +1481,7 @@ virDomainDeviceValidateAliasImpl(const virDomainDef *= def, =20 if (virHashLookup(aliases, info->alias)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("non unique alias detected: %s"), + _("non unique alias detected: %1$s"), info->alias); return -1; } @@ -1558,16 +1552,14 @@ virDomainDefMemtuneValidate(const virDomainDef *def) virBitmapOverlaps(mem->hugepages[i].nodemask, mem->hugepages[j].nodemask)) { virReportError(VIR_ERR_XML_DETAIL, - _("nodeset attribute of hugepages " - "of sizes %llu and %llu intersect"), + _("nodeset attribute of hugepages of sizes = %1$llu and %2$llu intersect"), mem->hugepages[i].size, mem->hugepages[j].size); return -1; } else if (!mem->hugepages[i].nodemask && !mem->hugepages[j].nodemask) { virReportError(VIR_ERR_XML_DETAIL, - _("two master hugepages detected: " - "%llu and %llu"), + _("two master hugepages detected: %1$llu an= d %2$llu"), mem->hugepages[i].size, mem->hugepages[j].size); return -1; @@ -1583,7 +1575,7 @@ virDomainDefMemtuneValidate(const virDomainDef *def) nextBit =3D virBitmapNextSetBit(mem->hugepages[i].nodemask, pos); if (nextBit >=3D 0) { virReportError(VIR_ERR_XML_DETAIL, - _("hugepages: node %zd not found"), + _("hugepages: node %1$zd not found"), nextBit); return -1; } @@ -1649,7 +1641,7 @@ virDomainDefOSValidate(const virDomainDef *def, =20 if (loader->nvram && def->os.firmware !=3D VIR_DOMAIN_OS_DEF_FIRMW= ARE_EFI) { virReportError(VIR_ERR_XML_DETAIL, - _("firmware type '%s' does not support nvram"), + _("firmware type '%1$s' does not support nvram"= ), virDomainOsDefFirmwareTypeToString(def->os.firm= ware)); return -1; } @@ -1707,7 +1699,7 @@ virDomainDefOSValidate(const virDomainDef *def, (def->cputune.name < VIR_CGROUP_CPU_PERIOD_MIN || \ def->cputune.name > VIR_CGROUP_CPU_PERIOD_MAX)) { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("Value of cputune '%s' must be in range [%llu= , %llu]"), \ + _("Value of cputune '%1$s' must be in range [%2= $llu, %3$llu]"), \ #name, \ VIR_CGROUP_CPU_PERIOD_MIN, \ VIR_CGROUP_CPU_PERIOD_MAX); \ @@ -1721,7 +1713,7 @@ virDomainDefOSValidate(const virDomainDef *def, (def->cputune.name < VIR_CGROUP_CPU_QUOTA_MIN || \ def->cputune.name > VIR_CGROUP_CPU_QUOTA_MAX)) { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("Value of cputune '%s' must be in range [%llu= , %llu]"), \ + _("Value of cputune '%1$s' must be in range [%2= $llu, %3$llu]"), \ #name, \ VIR_CGROUP_CPU_QUOTA_MIN, \ VIR_CGROUP_CPU_QUOTA_MAX); \ @@ -1787,7 +1779,7 @@ virDomainDefFSValidate(const virDomainDef *def) =20 if (virHashHasEntry(dsts, fs->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("filesystem target '%s' specified twice"), + _("filesystem target '%1$s' specified twice"), fs->dst); return -1; } @@ -1998,7 +1990,7 @@ virDomainNetDefValidatePortOptions(const char *macstr, if (!(type =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK || type =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - is n= ot supported for network interfaces with type=3D'%s'"), + _("interface %1$s - is= not supported for network interfaces with type=3D'%2$s'"), macstr, virDomainNetTypeToString(type)); return -1; } @@ -2008,7 +2000,7 @@ virDomainNetDefValidatePortOptions(const char *macstr, */ if (vport && vport->virtPortType !=3D VIR_NETDEV_VPORT_PROFILE_NON= E) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - is n= ot supported for network interfaces with virtualport type=3D'%s'"), + _("interface %1$s - is= not supported for network interfaces with virtualport type=3D'%2$s'"), macstr, virNetDevVPortTypeToString(vport->virtP= ortType)); return -1; } @@ -2052,7 +2044,7 @@ virDomainActualNetDefValidate(const virDomainNetDef *= net) (actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE && vport && vport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFI= LE_OPENVSWITCH))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - vlan tag not supported for th= is connection type"), + _("interface %1$s - vlan tag not supported for = this connection type"), macstr); return -1; } @@ -2063,8 +2055,7 @@ virDomainActualNetDefValidate(const virDomainNetDef *= net) */ if (bandwidth && actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - bandwidth settings are not suppor= ted " - "for hostdev interfaces"), + _("interface %1$s - bandwidth settings are not supp= orted for hostdev interfaces"), macstr); return -1; } @@ -2088,18 +2079,15 @@ virDomainNetDefValidate(const virDomainNetDef *net) if ((net->hostIP.nroutes || net->hostIP.nips) && net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid attempt to set network interface " - "host-side IP route and/or address info on " - "interface of type '%s'. This is only supported " - "on interfaces of type 'ethernet'"), + _("Invalid attempt to set network interface host-si= de IP route and/or address info on interface of type '%1$s'. " + "This is only supported on interfaces of type 'et= hernet'"), virDomainNetTypeToString(net->type)); return -1; } if (net->managed_tap =3D=3D VIR_TRISTATE_BOOL_NO && net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unmanaged target dev is not supported on " - "interfaces of type '%s'"), + _("unmanaged target dev is not supported on interfa= ces of type '%1$s'"), virDomainNetTypeToString(net->type)); return -1; } @@ -2114,7 +2102,7 @@ virDomainNetDefValidate(const virDomainNetDef *net) } else { if (net->teaming->persistent) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("teaming persistent attribute not allowed= if teaming type is '%s'"), + _("teaming persistent attribute not allowed= if teaming type is '%1$s'"), virDomainNetTeamingTypeToString(net->teamin= g->type)); return -1; } @@ -2292,7 +2280,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *= mem, =20 if (mem->targetNode >=3D nodeCount) { virReportError(VIR_ERR_XML_DETAIL, - _("can't add memory backend for guest node '%d'= as the guest has only '%zu' NUMA nodes configured"), + _("can't add memory backend for guest node '%1$= d' as the guest has only '%2$zu' NUMA nodes configured"), mem->targetNode, nodeCount); return -1; } @@ -2329,14 +2317,14 @@ virDomainMemoryDefValidate(const virDomainMemoryDef= *mem, case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM: if (!mem->nvdimmPath) { virReportError(VIR_ERR_XML_DETAIL, - _("path is required for model '%s'"), + _("path is required for model '%1$s'"), virDomainMemoryModelTypeToString(mem->model)); return -1; } =20 if (mem->discard =3D=3D VIR_TRISTATE_BOOL_YES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("discard is not supported for model '%s'"), + _("discard is not supported for model '%1$s'"), virDomainMemoryModelTypeToString(mem->model)); return -1; } @@ -2357,7 +2345,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *= mem, case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM: if (mem->requestedsize > mem->size) { virReportError(VIR_ERR_XML_DETAIL, - _("requested size must be smaller than or equal= to @size (%lluKiB)"), + _("requested size must be smaller than or equal= to @size (%1$lluKiB)"), mem->size); return -1; } @@ -2378,7 +2366,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *= mem, =20 if (mem->blocksize < thpSize) { virReportError(VIR_ERR_XML_DETAIL, - _("block size too small, must be at least %lluK= iB"), + _("block size too small, must be at least %1$ll= uKiB"), thpSize); return -1; } @@ -2396,7 +2384,7 @@ virDomainMemoryDefValidate(const virDomainMemoryDef *= mem, case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC: if (mem->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory device address is not supported for m= odel '%s'"), + _("memory device address is not supported for m= odel '%1$s'"), virDomainMemoryModelTypeToString(mem->model)); return -1; } @@ -2464,13 +2452,13 @@ virDomainInputDefValidate(const virDomainInputDef *= input, input->type !=3D VIR_DOMAIN_INPUT_TYPE_MOUSE && input->type !=3D VIR_DOMAIN_INPUT_TYPE_KBD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("ps2 bus does not support %s input device"), + _("ps2 bus does not support %1$s input device"), virDomainInputTypeToString(input->type)); return -1; } if (input->bus =3D=3D VIR_DOMAIN_INPUT_BUS_XEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported input bus %s"), + _("unsupported input bus %1$s"), virDomainInputBusTypeToString(input->bus)); return -1; } @@ -2480,14 +2468,14 @@ virDomainInputDefValidate(const virDomainInputDef *= input, case VIR_DOMAIN_OSTYPE_XENPVH: if (input->bus !=3D VIR_DOMAIN_INPUT_BUS_XEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported input bus %s"), + _("unsupported input bus %1$s"), virDomainInputBusTypeToString(input->bus)); return -1; } if (input->type !=3D VIR_DOMAIN_INPUT_TYPE_MOUSE && input->type !=3D VIR_DOMAIN_INPUT_TYPE_KBD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("xen bus does not support %s input device"), + _("xen bus does not support %1$s input device"), virDomainInputTypeToString(input->type)); return -1; } @@ -2498,7 +2486,7 @@ virDomainInputDefValidate(const virDomainInputDef *in= put, def->virtType =3D=3D VIR_DOMAIN_VIRT_PARALLELS) { if (input->bus !=3D VIR_DOMAIN_INPUT_BUS_PARALLELS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("parallels containers don't support input= bus %s"), + _("parallels containers don't support input= bus %1$s"), virDomainInputBusTypeToString(input->bus)); return -1; } @@ -2506,7 +2494,7 @@ virDomainInputDefValidate(const virDomainInputDef *in= put, if (input->type !=3D VIR_DOMAIN_INPUT_TYPE_MOUSE && input->type !=3D VIR_DOMAIN_INPUT_TYPE_KBD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("parallels bus does not support %s input = device"), + _("parallels bus does not support %1$s inpu= t device"), virDomainInputTypeToString(input->type)); return -1; } @@ -2556,7 +2544,7 @@ virDomainInputDefValidate(const virDomainInputDef *in= put, case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL: if (input->bus !=3D VIR_DOMAIN_INPUT_BUS_VIRTIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("only bus 'virtio' is supported for input mod= el '%s'"), + _("only bus 'virtio' is supported for input mod= el '%1$s'"), virDomainInputModelTypeToString(input->model)); return -1; } @@ -2637,7 +2625,7 @@ virDomainEnsureAudioID(const virDomainDef *def, } =20 virReportError(VIR_ERR_XML_ERROR, - _("no audio device with ID %u"), + _("no audio device with ID %1$u"), id); return -1; } @@ -2660,7 +2648,7 @@ virDomainAudioDefValidate(const virDomainDef *def, continue; if (def->audios[i]->id =3D=3D audio->id) { virReportError(VIR_ERR_XML_ERROR, - _("audio ID %u is used multiple times"), + _("audio ID %1$u is used multiple times"), audio->id); return -1; } @@ -2723,7 +2711,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *io= mmu) iommu->iotlb !=3D VIR_TRISTATE_SWITCH_ABSENT || iommu->aw_bits !=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("iommu model '%s' doesn't support additional = attributes"), + _("iommu model '%1$s' doesn't support additiona= l attributes"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } @@ -2739,7 +2727,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *io= mmu) case VIR_DOMAIN_IOMMU_MODEL_INTEL: if (iommu->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_XML_ERROR, - _("iommu model '%s' can't have address"), + _("iommu model '%1$s' can't have address"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } @@ -2762,7 +2750,7 @@ virDomainTPMDevValidate(const virDomainTPMDef *tpm) if (tpm->data.emulator.activePcrBanks && tpm->data.emulator.version !=3D VIR_DOMAIN_TPM_VERSION_2_0) { virReportError(VIR_ERR_XML_ERROR, - _(" requires TPM version '%s= '"), + _(" requires TPM version '%1= $s'"), virDomainTPMVersionTypeToString(VIR_DOMAIN_TPM_= VERSION_2_0)); return -1; } @@ -2822,7 +2810,7 @@ virDomainDeviceInfoValidate(const virDomainDeviceDef = *dev) case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED: if (dev->type !=3D VIR_DOMAIN_DEVICE_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("address of type '%s' is supported only for h= ostdevs"), + _("address of type '%1$s' is supported only for= hostdevs"), virDomainDeviceAddressTypeToString(info->type)); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464637; cv=none; d=zohomail.com; s=zohoarc; b=HDfWQ0qu3+iQdYfZpbDTZql1s6fFyFgA4Dj0tLWg32yevGEtS7q6uMlZthqgS2s/CZR/ghBg2XYYIuo7ipkA1ATprmHZ2xvdq5bN4XMqI2dnd7wL0QdWLCFK/Imt0NQ56WItOGi3j0EoGkhbchL9XzW6cxMbTPsigBSYoHJgXZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464637; 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=F/0OMnBE6WlvDv5mnVeoNKrKOrsO5bW87t4tvTeD32o=; b=O5w4GfjNrBmJi2DjiI4TFeZ8R4c8ENIapc83rtLG5Z4A7CzwXKxrUf7DDTw9TQGkWzUgG0DktiJRVkJ9l+vRtbJEzK34n/MWvycPg9vz654xvyp5OcCw226d8BY0tw9C5HoLvRMEZ0FLhiStaPv3Rzr/54OX3HKVA0pgMQ2x6cA= 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 1678464637740735.1663729463348; Fri, 10 Mar 2023 08:10:37 -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-361-bMEGDMvxN3KcC0CyTmZeUA-1; Fri, 10 Mar 2023 11:10:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F360B3C1024F; Fri, 10 Mar 2023 16:10:26 +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 DB5E82166B26; Fri, 10 Mar 2023 16:10:26 +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 CB24B1946A4A; Fri, 10 Mar 2023 16:10:26 +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 845B61946587 for ; Fri, 10 Mar 2023 16:10:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 79D3A4029A7A; Fri, 10 Mar 2023 16:10:25 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB7C440C83B6 for ; Fri, 10 Mar 2023 16:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464636; 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=F/0OMnBE6WlvDv5mnVeoNKrKOrsO5bW87t4tvTeD32o=; b=MEFfnmXVTgojTc1kmPe72pzmVBNR29j1VQ9GFytd3qCF62jTkRSyvuKUzw9/qj8Bj82NmS 2LBROmuyPE4Nxbnao+i1kH+3a8leIzRMGHR194oB19kEf/TBtajIIi4jdKqYDXMsHKP42X 1LDHq7jDVpWAnvAwlkyKDhfNuduuVnA= X-MC-Unique: bMEGDMvxN3KcC0CyTmZeUA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 08/51] conf/network_conf: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:24 +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.6 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: 1678464638774100015 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/network_conf.c | 367 +++++++++++++++++----------------------- 1 file changed, 152 insertions(+), 215 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 5d1f0e5203..73011cb7a2 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -459,7 +459,7 @@ virNetworkDHCPRangeDefParseXML(const char *networkName, =20 if (!(start =3D virXMLPropString(node, "start"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'start' attribute in dhcp range for netw= ork '%s'"), + _("Missing 'start' attribute in dhcp range for netw= ork '%1$s'"), networkName); return -1; } @@ -468,7 +468,7 @@ virNetworkDHCPRangeDefParseXML(const char *networkName, =20 if (!(end =3D virXMLPropString(node, "end"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'end' attribute in dhcp range for networ= k '%s'"), + _("Missing 'end' attribute in dhcp range for networ= k '%1$s'"), networkName); return -1; } @@ -507,21 +507,19 @@ virNetworkDHCPHostDefParseXML(const char *networkName, if (mac !=3D NULL) { if (VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid to specify MAC address '%s' " - "in network '%s' IPv6 static host definition"= ), + _("Invalid to specify MAC address '%1$s' in net= work '%2$s' IPv6 static host definition"), mac, networkName); return -1; } if (virMacAddrParse(mac, &addr) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Cannot parse MAC address '%s' in network '%s= '"), + _("Cannot parse MAC address '%1$s' in network '= %2$s'"), mac, networkName); return -1; } if (virMacAddrIsMulticast(&addr)) { virReportError(VIR_ERR_XML_ERROR, - _("expected unicast mac address, found " - "multicast '%s' in network '%s'"), + _("expected unicast mac address, found multicas= t '%1$s' in network '%2$s'"), (const char *)mac, networkName); return -1; } @@ -532,7 +530,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName, char *cp =3D id + strspn(id, "0123456789abcdefABCDEF:"); if (*cp) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid character '%c' in id '%s' of network= '%s'"), + _("Invalid character '%1$c' in id '%2$s' of net= work '%3$s'"), *cp, id, networkName); return -1; } @@ -541,7 +539,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName, name =3D virXMLPropString(node, "name"); if (name && !(g_ascii_isalpha(name[0]) || g_ascii_isdigit(name[0]))) { virReportError(VIR_ERR_XML_ERROR, - _("Cannot use host name '%s' in network '%s'"), + _("Cannot use host name '%1$s' in network '%2$s'"), name, networkName); return -1; } @@ -549,8 +547,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName, ip =3D virXMLPropString(node, "ip"); if (ip && (virSocketAddrParse(&inaddr, ip, AF_UNSPEC) < 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid IP address in static host definition " - "for network '%s'"), + _("Invalid IP address in static host definition for= network '%1$s'"), networkName); return -1; } @@ -559,9 +556,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName, /* for search/match, you just need one of the three */ if (!(mac || name || ip)) { virReportError(VIR_ERR_XML_ERROR, - _("At least one of name, mac, or ip attribute " - "must be specified for static host definition= " - "in network '%s' "), + _("At least one of name, mac, or ip attribute m= ust be specified for static host definition in network '%1$s'"), networkName); return -1; } @@ -572,22 +567,19 @@ virNetworkDHCPHostDefParseXML(const char *networkName, if (VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) { if (!(id || name)) { virReportError(VIR_ERR_XML_ERROR, - _("Static host definition in IPv6 network '%s' " - "must have id or name attribute"), + _("Static host definition in IPv6 network '%1$s= ' must have id or name attribute"), networkName); return -1; } } else if (!(mac || name)) { virReportError(VIR_ERR_XML_ERROR, - _("Static host definition in IPv4 network '%s' " - "must have mac or name attribute"), + _("Static host definition in IPv4 network '%1$s= ' must have mac or name attribute"), networkName); return -1; } if (!ip) { virReportError(VIR_ERR_XML_ERROR, - _("Missing IP address in static host definition= " - "for network '%s'"), + _("Missing IP address in static host definition= for network '%1$s'"), networkName); return -1; } @@ -681,14 +673,14 @@ virNetworkDNSHostDefParseXML(const char *networkName, =20 if (!(ip =3D virXMLPropString(node, "ip")) && !partialOkay) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing IP address in network '%s' DNS HOST reco= rd"), + _("Missing IP address in network '%1$s' DNS HOST re= cord"), networkName); goto error; } =20 if (ip && (virSocketAddrParse(&def->ip, ip, AF_UNSPEC) < 0)) { virReportError(VIR_ERR_XML_DETAIL, - _("Invalid IP address in network '%s' DNS HOST reco= rd"), + _("Invalid IP address in network '%1$s' DNS HOST re= cord"), networkName); goto error; } @@ -705,7 +697,7 @@ virNetworkDNSHostDefParseXML(const char *networkName, =20 if (!name[0]) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing hostname in network '%s' D= NS HOST record"), + _("Missing hostname in network '%1$s'= DNS HOST record"), networkName); goto error; } @@ -716,14 +708,14 @@ virNetworkDNSHostDefParseXML(const char *networkName, } if (def->nnames =3D=3D 0 && !partialOkay) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing hostname in network '%s' DNS HOST record= "), + _("Missing hostname in network '%1$s' DNS HOST reco= rd"), networkName); goto error; } =20 if (!VIR_SOCKET_ADDR_VALID(&def->ip) && def->nnames =3D=3D 0) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing ip and hostname in network '%s' DNS HOST= record"), + _("Missing ip and hostname in network '%1$s' DNS HO= ST record"), networkName); goto error; } @@ -765,22 +757,20 @@ virNetworkDNSSrvDefParseXML(const char *networkName, =20 if (!(def->service =3D virXMLPropString(node, "service")) && !partialO= kay) { virReportError(VIR_ERR_XML_DETAIL, - _("missing required service attribute in DNS SRV re= cord " - "of network '%s'"), networkName); + _("missing required service attribute in DNS SRV re= cord of network '%1$s'"), + networkName); goto error; } if (def->service) { if (strlen(def->service) > DNS_RECORD_LENGTH_SRV) { virReportError(VIR_ERR_XML_DETAIL, - _("service attribute '%s' in network '%s' is to= o long, " - "limit is %d bytes"), + _("service attribute '%1$s' in network '%2$s' i= s too long, limit is %3$d bytes"), def->service, networkName, DNS_RECORD_LENGTH_SR= V); goto error; } if (strspn(def->service, SERVICE_CHARS) < strlen(def->service)) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid character in service attribute '%s' " - "in DNS SRV record of network '%s'"), + _("invalid character in service attribute '%1$s= ' in DNS SRV record of network '%2$s'"), def->service, networkName); goto error; } @@ -788,16 +778,14 @@ virNetworkDNSSrvDefParseXML(const char *networkName, =20 if (!(def->protocol =3D virXMLPropString(node, "protocol")) && !partia= lOkay) { virReportError(VIR_ERR_XML_DETAIL, - _("missing required protocol attribute " - "in DNS SRV record '%s' of network '%s'"), + _("missing required protocol attribute in DNS SRV r= ecord '%1$s' of network '%2$s'"), def->service, networkName); goto error; } if (def->protocol && strspn(def->protocol, PROTOCOL_CHARS) < strlen(def->protocol)) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid character in protocol attribute '%s' " - "in DNS SRV record of network '%s'"), + _("invalid character in protocol attribute '%1$s' i= n DNS SRV record of network '%2$s'"), def->protocol, networkName); goto error; } @@ -809,15 +797,13 @@ virNetworkDNSSrvDefParseXML(const char *networkName, ret =3D virXPathUInt("string(./@port)", ctxt, &def->port); if (ret >=3D 0 && !def->target) { virReportError(VIR_ERR_XML_DETAIL, - _("DNS SRV port attribute not permitted without " - "target for service '%s' in network '%s'"), + _("DNS SRV port attribute not permitted without tar= get for service '%1$s' in network '%2$s'"), def->service, networkName); goto error; } if (ret =3D=3D -2 || (ret >=3D 0 && (def->port < 1 || def->port > 6553= 5))) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid DNS SRV port attribute " - "for service '%s' in network '%s'"), + _("invalid DNS SRV port attribute for service '%1$s= ' in network '%2$s'"), def->service, networkName); goto error; } @@ -825,15 +811,13 @@ virNetworkDNSSrvDefParseXML(const char *networkName, ret =3D virXPathUInt("string(./@priority)", ctxt, &def->priority); if (ret >=3D 0 && !def->target) { virReportError(VIR_ERR_XML_DETAIL, - _("DNS SRV priority attribute not permitted without= " - "target for service '%s' in network '%s'"), + _("DNS SRV priority attribute not permitted without= target for service '%1$s' in network '%2$s'"), def->service, networkName); goto error; } if (ret =3D=3D -2 || (ret >=3D 0 && def->priority > 65535)) { virReportError(VIR_ERR_XML_DETAIL, - _("Invalid DNS SRV priority attribute " - "for service '%s' in network '%s'"), + _("Invalid DNS SRV priority attribute for service '= %1$s' in network '%2$s'"), def->service, networkName); goto error; } @@ -841,15 +825,13 @@ virNetworkDNSSrvDefParseXML(const char *networkName, ret =3D virXPathUInt("string(./@weight)", ctxt, &def->weight); if (ret >=3D 0 && !def->target) { virReportError(VIR_ERR_XML_DETAIL, - _("DNS SRV weight attribute not permitted without " - "target for service '%s' in network '%s'"), + _("DNS SRV weight attribute not permitted without t= arget for service '%1$s' in network '%2$s'"), def->service, networkName); goto error; } if (ret =3D=3D -2 || (ret >=3D 0 && def->weight > 65535)) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid DNS SRV weight attribute " - "for service '%s' in network '%s'"), + _("invalid DNS SRV weight attribute for service '%1= $s' in network '%2$s'"), def->service, networkName); goto error; } @@ -872,27 +854,27 @@ virNetworkDNSTxtDefParseXML(const char *networkName, =20 if (!(def->name =3D virXMLPropString(node, "name"))) { virReportError(VIR_ERR_XML_DETAIL, - _("missing required name attribute in DNS TXT recor= d " - "of network %s"), networkName); + _("missing required name attribute in DNS TXT recor= d of network %1$s"), + networkName); goto error; } if (strcspn(def->name, bad) !=3D strlen(def->name)) { virReportError(VIR_ERR_XML_DETAIL, - _("prohibited character in DNS TXT record " - "name '%s' of network %s"), def->name, networkNam= e); + _("prohibited character in DNS TXT record name '%1$= s' of network %2$s"), + def->name, networkName); goto error; } if (!(def->value =3D virXMLPropString(node, "value")) && !partialOkay)= { virReportError(VIR_ERR_XML_DETAIL, - _("missing required value attribute in DNS TXT reco= rd " - "named '%s' of network %s"), def->name, networkNa= me); + _("missing required value attribute in DNS TXT reco= rd named '%1$s' of network %2$s"), + def->name, networkName); goto error; } =20 if (!(def->name || def->value)) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing required name or value " - "in DNS TXT record of network %s"), networkName); + _("Missing required name or value in DNS TXT record= of network %1$s"), + networkName); goto error; } return 0; @@ -932,7 +914,7 @@ virNetworkDNSDefParseXML(const char *networkName, nfwds =3D virXPathNodeSet("./forwarder", ctxt, &fwdNodes); if (nfwds < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of ne= twork %s"), + _("invalid element found in of ne= twork %1$s"), networkName); return -1; } @@ -945,8 +927,7 @@ virNetworkDNSDefParseXML(const char *networkName, if (addr && virSocketAddrParse(&def->forwarders[i].addr, addr, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid forwarder IP address '%s' " - "in network '%s'"), + _("Invalid forwarder IP address '%1$s' in n= etwork '%2$s'"), addr, networkName); return -1; } @@ -964,7 +945,7 @@ virNetworkDNSDefParseXML(const char *networkName, nhosts =3D virXPathNodeSet("./host", ctxt, &hostNodes); if (nhosts < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of network= %s"), + _("invalid element found in of network= %1$s"), networkName); return -1; } @@ -983,7 +964,7 @@ virNetworkDNSDefParseXML(const char *networkName, nsrvs =3D virXPathNodeSet("./srv", ctxt, &srvNodes); if (nsrvs < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of network = %s"), + _("invalid element found in of network = %1$s"), networkName); return -1; } @@ -1002,7 +983,7 @@ virNetworkDNSDefParseXML(const char *networkName, ntxts =3D virXPathNodeSet("./txt", ctxt, &txtNodes); if (ntxts < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of network = %s"), + _("invalid element found in of network = %1$s"), networkName); return -1; } @@ -1021,7 +1002,7 @@ virNetworkDNSDefParseXML(const char *networkName, if (def->enable =3D=3D VIR_TRISTATE_BOOL_NO && (nfwds || nhosts || nsrvs || ntxts)) { virReportError(VIR_ERR_XML_ERROR, - _("Extra data in disabled network '%s'"), + _("Extra data in disabled network '%1$s'"), networkName); return -1; } @@ -1055,13 +1036,13 @@ virNetworkIPDefParseXML(const char *networkName, address =3D virXPathString("string(./@address)", ctxt); if (!address) { virReportError(VIR_ERR_XML_ERROR, - _("Missing required address attribute in network '%= s'"), + _("Missing required address attribute in network '%= 1$s'"), networkName); goto cleanup; } if (virSocketAddrParse(&def->address, address, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid address '%s' in network '%s'"), + _("Invalid address '%1$s' in network '%2$s'"), address, networkName); goto cleanup; } @@ -1070,7 +1051,7 @@ virNetworkIPDefParseXML(const char *networkName, if (netmask && (virSocketAddrParse(&def->netmask, netmask, AF_UNSPEC) < 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid netmask '%s' in network '%s'"), + _("Invalid netmask '%1$s' in network '%2$s'"), netmask, networkName); goto cleanup; } @@ -1088,52 +1069,51 @@ virNetworkIPDefParseXML(const char *networkName, if (!(VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET) || VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_UNSPEC))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s family specified for non-IPv4 address '%s= ' in network '%s'"), + _("%1$s family specified for non-IPv4 address '= %2$s' in network '%3$s'"), def->family =3D=3D NULL? "no" : "ipv4", address= , networkName); goto cleanup; } if (netmask) { if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->netmask, AF_INET)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid netmask '%s' for address '%s' " - "in network '%s' (both must be IPv4)"), + _("Invalid netmask '%1$s' for address '%2$s= ' in network '%3$s' (both must be IPv4)"), netmask, address, networkName); goto cleanup; } if (def->prefix > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Network '%s' IP address cannot have " - "both a prefix and a netmask"), networkNa= me); + _("Network '%1$s' IP address cannot have bo= th a prefix and a netmask"), + networkName); goto cleanup; } } else if (def->prefix > 32) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid IPv4 prefix '%u' in network '%s'"), + _("Invalid IPv4 prefix '%1$u' in network '%2$s'= "), def->prefix, networkName); goto cleanup; } } else if (STREQ(def->family, "ipv6")) { if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Family 'ipv6' specified for non-IPv6 address= '%s' in network '%s'"), + _("Family 'ipv6' specified for non-IPv6 address= '%1$s' in network '%2$s'"), address, networkName); goto cleanup; } if (netmask) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("netmask not allowed for IPv6 address '%s' in= network '%s'"), + _("netmask not allowed for IPv6 address '%1$s' = in network '%2$s'"), address, networkName); goto cleanup; } if (def->prefix > 128) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid IPv6 prefix '%u' in network '%s'"), + _("Invalid IPv6 prefix '%1$u' in network '%2$s'= "), def->prefix, networkName); goto cleanup; } } else { virReportError(VIR_ERR_XML_ERROR, - _("Unrecognized family '%s' in network '%s'"), + _("Unrecognized family '%1$s' in network '%2$s'"), def->family, networkName); goto cleanup; } @@ -1145,8 +1125,7 @@ virNetworkIPDefParseXML(const char *networkName, if (virXPathNode("./tftp[1]", ctxt)) { if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in an IPv6 elemen= t " - "in network '%s'"), + _("Unsupported element in an IPv6 elemen= t in network '%1$s'"), networkName); goto cleanup; } @@ -1253,7 +1232,7 @@ virNetworkForwardNatDefParseXML(const char *networkNa= me, =20 if (def->type !=3D VIR_NETWORK_FORWARD_NAT) { virReportError(VIR_ERR_XML_ERROR, - _("The element can only be used when 'mode' is 'nat' in network %s"), + _("The element can only be used when 'mode' is 'nat' in network %1$s"), networkName); return -1; } @@ -1266,42 +1245,42 @@ virNetworkForwardNatDefParseXML(const char *network= Name, nNatAddrs =3D virXPathNodeSet("./address", ctxt, &natAddrNodes); if (nNatAddrs < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid
element found in of " - "network %s"), networkName); + _("invalid
element found in of = network %1$s"), + networkName); return -1; } else if (nNatAddrs > 1) { virReportError(VIR_ERR_XML_ERROR, - _("Only one
element is allowed in i= n " - " in network %s"), networkName); + _("Only one
element is allowed in i= n in network %1$s"), + networkName); return -1; } else if (nNatAddrs =3D=3D 1) { addrStart =3D virXMLPropString(*natAddrNodes, "start"); if (addrStart =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, - _("missing 'start' attribute in
eleme= nt in in " - " in network %s"), networkName); + _("missing 'start' attribute in
eleme= nt in in in network %1$s"), + networkName); return -1; } addrEnd =3D virXMLPropString(*natAddrNodes, "end"); if (addrEnd =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, - _("missing 'end' attribute in
element= in in " - " in network %s"), networkName); + _("missing 'end' attribute in
element= in in in network %1$s"), + networkName); return -1; } } =20 if (addrStart && virSocketAddrParse(&def->addr.start, addrStart, AF_IN= ET) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Bad ipv4 start address '%s' in in in " - "network '%s'"), addrStart, networkName); + _("Bad ipv4 start address '%1$s' in in in network '%2$s'"), + addrStart, networkName); return -1; } =20 if (addrEnd && virSocketAddrParse(&def->addr.end, addrEnd, AF_INET) < = 0) { virReportError(VIR_ERR_XML_ERROR, - _("Bad ipv4 end address '%s' in in = in " - "network '%s'"), addrEnd, networkName); + _("Bad ipv4 end address '%1$s' in in in network '%2$s'"), + addrEnd, networkName); return -1; } =20 @@ -1312,15 +1291,13 @@ virNetworkForwardNatDefParseXML(const char *network= Name, } else { if (addrStart) { virReportError(VIR_ERR_XML_ERROR, - _("Only start address '%s' specified in i= n " - " in network '%s'"), + _("Only start address '%1$s' specified in = in in network '%2$s'"), addrStart, networkName); return -1; } if (addrEnd) { virReportError(VIR_ERR_XML_ERROR, - _("Only end address '%s' specified in in " - " in network '%s'"), + _("Only end address '%1$s' specified in i= n in network '%2$s'"), addrEnd, networkName); return -1; } @@ -1330,29 +1307,28 @@ virNetworkForwardNatDefParseXML(const char *network= Name, nNatPorts =3D virXPathNodeSet("./port", ctxt, &natPortNodes); if (nNatPorts < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of " - "network %s"), networkName); + _("invalid element found in of net= work %1$s"), + networkName); return -1; } else if (nNatPorts > 1) { virReportError(VIR_ERR_XML_ERROR, - _("Only one element is allowed in in " - " in network %s"), networkName); + _("Only one element is allowed in in <= forward> in network %1$s"), + networkName); return -1; } else if (nNatPorts =3D=3D 1) { if (virXPathUInt("string(./port[1]/@start)", ctxt, &def->port.star= t) < 0 || def->port.start > 65535) { =20 virReportError(VIR_ERR_XML_DETAIL, - _("Missing or invalid 'start' attribute in " - "in in in network %s"), - networkName); + _("Missing or invalid 'start' attribute in in in in network %1$s"), + networkName); return -1; } if (virXPathUInt("string(./port[1]/@end)", ctxt, &def->port.end) <= 0 || def->port.end > 65535 || def->port.end < def->port.start) { virReportError(VIR_ERR_XML_DETAIL, - _("Missing or invalid 'end' attribute in = in " - " in in network %s"), networkN= ame); + _("Missing or invalid 'end' attribute in = in in in network %1$s"), + networkName); return -1; } } @@ -1385,7 +1361,7 @@ virNetworkForwardDefParseXML(const char *networkName, } else { if ((def->type =3D virNetworkForwardTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown forwarding type '%s'"), type); + _("unknown forwarding type '%1$s'"), type); return -1; } } @@ -1403,8 +1379,7 @@ virNetworkForwardDefParseXML(const char *networkName, =20 if (driverName <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown forward " - "in network %s"), + _("Unknown forward in n= etwork %2$s"), forwardDriverName, networkName); return -1; } @@ -1415,7 +1390,7 @@ virNetworkForwardDefParseXML(const char *networkName, nForwardIfs =3D virXPathNodeSet("./interface", ctxt, &forwardIfNodes); if (nForwardIfs < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in o= f network %s"), + _("invalid element found in o= f network %1$s"), networkName); return -1; } @@ -1423,7 +1398,7 @@ virNetworkForwardDefParseXML(const char *networkName, nForwardAddrs =3D virXPathNodeSet("./address", ctxt, &forwardAddrNodes= ); if (nForwardAddrs < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid
element found in of = network %s"), + _("invalid
element found in of = network %1$s"), networkName); return -1; } @@ -1431,7 +1406,7 @@ virNetworkForwardDefParseXML(const char *networkName, nForwardPfs =3D virXPathNodeSet("./pf", ctxt, &forwardPfNodes); if (nForwardPfs < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of netwo= rk %s"), + _("invalid element found in of netwo= rk %1$s"), networkName); return -1; } @@ -1439,12 +1414,12 @@ virNetworkForwardDefParseXML(const char *networkNam= e, nForwardNats =3D virXPathNodeSet("./nat", ctxt, &forwardNatNodes); if (nForwardNats < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid element found in of netw= ork %s"), + _("invalid element found in of netw= ork %1$s"), networkName); return -1; } else if (nForwardNats > 1) { virReportError(VIR_ERR_XML_ERROR, - _("Only one element is allowed in o= f network %s"), + _("Only one element is allowed in o= f network %1$s"), networkName); return -1; } else if (nForwardNats =3D=3D 1) { @@ -1457,9 +1432,7 @@ virNetworkForwardDefParseXML(const char *networkName, forwardDev =3D virXPathString("string(./@dev)", ctxt); if (forwardDev && (nForwardAddrs > 0 || nForwardPfs > 0)) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("the 'dev' attribute cannot be used whe= n " - "
or sub-elements are present " - "in network %s")); + _("the 'dev' attribute cannot be used whe= n
or sub-elements are present in network %1$s")); return -1; } =20 @@ -1478,8 +1451,7 @@ virNetworkForwardDefParseXML(const char *networkName, =20 if (!forwardDevi) { virReportError(VIR_ERR_XML_ERROR, - _("Missing required dev attribute in " - " element of network= %s"), + _("Missing required dev attribute in element of network %1$s"), networkName); return -1; } @@ -1490,8 +1462,7 @@ virNetworkForwardDefParseXML(const char *networkName, */ if (STRNEQ(forwardDevi, def->ifs[0].device.dev)) { virReportError(VIR_ERR_XML_ERROR, - _(" must match firs= t " - " in network %= s"), + _(" must match fi= rst in network %3$s"), def->ifs[0].device.dev, forwardDevi, networkName); return -1; @@ -1502,8 +1473,7 @@ virNetworkForwardDefParseXML(const char *networkName, for (j =3D 0; j < i; j++) { if (STREQ_NULLABLE(def->ifs[j].device.dev, forwardDevi)) { virReportError(VIR_ERR_XML_ERROR, - _("interface '%s' can only be " - "listed once in network %s"), + _("interface '%1$s' can only be listed = once in network %2$s"), forwardDevi, networkName); return -1; } @@ -1522,14 +1492,14 @@ virNetworkForwardDefParseXML(const char *networkNam= e, =20 if (!(addrType =3D virXMLPropString(forwardAddrNodes[i], "type= "))) { virReportError(VIR_ERR_XML_ERROR, - _("missing address type in network %s"), + _("missing address type in network %1$s"), networkName); return -1; } =20 if ((def->ifs[i].type =3D virNetworkForwardHostdevDeviceTypeFr= omString(addrType)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown address type '%s' in network %s"= ), + _("unknown address type '%1$s' in network %= 2$s"), addrType, networkName); return -1; } @@ -1545,8 +1515,7 @@ virNetworkForwardDefParseXML(const char *networkName, for (j =3D 0; j < i; j++) { if (virPCIDeviceAddressEqual(addr, &def->ifs[j].device= .pci)) { virReportError(VIR_ERR_XML_ERROR, - _("PCI device '%04x:%02x:%02x.%x' c= an " - "only be listed once in network %= s"), + _("PCI device '%1$04x:%2$02x:%3$02x= .%4$x' can only be listed once in network %5$s"), addr->domain, addr->bus, addr->slot, addr->function, networkName); @@ -1559,7 +1528,7 @@ virNetworkForwardDefParseXML(const char *networkName, =20 default: virReportError(VIR_ERR_XML_ERROR, - _("unsupported address type '%s' in network= %s"), + _("unsupported address type '%1$s' in netwo= rk %2$s"), addrType, networkName); return -1; } @@ -1568,7 +1537,7 @@ virNetworkForwardDefParseXML(const char *networkName, =20 } else if (nForwardPfs > 1) { virReportError(VIR_ERR_XML_ERROR, - _("Only one element is allowed in of= network %s"), + _("Only one element is allowed in of= network %1$s"), networkName); return -1; } else if (nForwardPfs =3D=3D 1) { @@ -1577,8 +1546,7 @@ virNetworkForwardDefParseXML(const char *networkName, forwardDev =3D virXMLPropString(*forwardPfNodes, "dev"); if (!forwardDev) { virReportError(VIR_ERR_XML_ERROR, - _("Missing required dev attribute " - "in element of network '%s'"), + _("Missing required dev attribute in eleme= nt of network '%1$s'"), networkName); return -1; } @@ -1652,7 +1620,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if (ipv6nogwStr) { if (virStringParseYesNo(ipv6nogwStr, &def->ipv6nogw) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid ipv6 setting '%s' in network '%s'"), + _("Invalid ipv6 setting '%1$s' in network '%2$s= '"), ipv6nogwStr, def->name); return NULL; } @@ -1692,7 +1660,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if (stpDelay) { if (virStrToLong_ulp(stpDelay, NULL, 10, &def->delay) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid delay value in network '%s'"), + _("Invalid delay value in network '%1$s'"), def->name); return NULL; } @@ -1703,8 +1671,8 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if ((def->macTableManager =3D virNetworkBridgeMACTableManagerTypeFromString(macTableMan= ager)) <=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid macTableManager setting '%s' " - "in network '%s'"), macTableManager, def->nam= e); + _("Invalid macTableManager setting '%1$s' in ne= twork '%2$s'"), + macTableManager, def->name); return NULL; } } @@ -1713,13 +1681,13 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if (macAddr) { if (virMacAddrParse(macAddr, &def->mac) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid bridge mac address '%s' in network '= %s'"), + _("Invalid bridge mac address '%1$s' in network= '%2$s'"), macAddr, def->name); return NULL; } if (virMacAddrIsMulticast(&def->mac)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid multicast bridge mac address '%s' in= network '%s'"), + _("Invalid multicast bridge mac address '%1$s' = in network '%2$s'"), macAddr, def->name); return NULL; } @@ -1730,7 +1698,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if (mtuSize) { if (virStrToLong_ui(mtuSize, NULL, 10, &def->mtu) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid mtu size '%s' in network '%s'"), + _("Invalid mtu size '%1$s' in network '%2$s'"), mtuSize, def->name); return NULL; } @@ -1843,7 +1811,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, if (!addrMatch) { g_autofree char *gw =3D virSocketAddrFormat(gateway); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unreachable static route gateway '%s' sp= ecified for network '%s'"), + _("unreachable static route gateway '%1$s' = specified for network '%2$s'"), gw, def->name); return NULL; } @@ -1871,16 +1839,14 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, */ if (def->nips =3D=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s forwarding requested, " - "but no IP address provided for network '%s'"= ), + _("%1$s forwarding requested, but no IP address= provided for network '%2$s'"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; } if (def->forward.nifs > 1) { virReportError(VIR_ERR_XML_ERROR, - _("multiple forwarding interfaces specified " - "for network '%s', only one is supported"), + _("multiple forwarding interfaces specified for= network '%1$s', only one is supported"), def->name); return NULL; } @@ -1891,8 +1857,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, * a forwarding device is nonsensical. */ virReportError(VIR_ERR_XML_ERROR, - _("forward dev not allowed for " - "network '%s' with forward mode=3D'%s'"), + _("forward dev not allowed for network '%1$s' w= ith forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return NULL; @@ -1905,22 +1870,21 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, case VIR_NETWORK_FORWARD_HOSTDEV: if (def->bridge) { virReportError(VIR_ERR_XML_ERROR, - _("bridge name not allowed in %s mode (network = '%s')"), + _("bridge name not allowed in %1$s mode (networ= k '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; } if (def->bridgeZone) { virReportError(VIR_ERR_XML_ERROR, - _("bridge zone not allowed in %s mode (network = '%s')"), + _("bridge zone not allowed in %1$s mode (networ= k '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; } if (def->macTableManager) { virReportError(VIR_ERR_XML_ERROR, - _("bridge macTableManager setting not allowed " - "in %s mode (network '%s')"), + _("bridge macTableManager setting not allowed i= n %1$s mode (network '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; @@ -1930,18 +1894,14 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, case VIR_NETWORK_FORWARD_BRIDGE: if (def->delay || stp || def->bridgeZone) { virReportError(VIR_ERR_XML_ERROR, - _("bridge delay/stp/zone options only allowed i= n " - "route, nat, and isolated mode, not in %s " - "(network '%s')"), + _("bridge delay/stp/zone options only allowed i= n route, nat, and isolated mode, not in %1$s (network '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; } if (def->bridge && (def->forward.nifs || def->forward.npfs)) { virReportError(VIR_ERR_XML_ERROR, - _("A network with forward mode=3D'%s' can speci= fy " - "a bridge name or a forward dev, but not " - "both (network '%s')"), + _("A network with forward mode=3D'%1$s' can spe= cify a bridge name or a forward dev, but not both (network '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; @@ -1968,8 +1928,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, case VIR_NETWORK_FORWARD_PASSTHROUGH: case VIR_NETWORK_FORWARD_HOSTDEV: virReportError(VIR_ERR_XML_ERROR, - _("mtu size only allowed in open, route, nat, " - "and isolated mode, not in %s (network '%s')"= ), + _("mtu size only allowed in open, route, nat, a= nd isolated mode, not in %1$s (network '%2$s')"), virNetworkForwardTypeToString(def->forward.type= ), def->name); return NULL; @@ -2037,7 +1996,7 @@ virNetworkDNSDefFormat(virBuffer *buf, =20 if (!fwd) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown enable type %d in network"), + _("Unknown enable type %1$d in network"), def->enable); return -1; } @@ -2048,7 +2007,7 @@ virNetworkDNSDefFormat(virBuffer *buf, =20 if (!fwd) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown forwardPlainNames type %d in network= "), + _("Unknown forwardPlainNames type %1$d in netwo= rk"), def->forwardPlainNames); return -1; } @@ -2378,7 +2337,7 @@ virNetworkDefFormatBuf(virBuffer *buf, =20 if (!mode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown forward type %d in network '%s'"), + _("Unknown forward type %1$d in network '%2$s'"= ), def->forward.type, def->name); return -1; } @@ -2408,7 +2367,7 @@ virNetworkDefFormatBuf(virBuffer *buf, =3D virNetworkForwardDriverNameTypeToString(def->forward.d= riverName); if (!driverName) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev driver name type %d "= ), + _("unexpected hostdev driver name type %1$d= "), def->forward.driverName); return -1; } @@ -2503,7 +2462,7 @@ virNetworkDefFormatBuf(virBuffer *buf, =20 if (!local) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown localOnly type %d in network"), + _("Unknown localOnly type %1$d in network"), def->domainLocalOnly); return -1; } @@ -2606,7 +2565,7 @@ virNetworkSaveXML(const char *configDir, =20 if (g_mkdir_with_parents(configDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory '%s'"), + _("cannot create config directory '%1$s'"), configDir); return -1; } @@ -2663,7 +2622,7 @@ static void virNetworkDefUpdateNoSupport(virNetworkDef *def, const char *section) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("can't update '%s' section of network '%s'"), + _("can't update '%1$s' section of network '%2$s'"), section, def->name); } =20 @@ -2672,7 +2631,7 @@ static void virNetworkDefUpdateUnknownCommand(unsigned int command) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unrecognized network update command code %d"), comma= nd); + _("unrecognized network update command code %1$d"), com= mand); } =20 =20 @@ -2683,8 +2642,7 @@ virNetworkDefUpdateCheckElementName(virNetworkDef *de= f, { if (!virXMLNodeNameEqual(node, section)) { virReportError(VIR_ERR_XML_ERROR, - _("unexpected element <%s>, expecting <%s>, " - "while updating network '%s'"), + _("unexpected element <%1$s>, expecting <%2$s>, whi= le updating network '%3$s'"), node->name, section, def->name); return -1; } @@ -2742,8 +2700,7 @@ virNetworkIPDefByIndex(virNetworkDef *def, int parent= Index) ipdef =3D virNetworkDefGetIPByIndex(def, AF_UNSPEC, parentIndex); if (!(ipdef)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't update dhcp host entry - no " - "element found at index %d in network '%s'"), + _("couldn't update dhcp host entry - no el= ement found at index %1$d in network '%2$s'"), parentIndex, def->name); } return ipdef; @@ -2765,8 +2722,8 @@ virNetworkIPDefByIndex(virNetworkDef *def, int parent= Index) } if (!ipdef) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't update dhcp host entry - no " - "element found in network '%s'"), def->name); + _("couldn't update dhcp host entry - no elemen= t found in network '%1$s'"), + def->name); } return ipdef; } @@ -2784,8 +2741,7 @@ virNetworkDefUpdateCheckMultiDHCP(virNetworkDef *def, if (ip !=3D ipdef) { if (ip->nranges || ip->nhosts) { virReportError(VIR_ERR_OPERATION_INVALID, - _("dhcp is supported only for a " - "single %s address on each network"), + _("dhcp is supported only for a single %1$s= address on each network"), (family =3D=3D AF_INET) ? "IPv4" : "IPv6"); return -1; } @@ -2849,9 +2805,7 @@ virNetworkDefUpdateIPDHCPHost(virNetworkDef *def, if (i =3D=3D ipdef->nhosts) { g_autofree char *ip =3D virSocketAddrFormat(&host.ip); virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate an existing dhcp host entry = with " - "\"mac=3D'%s'\" \"name=3D'%s'\" \"ip=3D'%s'\"= in" - " network '%s'"), + _("couldn't locate an existing dhcp host entry = with \"mac=3D'%1$s'\" \"name=3D'%2$s'\" \"ip=3D'%3$s'\" in network '%4$s'"), host.mac ? host.mac : _("unknown"), host.name, ip ? ip : _("unknown"), def->name); goto cleanup; @@ -2882,9 +2836,7 @@ virNetworkDefUpdateIPDHCPHost(virNetworkDef *def, g_autofree char *ip =3D virSocketAddrFormat(&host.ip); =20 virReportError(VIR_ERR_OPERATION_INVALID, - _("there is an existing dhcp host entry in " - "network '%s' that matches " - "\"\""), + _("there is an existing dhcp host entry in = network '%1$s' that matches \"\""), def->name, host.mac ? host.mac : _("unknown= "), host.name, ip ? ip : _("unknown")); goto cleanup; @@ -2912,8 +2864,8 @@ virNetworkDefUpdateIPDHCPHost(virNetworkDef *def, } if (i =3D=3D ipdef->nhosts) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate a matching dhcp host entry " - "in network '%s'"), def->name); + _("couldn't locate a matching dhcp host entry i= n network '%1$s'"), + def->name); goto cleanup; } =20 @@ -2994,9 +2946,7 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDef *def, g_autofree char *endip =3D virSocketAddrFormat(&range.addr.end= ); =20 virReportError(VIR_ERR_OPERATION_INVALID, - _("there is an existing dhcp range entry in " - "network '%s' that matches " - "\"\""), + _("there is an existing dhcp range entry in net= work '%1$s' that matches \"\""), def->name, startip ? startip : "unknown", endip ? endip : "unknown"); @@ -3013,8 +2963,8 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDef *def, =20 if (i =3D=3D ipdef->nranges) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate a matching dhcp range entry " - "in network '%s'"), def->name); + _("couldn't locate a matching dhcp range entry = in network '%1$s'"), + def->name); return -1; } =20 @@ -3089,9 +3039,7 @@ virNetworkDefUpdateForwardInterface(virNetworkDef *de= f, =20 if (i < def->forward.nifs) { virReportError(VIR_ERR_OPERATION_INVALID, - _("there is an existing interface entry " - "in network '%s' that matches " - "\"\""), + _("there is an existing interface entry in netw= ork '%1$s' that matches \"\""), def->name, iface.device.dev); goto cleanup; } @@ -3106,8 +3054,7 @@ virNetworkDefUpdateForwardInterface(virNetworkDef *de= f, =20 if (i =3D=3D def->forward.nifs) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't find an interface entry " - "in network '%s' matching "), + _("couldn't find an interface entry in network = '%1$s' matching "), def->name, iface.device.dev); goto cleanup; } @@ -3115,9 +3062,7 @@ virNetworkDefUpdateForwardInterface(virNetworkDef *de= f, /* fail if the interface is being used */ if (def->forward.ifs[i].connections > 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("unable to delete interface '%s' " - "in network '%s'. It is currently being used " - " by %d domains."), + _("unable to delete interface '%1$s' in network= '%2$s'. It is currently being used by %3$d domains."), iface.device.dev, def->name, def->forward.ifs[i].connections); goto cleanup; @@ -3184,17 +3129,14 @@ virNetworkDefUpdatePortGroup(virNetworkDef *def, ((command =3D=3D VIR_NETWORK_UPDATE_COMMAND_MODIFY) || (command =3D=3D VIR_NETWORK_UPDATE_COMMAND_DELETE))) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't find a portgroup entry " - "in network '%s' matching = "), + _("couldn't find a portgroup entry in network '%1$s= ' matching "), def->name, portgroup.name); goto cleanup; } else if (foundName >=3D 0 && ((command =3D=3D VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST) || (command =3D=3D VIR_NETWORK_UPDATE_COMMAND_ADD_LAST))) { virReportError(VIR_ERR_OPERATION_INVALID, - _("there is an existing portgroup entry in " - "network '%s' that matches " - "\"\""), + _("there is an existing portgroup entry in network = '%1$s' that matches \"\""), def->name, portgroup.name); goto cleanup; } @@ -3206,9 +3148,7 @@ virNetworkDefUpdatePortGroup(virNetworkDef *def, portgroup.isDefault && foundDefault >=3D 0 && foundDefault !=3D foundName) { virReportError(VIR_ERR_OPERATION_INVALID, - _("a different portgroup entry in " - "network '%s' is already set as the default. " - "Only one default is allowed."), + _("a different portgroup entry in network '%1$s' is= already set as the default. Only one default is allowed."), def->name); goto cleanup; } @@ -3305,8 +3245,7 @@ virNetworkDefUpdateDNSHost(virNetworkDef *def, =20 if (foundCt > 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("there is already at least one DNS HOST " - "record with a matching field in network %s"), + _("there is already at least one DNS HOST recor= d with a matching field in network %1$s"), def->name); goto cleanup; } @@ -3320,14 +3259,14 @@ virNetworkDefUpdateDNSHost(virNetworkDef *def, =20 if (foundCt =3D=3D 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate a matching DNS HOST " - "record in network %s"), def->name); + _("couldn't locate a matching DNS HOST record i= n network %1$s"), + def->name); goto cleanup; } if (foundCt > 1) { virReportError(VIR_ERR_OPERATION_INVALID, - _("multiple matching DNS HOST records were " - "found in network %s"), def->name); + _("multiple matching DNS HOST records were foun= d in network %1$s"), + def->name); goto cleanup; } =20 @@ -3392,8 +3331,7 @@ virNetworkDefUpdateDNSSrv(virNetworkDef *def, =20 if (foundCt > 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("there is already at least one DNS SRV " - "record matching all specified fields in netw= ork %s"), + _("there is already at least one DNS SRV record= matching all specified fields in network %1$s"), def->name); goto cleanup; } @@ -3407,14 +3345,14 @@ virNetworkDefUpdateDNSSrv(virNetworkDef *def, =20 if (foundCt =3D=3D 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate a matching DNS SRV " - "record in network %s"), def->name); + _("couldn't locate a matching DNS SRV record in= network %1$s"), + def->name); goto cleanup; } if (foundCt > 1) { virReportError(VIR_ERR_OPERATION_INVALID, - _("multiple DNS SRV records matching all specif= ied " - "fields were found in network %s"), def->name= ); + _("multiple DNS SRV records matching all specif= ied fields were found in network %1$s"), + def->name); goto cleanup; } =20 @@ -3472,8 +3410,7 @@ virNetworkDefUpdateDNSTxt(virNetworkDef *def, =20 if (foundIdx < dns->ntxts) { virReportError(VIR_ERR_OPERATION_INVALID, - _("there is already a DNS TXT record " - "with name '%s' in network %s"), + _("there is already a DNS TXT record with name = '%1$s' in network %2$s"), txt.name, def->name); goto cleanup; } @@ -3487,8 +3424,8 @@ virNetworkDefUpdateDNSTxt(virNetworkDef *def, =20 if (foundIdx =3D=3D dns->ntxts) { virReportError(VIR_ERR_OPERATION_INVALID, - _("couldn't locate a matching DNS TXT " - "record in network %s"), def->name); + _("couldn't locate a matching DNS TXT record in= network %1$s"), + def->name); goto cleanup; } =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464650; cv=none; d=zohomail.com; s=zohoarc; b=NaTgDNMxop/J73I+KwSR9FS6HWpsp3HgdPfSt9q2GiRsppuQON7tR1hLYH6NibpTz6Ymo2Nbm25f9nxziJMvZ56zeXFnfRaUkKJjEHNpd+2CNtz31QBUiN3ugOPcq8qkSCui1zBzAEbAfdqJDOejN92xzk8gkr46ZoQHSzvTsO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464650; 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=HN0kahEMZWR69+3D9n5/dvAxavQWaI2fDawQPZ5kZiM=; b=LYI16c4Okj2Eh+EilpICSo4KmG/cmAiLjXvmRivx7Ai+tD+2MN690gt4xMP+CjnsMqMoXLID8iz59Ds4L75hre5G0b3tfEMKdt3rfrKiACpQfIKV+w5Lwnls/gG2BbPvjyqF9IHyTAL4UCc5Ny9JuJAgMqGqgD86lPDIcXTyIFg= 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 1678464650081592.7506254855134; Fri, 10 Mar 2023 08:10:50 -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-107--n2sZBmBPx2Q2BKLBdhs7A-1; Fri, 10 Mar 2023 11:10:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5AF03183B3CB; Fri, 10 Mar 2023 16:10:29 +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 45FB240C83B6; Fri, 10 Mar 2023 16:10:29 +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 2779C1946A54; Fri, 10 Mar 2023 16:10:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D13D41946A5E for ; Fri, 10 Mar 2023 16:10:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A74F340C945A; Fri, 10 Mar 2023 16:10:26 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3208C40C1106 for ; Fri, 10 Mar 2023 16:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464649; 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=HN0kahEMZWR69+3D9n5/dvAxavQWaI2fDawQPZ5kZiM=; b=DCeknZo2+h1m4VQYxbhjUNckr3GOdRUkP1Be0qTxRomGQVhIREqR4uNQqlbx278r4EwAL/ 5i1ln1KBoCdbZHHPsN7Jk5wapu2pbcwea9SbcHmIFczdFoKyYvKdmhMOZPFJFE4WIscYGu bAfjSUGXSWCuN8IspJV7UD/NZpmYd1M= X-MC-Unique: -n2sZBmBPx2Q2BKLBdhs7A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 09/51] conf/node_device_conf: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:25 +0100 Message-Id: <4a0bd15f00115801fe2c4685ff6fa012f4dc8ec7.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.1 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: 1678464650956100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/node_device_conf.c | 178 ++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 91 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index af331baaf3..fcee9c027c 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -892,7 +892,7 @@ virNodeDevCapDRMParseXML(xmlXPathContextPtr ctxt, =20 if ((val =3D virNodeDevDRMTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown drm type '%s' for '%s'"), type, def->nam= e); + _("unknown drm type '%1$s' for '%2$s'"), type, def-= >name); return -1; } drm->type =3D val; @@ -937,7 +937,7 @@ virNodeDevCapMdevTypesParseXML(xmlXPathContextPtr ctxt, =20 if (!(type->device_api =3D virXPathString("string(./deviceAPI[1])"= , ctxt))) { virReportError(VIR_ERR_XML_ERROR, - _("missing device API for mediated device type = '%s'"), + _("missing device API for mediated device type = '%1$s'"), type->id); goto cleanup; } @@ -945,8 +945,7 @@ virNodeDevCapMdevTypesParseXML(xmlXPathContextPtr ctxt, if (virXPathUInt("string(./availableInstances)", ctxt, &type->available_instances) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("missing number of available instances for " - "mediated device type '%s'"), + _("missing number of available instances for me= diated device type '%1$s'"), type->id); goto cleanup; } @@ -1104,17 +1103,18 @@ virNodeDeviceCapVPDParseXML(xmlXPathContextPtr ctxt= , virPCIVPDResource **res) if (STREQ(access, "readonly")) { if (virNodeDeviceCapVPDParseReadOnlyFields(ctxt, newres) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Could not parse %s VPD resource fields"), acces= s); + _("Could not parse %1$s VPD resource fields"), acc= ess); return -1; } } else if (STREQ(access, "readwrite")) { if (virNodeDeviceCapVPDParseReadWriteFields(ctxt, newres) < 0)= { virReportError(VIR_ERR_XML_ERROR, - _("Could not parse %s VPD resource fields"), acces= s); + _("Could not parse %1$s VPD resource fields"), acc= ess); return -1; } } else { - virReportError(VIR_ERR_XML_ERROR, _("Unsupported VPD field acc= ess type specified %s"), + virReportError(VIR_ERR_XML_ERROR, + _("Unsupported VPD field access type specified = %1$s"), access); return -1; } @@ -1170,36 +1170,36 @@ virNodeDevCCWDeviceAddressParseXML(xmlXPathContextP= tr ctxt, =20 if (!(cssid =3D virXPathString("string(./cssid[1])", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing cssid value for '%s'"), dev_name); + _("missing cssid value for '%1$s'"), dev_name); return -1; } if (virStrToLong_uip(cssid, NULL, 0, &ccw_addr->cssid) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid cssid value '%s' for '%s'"), + _("invalid cssid value '%1$s' for '%2$s'"), cssid, dev_name); return -1; } =20 if (!(ssid =3D virXPathString("string(./ssid[1])", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing ssid value for '%s'"), dev_name); + _("missing ssid value for '%1$s'"), dev_name); return -1; } if (virStrToLong_uip(ssid, NULL, 0, &ccw_addr->ssid) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid ssid value '%s' for '%s'"), + _("invalid ssid value '%1$s' for '%2$s'"), ssid, dev_name); return -1; } =20 if (!(devno =3D virXPathString("string(./devno[1])", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing devno value for '%s'"), dev_name); + _("missing devno value for '%1$s'"), dev_name); return -1; } if (virStrToLong_uip(devno, NULL, 16, &ccw_addr->devno) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid devno value '%s' for '%s'"), + _("invalid devno value '%1$s' for '%2$s'"), devno, dev_name); return -1; } @@ -1312,13 +1312,13 @@ virNodeDevCapAPAdapterParseXML(xmlXPathContextPtr c= txt, =20 if (!(adapter =3D virXPathString("string(./ap-adapter[1])", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing ap-adapter value for '%s'"), def->name); + _("missing ap-adapter value for '%1$s'"), def->name= ); return -1; } =20 if (virStrToLong_uip(adapter, NULL, 0, ap_adapter) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid ap-adapter value '%s' for '%s'"), + _("invalid ap-adapter value '%1$s' for '%2$s'"), adapter, def->name); return -1; } @@ -1359,20 +1359,20 @@ virNodeDevCapAPQueueParseXML(xmlXPathContextPtr ctx= t, =20 if (!(dom =3D virXPathString("string(./ap-domain[1])", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing ap-domain value for '%s'"), def->name); + _("missing ap-domain value for '%1$s'"), def->name); return -1; } =20 if (virStrToLong_uip(dom, NULL, 0, &ap_queue->ap_domain) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid ap-domain value '%s' for '%s'"), + _("invalid ap-domain value '%1$s' for '%2$s'"), dom, def->name); return -1; } =20 if (ap_queue->ap_domain > 255) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("ap-domain value '%s' is out of range for '%s'"), + _("ap-domain value '%1$s' is out of range for '%2$s= '"), dom, def->name); return -1; } @@ -1423,7 +1423,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, storage->block =3D virXPathString("string(./block[1])", ctxt); if (!storage->block) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no block device path supplied for '%s'"), + _("no block device path supplied for '%1$s'"), def->name); return -1; } @@ -1442,7 +1442,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing storage capability type for '%s'"), + _("missing storage capability type for '%1$s'"), def->name); return -1; } @@ -1464,8 +1464,8 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, =20 val =3D 0; if (virNodeDevCapsDefParseULongLong("string(./media_size[1])",= ctxt, &val, def, - _("no removable media size= supplied for '%s'"), - _("invalid removable media= size supplied for '%s'")) < 0) { + _("no removable media size= supplied for '%1$s'"), + _("invalid removable media= size supplied for '%1$s'")) < 0) { return -1; } storage->removable_media_size =3D val; @@ -1473,7 +1473,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, ctxt->node =3D orignode2; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage capability type '%s' for '%s= '"), + _("unknown storage capability type '%1$s' for '= %2$s'"), type, def->name); return -1; } @@ -1482,8 +1482,8 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, if (!(storage->flags & VIR_NODE_DEV_CAP_STORAGE_REMOVABLE)) { val =3D 0; if (virNodeDevCapsDefParseULongLong("string(./size[1])", ctxt, &va= l, def, - _("no size supplied for '%s'"), - _("invalid size supplied for '= %s'")) < 0) + _("no size supplied for '%1$s'= "), + _("invalid size supplied for '= %1$s'")) < 0) return -1; storage->size =3D val; } @@ -1504,26 +1504,26 @@ virNodeDevCapSCSIParseXML(xmlXPathContextPtr ctxt, =20 if (virNodeDevCapsDefParseUInt("string(./host[1])", ctxt, &scsi->host, def, - _("no SCSI host ID supplied for '%s'"), - _("invalid SCSI host ID supplied for '%= s'")) < 0) + _("no SCSI host ID supplied for '%1$s'"= ), + _("invalid SCSI host ID supplied for '%= 1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./bus[1])", ctxt, &scsi->bus, def, - _("no SCSI bus ID supplied for '%s'"), - _("invalid SCSI bus ID supplied for '%s= '")) < 0) + _("no SCSI bus ID supplied for '%1$s'"), + _("invalid SCSI bus ID supplied for '%1= $s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./target[1])", ctxt, &scsi->target, def, - _("no SCSI target ID supplied for '%s'"= ), - _("invalid SCSI target ID supplied for = '%s'")) < 0) + _("no SCSI target ID supplied for '%1$s= '"), + _("invalid SCSI target ID supplied for = '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./lun[1])", ctxt, &scsi->lun, def, - _("no SCSI LUN ID supplied for '%s'"), - _("invalid SCSI LUN ID supplied for '%s= '")) < 0) + _("no SCSI LUN ID supplied for '%1$s'"), + _("invalid SCSI LUN ID supplied for '%1= $s'")) < 0) return -1; =20 scsi->type =3D virXPathString("string(./type[1])", ctxt); @@ -1548,7 +1548,7 @@ virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr ct= xt, scsi_target->name =3D virXPathString("string(./target[1])", ctxt); if (!scsi_target->name) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no target name supplied for '%s'"), + _("no target name supplied for '%1$s'"), def->name); return -1; } @@ -1562,7 +1562,7 @@ virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr ct= xt, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing type for SCSI target capability for = '%s'"), + _("missing type for SCSI target capability for = '%1$s'"), def->name); return -1; } @@ -1576,20 +1576,20 @@ virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr = ctxt, ctxt, &scsi_target->rport) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing rport name for '%s'"), def->name= ); + _("missing rport name for '%1$s'"), def->na= me); return -1; } =20 if (virNodeDevCapsDefParseString("string(./wwpn[1])", ctxt, &scsi_target->wwpn) < 0= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing wwpn identifier for '%s'"), + _("missing wwpn identifier for '%1$s'"), def->name); return -1; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown SCSI target capability type '%s' for= '%s'"), + _("unknown SCSI target capability type '%1$s' f= or '%2$s'"), type, def->name); return -1; } @@ -1617,15 +1617,15 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ct= xt, if (create =3D=3D EXISTING_DEVICE) { if (virNodeDevCapsDefParseUInt("string(./host[1])", ctxt, &scsi_host->host, def, - _("no SCSI host ID supplied for '%s= '"), - _("invalid SCSI host ID supplied fo= r '%s'")) < 0) { + _("no SCSI host ID supplied for '%1= $s'"), + _("invalid SCSI host ID supplied fo= r '%1$s'")) < 0) { return -1; } /* Optional unique_id value */ scsi_host->unique_id =3D -1; if (virNodeDevCapsDefParseIntOptional("string(./unique_id[1])", ct= xt, &scsi_host->unique_id, def, - _("invalid unique_id supplie= d for '%s'")) < 0) { + _("invalid unique_id supplie= d for '%1$s'")) < 0) { return -1; } } @@ -1639,7 +1639,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt, =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing SCSI host capability type for '%s'"), + _("missing SCSI host capability type for '%1$s'= "), def->name); return -1; } @@ -1658,8 +1658,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt, &scsi_host->wwnn) < 0) { if (virRandomGenerateWWN(&scsi_host->wwnn, virt_type) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no WWNN supplied for '%s', and " - "auto-generation failed"), + _("no WWNN supplied for '%1$s', and aut= o-generation failed"), def->name); return -1; } @@ -1670,8 +1669,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt, &scsi_host->wwpn) < 0) { if (virRandomGenerateWWN(&scsi_host->wwpn, virt_type) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no WWPN supplied for '%s', and " - "auto-generation failed"), + _("no WWPN supplied for '%1$s', and aut= o-generation failed"), def->name); return -1; } @@ -1684,7 +1682,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt, =20 } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown SCSI host capability type '%s' for '= %s'"), + _("unknown SCSI host capability type '%1$s' for= '%2$s'"), type, def->name); return -1; } @@ -1712,7 +1710,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt, net->ifname =3D virXPathString("string(./interface[1])", ctxt); if (!net->ifname) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no network interface supplied for '%s'"), + _("no network interface supplied for '%1$s'"), def->name); return -1; } @@ -1736,7 +1734,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt, =20 if ((val =3D virNetDevFeatureTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("unknown network device feature '%s'"), + _("unknown network device feature '%1$s'"), tmp); return -1; } @@ -1750,7 +1748,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt, int val =3D virNodeDevNetCapTypeFromString(type); if (val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid network type supplied for '%s'"), + _("invalid network type supplied for '%1$s'"), def->name); return -1; } @@ -1777,26 +1775,26 @@ virNodeDevCapUSBInterfaceParseXML(xmlXPathContextPt= r ctxt, =20 if (virNodeDevCapsDefParseUInt("string(./number[1])", ctxt, &usb_if->number, def, - _("no USB interface number supplied for= '%s'"), - _("invalid USB interface number supplie= d for '%s'")) < 0) + _("no USB interface number supplied for= '%1$s'"), + _("invalid USB interface number supplie= d for '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./class[1])", ctxt, &usb_if->klass, def, - _("no USB interface class supplied for = '%s'"), - _("invalid USB interface class supplied= for '%s'")) < 0) + _("no USB interface class supplied for = '%1$s'"), + _("invalid USB interface class supplied= for '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./subclass[1])", ctxt, &usb_if->subclass, def, - _("no USB interface subclass supplied f= or '%s'"), - _("invalid USB interface subclass suppl= ied for '%s'")) < 0) + _("no USB interface subclass supplied f= or '%1$s'"), + _("invalid USB interface subclass suppl= ied for '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./protocol[1])", ctxt, &usb_if->protocol, def, - _("no USB interface protocol supplied f= or '%s'"), - _("invalid USB interface protocol suppl= ied for '%s'")) < 0) + _("no USB interface protocol supplied f= or '%1$s'"), + _("invalid USB interface protocol suppl= ied for '%1$s'")) < 0) return -1; =20 usb_if->description =3D virXPathString("string(./description[1])", ctx= t); @@ -1839,26 +1837,26 @@ virNodeDevCapUSBDevParseXML(xmlXPathContextPtr ctxt, =20 if (virNodeDevCapsDefParseUInt("string(./bus[1])", ctxt, &usb_dev->bus, def, - _("no USB bus number supplied for '%s'"= ), - _("invalid USB bus number supplied for = '%s'")) < 0) + _("no USB bus number supplied for '%1$s= '"), + _("invalid USB bus number supplied for = '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseUInt("string(./device[1])", ctxt, &usb_dev->device, def, - _("no USB device number supplied for '%= s'"), - _("invalid USB device number supplied f= or '%s'")) < 0) + _("no USB device number supplied for '%= 1$s'"), + _("invalid USB device number supplied f= or '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseHexId("string(./vendor[1]/@id)", ctxt, &usb_dev->vendor, def, - _("no USB vendor ID supplied for '%s'"= ), - _("invalid USB vendor ID supplied for = '%s'")) < 0) + _("no USB vendor ID supplied for '%1$s= '"), + _("invalid USB vendor ID supplied for = '%1$s'")) < 0) return -1; =20 if (virNodeDevCapsDefParseHexId("string(./product[1]/@id)", ctxt, &usb_dev->product, def, - _("no USB product ID supplied for '%s'= "), - _("invalid USB product ID supplied for= '%s'")) < 0) + _("no USB product ID supplied for '%1$= s'"), + _("invalid USB product ID supplied for= '%1$s'")) < 0) return -1; =20 usb_dev->vendor_name =3D virXPathString("string(./vendor[1])", ctxt); @@ -2075,7 +2073,7 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt, if (virStrToLong_i(tmp, NULL, 16, &pci_dev->klass) < 0 || pci_dev->klass > 0xffffff) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid PCI class supplied for '%s'"), def->= name); + _("invalid PCI class supplied for '%1$s'"), def= ->name); goto out; } } else { @@ -2084,38 +2082,38 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt, =20 if (virNodeDevCapsDefParseUInt("string(./domain[1])", ctxt, &pci_dev->domain, def, - _("no PCI domain ID supplied for '%s'"), - _("invalid PCI domain ID supplied for '= %s'")) < 0) + _("no PCI domain ID supplied for '%1$s'= "), + _("invalid PCI domain ID supplied for '= %1$s'")) < 0) goto out; =20 if (virNodeDevCapsDefParseUInt("string(./bus[1])", ctxt, &pci_dev->bus, def, - _("no PCI bus ID supplied for '%s'"), - _("invalid PCI bus ID supplied for '%s'= ")) < 0) + _("no PCI bus ID supplied for '%1$s'"), + _("invalid PCI bus ID supplied for '%1$= s'")) < 0) goto out; =20 if (virNodeDevCapsDefParseUInt("string(./slot[1])", ctxt, &pci_dev->slot, def, - _("no PCI slot ID supplied for '%s'"), - _("invalid PCI slot ID supplied for '%s= '")) < 0) + _("no PCI slot ID supplied for '%1$s'"), + _("invalid PCI slot ID supplied for '%1= $s'")) < 0) goto out; =20 if (virNodeDevCapsDefParseUInt("string(./function[1])", ctxt, &pci_dev->function, def, - _("no PCI function ID supplied for '%s'= "), - _("invalid PCI function ID supplied for= '%s'")) < 0) + _("no PCI function ID supplied for '%1$= s'"), + _("invalid PCI function ID supplied for= '%1$s'")) < 0) goto out; =20 if (virNodeDevCapsDefParseHexId("string(./vendor[1]/@id)", ctxt, &pci_dev->vendor, def, - _("no PCI vendor ID supplied for '%s'"= ), - _("invalid PCI vendor ID supplied for = '%s'")) < 0) + _("no PCI vendor ID supplied for '%1$s= '"), + _("invalid PCI vendor ID supplied for = '%1$s'")) < 0) goto out; =20 if (virNodeDevCapsDefParseHexId("string(./product[1]/@id)", ctxt, &pci_dev->product, def, - _("no PCI product ID supplied for '%s'= "), - _("invalid PCI product ID supplied for= '%s'")) < 0) + _("no PCI product ID supplied for '%1$= s'"), + _("invalid PCI product ID supplied for= '%1$s'")) < 0) goto out; =20 pci_dev->vendor_name =3D virXPathString("string(./vendor[1])", ctxt); @@ -2140,7 +2138,7 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt, pci_dev->numa_node =3D -1; if (virNodeDevCapsDefParseIntOptional("string(./numa[1]/@node)", ctxt, &pci_dev->numa_node, def, - _("invalid NUMA node ID supplied= for '%s'")) < 0) + _("invalid NUMA node ID supplied= for '%1$s'")) < 0) goto out; =20 if ((pciExpress =3D virXPathNode("./pci-express[1]", ctxt))) { @@ -2182,13 +2180,13 @@ virNodeDevCapSystemParseXML(xmlXPathContextPtr ctxt, tmp =3D virXPathString("string(./hardware/uuid[1])", ctxt); if (!tmp) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no system UUID supplied for '%s'"), def->name); + _("no system UUID supplied for '%1$s'"), def->name); return -1; } =20 if (virUUIDParse(tmp, hardware->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed uuid element for '%s'"), def->name); + _("malformed uuid element for '%1$s'"), def->name); return -1; } =20 @@ -2237,7 +2235,7 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, =20 if (!(mdev->type =3D virXPathString("string(./type[1]/@id)", ctxt))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing type id attribute for '%s'"), def->name); + _("missing type id attribute for '%1$s'"), def->nam= e); return -1; } =20 @@ -2246,7 +2244,7 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, /* make sure that the provided uuid is valid */ if (virUUIDParse(uuidstr, uuidbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid uuid '%s' for new mdev device"), uui= dstr); + _("Invalid uuid '%1$s' for new mdev device"), u= uidstr); return -1; } mdev->uuid =3D g_new0(char, VIR_UUID_STRING_BUFLEN); @@ -2258,7 +2256,7 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, if (virXPathUInt("string(./iommuGroup[1]/@number)", ctxt, &mdev->iommuGroupNumber) < -1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid iommuGroup number attribute for '%s'"), + _("invalid iommuGroup number attribute for '%1$s'"), def->name); return -1; } @@ -2353,7 +2351,7 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt, case VIR_NODE_DEV_CAP_VPD: case VIR_NODE_DEV_CAP_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown capability type '%d' for '%s'"), + _("unknown capability type '%1$d' for '%2$s'"), caps->data.type, def->name); ret =3D -1; break; @@ -2426,16 +2424,14 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt, def->parent_wwpn =3D virXPathString("string(./parent[1]/@wwpn)", ctxt); if (def->parent_wwnn && !def->parent_wwpn) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent wwnn=3D'%s', the " - "wwpn must also be provided"), + _("when providing parent wwnn=3D'%1$s', the wwpn mu= st also be provided"), def->parent_wwnn); return NULL; } =20 if (!def->parent_wwnn && def->parent_wwpn) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent wwpn=3D'%s', the " - "wwnn must also be provided"), + _("when providing parent wwpn=3D'%1$s', the wwnn mu= st also be provided"), def->parent_wwpn); return NULL; } @@ -2448,7 +2444,7 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt, =20 if (n =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no device capabilities for '%s'"), + _("no device capabilities for '%1$s'"), def->name); return NULL; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464642; cv=none; d=zohomail.com; s=zohoarc; b=hzynti50S7DyBBtCl5fmPrZeOuY3GMDcN/KiNPowfeo9K0pCVaLFMcwX/bdOr3wmDJE1ph90O52cfJq8YeMM3Xguo+mIM7yz7ASMs7Wea0vUVw2IqAzscK7cZZTb2z4QjW/eXEkannCK8mAPNem+MmYHXJPhK6YhQ6Uq54XjAbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464642; 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=ybwPPCne6NDc64LBgAER8hsrxW9KH+I9pcyLRzNYAs0=; b=J4crNlsP/Ofy+38CQ4lWPB4yl5vlCEjzjg5nTtSAKP4xEJ6A8IllYX8WBsjHahO5yj9NDiJMRIeZ811ib6iHVih7wjN+u/quVCocYNnsDyMngBK5rZd/94634xtEkYdYsWfJge+1dmweAx36Hsvk5c9GDnFqt5IxRw/Hgt8giUg= 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 1678464642026962.3915529541069; Fri, 10 Mar 2023 08:10:42 -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-672-eYxWR-PyNLOMJY8jn4hl6w-1; Fri, 10 Mar 2023 11:10:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D185F183B3E0; Fri, 10 Mar 2023 16:10:29 +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 AB8BF2166B2D; Fri, 10 Mar 2023 16:10:29 +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 65E771946A79; Fri, 10 Mar 2023 16:10:29 +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 316DD1946587 for ; Fri, 10 Mar 2023 16:10:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1751840B40E4; Fri, 10 Mar 2023 16:10:28 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DDE240CE2A7 for ; Fri, 10 Mar 2023 16:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464640; 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=ybwPPCne6NDc64LBgAER8hsrxW9KH+I9pcyLRzNYAs0=; b=JLj97v3H6J1BIA1UJYNw0EFDthuM/PPIA6LnYdqi10z5MEgXaEEPWVMkwtQoSgkpFytxI1 X5GV6Yx/zhNiQuJ+IH5yQHas1AhqMF+UuTM9xGQuYY3XtqtrKbXxBLqR11JjBsX9wZNqd9 C9Ubyyo0Zbwj575cWoQxgdRT8iy81ck= X-MC-Unique: eYxWR-PyNLOMJY8jn4hl6w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 10/51] conf: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:26 +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.6 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: 1678464642995100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/backup_conf.c | 16 +++--- src/conf/capabilities.c | 21 ++++---- src/conf/checkpoint_conf.c | 8 +-- src/conf/cpu_conf.c | 46 ++++++++-------- src/conf/device_conf.c | 2 +- src/conf/domain_addr.c | 79 ++++++++++++---------------- src/conf/domain_capabilities.c | 3 +- src/conf/domain_event.c | 4 +- src/conf/domain_postparse.c | 30 +++++------ src/conf/interface_conf.c | 17 +++--- src/conf/netdev_bandwidth_conf.c | 10 ++-- src/conf/netdev_vlan_conf.c | 10 ++-- src/conf/netdev_vport_profile_conf.c | 2 +- src/conf/networkcommon_conf.c | 64 +++++++--------------- src/conf/node_device_util.c | 6 +-- src/conf/numa_conf.c | 67 ++++++++++------------- src/conf/nwfilter_conf.c | 23 ++++---- src/conf/nwfilter_params.c | 25 +++++---- src/conf/object_event.c | 10 ++-- src/conf/secret_conf.c | 8 +-- src/conf/snapshot_conf.c | 45 +++++++--------- src/conf/storage_adapter_conf.c | 6 +-- src/conf/storage_conf.c | 26 ++++----- src/conf/storage_encryption_conf.c | 4 +- src/conf/storage_source_conf.c | 15 +++--- src/conf/virchrdev.c | 13 ++--- src/conf/virdomainjob.c | 25 +++------ src/conf/virdomainmomentobjlist.c | 8 +-- src/conf/virdomainobjlist.c | 18 +++---- src/conf/virnetworkobj.c | 24 ++++----- src/conf/virnetworkportdef.c | 14 ++--- src/conf/virnodedeviceobj.c | 9 ++-- src/conf/virnwfilterbindingdef.c | 4 +- src/conf/virnwfilterbindingobj.c | 4 +- src/conf/virnwfilterbindingobjlist.c | 8 +-- src/conf/virnwfilterobj.c | 12 ++--- src/conf/virsecretobj.c | 22 ++++---- src/conf/virstorageobj.c | 22 ++++---- 38 files changed, 323 insertions(+), 407 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index ad5633388d..4a8c05dca9 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -159,7 +159,7 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node, if (def->store->type !=3D VIR_STORAGE_TYPE_FILE && def->store->type !=3D VIR_STORAGE_TYPE_BLOCK) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported disk backup type '%s'"), type); + _("unsupported disk backup type '%1$s'"), type); return -1; } =20 @@ -210,7 +210,7 @@ virDomainBackupDefParseXML(xmlXPathContextPtr ctxt, if ((mode =3D virXMLPropString(ctxt->node, "mode"))) { if ((def->type =3D virDomainBackupTypeFromString(mode)) <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown backup mode '%s'"), mode); + _("unknown backup mode '%1$s'"), mode); return NULL; } } @@ -240,7 +240,7 @@ virDomainBackupDefParseXML(xmlXPathContextPtr ctxt, if (def->server->transport =3D=3D VIR_STORAGE_NET_HOST_TRANS_UNIX = && !g_path_is_absolute(def->server->socket)) { virReportError(VIR_ERR_XML_ERROR, - _("backup socket path '%s' must be absolute"), + _("backup socket path '%1$s' must be absolute"), def->server->socket); return NULL; } @@ -419,7 +419,7 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDef *d= isk, if (virStorageSourceIsEmpty(src)) { if (disk->store) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' has no media"), disk->name); + _("disk '%1$s' has no media"), disk->name); return -1; } } else if (!disk->store) { @@ -429,7 +429,7 @@ virDomainBackupDefAssignStore(virDomainBackupDiskDef *d= isk, disk->store->path =3D g_strdup_printf("%s.%s", src->path, suff= ix); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("refusing to generate file name for disk '%s'= "), + _("refusing to generate file name for disk '%1$= s'"), disk->name); return -1; } @@ -463,13 +463,13 @@ virDomainBackupAlignDisks(virDomainBackupDef *def, =20 if (!(domdisk =3D virDomainDiskByTarget(dom, backupdisk->name))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), backupdisk->name); + _("no disk named '%1$s'"), backupdisk->name); return -1; } =20 if (virHashAddEntry(disks, backupdisk->name, NULL) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), backupdisk->name); return -1; } @@ -478,7 +478,7 @@ virDomainBackupAlignDisks(virDomainBackupDef *def, !backupdisk->incremental && !def->incremental) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'incremental' backup mode of disk '%s' requi= res setting 'incremental' field for disk or backup"), + _("'incremental' backup mode of disk '%1$s' req= uires setting 'incremental' field for disk or backup"), backupdisk->name); return -1; } diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 34770fc416..a3588abcc0 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -713,7 +713,7 @@ virCapabilitiesDomainDataLookupInternal(virCaps *caps, virBufferAsprintf(&buf, "%s", _("any configuration")); =20 virReportError(VIR_ERR_INVALID_ARG, - _("could not find capabilities for %s"), + _("could not find capabilities for %1$s"), virBufferCurrentContent(&buf)); return ret; } @@ -1398,8 +1398,7 @@ virCapabilitiesHostNUMAGetCellCpus(virCapsHostNUMA *c= aps, for (cpu =3D 0; cell && cpu < cell->ncpus; cpu++) { if (virBitmapSetBit(cpumask, cell->cpus[cpu].id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cpu '%u' in node '%zu' is out of range " - "of the provided bitmap"), + _("Cpu '%1$u' in node '%2$zu' is out of range o= f the provided bitmap"), cell->cpus[cpu].id, node); return -1; } @@ -1560,7 +1559,7 @@ virCapabilitiesGetNodeCacheReadFileUint(const char *p= refix, if (rv < 0) { if (rv =3D=3D -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s' does not exist"), + _("File '%1$s' does not exist"), path); } return -1; @@ -1582,7 +1581,7 @@ virCapabilitiesGetNodeCacheReadFileUllong(const char = *prefix, if (rv < 0) { if (rv =3D=3D -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s' does not exist"), + _("File '%1$s' does not exist"), path); } return -1; @@ -1629,7 +1628,7 @@ virCapabilitiesGetNodeCache(int node, =20 if (virStrToLong_ui(dname, NULL, 10, &cache.level) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -1655,7 +1654,7 @@ virCapabilitiesGetNodeCache(int node, case 2: cache.associativity =3D VIR_NUMA_CACHE_ASSOCIATIVITY_NONE;= break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown indexing value '%u'"), + _("unknown indexing value '%1$u'"), indexing); return -1; } @@ -1671,7 +1670,7 @@ virCapabilitiesGetNodeCache(int node, case 2: cache.policy =3D VIR_NUMA_CACHE_POLICY_NONE; break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown write_policy value '%u'"), + _("unknown write_policy value '%1$u'"), write_policy); return -1; } @@ -1851,7 +1850,7 @@ virCapabilitiesHostNUMAInitInterconnectsNode(GArray *= interconnects, =20 if (virStrToLong_ui(dname, NULL, 10, &initNode) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -1915,7 +1914,7 @@ virCapabilitiesHostNUMAInitInterconnects(virCapsHostN= UMA *caps) =20 if (virStrToLong_ui(dname, NULL, 10, &node) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -2260,7 +2259,7 @@ virCapabilitiesInitCaches(virCaps *caps) kernel_type =3D virCacheKernelTypeFromString(type); if (kernel_type < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown cache type '%s'"), type); + _("Unknown cache type '%1$s'"), type); return -1; } =20 diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 6656089457..89f8675235 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -283,13 +283,13 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef = *chkdef) =20 if (!domdisk) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), chkdisk->name); + _("no disk named '%1$s'"), chkdisk->name); return -1; } =20 if (virHashHasEntry(map, domdisk->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), chkdisk->name); return -1; } @@ -301,7 +301,7 @@ virDomainCheckpointAlignDisks(virDomainCheckpointDef *c= hkdef) domdisk->src->readonly) && chkdisk->type !=3D VIR_DOMAIN_CHECKPOINT_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' is empty or readonly"), + _("disk '%1$s' is empty or readonly"), chkdisk->name); return -1; } @@ -471,7 +471,7 @@ virDomainCheckpointRedefinePrep(virDomainObj *vm, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_INVALID_ARG, - _("definition for checkpoint %s must use uuid %= s"), + _("definition for checkpoint %1$s must use uuid= %2$s"), def->parent.name, uuidstr); return -1; } diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index ba7428bc93..2b361d2c68 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -416,7 +416,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, =20 if (def->mode < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid mode attribute '%s'"), + _("Invalid mode attribute '%1$s'"), cpuMode); return -1; } @@ -465,7 +465,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, } if ((def->arch =3D virArchFromString(arch)) =3D=3D VIR_ARCH_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown architecture %s"), arch); + _("Unknown architecture %1$s"), arch); return -1; } =20 @@ -537,7 +537,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, ctxt))) { if (strlen(vendor_id) !=3D VIR_CPU_VENDOR_ID_LENGTH) { virReportError(VIR_ERR_XML_ERROR, - _("vendor_id must be exactly %d characters = long"), + _("vendor_id must be exactly %1$d character= s long"), VIR_CPU_VENDOR_ID_LENGTH); return -1; } @@ -634,7 +634,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, for (j =3D 0; j < i; j++) { if (STREQ(name, def->features[j].name)) { virReportError(VIR_ERR_XML_ERROR, - _("CPU feature '%s' specified more than onc= e"), + _("CPU feature '%1$s' specified more than o= nce"), name); return -1; } @@ -707,7 +707,7 @@ virCPUDefFormatBufFull(virBuffer *buf, =20 if (!(tmp =3D virCPUModeTypeToString(def->mode))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU mode %d"), def->mode); + _("Unexpected CPU mode %1$d"), def->mode); return -1; } virBufferAsprintf(&attributeBuf, " mode=3D'%s'", tmp); @@ -715,7 +715,7 @@ virCPUDefFormatBufFull(virBuffer *buf, if (def->mode =3D=3D VIR_CPU_MODE_CUSTOM) { if (!(tmp =3D virCPUMatchTypeToString(def->match))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU match policy %d"), + _("Unexpected CPU match policy %1$d"), def->match); return -1; } @@ -778,7 +778,7 @@ virCPUDefFormatBuf(virBuffer *buf, fallback =3D virCPUFallbackTypeToString(def->fallback); if (!fallback) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU fallback value: %d"), + _("Unexpected CPU fallback value: %1$d"), def->fallback); return -1; } @@ -861,7 +861,7 @@ virCPUDefFormatBuf(virBuffer *buf, policy =3D virCPUFeaturePolicyTypeToString(feature->policy); if (!policy) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected CPU feature policy %d"), + _("Unexpected CPU feature policy %1$d"), feature->policy); return -1; } @@ -906,7 +906,7 @@ virCPUDefAddFeatureInternal(virCPUDef *def, case VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU feature '%s' specified more than once"), + _("CPU feature '%1$s' specified more than once"= ), name); return -1; } @@ -1039,71 +1039,71 @@ virCPUDefIsEqual(virCPUDef *src, } =20 if (src->type !=3D dst->type) { - MISMATCH(_("Target CPU type %s does not match source %s"), + MISMATCH(_("Target CPU type %1$s does not match source %2$s"), virCPUTypeToString(dst->type), virCPUTypeToString(src->type)); return false; } =20 if (src->mode !=3D dst->mode) { - MISMATCH(_("Target CPU mode %s does not match source %s"), + MISMATCH(_("Target CPU mode %1$s does not match source %2$s"), virCPUModeTypeToString(dst->mode), virCPUModeTypeToString(src->mode)); return false; } =20 if (src->check !=3D dst->check) { - MISMATCH(_("Target CPU check %s does not match source %s"), + MISMATCH(_("Target CPU check %1$s does not match source %2$s"), virCPUCheckTypeToString(dst->check), virCPUCheckTypeToString(src->check)); return false; } =20 if (src->arch !=3D dst->arch) { - MISMATCH(_("Target CPU arch %s does not match source %s"), + MISMATCH(_("Target CPU arch %1$s does not match source %2$s"), virArchToString(dst->arch), virArchToString(src->arch)); return false; } =20 if (STRNEQ_NULLABLE(src->model, dst->model)) { - MISMATCH(_("Target CPU model %s does not match source %s"), + MISMATCH(_("Target CPU model %1$s does not match source %2$s"), NULLSTR(dst->model), NULLSTR(src->model)); return false; } =20 if (STRNEQ_NULLABLE(src->vendor, dst->vendor)) { - MISMATCH(_("Target CPU vendor %s does not match source %s"), + MISMATCH(_("Target CPU vendor %1$s does not match source %2$s"), NULLSTR(dst->vendor), NULLSTR(src->vendor)); return false; } =20 if (STRNEQ_NULLABLE(src->vendor_id, dst->vendor_id)) { - MISMATCH(_("Target CPU vendor id %s does not match source %s"), + MISMATCH(_("Target CPU vendor id %1$s does not match source %2$s"), NULLSTR(dst->vendor_id), NULLSTR(src->vendor_id)); return false; } =20 if (src->sockets !=3D dst->sockets) { - MISMATCH(_("Target CPU sockets %d does not match source %d"), + MISMATCH(_("Target CPU sockets %1$d does not match source %2$d"), dst->sockets, src->sockets); return false; } =20 if (src->dies !=3D dst->dies) { - MISMATCH(_("Target CPU dies %d does not match source %d"), + MISMATCH(_("Target CPU dies %1$d does not match source %2$d"), dst->dies, src->dies); return false; } =20 if (src->cores !=3D dst->cores) { - MISMATCH(_("Target CPU cores %d does not match source %d"), + MISMATCH(_("Target CPU cores %1$d does not match source %2$d"), dst->cores, src->cores); return false; } =20 if (src->threads !=3D dst->threads) { - MISMATCH(_("Target CPU threads %d does not match source %d"), + MISMATCH(_("Target CPU threads %1$d does not match source %2$d"), dst->threads, src->threads); return false; } @@ -1118,20 +1118,20 @@ virCPUDefIsEqual(virCPUDef *src, } =20 if (src->nfeatures !=3D dst->nfeatures) { - MISMATCH(_("Target CPU feature count %zu does not match source %zu= "), + MISMATCH(_("Target CPU feature count %1$zu does not match source %= 2$zu"), dst->nfeatures, src->nfeatures); return false; } =20 for (i =3D 0; i < src->nfeatures; i++) { if (STRNEQ(src->features[i].name, dst->features[i].name)) { - MISMATCH(_("Target CPU feature %s does not match source %s"), + MISMATCH(_("Target CPU feature %1$s does not match source %2$s= "), dst->features[i].name, src->features[i].name); return false; } =20 if (src->features[i].policy !=3D dst->features[i].policy) { - MISMATCH(_("Target CPU feature policy %s does not match source= %s"), + MISMATCH(_("Target CPU feature policy %1$s does not match sour= ce %2$s"), virCPUFeaturePolicyTypeToString(dst->features[i].poli= cy), virCPUFeaturePolicyTypeToString(src->features[i].poli= cy)); return false; diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index a116e39c75..aa0cc8945c 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -272,7 +272,7 @@ virCCWDeviceAddressParseXML(xmlNodePtr node, =20 if (!virCCWDeviceAddressIsValid(addr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid specification for virtio ccw address: cs= sid=3D'0x%x' ssid=3D'0x%x' devno=3D'0x%04x'"), + _("Invalid specification for virtio ccw address: cs= sid=3D'0x%1$x' ssid=3D'0x%2$x' devno=3D'0x%3$04x'"), addr->cssid, addr->ssid, addr->devno); return -1; } diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index b6534f502c..27ce4a61ca 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -38,14 +38,14 @@ virDomainZPCIAddressReserveId(GHashTable *set, =20 if (!id->isSet) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No zPCI %s to reserve"), + _("No zPCI %1$s to reserve"), name); return -1; } =20 if (g_hash_table_lookup(set, &id->value)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("zPCI %s %o is already reserved"), + _("zPCI %1$s %2$o is already reserved"), name, id->value); return -1; } @@ -88,7 +88,7 @@ virDomainZPCIAddressAssignId(GHashTable *set, while (g_hash_table_lookup(set, &min)) { if (min =3D=3D max) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("There is no more free %s."), + _("There is no more free %1$s."), name); return -1; } @@ -314,8 +314,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress = *addr, } else { if (reportError) { virReportError(errType, - _("The device at PCI address %s needs to be= " - "an integrated device (bus=3D0)"), + _("The device at PCI address %1$s needs to = be an integrated device (bus=3D0)"), addrStr); } return false; @@ -341,9 +340,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress = *addr, !(busFlags & VIR_PCI_CONNECT_AUTOASSIGN)) { if (reportError) { virReportError(errType, - _("The device at PCI address %s was auto-assign= ed " - "this address, but the PCI controller " - "with index=3D'%d' doesn't allow auto-assignm= ent"), + _("The device at PCI address %1$s was auto-assi= gned this address, but the PCI controller with index=3D'%2$d' doesn't allow= auto-assignment"), addrStr, addr->bus); } return false; @@ -353,9 +350,7 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress = *addr, !(busFlags & VIR_PCI_CONNECT_HOTPLUGGABLE)) { if (reportError) { virReportError(errType, - _("The device at PCI address %s requires " - "hotplug capability, but the PCI controller " - "with index=3D'%d' doesn't support hotplug"), + _("The device at PCI address %1$s requires hotp= lug capability, but the PCI controller with index=3D'%2$d' doesn't support = hotplug"), addrStr, addr->bus); } return false; @@ -396,15 +391,12 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddres= s *addr, * bug in the code that sets the flag bits for devices. */ virReportError(errType, - _("The device at PCI address %s has " - "unrecognized connection type flags 0x%.2x"), + _("The device at PCI address %1$s has unrecogni= zed connection type flags 0x%2$.2x"), addrStr, devFlags & VIR_PCI_CONNECT_TYPES_MASK); return false; } virReportError(errType, - _("The device at PCI address %s cannot be " - "plugged into the PCI controller with index=3D'%d= '. " - "It requires a controller that accepts a %s."), + _("The device at PCI address %1$s cannot be plugged= into the PCI controller with index=3D'%2$d'. It requires a controller that= accepts a %3$s."), addrStr, addr->bus, connectStr); return false; } @@ -433,15 +425,13 @@ virDomainPCIAddressValidate(virDomainPCIAddressSet *a= ddrs, } if (addr->domain !=3D 0) { virReportError(errType, - _("Invalid PCI address %s. " - "Only PCI domain 0 is available"), + _("Invalid PCI address %1$s. Only PCI domain 0 is a= vailable"), addrStr); return false; } if (addr->bus >=3D addrs->nbuses) { virReportError(errType, - _("Invalid PCI address %s. " - "Only PCI buses up to %zu are available"), + _("Invalid PCI address %1$s. Only PCI buses up to %= 2$zu are available"), addrStr, addrs->nbuses - 1); return false; } @@ -458,19 +448,19 @@ virDomainPCIAddressValidate(virDomainPCIAddressSet *a= ddrs, /* some "buses" are really just a single port */ if (bus->minSlot && addr->slot < bus->minSlot) { virReportError(errType, - _("Invalid PCI address %s. slot must be >=3D %zu"), + _("Invalid PCI address %1$s. slot must be >=3D %2$z= u"), addrStr, bus->minSlot); return false; } if (addr->slot > bus->maxSlot) { virReportError(errType, - _("Invalid PCI address %s. slot must be <=3D %zu"), + _("Invalid PCI address %1$s. slot must be <=3D %2$z= u"), addrStr, bus->maxSlot); return false; } if (addr->function > VIR_PCI_ADDRESS_FUNCTION_LAST) { virReportError(errType, - _("Invalid PCI address %s. function must be <=3D %u= "), + _("Invalid PCI address %1$s. function must be <=3D = %2$u"), addrStr, VIR_PCI_ADDRESS_FUNCTION_LAST); return false; } @@ -733,14 +723,12 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSet *ad= drs, =20 if (existingContModel >=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("a PCI slot is needed to connect a PCI contro= ller " - "model=3D'%s', but none is available, and it " - "cannot be automatically added"), + _("a PCI slot is needed to connect a PCI contro= ller model=3D'%1$s', but none is available, and it cannot be automatically = added"), virDomainControllerModelPCITypeToString(existin= gContModel)); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot automatically add a new PCI bus for a= " - "device with connect flags %.2x"), flags); + _("Cannot automatically add a new PCI bus for a= device with connect flags %1$.2x"), + flags); } return -1; } @@ -838,7 +826,7 @@ virDomainPCIAddressReserveAddrInternal(virDomainPCIAddr= essSet *addrs, =20 if (bus->slot[addr->slot].functions & (1 << addr->function)) { virReportError(errType, - _("Attempted double use of PCI Address %s"), addrSt= r); + _("Attempted double use of PCI Address %1$s"), addr= Str); return -1; } =20 @@ -1321,7 +1309,7 @@ virDomainCCWAddressAssign(virDomainDeviceInfo *dev, =20 if (virHashLookup(addrs->defined, addr)) { virReportError(VIR_ERR_XML_ERROR, - _("The CCW devno '%s' is in use already"), + _("The CCW devno '%1$s' is in use already"), addr); return -1; } @@ -1457,8 +1445,7 @@ virDomainVirtioSerialAddrPlaceController(virDomainVir= tioSerialAddrSet *addrs, for (i =3D 0; i < addrs->ncontrollers; i++) { if (addrs->controllers[i]->idx =3D=3D cont->idx) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virtio serial controller with index %u alrea= dy exists" - " in the address set"), + _("virtio serial controller with index %1$u alr= eady exists in the address set"), cont->idx); return -2; } @@ -1583,7 +1570,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_= GNUC_UNUSED, i =3D virDomainVirtioSerialAddrFindController(addrs, info->addr.vioser= ial.controller); if (i < 0) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial controller %u is missing"), + _("virtio serial controller %1$u is missing"), info->addr.vioserial.controller); return -1; } @@ -1591,7 +1578,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_= GNUC_UNUSED, map =3D addrs->controllers[i]->ports; if (virBitmapGetBit(map, info->addr.vioserial.port, &b) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial controller %u does not have port %= u"), + _("virtio serial controller %1$u does not have port= %2$u"), info->addr.vioserial.controller, info->addr.vioserial.port); return -1; @@ -1599,7 +1586,7 @@ virDomainVirtioSerialAddrReserve(virDomainDef *def G_= GNUC_UNUSED, =20 if (b) { virReportError(VIR_ERR_XML_ERROR, - _("virtio serial port %u on controller %u is alread= y occupied"), + _("virtio serial port %1$u on controller %2$u is al= ready occupied"), info->addr.vioserial.port, info->addr.vioserial.controller); return -1; @@ -1726,7 +1713,7 @@ virDomainVirtioSerialAddrNextFromController(virDomain= VirtioSerialAddrSet *addrs, i =3D virDomainVirtioSerialAddrFindController(addrs, addr->controller); if (i < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virtio-serial controller %u not available"), + _("virtio-serial controller %1$u not available"), addr->controller); return -1; } @@ -1734,7 +1721,7 @@ virDomainVirtioSerialAddrNextFromController(virDomain= VirtioSerialAddrSet *addrs, map =3D addrs->controllers[i]->ports; if ((port =3D virBitmapNextClearBit(map, 0)) <=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("Unable to find a free port on virtio-serial cont= roller %u"), + _("Unable to find a free port on virtio-serial cont= roller %1$u"), addr->controller); return -1; } @@ -1977,7 +1964,7 @@ virDomainUSBAddressSetAddController(virDomainUSBAddre= ssSet *addrs, VIR_EXPAND_N(addrs->buses, addrs->nbuses, cont->idx - addrs->nbuse= s + 1); } else if (addrs->buses[cont->idx]) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB controllers with index %u"), + _("Duplicate USB controllers with index %1$u"), cont->idx); goto cleanup; } @@ -2021,7 +2008,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *a= ddrs, =20 if (info->addr.usb.bus >=3D addrs->nbuses || !addrs->buses[info->addr.usb.bus]) { - virReportError(VIR_ERR_XML_ERROR, _("Missing USB bus %u"), + virReportError(VIR_ERR_XML_ERROR, _("Missing USB bus %1$u"), info->addr.usb.bus); return NULL; } @@ -2035,7 +2022,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *a= ddrs, =20 if (hub->nports <=3D portIdx) { virReportError(VIR_ERR_XML_ERROR, - _("port %u out of range in USB address bus: %u = port: %s"), + _("port %1$u out of range in USB address bus: %= 2$u port: %3$s"), info->addr.usb.port[i], info->addr.usb.bus, portStr); @@ -2044,7 +2031,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *a= ddrs, hub =3D hub->ports[portIdx]; if (!hub) { virReportError(VIR_ERR_XML_ERROR, - _("there is no hub at port %u in USB address bu= s: %u port: %s"), + _("there is no hub at port %1$u in USB address = bus: %2$u port: %3$s"), info->addr.usb.port[i], info->addr.usb.bus, portStr); @@ -2055,7 +2042,7 @@ virDomainUSBAddressFindPort(virDomainUSBAddressSet *a= ddrs, targetPort =3D info->addr.usb.port[lastIdx] - 1; if (targetPort >=3D virBitmapSize(hub->portmap)) { virReportError(VIR_ERR_XML_ERROR, - _("requested USB port %s not present on USB bus %u"= ), + _("requested USB port %1$s not present on USB bus %= 2$u"), portStr, info->addr.usb.bus); return NULL; } @@ -2096,7 +2083,7 @@ virDomainUSBAddressSetAddHub(virDomainUSBAddressSet *= addrs, =20 if (targetHub->ports[targetPort]) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB hub on bus %u port %s"), + _("Duplicate USB hub on bus %1$u port %2$s"), hub->info.addr.usb.bus, portStr); goto cleanup; } @@ -2248,8 +2235,8 @@ virDomainUSBAddressAssign(virDomainUSBAddressSet *add= rs, if (info->addr.usb.bus >=3D addrs->nbuses || !addrs->buses[info->addr.usb.bus]) { virReportError(VIR_ERR_XML_ERROR, - _("USB bus %u requested but no controller " - "with that index is present"), info->addr.usb= .bus); + _("USB bus %1$u requested but no controller wit= h that index is present"), + info->addr.usb.bus); return -1; } rc =3D virDomainUSBAddressAssignFromBus(addrs, info, info->addr.us= b.bus); @@ -2307,7 +2294,7 @@ virDomainUSBAddressReserve(virDomainDeviceInfo *info, =20 if (virBitmapIsBitSet(targetHub->portmap, targetPort)) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate USB address bus %u port %s"), + _("Duplicate USB address bus %1$u port %2$s"), info->addr.usb.bus, portStr); return -1; } diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index d8915bd2d2..c076af7808 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -244,8 +244,7 @@ virDomainCapsEnumSet(virDomainCapsEnum *capsEnum, if (!val) { /* Integer overflow */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("integer overflow on %s. Please contact the " - "libvirt development team at libvir-list@redh= at.com"), + _("integer overflow on %1$s. Please contact the= libvirt development team at libvir-list@redhat.com"), capsEnumName); return -1; } diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 7e9bd08381..94b7335e56 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -575,7 +575,7 @@ virDomainEventNew(virClass *klass, =20 if (!virClassIsDerivedFrom(klass, virDomainEventClass)) { virReportInvalidArg(klass, - _("Class %s must derive from virDomainEvent"), + _("Class %1$s must derive from virDomainEvent"= ), virClassName(klass)); return NULL; } @@ -2395,7 +2395,7 @@ virDomainQemuMonitorEventStateRegisterID(virConnectPt= r conn, data->regex =3D g_regex_new(event, cflags, 0, &err); if (!data->regex) { virReportError(VIR_ERR_INVALID_ARG, - _("failed to compile regex '%s': %s"), + _("failed to compile regex '%1$s': %2$s"), event, err->message); VIR_FREE(data); return -1; diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c index 22eb603b3b..56759ae613 100644 --- a/src/conf/domain_postparse.c +++ b/src/conf/domain_postparse.c @@ -160,7 +160,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name =3D=3D VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK) { if (timer->tickpolicy) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of time= r tickpolicy"), + _("timer %1$s doesn't support setting of ti= mer tickpolicy"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -178,14 +178,14 @@ virDomainDefPostParseTimer(virDomainDef *def) if (timer->name !=3D VIR_DOMAIN_TIMER_NAME_TSC) { if (timer->frequency !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of time= r frequency"), + _("timer %1$s doesn't support setting of ti= mer frequency"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } =20 if (timer->mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of time= r mode"), + _("timer %1$s doesn't support setting of ti= mer mode"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -195,7 +195,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name !=3D VIR_DOMAIN_TIMER_NAME_RTC) { if (timer->track !=3D VIR_DOMAIN_TIMER_TRACK_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of time= r track"), + _("timer %1$s doesn't support setting of ti= mer track"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -341,7 +341,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, VIR_DOMAIN_DISK_BUS_SCSI, addr)) { virReportError(VIR_ERR_XML_ERROR, - _("SCSI host address controller=3D'%u' bus=3D'%= u' target=3D'%u' unit=3D'%u' in use by a SCSI disk"), + _("SCSI host address controller=3D'%1$u' bus=3D= '%2$u' target=3D'%3$u' unit=3D'%4$u' in use by a SCSI disk"), addr->controller, addr->bus, addr->target, addr->unit); return -1; @@ -358,7 +358,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, (model =3D=3D VIR_MDEV_MODEL_TYPE_VFIO_CCW && dev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)) { virReportError(VIR_ERR_XML_ERROR, - _("Unsupported address type '%s' with mediated = device model '%s'"), + _("Unsupported address type '%1$s' with mediate= d device model '%2$s'"), virDomainDeviceAddressTypeToString(dev->info->t= ype), virMediatedDeviceModelTypeToString(model)); return -1; @@ -391,7 +391,7 @@ virDomainChrIsaSerialDefPostParse(virDomainDef *def) if (isa_serial_count++ >=3D VIR_MAX_ISA_SERIAL_PORTS || def->serials[i]->target.port >=3D VIR_MAX_ISA_SERIAL_PORTS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Maximum supported number of ISA serial ports= is '%d'"), + _("Maximum supported number of ISA serial ports= is '%1$d'"), VIR_MAX_ISA_SERIAL_PORTS); return -1; } @@ -399,7 +399,7 @@ virDomainChrIsaSerialDefPostParse(virDomainDef *def) if (def->serials[i]->target.port !=3D -1) { if (used_serial_port[def->serials[i]->target.port]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("target port '%d' already allocated"), + _("target port '%1$d' already allocated"), def->serials[i]->target.port); return -1; } @@ -842,7 +842,7 @@ virDomainDefPostParseCheckFeatures(virDomainDef *def, if (UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_NAME_SLASH)) { if (def->name && strchr(def->name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), def->name); + _("name %1$s cannot contain '/'"), def->name); return -1; } } @@ -881,7 +881,7 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDevic= eDef *dev, dev->type =3D=3D VIR_DOMAIN_DEVICE_NET && dev->data.net->modelstr) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("driver does not support net model '%s'"), + _("driver does not support net model '%1$s'"), dev->data.net->modelstr); return -1; } @@ -890,7 +890,7 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDevic= eDef *dev, dev->data.disk->src->fdgroup && UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_DISK_FD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("driver does not support FD passing for disk '%s'= "), + _("driver does not support FD passing for disk '%1$= s'"), dev->data.disk->dst); return -1; } @@ -999,7 +999,7 @@ virDomainVcpuDefPostParse(virDomainDef *def) case VIR_TRISTATE_BOOL_NO: if (!vcpu->online) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu '%zu' is both offline and not hotpl= uggable"), i); + _("vcpu '%1$zu' is both offline and not hot= pluggable"), i); return -1; } break; @@ -1056,7 +1056,7 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNUC= _UNUSED, =20 if (virHashLookup(bootHash, order)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("boot order '%s' used for more than one device"), + _("boot order '%1$s' used for more than one device"= ), order); return -1; } @@ -1166,7 +1166,7 @@ virDomainDefRejectDuplicateControllers(virDomainDef *= def) =20 if (virBitmapIsBitSet(bitmaps[cont->type], cont->idx)) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple '%s' controllers with index '%d'"), + _("Multiple '%1$s' controllers with index '%2$d= '"), virDomainControllerTypeToString(cont->type), cont->idx); goto cleanup; @@ -1195,7 +1195,7 @@ virDomainDefRejectDuplicatePanics(virDomainDef *def) virDomainPanicModel model =3D def->panics[i]->model; if (exists[model]) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple panic devices with model '%s'"), + _("Multiple panic devices with model '%1$s'"), virDomainPanicModelTypeToString(model)); return -1; } diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 671b8b088f..3dce82983d 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -142,7 +142,7 @@ virInterfaceDefParseStartMode(virInterfaceDef *def, def->startmode =3D VIR_INTERFACE_START_NONE; } else { virReportError(VIR_ERR_XML_ERROR, - _("unknown interface startmode %s"), tmp); + _("unknown interface startmode %1$s"), tmp); return -1; } return 0; @@ -172,7 +172,7 @@ virInterfaceDefParseBondMode(xmlXPathContextPtr ctxt) return VIR_INTERFACE_BOND_BALALB; } =20 - virReportError(VIR_ERR_XML_ERROR, _("unknown bonding mode %s"), tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown bonding mode %1$s"), tmp); return -1; } =20 @@ -190,7 +190,7 @@ virInterfaceDefParseBondMiiCarrier(xmlXPathContextPtr c= txt) return VIR_INTERFACE_BOND_MII_NETIF; } =20 - virReportError(VIR_ERR_XML_ERROR, _("unknown mii bonding carrier %s"),= tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown mii bonding carrier %1$s"= ), tmp); return -1; } =20 @@ -210,7 +210,7 @@ virInterfaceDefParseBondArpValid(xmlXPathContextPtr ctx= t) return VIR_INTERFACE_BOND_ARP_ALL; } =20 - virReportError(VIR_ERR_XML_ERROR, _("unknown arp bonding validate %s")= , tmp); + virReportError(VIR_ERR_XML_ERROR, _("unknown arp bonding validate %1$s= "), tmp); return -1; } =20 @@ -370,7 +370,8 @@ virInterfaceDefParseIfAdressing(virInterfaceDef *def, return -1; } else { virReportError(VIR_ERR_XML_ERROR, - _("unsupported protocol family '%s'"), proto->f= amily); + _("unsupported protocol family '%1$s'"), + proto->family); return -1; } def->protos[def->nprotos++] =3D g_steal_pointer(&proto); @@ -399,7 +400,7 @@ virInterfaceDefParseBridge(virInterfaceDef *def, def->data.bridge.stp =3D 0; } else { virReportError(VIR_ERR_XML_ERROR, - _("bridge interface stp should be on or off got= %s"), + _("bridge interface stp should be on or off got= %1$s"), tmp); return 0; } @@ -585,7 +586,7 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, || (parentIfType =3D=3D VIR_INTERFACE_TYPE_VLAN)) { virReportError(VIR_ERR_XML_ERROR, - _("interface has unsupported type '%s'"), + _("interface has unsupported type '%1$s'"), virInterfaceTypeToString(type)); return NULL; } @@ -895,7 +896,7 @@ virInterfaceDefDevFormat(virBuffer *buf, =20 if (!(type =3D virInterfaceTypeToString(def->type))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected interface type %d"), def->type); + _("unexpected interface type %1$d"), def->type); return -1; } =20 diff --git a/src/conf/netdev_bandwidth_conf.c b/src/conf/netdev_bandwidth_c= onf.c index f7d27fb5af..1609b14784 100644 --- a/src/conf/netdev_bandwidth_conf.c +++ b/src/conf/netdev_bandwidth_conf.c @@ -46,7 +46,7 @@ virNetDevBandwidthParseRate(xmlNodePtr node, virNetDevBan= dwidthRate *rate) if (average) { if (virStrToLong_ullp(average, NULL, 10, &rate->average) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth average value '%= s'"), + _("could not convert bandwidth average value '%= 1$s'"), average); return -1; } @@ -64,21 +64,21 @@ virNetDevBandwidthParseRate(xmlNodePtr node, virNetDevB= andwidthRate *rate) =20 if (peak && virStrToLong_ullp(peak, NULL, 10, &rate->peak) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth peak value '%s'"), + _("could not convert bandwidth peak value '%1$s'"), peak); return -1; } =20 if (burst && virStrToLong_ullp(burst, NULL, 10, &rate->burst) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth burst value '%s'"), + _("could not convert bandwidth burst value '%1$s'"), burst); return -1; } =20 if (floor && virStrToLong_ullp(floor, NULL, 10, &rate->floor) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("could not convert bandwidth floor value '%s'"), + _("could not convert bandwidth floor value '%1$s'"), floor); return -1; } @@ -128,7 +128,7 @@ virNetDevBandwidthParse(virNetDevBandwidth **bandwidth, } if (virStrToLong_ui(class_id_prop, NULL, 10, class_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse class id '%s'"), + _("Unable to parse class id '%1$s'"), class_id_prop); return -1; } diff --git a/src/conf/netdev_vlan_conf.c b/src/conf/netdev_vlan_conf.c index 28a818ad85..96ac7f3428 100644 --- a/src/conf/netdev_vlan_conf.c +++ b/src/conf/netdev_vlan_conf.c @@ -65,7 +65,7 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ct= xt, virNetDevVlan *def) =20 if (def->tag[i] > 4095) { virReportError(VIR_ERR_XML_ERROR, - _("vlan tag id %u too large (maximum 4095)"), d= ef->tag[i]); + _("vlan tag id %1$u too large (maximum 4095)"),= def->tag[i]); goto cleanup; } =20 @@ -100,8 +100,8 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr = ctxt, virNetDevVlan *def) if (!def->trunk) { if (nTags > 1) { virReportError(VIR_ERR_XML_ERROR, - _("invalid \"trunk=3D'%s'\" in - tru= nk=3D'yes' " - "is required for more than one vlan tag")= , trunk); + _("invalid \"trunk=3D'%1$s'\" in - t= runk=3D'yes' is required for more than one vlan tag"), + trunk); goto cleanup; } if (def->nativeMode !=3D 0) { @@ -113,8 +113,8 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr = ctxt, virNetDevVlan *def) /* allow (but discard) "trunk=3D'no' if there is a single tag = */ if (STRCASENEQ(trunk, "no")) { virReportError(VIR_ERR_XML_ERROR, - _("invalid \"trunk=3D'%s'\" in " - "- must be yes or no"), trunk); + _("invalid \"trunk=3D'%1$s'\" in - m= ust be yes or no"), + trunk); goto cleanup; } } diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_p= rofile_conf.c index 26f379248f..59237e10de 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -43,7 +43,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int = flags) if ((virtPortType =3D virXMLPropString(node, "type")) && (virtPort->virtPortType =3D virNetDevVPortTypeFromString(virtPortT= ype)) <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown virtualport type %s"), virtPortType); + _("unknown virtualport type %1$s"), virtPortType); return NULL; } =20 diff --git a/src/conf/networkcommon_conf.c b/src/conf/networkcommon_conf.c index 275847853d..6f88d173c6 100644 --- a/src/conf/networkcommon_conf.c +++ b/src/conf/networkcommon_conf.c @@ -54,32 +54,28 @@ virNetDevIPRouteCreate(const char *errorDetail, =20 if (!address) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Missing required address attribute " - "in route definition"), + _("%1$s: Missing required address attribute in rout= e definition"), errorDetail); return NULL; } =20 if (!gateway) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Missing required gateway attribute " - "in route definition"), + _("%1$s: Missing required gateway attribute in rout= e definition"), errorDetail); return NULL; } =20 if (virSocketAddrParse(&def->address, address, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad network address '%s' " - "in route definition"), + _("%1$s: Bad network address '%2$s' in route defini= tion"), errorDetail, address); return NULL; } =20 if (virSocketAddrParse(&def->gateway, gateway, AF_UNSPEC) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad gateway address '%s' " - "in route definition"), + _("%1$s: Bad gateway address '%2$s' in route defini= tion"), errorDetail, gateway); return NULL; } @@ -90,89 +86,74 @@ virNetDevIPRouteCreate(const char *errorDetail, VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_UNSPEC))) { virReportError(VIR_ERR_XML_ERROR, def->family =3D=3D NULL ? - _("%s: No family specified for non-IPv4 address= '%s' " - "in route definition") : - _("%s: IPv4 family specified for non-IPv4 addre= ss '%s' " - "in route definition"), + _("%1$s: No family specified for non-IPv4 addre= ss '%2$s' in route definition") : + _("%1$s: IPv4 family specified for non-IPv4 add= ress '%2$s' in route definition"), errorDetail, address); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->gateway, AF_INET)) { virReportError(VIR_ERR_XML_ERROR, def->family =3D=3D NULL ? - _("%s: No family specified for non-IPv4 gateway= '%s' " - "in route definition") : - _("%s: IPv4 family specified for non-IPv4 gatew= ay '%s' " - "in route definition"), + _("%1$s: No family specified for non-IPv4 gatew= ay '%2$s' in route definition") : + _("%1$s: IPv4 family specified for non-IPv4 gat= eway '%2$s' in route definition"), errorDetail, address); return NULL; } if (netmask) { if (virSocketAddrParse(&def->netmask, netmask, AF_UNSPEC) < 0)= { virReportError(VIR_ERR_XML_ERROR, - _("%s: Bad netmask address '%s' " - "in route definition"), + _("%1$s: Bad netmask address '%2$s' in rout= e definition"), errorDetail, netmask); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->netmask, AF_INET)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid netmask '%s' " - "for address '%s' (both must be IPv4)"), + _("%1$s: Invalid netmask '%2$s' for address= '%3$s' (both must be IPv4)"), errorDetail, netmask, address); return NULL; } if (def->has_prefix) { /* can't have both netmask and prefix at the same time */ virReportError(VIR_ERR_XML_ERROR, - _("%s: Route definition cannot have both " - "a prefix and a netmask"), + _("%1$s: Route definition cannot have both = a prefix and a netmask"), errorDetail); return NULL; } } if (def->prefix > 32) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid prefix %u specified " - "in route definition, " - "must be 0 - 32"), + _("%1$s: Invalid prefix %2$u specified in route= definition, must be 0 - 32"), errorDetail, def->prefix); return NULL; } } else if (STREQ(def->family, "ipv6")) { if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: ipv6 family specified for non-IPv6 addre= ss '%s' " - "in route definition"), + _("%1$s: ipv6 family specified for non-IPv6 add= ress '%2$s' in route definition"), errorDetail, address); return NULL; } if (netmask) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Specifying netmask invalid for IPv6 addr= ess '%s' " - "in route definition"), + _("%1$s: Specifying netmask invalid for IPv6 ad= dress '%2$s' in route definition"), errorDetail, address); return NULL; } if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->gateway, AF_INET6)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: ipv6 specified for non-IPv6 gateway addr= ess '%s' " - "in route definition"), + _("%1$s: ipv6 specified for non-IPv6 gateway ad= dress '%2$s' in route definition"), errorDetail, gateway); return NULL; } if (def->prefix > 128) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Invalid prefix %u specified " - "in route definition, " - "must be 0 - 128"), + _("%1$s: Invalid prefix %2$u specified in route= definition, must be 0 - 128"), errorDetail, def->prefix); return NULL; } } else { virReportError(VIR_ERR_XML_ERROR, - _("%s: Unrecognized family '%s' " - "in route definition"), + _("%1$s: Unrecognized family '%2$s' in route defini= tion"), errorDetail, def->family); return NULL; } @@ -181,9 +162,7 @@ virNetDevIPRouteCreate(const char *errorDetail, if (netmask) { if (virSocketAddrMask(&def->address, &def->netmask, &testAddr) < 0= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: Error converting address '%s' with netma= sk '%s' " - "to network-address " - "in route definition"), + _("%1$s: Error converting address '%2$s' with n= etmask '%3$s' to network-address in route definition"), errorDetail, address, netmask); return NULL; } @@ -191,17 +170,14 @@ virNetDevIPRouteCreate(const char *errorDetail, if (virSocketAddrMaskByPrefix(&def->address, def->prefix, &testAddr) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: Error converting address '%s' with prefi= x %u " - "to network-address " - "in route definition"), + _("%1$s: Error converting address '%2$s' with p= refix %3$u to network-address in route definition"), errorDetail, address, def->prefix); return NULL; } } if (!virSocketAddrEqual(&def->address, &testAddr)) { virReportError(VIR_ERR_XML_ERROR, - _("%s: Address '%s' in route definition " - "is not a network address"), + _("%1$s: Address '%2$s' in route definition is not = a network address"), errorDetail, address); return NULL; } diff --git a/src/conf/node_device_util.c b/src/conf/node_device_util.c index 3c2fc4e258..cfe1b1077e 100644 --- a/src/conf/node_device_util.c +++ b/src/conf/node_device_util.c @@ -49,7 +49,7 @@ virNodeDeviceGetParentName(virConnectPtr conn, =20 if (!(device =3D virNodeDeviceLookupByName(conn, nodedev_name))) { virReportError(VIR_ERR_XML_ERROR, - _("Cannot find '%s' in node device database"), + _("Cannot find '%1$s' in node device database"), nodedev_name); return NULL; } @@ -123,7 +123,7 @@ virNodeDeviceCreateVport(virStorageAdapterFCHost *fchos= t) */ if (!skip_capable_check && !virVHBAPathExists(NULL, parent_host)) { virReportError(VIR_ERR_XML_ERROR, - _("parent '%s' specified for vHBA does not exist"), + _("parent '%1$s' specified for vHBA does not exist"= ), parent_hoststr); return NULL; } @@ -174,7 +174,7 @@ virNodeDeviceDeleteVport(virConnectPtr conn, /* Find our vHBA by searching the fc_host sysfs tree for our wwnn/wwpn= */ if (!(name =3D virVHBAGetHostByWWN(NULL, fchost->wwnn, fchost->wwpn)))= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find fc_host for wwnn=3D'%s' and wwpn= =3D'%s'"), + _("Failed to find fc_host for wwnn=3D'%1$s' and wwp= n=3D'%2$s'"), fchost->wwnn, fchost->wwpn); return -1; } diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 7ef7aa5138..b21671f587 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -180,7 +180,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa, =20 if (mem_node->nodeset) { virReportError(VIR_ERR_XML_ERROR, - _("Multiple memnode elements with cellid %u"), + _("Multiple memnode elements with cellid %1$u"), cellid); return -1; } @@ -211,7 +211,7 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa, =20 if (virBitmapIsAllClear(mem_node->nodeset)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodeset': %s"), tmp); + _("Invalid value of 'nodeset': %1$s"), tmp); return -1; } } @@ -247,14 +247,14 @@ virDomainNumatuneParseXML(virDomainNuma *numa, if ((modestr =3D virXMLPropString(node, "mode")) && (mode =3D virDomainNumatuneMemModeTypeFromString(modestr)) < 0= ) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported NUMA memory tuning mode '%s'"), = modestr); + _("Unsupported NUMA memory tuning mode '%1$s'")= , modestr); return -1; } =20 if ((placementstr =3D virXMLPropString(node, "placement")) && (placement =3D virDomainNumatunePlacementTypeFromString(placem= entstr)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported NUMA memory placement mode '%s'"= ), placementstr); + _("Unsupported NUMA memory placement mode '%1$s= '"), placementstr); return -1; } =20 @@ -264,7 +264,7 @@ virDomainNumatuneParseXML(virDomainNuma *numa, =20 if (virBitmapIsAllClear(nodeset)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid value of 'nodeset': %s"), nodese= tstr); + _("Invalid value of 'nodeset': %1$s"), node= setstr); return -1; } } @@ -507,7 +507,7 @@ virDomainNumatuneSet(virDomainNuma *numa, if (mode !=3D -1 && (mode < 0 || mode >=3D VIR_DOMAIN_NUMATUNE_MEM_LAST)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported numatune mode '%d'"), + _("Unsupported numatune mode '%1$d'"), mode); return -1; } @@ -515,7 +515,7 @@ virDomainNumatuneSet(virDomainNuma *numa, if (placement !=3D -1 && (placement < 0 || placement >=3D VIR_DOMAIN_NUMATUNE_PLACEMENT_LAS= T)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported numatune placement '%d'"), + _("Unsupported numatune placement '%1$d'"), mode); return -1; } @@ -732,8 +732,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, /* The "id" needs to be within numa/cell range */ if (sibling_id >=3D ndistances) { virReportError(VIR_ERR_XML_ERROR, - _("'sibling_id %d' does not refer to a " - "valid cell within NUMA 'cell id %d'"), + _("'sibling_id %1$d' does not refer to a valid = cell within NUMA 'cell id %2$d'"), sibling_id, cur_cell); goto cleanup; } @@ -752,8 +751,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, (sibling_id !=3D cur_cell && sibling_value =3D=3D LOCAL_DISTANCE)) { virReportError(VIR_ERR_XML_ERROR, - _("'value %d' is invalid for " - "'sibling id %d' under NUMA 'cell id %d'"), + _("'value %1$d' is invalid for 'sibling id %2$d= ' under NUMA 'cell id %3$d'"), sibling_value, sibling_id, cur_cell); goto cleanup; } @@ -826,8 +824,7 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, =20 if (!(tmp =3D virXMLPropString(nodes[i], "level"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'level' attribute in cache " - "element for NUMA node %d"), + _("Missing 'level' attribute in cache element f= or NUMA node %1$d"), cur_cell); return -1; } @@ -835,8 +832,7 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, if (virStrToLong_uip(tmp, NULL, 10, &level) < 0 || level =3D=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid 'level' attribute in cache " - "element for NUMA node %d"), + _("Invalid 'level' attribute in cache element f= or NUMA node %1$d"), cur_cell); return -1; } @@ -844,15 +840,14 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, =20 if (!(tmp =3D virXMLPropString(nodes[i], "associativity"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'associativity' attribute in cache " - "element for NUMA node %d"), + _("Missing 'associativity' attribute in cache e= lement for NUMA node %1$d"), cur_cell); return -1; } =20 if ((associativity =3D virNumaCacheAssociativityTypeFromString(tmp= )) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid cache associativity '%s'"), + _("Invalid cache associativity '%1$s'"), tmp); return -1; } @@ -860,14 +855,13 @@ virDomainNumaDefNodeCacheParseXML(virDomainNuma *def, =20 if (!(tmp =3D virXMLPropString(nodes[i], "policy"))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing 'policy' attribute in cache " - "element for NUMA node %d"), + _("Missing 'policy' attribute in cache element = for NUMA node %1$d"), cur_cell); } =20 if ((policy =3D virNumaCachePolicyTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid cache policy '%s'"), + _("Invalid cache policy '%1$s'"), tmp); return -1; } @@ -932,7 +926,7 @@ virDomainNumaDefParseXML(virDomainNuma *def, =20 if (def->mem_nodes[cur_cell].mem) { virReportError(VIR_ERR_XML_ERROR, - _("Duplicate NUMA cell info for cell id '%u'"), + _("Duplicate NUMA cell info for cell id '%1$u'"= ), cur_cell); return -1; } @@ -956,7 +950,7 @@ virDomainNumaDefParseXML(virDomainNuma *def, if (virBitmapOverlaps(def->mem_nodes[j].cpumask, def->mem_nodes[cur_cell].cpumask)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("NUMA cells %u and %zu have overlapping v= CPU ids"), + _("NUMA cells %1$u and %2$zu have overlappi= ng vCPU ids"), cur_cell, j); return -1; } @@ -1133,7 +1127,7 @@ virDomainNumaDefValidate(const virDomainNuma *def) =20 if (virBitmapIsBitSet(levelsSeen, cache->level)) { virReportError(VIR_ERR_XML_ERROR, - _("Cache level '%u' already defined"), + _("Cache level '%1$u' already defined"), cache->level); return -1; } @@ -1259,8 +1253,7 @@ virDomainNumaCheckABIStability(virDomainNuma *src, =20 if (virDomainNumaGetNodeCount(src) !=3D virDomainNumaGetNodeCount(tgt)= ) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NUMA node count '%zu' doesn't match " - "source '%zu'"), + _("Target NUMA node count '%1$zu' doesn't match sou= rce '%2$zu'"), virDomainNumaGetNodeCount(tgt), virDomainNumaGetNodeCount(src)); return false; @@ -1270,8 +1263,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (virDomainNumaGetNodeMemorySize(src, i) !=3D virDomainNumaGetNodeMemorySize(tgt, i)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Size of target NUMA node %zu (%llu) doesn't " - "match source (%llu)"), i, + _("Size of target NUMA node %1$zu (%2$llu) does= n't match source (%3$llu)"), + i, virDomainNumaGetNodeMemorySize(tgt, i), virDomainNumaGetNodeMemorySize(src, i)); return false; @@ -1280,8 +1273,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (!virBitmapEqual(virDomainNumaGetNodeCpumask(src, i), virDomainNumaGetNodeCpumask(tgt, i))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Processor mask of target NUMA node %zu doesn= 't " - "match source"), i); + _("Processor mask of target NUMA node %1$zu doe= sn't match source"), + i); return false; } =20 @@ -1289,8 +1282,8 @@ virDomainNumaCheckABIStability(virDomainNuma *src, if (virDomainNumaGetNodeDistance(src, i, j) !=3D virDomainNumaGetNodeDistance(tgt, i, j)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target NUMA distance from %zu to %zu " - "doesn't match source"), i, j); + _("Target NUMA distance from %1$zu to %2$zu= doesn't match source"), + i, j); =20 return false; } @@ -1407,8 +1400,7 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa, =20 if (node >=3D numa->nmem_nodes) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Argument 'node' %zu outranges " - "defined number of NUMA nodes"), + _("Argument 'node' %1$zu outranges defined number o= f NUMA nodes"), node); return -1; } @@ -1431,15 +1423,14 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa, if (value < LOCAL_DISTANCE || value > UNREACHABLE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Distance value of %d is not in valid range"), + _("Distance value of %1$d is not in valid range"), value); return -1; } =20 if (value =3D=3D LOCAL_DISTANCE && node !=3D cellid) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Distance value %d under node %zu is " - "LOCAL_DISTANCE and should be set to 10"), + _("Distance value %1$d under node %2$zu is LOCAL_DI= STANCE and should be set to 10"), value, node); return -1; } @@ -1461,7 +1452,7 @@ virDomainNumaSetNodeDistanceCount(virDomainNuma *numa, distances =3D numa->mem_nodes[node].distances; if (distances) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot alter an existing nmem_nodes distances se= t for node: %zu"), + _("Cannot alter an existing nmem_nodes distances se= t for node: %1$zu"), node); return 0; } diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 8d198a7bb1..70ad37e63d 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2009,7 +2009,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, =20 if (!found || rc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s has illegal value %s"), + _("%1$s has illegal value %2$s"), att[idx].name, prop); rc =3D -1; } @@ -2115,10 +2115,8 @@ virNWFilterRuleValidate(virNWFilterRuleDef *rule) } if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s rule with port specification requires= " - "protocol specification with protocol to = be " - "either one of tcp(6), udp(17), dccp(33),= or " - "sctp(132)"), protocol); + _("%1$s rule with port specification requir= es protocol specification with protocol to be either one of tcp(6), udp(17)= , dccp(33), or sctp(132)"), + protocol); } } break; @@ -2485,8 +2483,7 @@ virNWFilterIsValidChainName(const char *chainname) { if (strlen(chainname) > MAX_CHAIN_SUFFIX_SIZE) { virReportError(VIR_ERR_INVALID_ARG, - _("Name of chain is longer than " - "%u characters"), + _("Name of chain is longer than %1$u characters"), MAX_CHAIN_SUFFIX_SIZE); return false; } @@ -2532,8 +2529,7 @@ virNWFilterIsAllowedChain(const char *chainname) } =20 virBufferAsprintf(&buf, - _("Invalid chain name '%s'. Please use a chain name " - "called '%s' or any of the following prefixes: "), + _("Invalid chain name '%1$s'. Please use a chain nam= e called '%2$s' or any of the following prefixes: "), chainname, virNWFilterChainSuffixTypeToString( VIR_NWFILTER_CHAINSUFFIX_ROOT)); @@ -2579,15 +2575,14 @@ virNWFilterDefParseXML(xmlXPathContextPtr ctxt) if (chain_pri_s) { if (virStrToLong_i(chain_pri_s, NULL, 10, &chain_priority) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse chain priority '%s'"), + _("Could not parse chain priority '%1$s'"), chain_pri_s); return NULL; } if (chain_priority < NWFILTER_MIN_FILTER_PRIORITY || chain_priority > NWFILTER_MAX_FILTER_PRIORITY) { virReportError(VIR_ERR_INVALID_ARG, - _("Priority '%d' is outside valid " - "range of [%d,%d]"), + _("Priority '%1$d' is outside valid range of [%= 2$d,%3$d]"), chain_priority, NWFILTER_MIN_FILTER_PRIORITY, NWFILTER_MAX_FILTER_PRIORITY); @@ -2713,7 +2708,7 @@ virNWFilterDeleteDef(const char *configDir, =20 if (unlink(configFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot remove config for %s"), + _("cannot remove config for %1$s"), def->name); return -1; } @@ -2792,7 +2787,7 @@ virNWFilterRuleDefDetailsFormat(virBuffer *buf, if (att[i].formatter && !(flags & NWFILTER_ENTRY_ITEM_FLAG_HAS= _VAR)) { if (!att[i].formatter(buf, def, item)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("formatter for %s %s reported error"), + _("formatter for %1$s %2$s reported error= "), type, att[i].name); return; diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index 92385a97e6..496ed2f0b8 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -338,7 +338,7 @@ virNWFilterVarCombIterAddVariable(virNWFilterVarCombIte= rEntry *cie, varValue =3D virHashLookup(hash, varName); if (varValue =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find value for variable '%s'"), + _("Could not find value for variable '%1$s'"), varName); return -1; } @@ -409,8 +409,8 @@ virNWFilterVarCombIterEntryAreUniqueEntries(virNWFilter= VarCombIterEntry *cie, =20 value =3D virNWFilterVarValueGetNthValue(varValue, cie->curValue); if (!value) { - VIR_ERROR(_("Lookup of value at index %u resulted in a NULL " - "pointer"), cie->curValue); + VIR_ERROR(_("Lookup of value at index %1$u resulted in a NULL poin= ter"), + cie->curValue); return true; } =20 @@ -550,8 +550,8 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIte= r *ci, iterIndex =3D virNWFilterVarCombIterGetIndexByIterId(ci, iterId); if (iterIndex < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get iterator index for " - "iterator ID %u"), iterId); + _("Could not get iterator index for iterator ID= %1$u"), + iterId); return NULL; } break; @@ -560,8 +560,8 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIte= r *ci, iterIndex =3D virNWFilterVarCombIterGetIndexByIterId(ci, iterId); if (iterIndex < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get iterator index for " - "(internal) iterator ID %u"), iterId); + _("Could not get iterator index for (internal) = iterator ID %1$u"), + iterId); return NULL; } break; @@ -578,7 +578,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIte= r *ci, =20 if (!found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find variable '%s' in iterator"), + _("Could not find variable '%1$s' in iterator"), varName); return NULL; } @@ -586,7 +586,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIte= r *ci, value =3D virHashLookup(ci->hashTable, varName); if (!value) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find value for variable '%s'"), + _("Could not find value for variable '%1$s'"), varName); return NULL; } @@ -594,8 +594,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIte= r *ci, res =3D virNWFilterVarValueGetNthValue(value, ci->iter[iterIndex].curV= alue); if (!res) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get nth (%u) value of " - "variable '%s'"), + _("Could not get nth (%1$u) value of variable '%2$s= '"), ci->iter[iterIndex].curValue, varName); return NULL; } @@ -877,8 +876,8 @@ virNWFilterVarAccessParse(const char *varAccess) case VIR_NWFILTER_VAR_ACCESS_ITERATOR: if (result > VIR_NWFILTER_MAX_ITERID) { virReportError(VIR_ERR_INVALID_ARG, - _("Iterator ID exceeds maximum ID " - "of %u"), VIR_NWFILTER_MAX_ITERID); + _("Iterator ID exceeds maximum ID of %1$u"), + VIR_NWFILTER_MAX_ITERID); goto err_exit; } dest->u.iterId =3D result; diff --git a/src/conf/object_event.c b/src/conf/object_event.c index 62bbfb33bc..5fb96cb7aa 100644 --- a/src/conf/object_event.c +++ b/src/conf/object_event.c @@ -254,7 +254,7 @@ virObjectEventCallbackListRemoveID(virConnectPtr conn, } =20 virReportError(VIR_ERR_INVALID_ARG, - _("could not find event callback %d for deletion"), + _("could not find event callback %1$d for deletion"), callbackID); return -1; } @@ -281,7 +281,7 @@ virObjectEventCallbackListMarkDeleteID(virConnectPtr co= nn, } =20 virReportError(VIR_ERR_INVALID_ARG, - _("could not find event callback %d for deletion"), + _("could not find event callback %1$d for deletion"), callbackID); return -1; } @@ -596,7 +596,7 @@ virObjectEventNew(virClass *klass, =20 if (!virClassIsDerivedFrom(klass, virObjectEventClass)) { virReportInvalidArg(klass, - _("Class %s must derive from virObjectEvent"), + _("Class %1$s must derive from virObjectEvent"= ), virClassName(klass)); return NULL; } @@ -973,7 +973,7 @@ virObjectEventStateCallbackID(virConnectPtr conn, =20 if (ret < 0) virReportError(VIR_ERR_INVALID_ARG, - _("event callback function %p not registered"), + _("event callback function %1$p not registered"), callback); return ret; } @@ -1021,7 +1021,7 @@ virObjectEventStateEventID(virConnectPtr conn, =20 if (ret < 0) virReportError(VIR_ERR_INVALID_ARG, - _("event callback id %d not registered"), + _("event callback id %1$d not registered"), callbackID); return ret; } diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 629a4a57f7..7463185eb1 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -61,7 +61,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt, type =3D virSecretUsageTypeFromString(type_str); if (type < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown secret usage type %s"), type_str); + _("unknown secret usage type %1$s"), type_str); return -1; } def->usage_type =3D type; @@ -116,7 +116,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } @@ -200,7 +200,7 @@ virSecretDefFormatUsage(virBuffer *buf, type =3D virSecretUsageTypeToString(def->usage_type); if (type =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } @@ -232,7 +232,7 @@ virSecretDefFormatUsage(virBuffer *buf, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret usage type %d"), + _("unexpected secret usage type %1$d"), def->usage_type); return -1; } diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 9bf3c78353..0acba95d7f 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -153,7 +153,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, if (src->type =3D=3D VIR_STORAGE_TYPE_VOLUME || src->type =3D=3D VIR_STORAGE_TYPE_DIR) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported disk snapshot type '%s'"), + _("unsupported disk snapshot type '%1$s'"), virStorageTypeToString(src->type)); return -1; } @@ -170,7 +170,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, if ((driver =3D virXPathString("string(./driver/@type)", ctxt)) && (src->format =3D virStorageFileFormatTypeFromString(driver)) <=3D = 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown disk snapshot driver '%s'"), driver); + _("unknown disk snapshot driver '%1$s'"), drive= r); return -1; } =20 @@ -183,7 +183,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node, /* validate that the passed path is absolute */ if (virStorageSourceIsRelative(src)) { virReportError(VIR_ERR_XML_ERROR, - _("disk snapshot image path '%s' must be absolute"), + _("disk snapshot image path '%1$s' must be absolute= "), src->path); return -1; } @@ -259,7 +259,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, def->state =3D virDomainSnapshotStateTypeFromString(state); if (def->state <=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid state '%s' in domain snapshot XML"), + _("Invalid state '%1$s' in domain snapshot XML"= ), state); return NULL; } @@ -336,7 +336,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, if (def->memorysnapshotfile && def->memory !=3D VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) { virReportError(VIR_ERR_XML_ERROR, - _("memory filename '%s' requires external snapshot"= ), + _("memory filename '%1$s' requires external snapsho= t"), def->memorysnapshotfile); return NULL; } @@ -360,7 +360,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, /* verify that memory path is absolute */ if (def->memorysnapshotfile && !g_path_is_absolute(def->memorysnapshot= file)) { virReportError(VIR_ERR_XML_ERROR, - _("memory snapshot file path (%s) must be absolute"= ), + _("memory snapshot file path (%1$s) must be absolut= e"), def->memorysnapshotfile); return NULL; } @@ -434,8 +434,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef = *def, if ((flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) && def->state !=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) { virReportError(VIR_ERR_INVALID_ARG, - _("disk-only flag for snapshot %s requires " - "disk-snapshot state"), + _("disk-only flag for snapshot %1$s requires disk-s= napshot state"), def->parent.name); return -1; } @@ -445,7 +444,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef = *def, =20 virUUIDFormat(domain_uuid, uuidstr); virReportError(VIR_ERR_INVALID_ARG, - _("definition for snapshot %s must use uuid %s"), + _("definition for snapshot %1$s must use uuid %2$s"= ), def->parent.name, uuidstr); return -1; } @@ -458,8 +457,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef = *def, (def->state =3D=3D VIR_DOMAIN_SNAPSHOT_RUNNING || def->state =3D=3D VIR_DOMAIN_SNAPSHOT_PAUSED)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot change between online and offline " - "snapshot state in snapshot %s"), + _("cannot change between online and offline sna= pshot state in snapshot %1$s"), def->parent.name); return -1; } @@ -467,8 +465,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef = *def, if ((otherdef->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT) != =3D (def->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot change between disk only and " - "full system in snapshot %s"), + _("cannot change between disk only and full sys= tem in snapshot %1$s"), def->parent.name); return -1; } @@ -512,25 +509,21 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnap= shotDef *def) =20 if (disk->src->type !=3D VIR_STORAGE_TYPE_FILE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name " - "for disk '%s' on a '%s' device"), + _("cannot generate external snapshot name for d= isk '%1$s' on a '%2$s' device"), disk->name, virStorageTypeToString(disk->src->t= ype)); return -1; } =20 if (!(origpath =3D virDomainDiskGetSource(def->parent.dom->disks[i= ]))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name " - "for disk '%s' without source"), + _("cannot generate external snapshot name for d= isk '%1$s' without source"), disk->name); return -1; } =20 if (stat(origpath, &sb) < 0 || !S_ISREG(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("source for disk '%s' is not a regular " - "file; refusing to generate external " - "snapshot name"), + _("source for disk '%1$s' is not a regular file= ; refusing to generate external snapshot name"), disk->name); return -1; } @@ -549,8 +542,7 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapsh= otDef *def) for (j =3D 0; j < i; j++) { if (STREQ_NULLABLE(disk->src->path, def->disks[j].src->path)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot generate external snapshot name f= or " - "disk '%s': collision with disk '%s'"), + _("cannot generate external snapshot name f= or disk '%1$s': collision with disk '%2$s'"), disk->name, def->disks[j].name); return -1; } @@ -637,13 +629,13 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *sna= pdef, =20 if (!domdisk) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("no disk named '%s'"), snapdisk->name); + _("no disk named '%1$s'"), snapdisk->name); return -1; } =20 if (virHashHasEntry(map, domdisk->dst)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' specified twice"), + _("disk '%1$s' specified twice"), snapdisk->name); return -1; } @@ -664,7 +656,7 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapd= ef, !(snapdisk->snapshot =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATIO= N_NO && domdisk->snapshot =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATION= _NO)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' must use snapshot mode '%s'"), + _("disk '%1$s' must use snapshot mode '%2$s'"), snapdisk->name, virDomainSnapshotLocationTypeToString(default_s= napshot)); return -1; @@ -673,8 +665,7 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapd= ef, if (snapdisk->src->path && snapdisk->snapshot !=3D VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL)= { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("file '%s' for disk '%s' requires " - "use of external snapshot mode"), + _("file '%1$s' for disk '%2$s' requires use of = external snapshot mode"), snapdisk->src->path, snapdisk->name); return -1; } diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_con= f.c index 4c13cc4c17..2a8a1a3eb5 100644 --- a/src/conf/storage_adapter_conf.c +++ b/src/conf/storage_adapter_conf.c @@ -208,16 +208,14 @@ virStorageAdapterValidateFCHost(virStorageAdapterFCHo= st *fchost) =20 if ((fchost->parent_wwnn && !fchost->parent_wwpn)) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent_wwnn=3D'%s', the " - "parent_wwpn must also be provided"), + _("when providing parent_wwnn=3D'%1$s', the parent_= wwpn must also be provided"), fchost->parent_wwnn); return -1; } =20 if (!fchost->parent_wwnn && fchost->parent_wwpn) { virReportError(VIR_ERR_XML_ERROR, - _("when providing parent_wwpn=3D'%s', the " - "parent_wwnn must also be provided"), + _("when providing parent_wwpn=3D'%1$s', the parent_= wwnn must also be provided"), fchost->parent_wwpn); return -1; } diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index f5a9636ce2..3e584ad9b9 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -309,7 +309,7 @@ virStoragePoolTypeInfoLookup(int type) return &poolTypeInfo[i]; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing backend for pool type %d"), type); + _("missing backend for pool type %1$d"), type); return NULL; } =20 @@ -554,7 +554,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, =20 if (source->format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown pool format type %s"), format); + _("unknown pool format type %1$s"), format); return -1; } } @@ -638,15 +638,14 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, if ((source->format !=3D VIR_STORAGE_POOL_NETFS_NFS) && (source->format !=3D VIR_STORAGE_POOL_NETFS_AUTO)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("storage pool protocol ver unsupported for " - "pool type '%s'"), + _("storage pool protocol ver unsupported for po= ol type '%1$s'"), virStoragePoolFormatFileSystemNetTypeToString(s= ource->format)); return -1; } =20 if (strchr(source->protocolVer, ',')) { virReportError(VIR_ERR_XML_DETAIL, - _("storage pool protocol ver '%s' must not cont= ain ','"), + _("storage pool protocol ver '%1$s' must not co= ntain ','"), source->protocolVer); return -1; } @@ -766,7 +765,7 @@ virStoragePoolDefRefreshParse(xmlXPathContextPtr ctxt, =20 if ((tmp =3D virStorageVolDefRefreshAllocationTypeFromString(allocatio= n)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown storage pool volume refresh allocation t= ype %s"), + _("unknown storage pool volume refresh allocation t= ype %1$s"), allocation); return -1; } @@ -865,7 +864,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) =20 if (strchr(def->name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), def->name); + _("name %1$s cannot contain '/'"), def->name); return NULL; } =20 @@ -1052,7 +1051,7 @@ virStoragePoolSourceFormat(virBuffer *buf, const char *format =3D (options->formatToString)(src->format); if (!format) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown pool format number %d"), + _("unknown pool format number %1$d"), src->format); return -1; } @@ -1275,7 +1274,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, if (type) { if ((def->type =3D virStorageVolTypeFromString(type)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume type '%s'"), type); + _("unknown volume type '%1$s'"), type); return NULL; } } @@ -1296,7 +1295,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, =20 if (def->target.backingStore->format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume format type %s"), format); + _("unknown volume format type %1$s"), forma= t); return NULL; } } @@ -1342,7 +1341,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, =20 if (def->target.format < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume format type %s"), format); + _("unknown volume format type %1$s"), format); return NULL; } } @@ -1386,7 +1385,8 @@ virStorageVolDefParseXML(virStoragePoolDef *pool, int f =3D virStorageFileFeatureTypeFromString((const char*)nod= es[i]->name); =20 if (f < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported = feature %s"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported feature %1$s"), (const char*)nodes[i]->name); return NULL; } @@ -1446,7 +1446,7 @@ virStorageVolTargetDefFormat(virStorageVolOptions *op= tions, const char *format =3D (options->formatToString)(def->format); if (!format) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown volume format number %d"), + _("unknown volume format number %1$d"), def->format); return -1; } diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encrypti= on_conf.c index 3651ff8cfd..91fe30edf6 100644 --- a/src/conf/storage_encryption_conf.c +++ b/src/conf/storage_encryption_conf.c @@ -159,7 +159,7 @@ virStorageEncryptionSecretParse(xmlXPathContextPtr ctxt, =20 if ((ret->type =3D virStorageEncryptionSecretTypeFromString(type_str))= < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume encryption secret type %s"), + _("unknown volume encryption secret type %1$s"), type_str); goto cleanup; } @@ -237,7 +237,7 @@ virStorageEncryptionParseNode(xmlNodePtr node, if ((encdef->format =3D virStorageEncryptionFormatTypeFromString(format_str)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown volume encryption format type %s"), + _("unknown volume encryption format type %1$s"), format_str); goto cleanup; } diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c index 58009fd06e..99061e4df7 100644 --- a/src/conf/storage_source_conf.c +++ b/src/conf/storage_source_conf.c @@ -259,7 +259,7 @@ virStorageAuthDefParse(xmlNodePtr node, */ if ((authdef->authType =3D virStorageAuthTypeFromString(authtype))= < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown auth type '%s'"), authtype); + _("unknown auth type '%1$s'"), authtype); return NULL; } } @@ -360,14 +360,14 @@ virStoragePRDefParseXML(xmlXPathContextPtr ctxt) =20 if (type && STRNEQ(type, "unix")) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported connection type for := %s"), + _("unsupported connection type for := %1$s"), type); goto cleanup; } =20 if (mode && STRNEQ(mode, "client")) { virReportError(VIR_ERR_XML_ERROR, - _("unsupported connection mode for := %s"), + _("unsupported connection mode for := %1$s"), mode); goto cleanup; } @@ -648,7 +648,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDe= f *def) if (virStringHasChars(def->name, virStorageSourceCookieValueInvalidCha= rs) || virStringHasChars(def->name, virStorageSourceCookieNameInvalidChar= s)) { virReportError(VIR_ERR_XML_ERROR, - _("cookie name '%s' contains invalid characters"), + _("cookie name '%1$s' contains invalid characters"), def->name); return -1; } @@ -657,7 +657,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDe= f *def) if (val[0] =3D=3D '"') { if (val[len - 1] !=3D '"') { virReportError(VIR_ERR_XML_ERROR, - _("value of cookie '%s' contains invalid charac= ters"), + _("value of cookie '%1$s' contains invalid char= acters"), def->name); return -1; } @@ -669,7 +669,7 @@ virStorageSourceNetCookieValidate(virStorageNetCookieDe= f *def) /* check invalid characters in value */ if (virStringHasChars(checkval, virStorageSourceCookieValueInvalidChar= s)) { virReportError(VIR_ERR_XML_ERROR, - _("value of cookie '%s' contains invalid characters= "), + _("value of cookie '%1$s' contains invalid characte= rs"), def->name); return -1; } @@ -690,7 +690,8 @@ virStorageSourceNetCookiesValidate(virStorageSource *sr= c) =20 for (j =3D i + 1; j < src->ncookies; j++) { if (STREQ(src->cookies[i]->name, src->cookies[j]->name)) { - virReportError(VIR_ERR_XML_ERROR, _("duplicate cookie '%s'= "), + virReportError(VIR_ERR_XML_ERROR, + _("duplicate cookie '%1$s'"), src->cookies[i]->name); return -1; } diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 0ffd3db90a..acf1871d36 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -115,8 +115,7 @@ static int virChrdevLockFileCreate(const char *dev) if (virPidFileReadPathIfAlive(path, &pid, NULL) =3D=3D 0 && pid >=3D 0= ) { /* the process exists, the lockfile is valid */ virReportError(VIR_ERR_OPERATION_FAILED, - _("Requested device '%s' is locked by " - "lock file '%s' held by process %lld"), + _("Requested device '%1$s' is locked by lock file '= %2$s' held by process %3$lld"), dev, path, (long long) pid); return -1; } else { @@ -142,8 +141,7 @@ static int virChrdevLockFileCreate(const char *dev) return 0; } virReportSystemError(errno, - _("Couldn't create lock file for " - "device '%s' in path '%s'"), + _("Couldn't create lock file for device '%1$s= ' in path '%2$s'"), dev, path); return -1; } @@ -151,8 +149,7 @@ static int virChrdevLockFileCreate(const char *dev) /* write the pid to the file */ if (safewrite(lockfd, pidStr, strlen(pidStr)) < 0) { virReportSystemError(errno, - _("Couldn't write to lock file for " - "device '%s' in path '%s'"), + _("Couldn't write to lock file for device '%1= $s' in path '%2$s'"), dev, path); unlink(path); return -1; @@ -340,7 +337,7 @@ int virChrdevOpen(virChrdevs *devs, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported device type '%s'"), + _("Unsupported device type '%1$s'"), virDomainChrTypeToString(source->type)); return -1; } @@ -405,7 +402,7 @@ int virChrdevOpen(virChrdevs *devs, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported device type '%s'"), + _("Unsupported device type '%1$s'"), virDomainChrTypeToString(source->type)); goto error; } diff --git a/src/conf/virdomainjob.c b/src/conf/virdomainjob.c index c4cbbe8f6d..2644a793f8 100644 --- a/src/conf/virdomainjob.c +++ b/src/conf/virdomainjob.c @@ -368,7 +368,7 @@ virDomainObjBeginJobInternal(virDomainObj *obj, =20 virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, obj->def->name); goto cleanup; } @@ -461,18 +461,15 @@ virDomainObjBeginJobInternal(virDomainObj *obj, if (errno =3D=3D ETIMEDOUT) { if (blocker && agentBlocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by monitor=3D%s agent=3D%s)"), + _("cannot acquire state change lock (held by mo= nitor=3D%1$s agent=3D%2$s)"), blocker, agentBlocker); } else if (blocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by monitor=3D%s)"), + _("cannot acquire state change lock (held by mo= nitor=3D%1$s)"), blocker); } else if (agentBlocker) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("cannot acquire state change " - "lock (held by agent=3D%s)"), + _("cannot acquire state change lock (held by ag= ent=3D%1$s)"), agentBlocker); } else { virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s", @@ -483,21 +480,15 @@ virDomainObjBeginJobInternal(virDomainObj *obj, jobObj->jobsQueued > jobObj->maxQueuedJobs) { if (blocker && agentBlocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by monitor=3D%s agent=3D%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by mo= nitor=3D%1$s agent=3D%2$s) due to max_queued limit"), blocker, agentBlocker); } else if (blocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by monitor=3D%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by mo= nitor=3D%1$s) due to max_queued limit"), blocker); } else if (agentBlocker) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot acquire state change " - "lock (held by agent=3D%s) " - "due to max_queued limit"), + _("cannot acquire state change lock (held by ag= ent=3D%1$s) due to max_queued limit"), agentBlocker); } else { virReportError(VIR_ERR_OPERATION_FAILED, "%s", @@ -569,7 +560,7 @@ virDomainObjBeginNestedJob(virDomainObj *obj, { if (asyncJob !=3D obj->job->asyncJob) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected async job %d type expected %d"), + _("unexpected async job %1$d type expected %2$d"), asyncJob, obj->job->asyncJob); return -1; } diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentob= jlist.c index f19ec3319a..e5cdd9a141 100644 --- a/src/conf/virdomainmomentobjlist.c +++ b/src/conf/virdomainmomentobjlist.c @@ -235,7 +235,7 @@ virDomainMomentAssignDef(virDomainMomentObjList *moment= s, =20 if (virHashLookup(moments->objs, def->name) !=3D NULL) { virReportError(VIR_ERR_OPERATION_FAILED, - _("domain moment %s already exists"), + _("domain moment %1$s already exists"), def->name); return NULL; } @@ -539,21 +539,21 @@ virDomainMomentCheckCycles(virDomainMomentObjList *li= st, if (def->parent_name) { if (STREQ(def->name, def->parent_name)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot set moment %s as its own parent"), + _("cannot set moment %1$s as its own parent"), def->name); return -1; } other =3D virDomainMomentFindByName(list, def->parent_name); if (!other) { virReportError(VIR_ERR_INVALID_ARG, - _("parent %s for moment %s not found"), + _("parent %1$s for moment %2$s not found"), def->parent_name, def->name); return -1; } while (other->def->parent_name) { if (STREQ(other->def->parent_name, def->name)) { virReportError(VIR_ERR_INVALID_ARG, - _("parent %s would create cycle to %s"), + _("parent %1$s would create cycle to %2$s"), other->def->name, def->name); return -1; } diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index 13675acda5..6be5de5e2b 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -280,14 +280,14 @@ virDomainObjListAddLocked(virDomainObjList *doms, if ((vm =3D virDomainObjListFindByUUIDLocked(doms, (*def)->uuid))) { if (vm->removing) { virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' is already being removed"), + _("domain '%1$s' is already being removed"), vm->def->name); goto error; } else if (STRNEQ(vm->def->name, (*def)->name)) { /* UUID matches, but if names don't match, refuse it */ virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' is already defined with uuid %s"= ), + _("domain '%1$s' is already defined with uuid %= 2$s"), vm->def->name, uuidstr); goto error; } @@ -296,13 +296,13 @@ virDomainObjListAddLocked(virDomainObjList *doms, /* UUID & name match, but if VM is already active, refuse it */ if (virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain '%s' is already active"), + _("domain '%1$s' is already active"), vm->def->name); goto error; } if (!vm->persistent) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain '%s' is already being started"), + _("domain '%1$s' is already being started"), vm->def->name); goto error; } @@ -317,7 +317,7 @@ virDomainObjListAddLocked(virDomainObjList *doms, if ((vm =3D virDomainObjListFindByNameLocked(doms, (*def)->name)))= { virUUIDFormat(vm->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' already exists with uuid %s"), + _("domain '%1$s' already exists with uuid %2$s"= ), (*def)->name, uuidstr); goto error; } @@ -443,7 +443,7 @@ virDomainObjListRename(virDomainObjList *doms, =20 if (virHashLookup(doms->objsName, new_name) !=3D NULL) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain with name '%s' already exists"), + _("domain with name '%1$s' already exists"), new_name); goto cleanup; } @@ -539,7 +539,7 @@ virDomainObjListLoadStatus(virDomainObjList *doms, =20 if (virHashLookup(doms->objs, uuidstr) !=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected domain %s already exists"), + _("unexpected domain %1$s already exists"), obj->def->name); goto error; } @@ -608,7 +608,7 @@ virDomainObjListLoadAllConfigs(virDomainObjList *doms, dom->persistent =3D 1; virDomainObjEndAPI(&dom); } else { - VIR_ERROR(_("Failed to load config for domain '%s'"), entry->d= _name); + VIR_ERROR(_("Failed to load config for domain '%1$s'"), entry-= >d_name); } } =20 @@ -1007,7 +1007,7 @@ virDomainObjListConvert(virDomainObjList *domlist, =20 virObjectRWUnlock(domlist); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, dom->name); goto error; } diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index c75ecf3a04..1726fc381f 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -543,7 +543,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, if (STRNEQ(obj->def->name, def->name)) { virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("network '%s' is already defined with uuid %s= "), + _("network '%1$s' is already defined with uuid = %2$s"), obj->def->name, uuidstr); goto cleanup; } @@ -552,7 +552,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, /* UUID & name match, but if network is already active, refuse= it */ if (virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network is already active as '%s'"), + _("network is already active as '%1$s'"), obj->def->name); goto cleanup; } @@ -566,7 +566,7 @@ virNetworkObjAssignDefLocked(virNetworkObjList *nets, virObjectLock(obj); virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("network '%s' already exists with uuid %s"), + _("network '%1$s' already exists with uuid %2$s= "), def->name, uuidstr); goto cleanup; } @@ -862,8 +862,7 @@ virNetworkLoadState(virNetworkObjList *nets, =20 if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network config filename '%s'" - " does not match network name '%s'"), + _("Network config filename '%1$s' does not match ne= twork name '%2$s'"), configFile, def->name); return NULL; } @@ -888,7 +887,7 @@ virNetworkLoadState(virNetworkObjList *nets, if (floor_sum && virStrToLong_ull(floor_sum, NULL, 10, &floor_sum_val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed 'floor_sum' attribute: %s"), + _("Malformed 'floor_sum' attribute: %1$s"), floor_sum); return NULL; } @@ -902,7 +901,7 @@ virNetworkLoadState(virNetworkObjList *nets, int flag =3D virNetworkTaintTypeFromString(str); if (flag < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown taint flag %s"), str); + _("Unknown taint flag %1$s"), str); return NULL; } /* Compute taint mask here. The network object does not @@ -961,8 +960,7 @@ virNetworkLoadConfig(virNetworkObjList *nets, =20 if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network config filename '%s'" - " does not match network name '%s'"), + _("Network config filename '%1$s' does not match ne= twork name '%2$s'"), configFile, def->name); return NULL; } @@ -1105,7 +1103,7 @@ virNetworkObjDeleteConfig(const char *configDir, =20 if (unlink(configFile) < 0) { virReportSystemError(errno, - _("cannot remove config file '%s'"), + _("cannot remove config file '%1$s'"), configFile); return -1; } @@ -1565,7 +1563,7 @@ virNetworkObjAddPort(virNetworkObj *net, =20 if (virHashLookup(net->ports, uuidstr)) { virReportError(VIR_ERR_NETWORK_PORT_EXIST, - _("Network port with UUID %s already exists"), + _("Network port with UUID %1$s already exists"), uuidstr); return -1; } @@ -1596,7 +1594,7 @@ virNetworkObjLookupPort(virNetworkObj *net, =20 if (!(ret =3D virHashLookup(net->ports, uuidstr))) { virReportError(VIR_ERR_NO_NETWORK_PORT, - _("Network port with UUID %s does not exist"), + _("Network port with UUID %1$s does not exist"), uuidstr); return NULL; } @@ -1618,7 +1616,7 @@ virNetworkObjDeletePort(virNetworkObj *net, =20 if (!(portdef =3D virHashLookup(net->ports, uuidstr))) { virReportError(VIR_ERR_NO_NETWORK_PORT, - _("Network port with UUID %s does not exist"), + _("Network port with UUID %1$s does not exist"), uuidstr); return -1; } diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index 37f5376976..fc06ef41d5 100644 --- a/src/conf/virnetworkportdef.c +++ b/src/conf/virnetworkportdef.c @@ -102,7 +102,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) } if (virUUIDParse(uuid, def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); return NULL; } =20 @@ -123,7 +123,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) =20 if (virUUIDParse(uuid, def->owneruuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); return NULL; } =20 @@ -143,7 +143,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) } if (virMacAddrParse(mac, &def->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse MAC '%s'"), mac); + _("Unable to parse MAC '%1$s'"), mac); return NULL; } =20 @@ -196,8 +196,8 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) (def->plug.bridge.macTableManager =3D virNetworkBridgeMACTableManagerTypeFromString(macmgr)) <=3D 0= ) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid macTableManager setting '%s' " - "in network port"), macmgr); + _("Invalid macTableManager setting '%1$s' in ne= twork port"), + macmgr); return NULL; } break; @@ -213,7 +213,7 @@ virNetworkPortDefParseXML(xmlXPathContextPtr ctxt) (def->plug.direct.mode =3D virNetDevMacVLanModeTypeFromString(mode)) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid mode setting '%s' in network port"),= mode); + _("Invalid mode setting '%1$s' in network port"= ), mode); return NULL; } break; @@ -424,7 +424,7 @@ virNetworkPortDefDeleteStatus(virNetworkPortDef *def, =20 if (unlink(path) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to delete %s"), path); + _("Unable to delete %1$s"), path); return -1; } =20 diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 4c22484d11..cfef30d47e 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -554,8 +554,7 @@ virNodeDeviceFindFCParentHost(virNodeDeviceObj *obj) =20 if (!cap) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parent device %s is not capable " - "of vport operations"), + _("Parent device %1$s is not capable of vport opera= tions"), obj->def->name); return -1; } @@ -574,7 +573,7 @@ virNodeDeviceObjListGetParentHostByParent(virNodeDevice= ObjList *devs, =20 if (!(obj =3D virNodeDeviceObjListFindByName(devs, parent_name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } @@ -599,7 +598,7 @@ virNodeDeviceObjListGetParentHostByWWNs(virNodeDeviceOb= jList *devs, if (!(obj =3D virNodeDeviceObjListFindByWWNs(devs, parent_wwnn, parent_wwpn))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } @@ -622,7 +621,7 @@ virNodeDeviceObjListGetParentHostByFabricWWN(virNodeDev= iceObjList *devs, =20 if (!(obj =3D virNodeDeviceObjListFindByFabricWWN(devs, parent_fabric_= wwn))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find parent device for '%s'"), + _("Could not find parent device for '%1$s'"), dev_name); return -1; } diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index 592731fc1b..423ed7a392 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -113,7 +113,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt) =20 if (virUUIDParse(uuid, ret->owneruuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse UUID '%s'"), uuid); + _("Unable to parse UUID '%1$s'"), uuid); VIR_FREE(uuid); goto cleanup; } @@ -128,7 +128,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt) =20 if (virMacAddrParse(mac, &ret->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse MAC '%s'"), mac); + _("Unable to parse MAC '%1$s'"), mac); VIR_FREE(mac); goto cleanup; } diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbinding= obj.c index 862f825422..e0101a1086 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -159,7 +159,7 @@ virNWFilterBindingObjSave(const virNWFilterBindingObj *= obj, =20 if (g_mkdir_with_parents(statusDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory '%s'"), + _("cannot create config directory '%1$s'"), statusDir); return -1; } @@ -185,7 +185,7 @@ virNWFilterBindingObjDelete(const virNWFilterBindingObj= *obj, if (unlink(filename) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove status '%s' for nwfilter = binding %s'"), + _("Unable to remove status '%1$s' for nwfilte= r binding %2$s'"), filename, obj->def->portdevname); return -1; } diff --git a/src/conf/virnwfilterbindingobjlist.c b/src/conf/virnwfilterbin= dingobjlist.c index a349f5c195..002f6e2245 100644 --- a/src/conf/virnwfilterbindingobjlist.c +++ b/src/conf/virnwfilterbindingobjlist.c @@ -169,11 +169,11 @@ virNWFilterBindingObjListAddLocked(virNWFilterBinding= ObjList *bindings, if (binding) { if (virNWFilterBindingObjGetRemoving(binding)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("binding '%s' is already being removed"), + _("binding '%1$s' is already being removed"), def->portdevname); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("binding '%s' already exists"), + _("binding '%1$s' already exists"), def->portdevname); } goto error; @@ -272,7 +272,7 @@ virNWFilterBindingObjListLoadStatus(virNWFilterBindingO= bjList *bindings, def =3D virNWFilterBindingObjGetDef(obj); if (virHashLookup(bindings->objs, def->portdevname) !=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected binding %s already exists"), + _("unexpected binding %1$s already exists"), def->portdevname); goto error; } @@ -321,7 +321,7 @@ virNWFilterBindingObjListLoadAllConfigs(virNWFilterBind= ingObjList *bindings, if (binding) virNWFilterBindingObjEndAPI(&binding); else - VIR_ERROR(_("Failed to load config for binding '%s'"), entry->= d_name); + VIR_ERROR(_("Failed to load config for binding '%1$s'"), entry= ->d_name); } =20 virObjectRWUnlock(bindings); diff --git a/src/conf/virnwfilterobj.c b/src/conf/virnwfilterobj.c index 2e75e90cf1..6456add593 100644 --- a/src/conf/virnwfilterobj.c +++ b/src/conf/virnwfilterobj.c @@ -190,13 +190,13 @@ virNWFilterObjListFindInstantiateFilter(virNWFilterOb= jList *nwfilters, =20 if (!(obj =3D virNWFilterObjListFindByName(nwfilters, filtername))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("referenced filter '%s' is missing"), filtername); + _("referenced filter '%1$s' is missing"), filternam= e); return NULL; } =20 if (virNWFilterObjWantRemoved(obj)) { virReportError(VIR_ERR_NO_NWFILTER, - _("Filter '%s' is in use."), filtername); + _("Filter '%1$s' is in use."), filtername); virNWFilterObjUnlock(obj); return NULL; } @@ -305,8 +305,7 @@ virNWFilterObjListAssignDef(virNWFilterObjList *nwfilte= rs, =20 if (STRNEQ(def->name, objdef->name)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("filter with same UUID but different name " - "('%s') already exists"), + _("filter with same UUID but different name ('%= 1$s') already exists"), objdef->name); virNWFilterObjUnlock(obj); return NULL; @@ -317,7 +316,7 @@ virNWFilterObjListAssignDef(virNWFilterObjList *nwfilte= rs, objdef =3D obj->def; virUUIDFormat(objdef->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("filter '%s' already exists with uuid %s"), + _("filter '%1$s' already exists with uuid %2$s"= ), def->name, uuidstr); virNWFilterObjUnlock(obj); return NULL; @@ -576,8 +575,7 @@ virNWFilterObjListLoadConfig(virNWFilterObjList *nwfilt= ers, =20 if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_XML_ERROR, - _("network filter config filename '%s' " - "does not match name '%s'"), + _("network filter config filename '%1$s' does not m= atch name '%2$s'"), configFile, def->name); goto error; } diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 4929f74155..e0393e6cec 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -344,8 +344,7 @@ virSecretObjListAdd(virSecretObjList *secrets, =20 if (STRNEQ_NULLABLE(objdef->usage_id, (*newdef)->usage_id)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("a secret with UUID %s is already defined for= " - "use with %s"), + _("a secret with UUID %1$s is already defined f= or use with %2$s"), uuidstr, objdef->usage_id); goto cleanup; } @@ -371,8 +370,7 @@ virSecretObjListAdd(virSecretObjList *secrets, objdef =3D obj->def; virUUIDFormat(objdef->uuid, uuidstr); virReportError(VIR_ERR_INTERNAL_ERROR, - _("a secret with UUID %s already defined for " - "use with %s"), + _("a secret with UUID %1$s already defined for = use with %2$s"), uuidstr, (*newdef)->usage_id); goto cleanup; } @@ -644,7 +642,7 @@ virSecretObjDeleteConfig(virSecretObj *obj) =20 if (!def->isephemeral && unlink(obj->configFile) < 0 && errno !=3D ENOENT) { - virReportSystemError(errno, _("cannot unlink '%s'"), + virReportSystemError(errno, _("cannot unlink '%1$s'"), obj->configFile); return -1; } @@ -725,7 +723,7 @@ virSecretObjGetValue(virSecretObj *obj) char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(def->uuid, uuidstr); virReportError(VIR_ERR_NO_SECRET, - _("secret '%s' does not have a value"), uuidstr); + _("secret '%1$s' does not have a value"), uuidstr); return NULL; } =20 @@ -799,7 +797,7 @@ virSecretLoadValidateUUID(virSecretDef *def, =20 if (!virStringMatchesNameSuffix(file, uuidstr, ".xml")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _(" does not match secret file name '%s'"), + _(" does not match secret file name '%1$s'"), file); return -1; } @@ -820,20 +818,20 @@ virSecretLoadValue(virSecretObj *obj) ret =3D 0; goto cleanup; } - virReportSystemError(errno, _("cannot open '%s'"), + virReportSystemError(errno, _("cannot open '%1$s'"), obj->base64File); goto cleanup; } =20 if (fstat(fd, &st) < 0) { - virReportSystemError(errno, _("cannot stat '%s'"), + virReportSystemError(errno, _("cannot stat '%1$s'"), obj->base64File); goto cleanup; } =20 if ((size_t)st.st_size !=3D st.st_size) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("'%s' file does not fit in memory"), + _("'%1$s' file does not fit in memory"), obj->base64File); goto cleanup; } @@ -841,7 +839,7 @@ virSecretLoadValue(virSecretObj *obj) contents =3D g_new0(char, st.st_size + 1); =20 if (saferead(fd, contents, st.st_size) !=3D st.st_size) { - virReportSystemError(errno, _("cannot read '%s'"), + virReportSystemError(errno, _("cannot read '%1$s'"), obj->base64File); goto cleanup; } @@ -914,7 +912,7 @@ virSecretLoadAllConfigs(virSecretObjList *secrets, continue; =20 if (!(obj =3D virSecretLoad(secrets, de->d_name, path, configDir))= ) { - VIR_ERROR(_("Error reading secret: %s"), + VIR_ERROR(_("Error reading secret: %1$s"), virGetLastErrorMessage()); VIR_FREE(path); continue; diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index e6c187e80a..7010e97d61 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1037,7 +1037,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList *p= ools, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("pool '%s' is already defined with uuid %s"), + _("pool '%1$s' is already defined with uuid %2$= s"), obj->def->name, uuidstr); goto cleanup; } @@ -1046,14 +1046,14 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList = *pools, /* UUID & name match, but if Pool is already active, refuse it= */ if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("pool is already active as '%s'"), + _("pool is already active as '%1$s'"), obj->def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("pool '%s' is starting up"), + _("pool '%1$s' is starting up"), obj->def->name); goto cleanup; } @@ -1071,7 +1071,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjList *p= ools, =20 virUUIDFormat(obj->def->uuid, uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("pool '%s' already exists with uuid %s"), + _("pool '%1$s' already exists with uuid %2$s"), def->name, uuidstr); goto cleanup; } @@ -1455,7 +1455,7 @@ virStoragePoolObjSourceFindDuplicate(virStoragePoolOb= jList *pools, =20 if (obj) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Storage source conflict with pool: '%s'"), + _("Storage source conflict with pool: '%1$s'"), obj->def->name); return -1; } @@ -1577,8 +1577,7 @@ virStoragePoolObjLoad(virStoragePoolObjList *pools, =20 if (!virStringMatchesNameSuffix(file, def->name, ".xml")) { virReportError(VIR_ERR_XML_ERROR, - _("Storage pool config filename '%s' does " - "not match pool name '%s'"), + _("Storage pool config filename '%1$s' does not mat= ch pool name '%2$s'"), path, def->name); return NULL; } @@ -1630,8 +1629,7 @@ virStoragePoolObjLoadState(virStoragePoolObjList *poo= ls, =20 if (STRNEQ(name, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Storage pool state file '%s' does not match " - "pool name '%s'"), + _("Storage pool state file '%1$s' does not match po= ol name '%2$s'"), stateFile, def->name); return NULL; } @@ -1715,7 +1713,7 @@ virStoragePoolObjSaveDef(virStorageDriverState *drive= r, if (!obj->configFile) { if (g_mkdir_with_parents(driver->configDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create config directory %s"), + _("cannot create config directory %1$s"), driver->configDir); return -1; } @@ -1741,13 +1739,13 @@ virStoragePoolObjDeleteDef(virStoragePoolObj *obj) { if (!obj->configFile) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no config file for %s"), obj->def->name); + _("no config file for %1$s"), obj->def->name); return -1; } =20 if (unlink(obj->configFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot remove config for %s"), + _("cannot remove config for %1$s"), obj->def->name); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464655; cv=none; d=zohomail.com; s=zohoarc; b=Z09dCvA8lufr5d/px8l+9+eD01gtwYyNZZgqzhHuuJhA2YFp/VaxevLB3D+DNYg5OehsDaFkHumW/r5Pcwwo5AvjXxH9zIAHKZxsOFu5UvS71VCbOOmB2hl8mkTavL3gV/FabA4xpwcRo0XGzwOtLmH/52fCRv+RVyKe8PP7ATs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464655; 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=ctwI3P/WZCFqL8O09BpS3tWGIFkScUmnuCgrmez+JQY=; b=TwtFbt967xK2h7LDBGsOC5loYz7Ou1Zn87d7xXEC4+0iP5e7r2qXJ863VVqBKzr+obbjptNG8x6HVSgfYWRntSSCGqV/pD1prcCeSi5iG/e34/Bk/yTr1Lxd0mQ8rAwxNv3s7YhtR/SmGYefgmI1oEZDwA8lLLkdNWswZlOUZdE= 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 16784646558411022.9200995611117; Fri, 10 Mar 2023 08:10:55 -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-438-Yn6zBhw4Ov2mHaos7Ids0w-1; Fri, 10 Mar 2023 11:10:51 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4AF57882823; Fri, 10 Mar 2023 16:10:33 +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 358C1140EBF4; Fri, 10 Mar 2023 16:10:33 +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 1ADBD1946A4A; Fri, 10 Mar 2023 16:10:33 +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 718561946A75 for ; Fri, 10 Mar 2023 16:10:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6603AC15BAE; Fri, 10 Mar 2023 16:10:29 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3BC7C15BA0 for ; Fri, 10 Mar 2023 16:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464654; 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=ctwI3P/WZCFqL8O09BpS3tWGIFkScUmnuCgrmez+JQY=; b=LKxA2Rosdca71stJ6CdKsmkgRby8GiyGdlSs7Eu+U7UqrsgLemlbeUK3U0A4od0UcSN3EZ wxdrgiM66hSB+phrD3HWZqmnFe0QkKDUjQhaHu37gtHGgZ18zUmUWgvDjavoPDIH2oHPEm vrL+DCFk44GN4M5A8p6Z+BwJ41qFt0U= X-MC-Unique: Yn6zBhw4Ov2mHaos7Ids0w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 11/51] cpu: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:27 +0100 Message-Id: <873020e888fdc12256cad204aa5b4c79e32af239.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.7 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: 1678464656946100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/cpu/cpu.c | 40 +++++++++++++------------- src/cpu/cpu_arm.c | 23 ++++++++------- src/cpu/cpu_map.c | 6 ++-- src/cpu/cpu_ppc64.c | 33 ++++++++++------------ src/cpu/cpu_s390.c | 5 ++-- src/cpu/cpu_x86.c | 68 +++++++++++++++++++++------------------------ 6 files changed, 83 insertions(+), 92 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 26f41272a7..bb5737e938 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -64,7 +64,7 @@ cpuGetSubDriver(virArch arch) } =20 virReportError(VIR_ERR_NO_SUPPORT, - _("'%s' architecture is not supported by CPU driver"), + _("'%1$s' architecture is not supported by CPU driver"), virArchToString(arch)); return NULL; } @@ -81,7 +81,7 @@ cpuGetSubDriverByName(const char *name) } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU driver '%s' does not exist"), + _("CPU driver '%1$s' does not exist"), name); return NULL; } @@ -156,7 +156,7 @@ virCPUCompare(virArch arch, =20 if (!driver->compare) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot compare CPUs of %s architecture"), + _("cannot compare CPUs of %1$s architecture"), virArchToString(arch)); return VIR_CPU_COMPARE_ERROR; } @@ -210,7 +210,7 @@ cpuDecode(virCPUDef *cpu, =20 if (driver->decode =3D=3D NULL) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot decode CPU data for %s architecture"), + _("cannot decode CPU data for %1$s architecture"), virArchToString(cpu->arch)); return -1; } @@ -266,7 +266,7 @@ cpuEncode(virArch arch, =20 if (driver->encode =3D=3D NULL) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot encode CPU data for %s architecture"), + _("cannot encode CPU data for %1$s architecture"), virArchToString(arch)); return -1; } @@ -417,7 +417,7 @@ virCPUGetHost(virArch arch, case VIR_CPU_TYPE_GUEST: if (nodeInfo) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot set topology for CPU type '%s'"), + _("cannot set topology for CPU type '%1$s'"), virCPUTypeToString(type)); return NULL; } @@ -427,7 +427,7 @@ virCPUGetHost(virArch arch, case VIR_CPU_TYPE_AUTO: case VIR_CPU_TYPE_LAST: virReportError(VIR_ERR_INVALID_ARG, - _("unsupported CPU type: %s"), + _("unsupported CPU type: %1$s"), virCPUTypeToString(type)); return NULL; } @@ -450,7 +450,7 @@ virCPUGetHost(virArch arch, virArchToString(arch)); } else { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot detect host CPU model for %s architecture= "), + _("cannot detect host CPU model for %1$s architectu= re"), virArchToString(arch)); return NULL; } @@ -524,12 +524,12 @@ virCPUBaseline(virArch arch, for (i =3D 0; i < ncpus; i++) { if (!cpus[i]) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid CPU definition at index %zu"), i); + _("invalid CPU definition at index %1$zu"), i); return NULL; } if (!cpus[i]->model) { virReportError(VIR_ERR_INVALID_ARG, - _("no CPU model specified at index %zu"), i); + _("no CPU model specified at index %1$zu"), i); return NULL; } } @@ -542,7 +542,7 @@ virCPUBaseline(virArch arch, =20 if (!driver->baseline) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot compute baseline CPU of %s architecture"), + _("cannot compute baseline CPU of %1$s architecture= "), virArchToString(arch)); return NULL; } @@ -614,7 +614,7 @@ virCPUUpdate(virArch arch, =20 if (!driver->update) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot update guest CPU for %s architecture"), + _("cannot update guest CPU for %1$s architecture"), virArchToString(arch)); return -1; } @@ -701,7 +701,7 @@ virCPUCheckFeature(virArch arch, =20 if (!driver->checkFeature) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot check guest CPU feature for %s architectu= re"), + _("cannot check guest CPU feature for %1$s architec= ture"), virArchToString(arch)); return -1; } @@ -738,7 +738,7 @@ virCPUCheckForbiddenFeatures(virCPUDef *guest, const vi= rCPUDef *host) continue; =20 virReportError(VIR_ERR_CPU_INCOMPATIBLE, - _("Host CPU provides forbidden feature '%s'"), + _("Host CPU provides forbidden feature '%1$s'"), guest->features[i].name); return -1; } @@ -772,7 +772,7 @@ virCPUDataCheckFeature(const virCPUData *data, =20 if (!driver->dataCheckFeature) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot check guest CPU feature for %s architectu= re"), + _("cannot check guest CPU feature for %1$s architec= ture"), virArchToString(data->arch)); return -1; } @@ -802,7 +802,7 @@ virCPUDataFormat(const virCPUData *data) =20 if (!driver->dataFormat) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot format %s CPU data"), + _("cannot format %1$s CPU data"), virArchToString(data->arch)); return NULL; } @@ -862,7 +862,7 @@ virCPUData *virCPUDataParseNode(xmlNodePtr node) return NULL; =20 if (!driver->dataParse) { - virReportError(VIR_ERR_NO_SUPPORT, _("cannot parse %s CPU data"), = arch); + virReportError(VIR_ERR_NO_SUPPORT, _("cannot parse %1$s CPU data")= , arch); return NULL; } =20 @@ -988,14 +988,14 @@ virCPUTranslate(virArch arch, =20 if (cpu->fallback !=3D VIR_CPU_FALLBACK_ALLOW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU model %s is not supported by hypervisor"), + _("CPU model %1$s is not supported by hypervisor"), cpu->model); return -1; } =20 if (!driver->translate) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot translate CPU model %s to a supported mod= el"), + _("cannot translate CPU model %1$s to a supported m= odel"), cpu->model); return -1; } @@ -1177,7 +1177,7 @@ virCPUDataAddFeature(virCPUData *cpuData, =20 if (!driver->dataAddFeature) { virReportError(VIR_ERR_NO_SUPPORT, - _("cannot add guest CPU feature for %s architecture= "), + _("cannot add guest CPU feature for %1$s architectu= re"), virArchToString(cpuData->arch)); return -1; } diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 8e562bd7a3..324c701e81 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -252,7 +252,7 @@ virCPUarmMapFeatureParse(xmlXPathContextPtr ctxt G_GNUC= _UNUSED, =20 if (virCPUarmMapFeatureFind(map, name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU feature %s already defined"), name); + _("CPU feature %1$s already defined"), name); return -1; } =20 @@ -307,7 +307,7 @@ virCPUarmVendorParse(xmlXPathContextPtr ctxt, =20 if (virCPUarmVendorFindByName(map, vendor->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU vendor %s already defined"), + _("CPU vendor %1$s already defined"), vendor->name); return -1; } @@ -318,7 +318,7 @@ virCPUarmVendorParse(xmlXPathContextPtr ctxt, =20 if (virCPUarmVendorFindByID(map, vendor->value)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU vendor value 0x%2llx already defined"), + _("CPU vendor value 0x%1$2llx already defined"), vendor->value); return -1; } @@ -373,7 +373,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt, =20 if (virCPUarmModelFind(map, model->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU model %s already defined"), + _("CPU model %1$s already defined"), model->name); return -1; } @@ -386,7 +386,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt, =20 if (!(model->vendor =3D virCPUarmVendorFindByName(map, vendor))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown vendor %s referenced by CPU model %s= "), + _("Unknown vendor %1$s referenced by CPU model = %2$s"), vendor, model->name); return -1; } @@ -394,7 +394,7 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt, =20 if (!(pvrNode =3D virXPathNode("./pvr", ctxt))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing PVR information for CPU model %s"), + _("Missing PVR information for CPU model %1$s"), model->name); return -1; } @@ -520,8 +520,7 @@ virCPUarmCompare(virCPUDef *host, =20 if (failIncompatible) { virReportError(VIR_ERR_CPU_INCOMPATIBLE, - _("Host CPU model does not match required CPU " - "vendor %s or(and) model %s"), + _("Host CPU model does not match required CPU v= endor %1$s or(and) model %2$s"), NULLSTR(cpu->vendor), NULLSTR(cpu->model)); return VIR_CPU_COMPARE_ERROR; } @@ -546,7 +545,7 @@ virCPUarmValidateFeatures(virCPUDef *cpu) =20 if (!virCPUarmMapFeatureFind(map, feature->name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown CPU feature: %s"), + _("unknown CPU feature: %1$s"), feature->name); return -1; } @@ -635,14 +634,14 @@ virCPUarmDecode(virCPUDef *cpu, =20 if (!(model =3D virCPUarmModelFindByPVR(map, cpuData->pvr))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Cannot find CPU model with PVR 0x%03llx"), + _("Cannot find CPU model with PVR 0x%1$03llx"), cpuData->pvr); return -1; } =20 if (!virCPUModelIsAllowed(model->name, models)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU model %s is not supported by hypervisor"), + _("CPU model %1$s is not supported by hypervisor"), model->name); return -1; } @@ -652,7 +651,7 @@ virCPUarmDecode(virCPUDef *cpu, if (cpuData->vendor_id && !(vendor =3D virCPUarmVendorFindByID(map, cpuData->vendor_id))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Cannot find CPU vendor with vendor id 0x%02llx"), + _("Cannot find CPU vendor with vendor id 0x%1$02llx= "), cpuData->vendor_id); return -1; } diff --git a/src/cpu/cpu_map.c b/src/cpu/cpu_map.c index 1d8051a13b..16795a9a0a 100644 --- a/src/cpu/cpu_map.c +++ b/src/cpu/cpu_map.c @@ -47,7 +47,7 @@ loadData(const char *mapfile, =20 if (n > 0 && !callback) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected element '%s' in CPU map '%s'"), eleme= nt, mapfile); + _("Unexpected element '%1$s' in CPU map '%2$s'"), e= lement, mapfile); return -1; } =20 @@ -56,7 +56,7 @@ loadData(const char *mapfile, =20 if (!(name =3D virXMLPropString(nodes[i], "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find %s name in CPU map '%s'"), eleme= nt, mapfile); + _("cannot find %1$s name in CPU map '%2$s'"), e= lement, mapfile); return -1; } VIR_DEBUG("Load %s name %s", element, name); @@ -173,7 +173,7 @@ int cpuMapLoad(const char *arch, =20 if ((ctxt->node =3D virXPathNode(xpath, ctxt)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find CPU map for %s architecture"), arch); + _("cannot find CPU map for %1$s architecture"), arc= h); return -1; } =20 diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index a33e4da9a9..e13cdbdf6b 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -110,7 +110,7 @@ ppc64CheckCompatibilityMode(const char *host_model, virStrToLong_i(tmp, NULL, 10, &compat) < 0 || compat < 6 || compat > 10) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown compatibility mode %s"), + _("Unknown compatibility mode %1$s"), compat_mode); return VIR_CPU_COMPARE_ERROR; } @@ -246,7 +246,7 @@ ppc64ModelFromCPU(const virCPUDef *cpu, =20 if (!(model =3D ppc64ModelFind(map, cpu->model))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU model %s"), cpu->model); + _("Unknown CPU model %1$s"), cpu->model); return NULL; } =20 @@ -286,7 +286,7 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED, =20 if (ppc64VendorFind(map, vendor->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU vendor %s already defined"), vendor->name); + _("CPU vendor %1$s already defined"), vendor->name); return -1; } =20 @@ -313,7 +313,7 @@ ppc64ModelParse(xmlXPathContextPtr ctxt, =20 if (ppc64ModelFind(map, model->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU model %s already defined"), model->name); + _("CPU model %1$s already defined"), model->name); return -1; } =20 @@ -321,14 +321,14 @@ ppc64ModelParse(xmlXPathContextPtr ctxt, vendor =3D virXPathString("string(./vendor/@name)", ctxt); if (!vendor) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid vendor element in CPU model %s"), + _("Invalid vendor element in CPU model %1$s"), model->name); return -1; } =20 if (!(model->vendor =3D ppc64VendorFind(map, vendor))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown vendor %s referenced by CPU model %s= "), + _("Unknown vendor %1$s referenced by CPU model = %2$s"), vendor, model->name); return -1; } @@ -336,7 +336,7 @@ ppc64ModelParse(xmlXPathContextPtr ctxt, =20 if ((n =3D virXPathNodeSet("./pvr", ctxt, &nodes)) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing PVR information for CPU model %s"), + _("Missing PVR information for CPU model %1$s"), model->name); return -1; } @@ -428,7 +428,7 @@ ppc64Compute(virCPUDef *host, VIR_DEBUG("CPU arch %s does not match host arch", virArchToString(cpu->arch)); if (message) - *message =3D g_strdup_printf(_("CPU arch %s does not match= host arch"), + *message =3D g_strdup_printf(_("CPU arch %1$s does not mat= ch host arch"), virArchToString(cpu->arch)); =20 return VIR_CPU_COMPARE_INCOMPATIBLE; @@ -440,8 +440,7 @@ ppc64Compute(virCPUDef *host, VIR_DEBUG("host CPU vendor does not match required CPU vendor %s", cpu->vendor); if (message) { - *message =3D g_strdup_printf(_("host CPU vendor does not match= required " - "CPU vendor %s"), + *message =3D g_strdup_printf(_("host CPU vendor does not match= required CPU vendor %1$s"), cpu->vendor); } =20 @@ -497,8 +496,7 @@ ppc64Compute(virCPUDef *host, VIR_DEBUG("host CPU model does not match required CPU model %s", guest_model->name); if (message) { - *message =3D g_strdup_printf(_("host CPU model does not match = required " - "CPU model %s"), + *message =3D g_strdup_printf(_("host CPU model does not match = required CPU model %1$s"), guest_model->name); } =20 @@ -554,14 +552,14 @@ ppc64DriverDecode(virCPUDef *cpu, =20 if (!(model =3D ppc64ModelFindPVR(map, data->data.ppc64.pvr[0].value))= ) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Cannot find CPU model with PVR 0x%08x"), + _("Cannot find CPU model with PVR 0x%1$08x"), data->data.ppc64.pvr[0].value); return -1; } =20 if (!virCPUModelIsAllowed(model->name, models)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU model %s is not supported by hypervisor"), + _("CPU model %1$s is not supported by hypervisor"), model->name); return -1; } @@ -687,7 +685,7 @@ virCPUppc64Baseline(virCPUDef **cpus, =20 if (!(model =3D ppc64ModelFind(map, cpus[0]->model))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU model %s"), cpus[0]->model); + _("Unknown CPU model %1$s"), cpus[0]->model); return NULL; } =20 @@ -716,15 +714,14 @@ virCPUppc64Baseline(virCPUDef **cpus, =20 if (!(vnd =3D ppc64VendorFind(map, cpus[i]->vendor))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Unknown CPU vendor %s"), cpus[i]->vendor); + _("Unknown CPU vendor %1$s"), cpus[i]->vendor); return NULL; } =20 if (model->vendor) { if (model->vendor !=3D vnd) { virReportError(VIR_ERR_OPERATION_FAILED, - _("CPU vendor %s of model %s differs from " - "vendor %s"), + _("CPU vendor %1$s of model %2$s differs fr= om vendor %3$s"), model->vendor->name, model->name, vnd->name); return NULL; diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index 1de5251974..ffb1a2cf7b 100644 --- a/src/cpu/cpu_s390.c +++ b/src/cpu/cpu_s390.c @@ -53,7 +53,7 @@ virCPUs390Update(virCPUDef *guest, if (guest->mode =3D=3D VIR_CPU_MODE_CUSTOM) { if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("match mode %s not supported"), + _("match mode %1$s not supported"), virCPUMatchTypeToString(guest->match)); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -94,8 +94,7 @@ virCPUs390ValidateFeatures(virCPUDef *cpu) for (i =3D 0; i < cpu->nfeatures; i++) { if (cpu->features[i].policy =3D=3D VIR_CPU_FEATURE_OPTIONAL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("only cpu feature policies 'require' and " - "'disable' are supported for %s"), + _("only cpu feature policies 'require' and 'dis= able' are supported for %1$s"), cpu->features[i].name); return -1; } diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index a8a537cbb6..8d371d5501 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -681,7 +681,7 @@ virCPUx86VendorToData(const char *vendor, =20 if (strlen(vendor) !=3D VENDOR_STRING_LENGTH) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid CPU vendor string '%s'"), vendor); + _("Invalid CPU vendor string '%1$s'"), vendor); return -1; } =20 @@ -946,14 +946,14 @@ x86VendorParse(xmlXPathContextPtr ctxt, =20 if (x86VendorFind(map, vendor->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU vendor %s already defined"), vendor->name); + _("CPU vendor %1$s already defined"), vendor->name); return -1; } =20 string =3D virXPathString("string(@string)", ctxt); if (!string) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing vendor string for CPU vendor %s"), + _("Missing vendor string for CPU vendor %1$s"), vendor->name); return -1; } @@ -990,7 +990,7 @@ x86FeatureInData(const char *name, if (!(feature =3D x86FeatureFind(map, name)) && !(feature =3D x86FeatureFindInternal(name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown CPU feature %s"), name); + _("unknown CPU feature %1$s"), name); return -1; } =20 @@ -1113,13 +1113,13 @@ x86ParseDataItemList(virCPUx86Data *cpudata, if (virXMLNodeNameEqual(node, "cpuid")) { if (x86ParseCPUID(node, &item) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid cpuid[%zu]"), i); + _("Invalid cpuid[%1$zu]"), i); return -1; } } else { if (x86ParseMSR(node, &item) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid msr[%zu]"), i); + _("Invalid msr[%1$zu]"), i); return -1; } } @@ -1149,7 +1149,7 @@ x86FeatureParse(xmlXPathContextPtr ctxt, =20 if (x86FeatureFind(map, feature->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU feature %s already defined"), feature->name); + _("CPU feature %1$s already defined"), feature->nam= e); return -1; } =20 @@ -1348,7 +1348,7 @@ x86ModelFromCPU(const virCPUDef *cpu, (policy =3D=3D VIR_CPU_FEATURE_REQUIRE || policy =3D=3D -1)) { if (!(model =3D x86ModelFind(map, cpu->model))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU model %s"), cpu->model); + _("Unknown CPU model %1$s"), cpu->model); return NULL; } =20 @@ -1372,7 +1372,7 @@ x86ModelFromCPU(const virCPUDef *cpu, =20 if (!(feature =3D x86FeatureFind(map, cpu->features[i].name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU feature %s"), cpu->features[i].n= ame); + _("Unknown CPU feature %1$s"), cpu->features[i]= .name); return NULL; } =20 @@ -1460,7 +1460,7 @@ x86ModelParseDecode(virCPUx86Model *model, =20 if (!(decode_node =3D virXPathNode("./decode", ctxt))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing decode element in CPU model %s"), + _("missing decode element in CPU model %1$s"), model->name); return -1; } @@ -1496,14 +1496,14 @@ x86ModelParseAncestor(virCPUx86Model *model, name =3D virXPathString("string(./model/@name)", ctxt); if (!name) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing ancestor's name in CPU model %s"), + _("Missing ancestor's name in CPU model %1$s"), model->name); return -1; } =20 if (!(ancestor =3D x86ModelFind(map, name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Ancestor model %s not found for CPU model %s"), + _("Ancestor model %1$s not found for CPU model %2$s= "), name, model->name); return -1; } @@ -1543,7 +1543,7 @@ x86ModelParseSignatures(virCPUx86Model *model, rc =3D virXPathUInt("string(@family)", ctxt, &sig->family); if (rc < 0 || sig->family =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid CPU signature family in model %s"), + _("Invalid CPU signature family in model %1$s"), model->name); return -1; } @@ -1551,7 +1551,7 @@ x86ModelParseSignatures(virCPUx86Model *model, rc =3D virXPathUInt("string(@model)", ctxt, &sig->model); if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid CPU signature model in model %s"), + _("Invalid CPU signature model in model %1$s"), model->name); return -1; } @@ -1580,14 +1580,14 @@ x86ModelParseVendor(virCPUx86Model *model, vendor =3D virXPathString("string(./vendor/@name)", ctxt); if (!vendor) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid vendor element in CPU model %s"), + _("Invalid vendor element in CPU model %1$s"), model->name); return -1; } =20 if (!(model->vendor =3D x86VendorFind(map, vendor))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown vendor %s referenced by CPU model %s"), + _("Unknown vendor %1$s referenced by CPU model %2$s= "), vendor, model->name); return -1; } @@ -1618,14 +1618,14 @@ x86ModelParseFeatures(virCPUx86Model *model, =20 if (!(ftname =3D virXMLPropString(nodes[i], "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing feature name for CPU model %s"), + _("Missing feature name for CPU model %1$s"), model->name); return -1; } =20 if (!(feature =3D x86FeatureFind(map, ftname))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Feature %s required by CPU model %s not foun= d"), + _("Feature %1$s required by CPU model %2$s not = found"), ftname, model->name); return -1; } @@ -1660,7 +1660,7 @@ x86ModelParse(xmlXPathContextPtr ctxt, =20 if (x86ModelFind(map, name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Multiple definitions of CPU model '%s'"), name); + _("Multiple definitions of CPU model '%1$s'"), name= ); return -1; } =20 @@ -1857,7 +1857,7 @@ x86Compute(virCPUDef *host, VIR_DEBUG("CPU arch %s does not match host arch", virArchToString(cpu->arch)); if (message) { - *message =3D g_strdup_printf(_("CPU arch %s does not match= host arch"), + *message =3D g_strdup_printf(_("CPU arch %1$s does not mat= ch host arch"), virArchToString(cpu->arch)); } return VIR_CPU_COMPARE_INCOMPATIBLE; @@ -1869,8 +1869,7 @@ x86Compute(virCPUDef *host, VIR_DEBUG("host CPU vendor does not match required CPU vendor %s", cpu->vendor); if (message) { - *message =3D g_strdup_printf(_("host CPU vendor does not match= required " - "CPU vendor %s"), + *message =3D g_strdup_printf(_("host CPU vendor does not match= required CPU vendor %1$s"), cpu->vendor); } =20 @@ -2196,7 +2195,7 @@ x86Decode(virCPUDef *cpu, STREQ(candidate->name, preferred[0])) { if (cpu->fallback !=3D VIR_CPU_FALLBACK_ALLOW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU model %s is not supported by hyp= ervisor"), + _("CPU model %1$s is not supported by h= ypervisor"), preferred[0]); return -1; } else { @@ -2379,7 +2378,7 @@ x86Encode(virArch arch, =20 if (cpu->vendor && !(v =3D x86VendorFind(map, cpu->vendor))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("CPU vendor %s not found"), cpu->vendor); + _("CPU vendor %1$s not found"), cpu->vendor); return -1; } =20 @@ -2840,7 +2839,7 @@ virCPUx86Baseline(virCPUDef **cpus, outputVendor =3D false; } else if (!(vendor =3D x86VendorFind(map, cpus[0]->vendor))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Unknown CPU vendor %s"), cpus[0]->vendor); + _("Unknown CPU vendor %1$s"), cpus[0]->vendor); return NULL; } =20 @@ -2862,7 +2861,7 @@ virCPUx86Baseline(virCPUDef **cpus, if (cpus[i]->vendor && model->vendor && STRNEQ(cpus[i]->vendor, model->vendor->name)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("CPU vendor %s of model %s differs from vendo= r %s"), + _("CPU vendor %1$s of model %2$s differs from v= endor %3$s"), model->vendor->name, model->name, cpus[i]->vend= or); return NULL; } @@ -2879,7 +2878,7 @@ virCPUx86Baseline(virCPUDef **cpus, if (!vendor) { if (!(vendor =3D x86VendorFind(map, vn))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Unknown CPU vendor %s"), vn); + _("Unknown CPU vendor %1$s"), vn); return NULL; } } else if (STRNEQ(vendor->name, vn)) { @@ -3008,7 +3007,7 @@ virCPUx86Update(virCPUDef *guest, =20 if (!(guestModel =3D x86ModelFind(map, guest->model))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU model %s"), guest->model); + _("Unknown CPU model %1$s"), guest->model); return -1; } =20 @@ -3097,18 +3096,15 @@ virCPUx86UpdateLive(virCPUDef *cpu, if (added || removed) { if (added && removed) virReportError(VIR_ERR_OPERATION_FAILED, - _("guest CPU doesn't match specification: " - "extra features: %s, missing features: %s"), + _("guest CPU doesn't match specification: extra= features: %1$s, missing features: %2$s"), added, removed); else if (added) virReportError(VIR_ERR_OPERATION_FAILED, - _("guest CPU doesn't match specification: " - "extra features: %s"), + _("guest CPU doesn't match specification: extra= features: %1$s"), added); else virReportError(VIR_ERR_OPERATION_FAILED, - _("guest CPU doesn't match specification: " - "missing features: %s"), + _("guest CPU doesn't match specification: missi= ng features: %1$s"), removed); return -1; } @@ -3218,7 +3214,7 @@ virCPUx86ExpandFeatures(virCPUDef *cpu) =20 if (!(model =3D x86ModelFind(map, cpu->model))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown CPU model %s"), cpu->model); + _("unknown CPU model %1$s"), cpu->model); return -1; } =20 @@ -3293,7 +3289,7 @@ virCPUx86ValidateFeatures(virCPUDef *cpu) for (i =3D 0; i < cpu->nfeatures; i++) { if (!x86FeatureFind(map, cpu->features[i].name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown CPU feature: %s"), + _("unknown CPU feature: %1$s"), cpu->features[i].name); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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 From nobody Fri Apr 19 05:30:58 2024 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=1678464668; cv=none; d=zohomail.com; s=zohoarc; b=Zd0E7gpI3SUES/qlDMFa+dxfUcFVILxPLkQhkzmX4QuevCeqChNSzWjxYg2GzJtOkgl8I4gpQL6cNXYtT/5a/3uYIKO/yG4dcmpzVAFoVlMohFQAl8otNCHkGqkPdjcm3wN2MMr6yrlBNSfOHUMc23417+dDFTCnUaOWXeW+eIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464668; 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=f+jTSA1c46bRtFI5fp8hwmKTKe7XZ8pWrrdkBNAqQTw=; b=ieXkIH/pkspMSefjtmeSeo8EmaLW1aIZYj3aplPV81k6yTnKvZGkEvWXXshcAf0iuYKjM9d0vWGY56N/NSBNsNt6MZrL/mWFUoJm370TjCcsWy6hlpBue+X7cojsTOfr/+L2phOtPFNaRR1JkhWRzdJKdiPnmdxoUdaBo9FY+PE= 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 16784646683821001.8041242098549; Fri, 10 Mar 2023 08:11:08 -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-636-HmHij2MhMDufOkr1ZJpzJg-1; Fri, 10 Mar 2023 11:10:52 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A138E882845; Fri, 10 Mar 2023 16:10:32 +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 8D6182166B26; Fri, 10 Mar 2023 16:10:32 +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 7105A1946A73; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 06CA91946587 for ; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DA7AA44101; Fri, 10 Mar 2023 16:10:31 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C8B6440D8 for ; Fri, 10 Mar 2023 16:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464667; 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=f+jTSA1c46bRtFI5fp8hwmKTKe7XZ8pWrrdkBNAqQTw=; b=GN8zC0DtO423KpA/yugiL8p2o7GWHcD0IJfe+WtV0PkpXYHOP6Py2vmdAVI3gooLznZaC3 UrNh8yYZpZv6oH9Xd28kH6oLtJC52aMHVgre6II2Op3b39AMgx+U4+dV2T4DpopHHbawI5 6fa35HPXrdMvcbvjIH+16KS4Pf7y9G4= X-MC-Unique: HmHij2MhMDufOkr1ZJpzJg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 13/51] hyperv: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:29 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.6 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: 1678464668985100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/hyperv/hyperv_driver.c | 46 +++++++++++++++--------------- src/hyperv/hyperv_network_driver.c | 4 +-- src/hyperv/hyperv_util.c | 3 +- src/hyperv/hyperv_wmi.c | 43 ++++++++++++++-------------- 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 5c3c810ba5..414274fdfd 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -69,7 +69,7 @@ hypervGetProcessorsByName(hypervPrivate *priv, const char= *name, =20 if (!processorList) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not look up processor(s) on '%s'"), + _("Could not look up processor(s) on '%1$s'"), name); return -1; } @@ -155,7 +155,7 @@ hypervGetVirtualSystemByID(hypervPrivate *priv, int id, return -1; =20 if (*computerSystemList =3D=3D NULL) { - virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %d"), id); + virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %1$d"), id); return -1; } =20 @@ -179,7 +179,7 @@ hypervGetVirtualSystemByName(hypervPrivate *priv, const= char *name, =20 if (*computerSystemList =3D=3D NULL) { virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with name %s"), name); + _("No domain with name %1$s"), name); return -1; } =20 @@ -250,7 +250,7 @@ hypervLookupHostSystemBiosUuid(hypervPrivate *priv, uns= igned char *uuid) =20 if (virUUIDParse(computerSystem->data->UUID, uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), computerSystem->data->UUID); return -1; } @@ -384,7 +384,7 @@ hypervGetDeviceParentRasdFromDeviceId(const char *paren= tDeviceId, return 0; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to locate parent device with ID '%s'"), + _("Failed to locate parent device with ID '%1$s'"), parentDeviceId); =20 return -1; @@ -424,13 +424,13 @@ hypervDomainCreateSCSIController(virDomainPtr domain,= virDomainControllerDef *de if (def->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT && def->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported SCSI controller model '%d'"), def->m= odel); + _("Unsupported SCSI controller model '%1$d'"), def-= >model); return -1; } =20 if (def->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported SCSI controller address type '%d'"),= def->info.type); + _("Unsupported SCSI controller address type '%1$d'"= ), def->info.type); return -1; } =20 @@ -1327,7 +1327,7 @@ hypervDomainDefParseVirtualExtent(hypervPrivate *priv, disk->device =3D VIR_DOMAIN_DISK_DEVICE_FLOPPY; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unrecognized controller type %d"), + _("Unrecognized controller type %1$d"), controller->data->ResourceType); goto cleanup; } @@ -1773,7 +1773,7 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthP= tr auth, =20 if (!os) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get version information for host %s"), + _("Could not get version information for host %1$s"= ), conn->uri->server); goto cleanup; } @@ -1818,7 +1818,7 @@ hypervConnectGetVersion(virConnectPtr conn, unsigned = long *version) =20 if (hypervParseVersionString(priv->version, &major, &minor, µ) < = 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse version from '%s'"), + _("Could not parse version from '%1$s'"), priv->version); return -1; } @@ -1842,7 +1842,7 @@ hypervConnectGetVersion(virConnectPtr conn, unsigned = long *version) */ if (major > 99 || minor > 99 || micro > 999999) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not produce packed version number from '%s= '"), + _("Could not produce packed version number from '%1= $s'"), priv->version); return -1; } @@ -1891,7 +1891,7 @@ hypervConnectGetMaxVcpus(virConnectPtr conn, const ch= ar *type G_GNUC_UNUSED) =20 if (!processorSettingData) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get maximum definition of Msvm_Process= orSettingData for host %s"), + _("Could not get maximum definition of Msvm_Process= orSettingData for host %1$s"), conn->uri->server); return -1; } @@ -1943,7 +1943,7 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr = info) /* Fill struct */ if (virStrcpyStatic(info->model, processorList->data->Name) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU model %s too long for destination"), + _("CPU model %1$s too long for destination"), processorList->data->Name); return -1; } @@ -2059,7 +2059,7 @@ hypervDomainLookupByName(virConnectPtr conn, const ch= ar *name) =20 if (computerSystem->next) { virReportError(VIR_ERR_MULTIPLE_DOMAINS, - _("Multiple domains exist with the name '%s': repea= t the request using a UUID"), + _("Multiple domains exist with the name '%1$s': rep= eat the request using a UUID"), name); return NULL; } @@ -2127,7 +2127,7 @@ hypervDomainShutdownFlags(virDomainPtr domain, unsign= ed int flags) if (hypervGetWmiClass(Msvm_ShutdownComponent, &shutdown) < 0 || !shutdown) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Could not get Msvm_ShutdownComponent for domain = with UUID '%s'"), + _("Could not get Msvm_ShutdownComponent for domain = with UUID '%1$s'"), uuid); return -1; } @@ -2464,7 +2464,7 @@ hypervDomainScreenshot(virDomainPtr domain, temporaryDirectory =3D "/tmp"; temporaryFile =3D g_strdup_printf("%s/libvirt.hyperv.screendump.XXXXXX= ", temporaryDirectory); if ((fd =3D g_mkstemp_full(temporaryFile, O_RDWR | O_CLOEXEC, S_IRUSR = | S_IWUSR)) =3D=3D -1) { - virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"), tempora= ryFile); + virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"), tempo= raryFile); goto cleanup; } unlinkTemporaryFile =3D true; @@ -2705,7 +2705,7 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned = int flags) =20 if (virUUIDParse(computerSystem->data->Name, def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), computerSystem->data->Name); return NULL; } @@ -2928,7 +2928,7 @@ hypervDomainDefineXML(virConnectPtr conn, const char = *xml) if ((domain =3D hypervDomainLookupByUUID(conn, def->uuid))) { char uuid_string[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(domain->uuid, uuid_string); - virReportError(VIR_ERR_DOM_EXIST, _("Domain already exists with UU= ID '%s'"), uuid_string); + virReportError(VIR_ERR_DOM_EXIST, _("Domain already exists with UU= ID '%1$s'"), uuid_string); =20 // Don't use the 'exit' label, since we don't want to delete the e= xisting domain. virObjectUnref(domain); @@ -2978,7 +2978,7 @@ hypervDomainDefineXML(virConnectPtr conn, const char = *xml) /* Attach serials */ for (i =3D 0; i < def->nserials; i++) { if (hypervDomainAttachSerial(domain, def->serials[i]) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach ser= ial port %zu"), i); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach ser= ial port %1$zu"), i); goto error; } } @@ -2986,7 +2986,7 @@ hypervDomainDefineXML(virConnectPtr conn, const char = *xml) /* Attach networks */ for (i =3D 0; i < def->nnets; i++) { if (hypervDomainAttachSyntheticEthernetAdapter(domain, def->nets[i= ], hostname) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach net= work %zu"), i); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach net= work %1$zu"), i); goto error; } } @@ -3133,7 +3133,7 @@ hypervDomainAttachDeviceFlags(virDomainPtr domain, co= nst char *xml, unsigned int case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Attaching devices of type %d is not implemented"= ), dev->type); + _("Attaching devices of type %1$d is not implemente= d"), dev->type); return -1; } =20 @@ -3290,7 +3290,7 @@ hypervNodeGetFreeMemory(virConnectPtr conn) =20 if (!operatingSystem) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get free memory for host %s"), + _("Could not get free memory for host %1$s"), conn->uri->server); return 0; } @@ -3732,7 +3732,7 @@ hypervDebugHandler(const char *message, debug_level_e= level, case DEBUG_LEVEL_ERROR: case DEBUG_LEVEL_CRITICAL: case DEBUG_LEVEL_ALWAYS: - VIR_ERROR(_("openwsman: %s"), message); + VIR_ERROR(_("openwsman: %1$s"), message); break; =20 case DEBUG_LEVEL_WARNING: diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network= _driver.c index a794a681b5..eefcaf05f6 100644 --- a/src/hyperv/hyperv_network_driver.c +++ b/src/hyperv/hyperv_network_driver.c @@ -40,7 +40,7 @@ hypervMsvmVirtualSwitchToNetwork(virConnectPtr conn, Msvm= _VirtualEthernetSwitch =20 if (virUUIDParse(virtualSwitch->data->Name, uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), virtualSwitch->data->Name); return NULL; } @@ -64,7 +64,7 @@ hypervNetworkLookup(virConnectPtr conn, const char *prope= rty, const char *value) =20 if (!virtualSwitch) { virReportError(VIR_ERR_NO_NETWORK, - _("No network found with property '%s' =3D '%s'"), = property, value); + _("No network found with property '%1$s' =3D '%2$s'= "), property, value); return NULL; } =20 diff --git a/src/hyperv/hyperv_util.c b/src/hyperv/hyperv_util.c index fe71e47285..37a1b1a249 100644 --- a/src/hyperv/hyperv_util.c +++ b/src/hyperv/hyperv_util.c @@ -55,8 +55,7 @@ hypervParseUri(hypervParsedUri **parsedUri, virURI *uri) 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; } diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 7dac5c46d1..8bc376e22f 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -70,7 +70,7 @@ hypervVerifyResponse(WsManClient *client, WsXmlDocH respo= nse, =20 if (lastError !=3D WS_LASTERR_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Transport error during %s: %s (%d)"), + _("Transport error during %1$s: %2$s (%3$d)"), detail, wsman_transport_get_last_error_string(lastE= rror), lastError); return -1; @@ -80,14 +80,14 @@ hypervVerifyResponse(WsManClient *client, WsXmlDocH res= ponse, * 400 (Bad Request) or 500 (Internal Server Error) */ if (responseCode !=3D 200 && responseCode !=3D 400 && responseCode != =3D 500) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected HTTP response during %s: %d"), + _("Unexpected HTTP response during %1$s: %2$d"), detail, responseCode); return -1; } =20 if (response =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Empty response during %s"), detail); + _("Empty response during %1$s"), detail); return -1; } =20 @@ -98,8 +98,7 @@ hypervVerifyResponse(WsManClient *client, WsXmlDocH respo= nse, wsmc_get_fault_data(response, fault); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("SOAP fault during %s: code '%s', subcode '%s', " - "reason '%s', detail '%s'"), + _("SOAP fault during %1$s: code '%2$s', subcode '%3= $s', reason '%4$s', detail '%5$s'"), detail, NULLSTR(fault->code), NULLSTR(fault->subcod= e), NULLSTR(fault->reason), NULLSTR(fault->fault_detail= )); =20 @@ -556,7 +555,7 @@ hypervSerializeEmbeddedParam(hypervParam *p, const char= *resourceUri, =20 if (!(xmlNodeParam =3D ws_xml_add_child(*methodNode, resourceUri, p->e= mbedded.name, NULL))) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node= %1$s"), p->embedded.name); return -1; } @@ -780,11 +779,11 @@ hypervInvokeMethod(hypervPrivate *priv, =20 if (faultReason) virReportError(VIR_ERR_INTERNAL_ERROR, - _("WS-Management fault during %s invocation: %s= "), + _("WS-Management fault during %1$s invocation: = %2$s"), params->method, faultReason); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get return value for %s invocation= "), + _("Could not get return value for %1$s invocati= on"), params->method); =20 return -1; @@ -801,7 +800,7 @@ hypervInvokeMethod(hypervPrivate *priv, instanceID =3D ws_xml_get_xpath_value(response, jobcode_instance_x= path); if (!instanceID) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get instance ID for %s invocation"= ), + _("Could not get instance ID for %1$s invocatio= n"), params->method); return -1; } @@ -854,11 +853,11 @@ hypervInvokeMethod(hypervPrivate *priv, } if (!completed && timeout < 0) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("Timeout waiting for %s invocation"), params-= >method); + _("Timeout waiting for %1$s invocation"), param= s->method); return -1; } } else if (returnCode !=3D CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Invocation of %s returne= d an error: %s (%d)"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Invocation of %1$s retur= ned an error: %2$s (%3$d)"), params->method, hypervReturnCodeToString(returnCode= ), returnCode); return -1; @@ -1155,14 +1154,14 @@ hypervInvokeMsvmComputerSystemRequestStateChange(vi= rDomainPtr domain, =20 if (returnValue =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup %s for %s invocation"), + _("Could not lookup %1$s for %2$s invocation"), "ReturnValue", "RequestStateChange"); return -1; } =20 if (virStrToLong_i(returnValue, NULL, 10, &returnCode) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse return code from '%s'"), returnV= alue); + _("Could not parse return code from '%1$s'"), retur= nValue); return -1; } =20 @@ -1172,7 +1171,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virD= omainPtr domain, =20 if (instanceID =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup %s for %s invocation"), + _("Could not lookup %1$s for %2$s invocation"), "InstanceID", "RequestStateChange"); return -1; } @@ -1189,7 +1188,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virD= omainPtr domain, =20 if (concreteJob =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not lookup %s for %s invocation"), + _("Could not lookup %1$s for %2$s invocatio= n"), "Msvm_ConcreteJob", "RequestStateChange"); return -1; } @@ -1214,20 +1213,20 @@ hypervInvokeMsvmComputerSystemRequestStateChange(vi= rDomainPtr domain, case MSVM_CONCRETEJOB_JOBSTATE_EXCEPTION: case MSVM_CONCRETEJOB_JOBSTATE_SERVICE: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Concrete job for %s invocation is in err= or state"), + _("Concrete job for %1$s invocation is in e= rror state"), "RequestStateChange"); return -1; =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Concrete job for %s invocation is in unk= nown state"), + _("Concrete job for %1$s invocation is in u= nknown state"), "RequestStateChange"); return -1; } } } else if (returnCode !=3D CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invocation of %s returned an error: %s (%d)"), + _("Invocation of %1$s returned an error: %2$s (%3$d= )"), "RequestStateChange", hypervReturnCodeToString(retu= rnCode), returnCode); return -1; @@ -1330,7 +1329,7 @@ hypervMsvmComputerSystemToDomain(virConnectPtr conn, =20 if (virUUIDParse(computerSystem->data->Name, uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), computerSystem->data->Name); return -1; } @@ -1364,7 +1363,7 @@ hypervMsvmComputerSystemFromUUID(hypervPrivate *priv,= const char *uuid, return -1; =20 if (!*computerSystem) { - virReportError(VIR_ERR_NO_DOMAIN, _("No domain with UUID %s"), uui= d); + virReportError(VIR_ERR_NO_DOMAIN, _("No domain with UUID %1$s"), u= uid); return -1; } =20 @@ -1429,7 +1428,7 @@ hypervGetResourceAllocationSD(hypervPrivate *priv, =20 if (!*data) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not look up resource allocation setting da= ta with virtual system instance ID '%s'"), + _("Could not look up resource allocation setting da= ta with virtual system instance ID '%1$s'"), id); return -1; } @@ -1447,7 +1446,7 @@ hypervGetProcessorSD(hypervPrivate *priv, =20 if (!*data) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not look up processor setting data with vi= rtual system instance ID '%s'"), + _("Could not look up processor setting data with vi= rtual system instance ID '%1$s'"), id); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464787; cv=none; d=zohomail.com; s=zohoarc; b=i3TxQ+NPSubxhLWJ0lkEEUlBiZ94038XMNOoUAlt+8I9sWWFLTFwLVflHtOcZc6IvumumMhmHAOLuRccA/fM37Dlg1QuVxQfNKWde/bWmzuWN5DDARNgPhO4Lo8LD1fKmO1QwUukjB6vYQp802arXRy2Eqip9IeY34YI836y8yY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464787; 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=WPpL3Hk16SBqGeutYC5MOj8/tFyA7W2ZuGKPH0hW4Qw=; b=ZxhZ2POPMnpWYQBGcwn3V0P37V8c+Uw3UkhHBkVntSk4YBNrtlPUAiJL4zjhSOWLliVXoCe+GaH80HS0ilHBEwnNF2Fj27uPsmURAj7RpcxieyHk/I4FUBMZYxVoTpkwbF6q//SkKCa40EoZcjrvd9mPMErkNa+WF6wqVeVaayY= 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 1678464787367260.4489418358428; Fri, 10 Mar 2023 08:13:07 -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-644-DeCn2XnKNyOaJ4dzBG5aUw-1; Fri, 10 Mar 2023 11:12:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3FE83C10C6C; Fri, 10 Mar 2023 16:10:34 +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 DD3CF140EBF4; Fri, 10 Mar 2023 16:10:34 +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 CB14C1946A5E; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F34961946587 for ; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E9CF744101; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E196440D8 for ; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464786; 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=WPpL3Hk16SBqGeutYC5MOj8/tFyA7W2ZuGKPH0hW4Qw=; b=R2vRG+nHIf1KLkPQYNprg8ZKKW2ZMCX019WEVr8n973htcvlk/FiHvwf3bA7vTj1GaXji2 V85sSyb+aiWb9i4M1mR5QliIB7xhig0VBaNGLz1Ym8bud6pSZFcCti5e9h6v5ij0mFFKdX sxDq2j2FazO1B+z4/aZVcyVN7aDCx1o= X-MC-Unique: DeCn2XnKNyOaJ4dzBG5aUw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 14/51] hypervisor: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:30 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.7 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: 1678464787693100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/hypervisor/domain_cgroup.c | 4 +-- src/hypervisor/domain_driver.c | 20 ++++++------- src/hypervisor/virhostdev.c | 53 ++++++++++++++-------------------- 3 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/hypervisor/domain_cgroup.c b/src/hypervisor/domain_cgroup.c index 7265325406..20ad96b11c 100644 --- a/src/hypervisor/domain_cgroup.c +++ b/src/hypervisor/domain_cgroup.c @@ -166,7 +166,7 @@ virDomainCgroupSetupDomainBlkioParameters(virCgroup *cg= roup, } } } else { - virReportError(VIR_ERR_INVALID_ARG, _("Unknown blkio param= eter %s"), + virReportError(VIR_ERR_INVALID_ARG, _("Unknown blkio param= eter %1$s"), param->field); ret =3D -1; virBlkioDeviceArrayClear(devices, ndevices); @@ -370,7 +370,7 @@ virDomainCgroupInitCgroup(const char *prefix, =20 if (!g_path_is_absolute(vm->def->resource->partition)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Resource partition '%s' must start with '/'"), + _("Resource partition '%1$s' must start with '/'"), vm->def->resource->partition); return -1; } diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c index d020b94921..66e09ffb04 100644 --- a/src/hypervisor/domain_driver.c +++ b/src/hypervisor/domain_driver.c @@ -151,7 +151,7 @@ virDomainDriverMergeBlkioDevice(virBlkioDevice **dest_a= rray, } else if (STREQ(type, VIR_DOMAIN_BLKIO_DEVICE_WRITE_BPS))= { dest->wbps =3D src->wbps; } else { - virReportError(VIR_ERR_INVALID_ARG, _("Unknown paramet= er %s"), + virReportError(VIR_ERR_INVALID_ARG, _("Unknown paramet= er %1$s"), type); return -1; } @@ -256,7 +256,7 @@ virDomainDriverParseBlkioDeviceStr(char *blkioDeviceStr= , const char *type, goto number_error; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unknown parameter '%s'"), type); + _("unknown parameter '%1$s'"), type); goto cleanup; } =20 @@ -279,13 +279,13 @@ virDomainDriverParseBlkioDeviceStr(char *blkioDeviceS= tr, const char *type, =20 parse_error: virReportError(VIR_ERR_INVALID_ARG, - _("unable to parse blkio device '%s' '%s'"), + _("unable to parse blkio device '%1$s' '%2$s'"), type, blkioDeviceStr); goto cleanup; =20 number_error: virReportError(VIR_ERR_INVALID_ARG, - _("invalid value '%s' for parameter '%s' of device '%s'= "), + _("invalid value '%1$s' for parameter '%2$s' of device = '%3$s'"), temp, type, result[i].path); =20 cleanup: @@ -362,7 +362,7 @@ virDomainDriverNodeDeviceGetPCIInfo(virNodeDeviceDef *d= ef, =20 if (!cap) { virReportError(VIR_ERR_INVALID_ARG, - _("device %s is not a PCI device"), def->name); + _("device %1$s is not a PCI device"), def->name); return -1; } =20 @@ -525,7 +525,7 @@ virDomainDriverAddIOThreadCheck(virDomainDef *def, { if (virDomainIOThreadIDFind(def, iothread_id)) { virReportError(VIR_ERR_INVALID_ARG, - _("an IOThread is already using iothread_id '%u'"), + _("an IOThread is already using iothread_id '%1$u'"= ), iothread_id); return -1; } @@ -548,7 +548,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, =20 if (!virDomainIOThreadIDFind(def, iothread_id)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find IOThread '%u' in iothreadids list"), + _("cannot find IOThread '%1$u' in iothreadids list"= ), iothread_id); return -1; } @@ -556,8 +556,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, for (i =3D 0; i < def->ndisks; i++) { if (def->disks[i]->iothread =3D=3D iothread_id) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot remove IOThread %u since it " - "is being used by disk '%s'"), + _("cannot remove IOThread %1$u since it is bein= g used by disk '%2$s'"), iothread_id, def->disks[i]->dst); return -1; } @@ -566,8 +565,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, for (i =3D 0; i < def->ncontrollers; i++) { if (def->controllers[i]->iothread =3D=3D iothread_id) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot remove IOThread '%u' since it " - "is being used by controller"), + _("cannot remove IOThread '%1$u' since it is be= ing used by controller"), iothread_id); return -1; } diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index bc5a20d691..eac3474783 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -94,13 +94,12 @@ static int virHostdevIsPCINodeDeviceUsed(virPCIDeviceAd= dress *devAddr, void *opa =20 if (actual_drvname && actual_domname) virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is in use by " - "driver %s, domain %s"), + _("PCI device %1$s is in use by driver %2$s, do= main %3$s"), virPCIDeviceGetName(actual), actual_drvname, actual_domname); else virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is in use"), + _("PCI device %1$s is in use"), virPCIDeviceGetName(actual)); return -1; } @@ -171,7 +170,7 @@ virHostdevManagerNew(void) =20 if (g_mkdir_with_parents(hostdevMgr->stateDir, 0777) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to create state dir '%s'"), + _("Failed to create state dir '%1$s'"), hostdevMgr->stateDir); return NULL; } @@ -188,7 +187,7 @@ virHostdevManagerNew(void) if (g_mkdir_with_parents(hostdevMgr->stateDir, 0777) < 0) { umask(old_umask); virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to create state dir '%s'"), + _("Failed to create state dir '%1$s'"), hostdevMgr->stateDir); return NULL; } @@ -250,7 +249,7 @@ virHostdevGetPCIHostDevice(const virDomainHostdevDef *h= ostdev, virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_XEN); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("pci backend driver '%s' is not supported"), + _("pci backend driver '%1$s' is not supported"), virDomainHostdevSubsysPCIBackendTypeToString(pcisrc= ->backend)); return -1; } @@ -333,7 +332,7 @@ virHostdevNetDevice(virDomainHostdevDef *hostdev, =20 if (!(*linkdev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("The device at %s has no network device name"= ), + _("The device at %1$s has no network device nam= e"), sysfs_path); return -1; } @@ -378,9 +377,7 @@ virHostdevNetConfigVirtPortProfile(const char *linkdev,= int vf, case VIR_NETDEV_VPORT_PROFILE_8021QBG: case VIR_NETDEV_VPORT_PROFILE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtualport type %s is " - "currently not supported on interfaces of type " - "hostdev"), + _("virtualport type %1$s is currently not supported= on interfaces of type hostdev"), virNetDevVPortTypeToString(virtPort->virtPortType)); break; =20 @@ -475,8 +472,7 @@ virHostdevSetNetConfig(virDomainHostdevDef *hostdev, if (virtPort) { if (vlan) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("direct setting of the vlan tag is not allowe= d " - "for hostdev devices using %s mode"), + _("direct setting of the vlan tag is not allowe= d for hostdev devices using %1$s mode"), virNetDevVPortTypeToString(virtPort->virtPortTy= pe)); return -1; } @@ -611,7 +607,7 @@ virHostdevResetAllPCIDevices(virHostdevManager *mgr, VIR_DEBUG("Resetting PCI device %s", virPCIDeviceGetName(pci)); if (virPCIDeviceReset(pci, mgr->activePCIHostdevs, mgr->inactivePCIHostdevs) < 0) { - VIR_ERROR(_("Failed to reset PCI device: %s"), + VIR_ERROR(_("Failed to reset PCI device: %1$s"), virGetLastErrorMessage()); ret =3D -1; } @@ -642,7 +638,7 @@ virHostdevReattachAllPCIDevices(virHostdevManager *mgr, if (virPCIDeviceReattach(actual, mgr->activePCIHostdevs, mgr->inactivePCIHostdevs) < 0) { - VIR_ERROR(_("Failed to re-attach PCI device: %s"), + VIR_ERROR(_("Failed to re-attach PCI device: %1$s"), virGetLastErrorMessage()); } } else { @@ -699,7 +695,7 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, =20 if (!usesVFIO && !virPCIDeviceIsAssignable(pci, strict_acs_check))= { virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is not assignable"), + _("PCI device %1$s is not assignable"), virPCIDeviceGetName(pci)); goto cleanup; } @@ -788,8 +784,7 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, goto reattachdevs; } else { virReportError(VIR_ERR_OPERATION_INVALID, - _("Unmanaged PCI device %s must be manually= " - "detached from the host"), + _("Unmanaged PCI device %1$s must be manual= ly detached from the host"), virPCIDeviceGetName(pci)); goto reattachdevs; } @@ -1012,7 +1007,7 @@ virHostdevReAttachPCIDevicesImpl(virHostdevManager *m= gr, if (!actual || virPCIDeviceListAdd(mgr->inactivePCIHostdevs, actual) < 0) { =20 - VIR_ERROR(_("Failed to add PCI device %s to the inactive list"= ), + VIR_ERROR(_("Failed to add PCI device %1$s to the inactive lis= t"), virGetLastErrorMessage()); virResetLastError(); } @@ -1104,7 +1099,7 @@ virHostdevReAttachPCIDevices(virHostdevManager *mgr, return; =20 if (!(pcidevs =3D virHostdevGetPCIHostDeviceList(hostdevs, nhostdevs))= ) { - VIR_ERROR(_("Failed to allocate PCI device list: %s"), + VIR_ERROR(_("Failed to allocate PCI device list: %1$s"), virGetLastErrorMessage()); virResetLastError(); return; @@ -1340,13 +1335,12 @@ virHostdevMarkUSBDevices(virHostdevManager *mgr, virUSBDeviceGetUsedBy(tmp, &other_drvname, &other_domname); if (other_drvname && other_domname) virReportError(VIR_ERR_OPERATION_INVALID, - _("USB device %s is in use by " - "driver %s, domain %s"), + _("USB device %1$s is in use by driver %2$s= , domain %3$s"), virUSBDeviceGetName(tmp), other_drvname, other_domname); else virReportError(VIR_ERR_OPERATION_INVALID, - _("USB device %s is already in use"), + _("USB device %1$s is already in use"), virUSBDeviceGetName(tmp)); goto error; } @@ -1423,13 +1417,11 @@ virHostdevFindUSBDevice(virDomainHostdevDef *hostde= v, } else if (rc > 1) { if (autoAddress) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Multiple USB devices for %x:%x were foun= d," - " but none of them is at bus:%u device:%u= "), + _("Multiple USB devices for %1$x:%2$x were = found, but none of them is at bus:%3$u device:%4$u"), vendor, product, bus, device); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("Multiple USB devices for %x:%x, " - "use
to specify one"), + _("Multiple USB devices for %1$x:%2$x, use =
to specify one"), vendor, product); } return -1; @@ -1610,8 +1602,7 @@ virHostdevPrepareSCSIDevices(virHostdevManager *mgr, =20 if (!(scsi_shareable && tmp_shareable)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("SCSI device %s is already in use by " - "other domain(s) as '%s'"), + _("SCSI device %1$s is already in use by ot= her domain(s) as '%2$s'"), virSCSIDeviceGetName(tmp), tmp_shareable ? "shareable" : "non-shareabl= e"); goto error; @@ -2287,7 +2278,7 @@ virHostdevPrepareOneNVMeDevice(virHostdevManager *hos= tdev_mgr, addrStr =3D virPCIDeviceAddressAsString(addr); =20 virReportError(VIR_ERR_OPERATION_INVALID, - _("NVMe device %s already in use by driver %s domai= n %s"), + _("NVMe device %1$s already in use by driver %2$s d= omain %3$s"), NULLSTR(addrStr), actual_drvname, actual_domname); goto cleanup; } @@ -2376,7 +2367,7 @@ virHostdevPrepareNVMeDevices(virHostdevManager *hostd= ev_mgr, while (lastGoodDiskIdx >=3D 0) { if (virHostdevReAttachOneNVMeDevice(hostdev_mgr, drv_name, dom_nam= e, disks[lastGoodDiskIdx]->src) <= 0) { - VIR_ERROR(_("Failed to reattach NVMe for disk target: %s"), + VIR_ERROR(_("Failed to reattach NVMe for disk target: %1$s"), disks[lastGoodDiskIdx]->dst); } =20 @@ -2446,7 +2437,7 @@ virHostdevReAttachNVMeDevices(virHostdevManager *host= dev_mgr, for (i =3D 0; i < ndisks; i++) { if (virHostdevReAttachOneNVMeDevice(hostdev_mgr, drv_name, dom_name, disks[i]->src) < 0) { - VIR_ERROR(_("Failed to reattach NVMe for disk target: %s"), + VIR_ERROR(_("Failed to reattach NVMe for disk target: %1$s"), disks[i]->dst); ret =3D -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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 From nobody Fri Apr 19 05:30:58 2024 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=1678464695; cv=none; d=zohomail.com; s=zohoarc; b=d5DeP69YPK0uWu3KvCohNEAmVQ3Cgfxp/X7zEcCimcqq8HEoNi3X7PQ5Z7wZsl6wtr7D0jW9E4ONIO3AODqPZ/2qaSHYFWkF79oEN4CcPEgkjNA2/4KzBrJ0BH9dHx2j6ZOzIe5BWBRie4I6Z7f4sB2/pLsddvDY5aEUCwp0KmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464695; 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=h6WYc1vzJJYCGj7EfB34SKMbnwQwYqNicpLhGpAORNc=; b=JlyvDgMnuVBS/uvYn77668VqFdQ+T2EnSHLHBxUk4ePlguWR8N8riEk5sL4ggVXVi+nYRnuyU0KAjOnX1TdAMfBZWCgndx0wj7xSs3dYiR8d5VuOlMzKyLJgm3bEzVHW/XndTCu0dImfeXaJbQPFJAkvOOcic5m5BGozeiumEBo= 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 167846469568878.55689396902778; Fri, 10 Mar 2023 08:11:35 -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-227-eEDnifFXNZCy6CRFIOsDrw-1; Fri, 10 Mar 2023 11:11:24 -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 96087857A89; Fri, 10 Mar 2023 16:10:36 +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 7476F492B01; Fri, 10 Mar 2023 16:10:36 +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 664B81946A4A; Fri, 10 Mar 2023 16:10:36 +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 95E6A1946587 for ; Fri, 10 Mar 2023 16:10:35 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8C56D492B00; Fri, 10 Mar 2023 16:10:35 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEEF2492C3E for ; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464694; 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=h6WYc1vzJJYCGj7EfB34SKMbnwQwYqNicpLhGpAORNc=; b=Qf1Xiip4zwtROrhaxE4Bsb789oYKdqPHkPAmXJ4W+bf2qX7Wo7ClgKF1S0B1Ybp2wVKWxv trJeaQyRAF2C5PRY9AYifFwmNRUbGaiBtjDhFA1ha+BFrNDbMdE4+KvOG4EKz1N+vvRGse K1JbKJsNwTXSMOsoEbGbnbwVsn2ca5k= X-MC-Unique: eEDnifFXNZCy6CRFIOsDrw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 16/51] libxl: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:32 +0100 Message-Id: <2c417434371935f7618c7a21967216cb0a01275c.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.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: 1678464697216100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/libxl/libxl_capabilities.c | 2 +- src/libxl/libxl_conf.c | 61 +++++----- src/libxl/libxl_domain.c | 24 ++-- src/libxl/libxl_driver.c | 215 ++++++++++++++++----------------- src/libxl/libxl_migration.c | 6 +- src/libxl/xen_common.c | 72 +++++------ src/libxl/xen_xl.c | 28 ++--- src/libxl/xen_xm.c | 4 +- 8 files changed, 201 insertions(+), 211 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index c2975d637e..cd40cff739 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -348,7 +348,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCaps *caps) regex =3D g_regex_new(XEN_CAP_REGEX, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 15369b2791..12a0eb7085 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -186,7 +186,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, strlen(def->seclabels[0]->label), &c_info->ssidref)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to resolve security label= '%s'"), + _("libxenlight failed to resolve security label= '%1$s'"), def->seclabels[0]->label); } } @@ -194,7 +194,7 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, virUUIDFormat(def->uuid, uuidstr); if (libxl_uuid_from_string(&c_info->uuid, uuidstr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to parse UUID '%s'"), uuidstr= ); + _("libxenlight failed to parse UUID '%1$s'"), uuids= tr); goto error; } =20 @@ -272,7 +272,7 @@ libxlMakeChrdevStr(virDomainChrDef *def, char **buf) =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chardev '%s'"), type); + _("unsupported chardev '%1$s'"), type); return -1; } =20 @@ -384,7 +384,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, =20 case VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset '%s'"), + _("unsupported clock offset '%1$s'"), virDomainClockOffsetTypeToString(clock.offset)); return -1; =20 @@ -392,7 +392,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_CLOCK_OFFSET_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected clock offset '%d'"), clock.offset); + _("unexpected clock offset '%1$d'"), clock.offset); return -1; } =20 @@ -421,7 +421,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_TIMER_NAME_HPET: if (!hvm) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(clock.timers= [i]->name)); return -1; } @@ -436,7 +436,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_TIMER_NAME_PIT: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(clock.timers[i]-= >name)); return -1; =20 @@ -503,7 +503,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, false)); if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported cpu feature '%s'"), + _("unsupported cpu feature '%1$s'"= ), def->cpu->features[i].name); return -1; } @@ -524,7 +524,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, def->cpu->features[i].name, fal= se)); if (libxl_cpuid_parse_config(&b_info->cpuid, x= lCPU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported cpu feature '%s'"), + _("unsupported cpu feature '%1$s'"= ), def->cpu->features[i].name); return -1; } @@ -542,7 +542,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported nested HVM setting for %s machine o= n this Xen version"), + _("unsupported nested HVM setting for %1$s machine= on this Xen version"), def->os.machine); return -1; } @@ -658,7 +658,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, =20 if (def->os.loader && def->os.loader->format !=3D VIR_STORAGE_FILE= _RAW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported loader format '%s'"), + _("Unsupported loader format '%1$s'"), virStorageFileFormatTypeToString(def->os.loader= ->format)); return -1; } @@ -666,14 +666,14 @@ libxlMakeDomBuildInfo(virDomainDef *def, if (def->emulator) { if (!virFileExists(def->emulator)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' not found"), + _("emulator '%1$s' not found"), def->emulator); return -1; } =20 if (!virFileIsExecutable(def->emulator)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("emulator '%s' is not executable"), + _("emulator '%1$s' is not executable"), def->emulator); return -1; } @@ -800,7 +800,7 @@ libxlMakeDomBuildInfo(virDomainDef *def, case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRANSITIONAL: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported balloon device model '%s'"), + _("unsupported balloon device model '%1$s'"), virDomainMemballoonModelTypeToString(def->memba= lloon->model)); return -1; case VIR_DOMAIN_MEMBALLOON_MODEL_NONE: @@ -894,7 +894,7 @@ libxlMakeVnumaList(virDomainDef *def, bitmap =3D virDomainNumaGetNodeCpumask(numa, i); if (bitmap =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vnuma sibling %zu missing vcpus set"), i); + _("vnuma sibling %1$zu missing vcpus set"), i); goto cleanup; } =20 @@ -980,14 +980,14 @@ libxlMakeNetworkDiskSrcStr(virStorageSource *src, case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, - _("Unsupported network block protocol '%s'"), + _("Unsupported network block protocol '%1$s'"), virStorageNetProtocolTypeToString(src->protocol)); return NULL; =20 case VIR_STORAGE_NET_PROTOCOL_RBD: if (strchr(src->path, ':')) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("':' not allowed in RBD source volume name '%= s'"), + _("':' not allowed in RBD source volume name '%= 1$s'"), src->path); return NULL; } @@ -1115,8 +1115,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1141,8 +1140,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1150,8 +1148,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) } else if (STREQ(driver, "file")) { if (format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1161,8 +1158,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) } else if (STREQ(driver, "phy")) { if (format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk format= %s " - "with disk driver %s"), + _("libxenlight does not support disk format= %1$s with disk driver %2$s"), virStorageFileFormatTypeToString(format), driver); return -1; @@ -1171,7 +1167,7 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_= disk *x_disk) x_disk->backend =3D LIBXL_DISK_BACKEND_PHY; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight does not support disk driver %s"= ), + _("libxenlight does not support disk driver %1$= s"), driver); return -1; } @@ -1409,7 +1405,7 @@ libxlMakeNic(virDomainDef *def, case VIR_DOMAIN_NET_TYPE_VDS: case VIR_DOMAIN_NET_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported interface type %s"), + _("unsupported interface type %1$s"), virDomainNetTypeToString(l_nic->type)); goto cleanup; } @@ -1728,7 +1724,7 @@ libxlGetAutoballoonConf(libxlDriverConfig *cfg, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 @@ -1791,7 +1787,7 @@ libxlDriverConfigInit(libxlDriverConfig *cfg) =20 if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create log dir '%s'"), + _("failed to create log dir '%1$s'"), cfg->logDir); return -1; } @@ -2196,8 +2192,7 @@ libxlMakeUSB(virDomainHostdevDef *hostdev, libxl_devi= ce_usbdev *usbdev) } else { if (virHostdevFindUSBDevice(hostdev, true, &usb) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to find USB device busnum:devnum " - "for %x:%x"), + _("failed to find USB device busnum:devnum for = %1$x:%2$x"), usbsrc->vendor, usbsrc->product); goto cleanup; } @@ -2390,7 +2385,7 @@ libxlMakeVideo(virDomainDef *def, libxl_domain_config= *d_config) case VIR_DOMAIN_VIDEO_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("video type %s is not supported by libxl"), + _("video type %1$s is not supported by libxl"), virDomainVideoTypeToString(def->videos[0]->type= )); return -1; } @@ -2421,7 +2416,7 @@ libxlDriverNodeGetInfo(libxlDriverPrivate *driver, vi= rNodeInfoPtr info) =20 if (virStrcpyStatic(info->model, virArchToString(hostarch)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("host arch %s is too big for destination"), + _("host arch %1$s is too big for destination"), virArchToString(hostarch)); goto cleanup; } diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index f28a6207a3..6c167df63e 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -153,8 +153,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDef *dev, /* forbid capabilities mode hostdev in this kind of hypervisor */ if (hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode 'capabilities' is not " - "supported in %s"), + _("hostdev mode 'capabilities' is not supported= in %1$s"), virDomainVirtTypeToString(def->virtType)); return -1; } @@ -339,7 +338,7 @@ libxlDomainDefValidate(const virDomainDef *def, case VIR_DOMAIN_SOUND_MODEL_ICH9: case VIR_DOMAIN_SOUND_MODEL_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported audio model %s"), + _("unsupported audio model %1$s"), virDomainSoundModelTypeToString(snd->model)); return -1; } @@ -379,7 +378,7 @@ libxlDomainShutdownHandleRestart(libxlDriverPrivate *dr= iver, libxlDomainDestroyInternal(driver, vm); libxlDomainCleanup(driver, vm); if (libxlDomainStartNew(driver, vm, false) < 0) { - VIR_ERROR(_("Failed to restart VM '%s': %s"), + VIR_ERROR(_("Failed to restart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); } } @@ -489,8 +488,7 @@ libxlDomainShutdownThread(void *opaque) =20 if (libxlRetrieveDomainConfigurationWrapper(cfg->ctx, vm->def->id, &d_config) !=3D 0) { - VIR_ERROR(_("Failed to retrieve config for VM '%s'. " - "Unable to perform soft reset. Destroying VM"), + VIR_ERROR(_("Failed to retrieve config for VM '%1$s'. Unable t= o perform soft reset. Destroying VM"), vm->def->name); libxlDomainShutdownHandleDestroy(driver, vm); goto endjob; @@ -503,7 +501,7 @@ libxlDomainShutdownThread(void *opaque) =20 if (libxl_domain_soft_reset(cfg->ctx, &d_config, vm->def->id, NULL, NULL) !=3D 0) { - VIR_ERROR(_("Failed to soft reset VM '%s'. Destroying VM"), + VIR_ERROR(_("Failed to soft reset VM '%1$s'. Destroying VM"), vm->def->name); libxlDomainShutdownHandleDestroy(driver, vm); goto endjob; @@ -675,7 +673,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver, =20 if ((fd =3D virFileOpenAs(from, O_RDONLY, 0, -1, -1, 0)) < 0) { virReportSystemError(-fd, - _("Failed to open domain image file '%s'"), f= rom); + _("Failed to open domain image file '%1$s'"),= from); goto error; } =20 @@ -692,14 +690,14 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver, =20 if (hdr.version > LIBXL_SAVE_VERSION) { virReportError(VIR_ERR_OPERATION_FAILED, - _("image version is not supported (%d > %d)"), + _("image version is not supported (%1$d > %2$d)"), hdr.version, LIBXL_SAVE_VERSION); goto error; } =20 if (hdr.xmlLen <=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("invalid XML length: %d"), hdr.xmlLen); + _("invalid XML length: %1$d"), hdr.xmlLen); goto error; } =20 @@ -1256,11 +1254,11 @@ libxlDomainStartPerform(libxlDriverPrivate *driver, if (libxlret) { if (restore_fd < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to create new domain '%s'= "), + _("libxenlight failed to create new domain '%1$= s'"), d_config.c_info.name); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to restore domain '%s'"), + _("libxenlight failed to restore domain '%1$s'"= ), d_config.c_info.name); goto cleanup; } @@ -1399,7 +1397,7 @@ libxlDomainStartNew(libxlDriverPrivate *driver, virUUIDFormat(vm->def->uuid, vm_uuidstr); virUUIDFormat(def->uuid, def_uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot restore domain '%s' uuid %s from a fi= le which belongs to domain '%s' uuid %s"), + _("cannot restore domain '%1$s' uuid %2$s from = a file which belongs to domain '%3$s' uuid %4$s"), vm->def->name, vm_uuidstr, def->name, def_uuids= tr); goto cleanup; } diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 04e74086e6..68c4c7b768 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -307,7 +307,7 @@ libxlDomObjFromDomain(virDomainPtr dom) if (!vm) { virUUIDFormat(dom->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, dom->name); return NULL; } @@ -332,7 +332,7 @@ libxlAutostartDomain(virDomainObj *vm, if (vm->autostart && !virDomainObjIsActive(vm) && libxlDomainStartNew(driver, vm, false) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart VM '%s': %s"), + _("Failed to autostart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); goto endjob; } @@ -721,31 +721,31 @@ libxlStateInitialize(bool privileged, libxl_driver->config =3D cfg; if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create state dir '%s'"), + _("failed to create state dir '%1$s'"), cfg->stateDir); goto error; } if (g_mkdir_with_parents(cfg->libDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create lib dir '%s'"), + _("failed to create lib dir '%1$s'"), cfg->libDir); goto error; } if (g_mkdir_with_parents(cfg->saveDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create save dir '%s'"), + _("failed to create save dir '%1$s'"), cfg->saveDir); goto error; } if (g_mkdir_with_parents(cfg->autoDumpDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create dump dir '%s'"), + _("failed to create dump dir '%1$s'"), cfg->autoDumpDir); goto error; } if (g_mkdir_with_parents(cfg->channelDir, 0777) < 0) { virReportSystemError(errno, - _("failed to create channel dir '%s'"), + _("failed to create channel dir '%1$s'"), cfg->channelDir); goto error; } @@ -875,7 +875,7 @@ libxlConnectOpen(virConnectPtr conn, STRNEQ(conn->uri->path, "/") && STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected Xen URI path '%s', try xen:///system"= ), + _("unexpected Xen URI path '%1$s', try xen:///syste= m"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -1169,7 +1169,7 @@ libxlDomainSuspend(virDomainPtr dom) if (virDomainObjGetState(vm, NULL) !=3D VIR_DOMAIN_PAUSED) { if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to suspend domain '%d' with libxenlig= ht"), + _("Failed to suspend domain '%1$d' with libxenl= ight"), vm->def->id); goto endjob; } @@ -1222,7 +1222,7 @@ libxlDomainResume(virDomainPtr dom) if (virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_PAUSED) { if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to resume domain '%d' with libxenligh= t"), + _("Failed to resume domain '%1$d' with libxenli= ght"), vm->def->id); goto endjob; } @@ -1281,7 +1281,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned i= nt flags) =20 if (ret !=3D ERROR_NOPARAVIRT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to shutdown domain '%d' with libxenli= ght"), + _("Failed to shutdown domain '%1$d' with libxen= light"), vm->def->id); ret =3D -1; goto cleanup; @@ -1296,7 +1296,7 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned i= nt flags) goto cleanup; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to shutdown domain '%d' with libxenlight"= ), + _("Failed to shutdown domain '%1$d' with libxenligh= t"), vm->def->id); ret =3D -1; } @@ -1343,7 +1343,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flag= s) goto cleanup; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reboot domain '%d' with libxenlight"), + _("Failed to reboot domain '%1$d' with libxenlight"= ), vm->def->id); ret =3D -1; } @@ -1382,7 +1382,7 @@ libxlDomainDestroyFlags(virDomainPtr dom, =20 if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id); + _("Failed to destroy domain '%1$d'"), vm->def->id); goto endjob; } =20 @@ -1430,7 +1430,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, virCheckFlags(0, -1); if (target !=3D VIR_NODE_SUSPEND_TARGET_MEM) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("PMSuspend type %d not supported by libxenlight driver"), + _("PMSuspend type %1$d not supported by libxenlight driver= "), target); return -1; } @@ -1462,7 +1462,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, =20 if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to suspend domain '%d'"), vm->def->id); + _("Failed to suspend domain '%1$d'"), vm->def->id); goto endjob; } =20 @@ -1513,7 +1513,7 @@ libxlDomainPMWakeup(virDomainPtr dom, unsigned int fl= ags) priv =3D vm->privateData; if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to resume domain '%d'"), vm->def->id); + _("Failed to resume domain '%1$d'"), vm->def->id); goto endjob; } virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_WAKEUP= ); @@ -1647,8 +1647,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, if (flags & VIR_DOMAIN_MEM_LIVE) { if (libxl_domain_setmaxmem(cfg->ctx, vm->def->id, newmem) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set maximum memory for domain = '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set maximum memory for domain = '%1$d' with libxenlight"), + vm->def->id); goto endjob; } } @@ -1680,8 +1680,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned = long newmem, virObjectLock(vm); if (res < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set memory for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set memory for domain '%1$d' w= ith libxenlight"), + vm->def->id); goto endjob; } vm->def->mem.cur_balloon =3D newmem; @@ -1741,7 +1741,7 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr= info) =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto cleanup; } @@ -1805,15 +1805,15 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_PAUSED) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Domain '%d' has to be running because libxenligh= t will" - " suspend it"), vm->def->id); + _("Domain '%1$d' has to be running because libxenli= ght will suspend it"), + vm->def->id); goto cleanup; } =20 if ((fd =3D virFileOpenAs(to, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUS= R, -1, -1, 0)) < 0) { virReportSystemError(-fd, - _("Failed to create domain save file '%s'"), = to); + _("Failed to create domain save file '%1$s'")= , to); goto cleanup; } =20 @@ -1845,7 +1845,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to save domain '%d' with libxenlight"), + _("Failed to save domain '%1$d' with libxenlight"), vm->def->id); ret =3D -1; goto cleanup; @@ -1859,7 +1859,7 @@ libxlDoDomainSave(libxlDriverPrivate *driver, =20 if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id); + _("Failed to destroy domain '%1$d'"), vm->def->id); goto cleanup; } =20 @@ -2025,8 +2025,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) virDomainObjGetState(vm, NULL) =3D=3D VIR_DOMAIN_RUNNING) { if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Before dumping core, failed to suspend domai= n '%d'" - " with libxenlight"), + _("Before dumping core, failed to suspend domai= n '%1$d' with libxenlight"), vm->def->id); goto endjob; } @@ -2040,7 +2039,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) virObjectLock(vm); if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to dump core of domain '%d' with libxenli= ght"), + _("Failed to dump core of domain '%1$d' with libxen= light"), vm->def->id); ret =3D -1; goto unpause; @@ -2049,7 +2048,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) if (flags & VIR_DUMP_CRASH) { if (libxlDomainDestroyInternal(driver, vm) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to destroy domain '%d'"), vm->def->id= ); + _("Failed to destroy domain '%1$d'"), vm->def->= id); goto unpause; } =20 @@ -2068,8 +2067,8 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to,= unsigned int flags) if (virDomainObjIsActive(vm) && paused) { if (libxlDomainUnpauseWrapper(cfg->ctx, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("After dumping core, failed to resume domain = '%d' with" - " libxenlight"), vm->def->id); + _("After dumping core, failed to resume domain = '%1$d' with libxenlight"), + vm->def->id); } else { virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED); @@ -2234,7 +2233,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, (flags & (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) =3D=3D (VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_LIVE)) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid flag combination: (0x%x)"), flags); + _("invalid flag combination: (0x%1$x)"), flags); return -1; } =20 @@ -2275,8 +2274,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, =20 if (nvcpus > max) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpus is greater than max allowable" - " vcpus for the domain: %d > %d"), nvcpus, max); + _("requested vcpus is greater than max allowable vc= pus for the domain: %1$d > %2$d"), + nvcpus, max); goto endjob; } =20 @@ -2308,8 +2307,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, case VIR_DOMAIN_VCPU_LIVE: if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) !=3D 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set vcpus for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set vcpus for domain '%1$d' with l= ibxenlight"), + vm->def->id); goto endjob; } if (virDomainDefSetVcpus(vm->def, nvcpus) < 0) @@ -2319,8 +2318,8 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned i= nt nvcpus, case VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_CONFIG: if (libxlSetVcpuonlineWrapper(cfg->ctx, vm->def->id, &map) !=3D 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set vcpus for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to set vcpus for domain '%1$d' with l= ibxenlight"), + vm->def->id); goto endjob; } if (virDomainDefSetVcpus(vm->def, nvcpus) < 0 || @@ -2388,7 +2387,7 @@ libxlDomainGetVcpusFlags(virDomainPtr dom, unsigned i= nt flags) } if ((flags & VIR_DOMAIN_VCPU_LIVE) && (flags & VIR_DOMAIN_VCPU_CONFIG)= ) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid flag combination: (0x%x)"), flags); + _("invalid flag combination: (0x%1$x)"), flags); return -1; } =20 @@ -2464,7 +2463,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned in= t vcpu, if (!(vcpuinfo =3D virDomainDefGetVcpu(targetDef, vcpu)) || !vcpuinfo->online) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%u' is not active"), vcpu); + _("vcpu '%1$u' is not active"), vcpu); goto endjob; } =20 @@ -2472,7 +2471,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned in= t vcpu, libxl_bitmap map =3D { .size =3D maplen, .map =3D cpumap }; if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, vcpu, &map, NULL= ) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to pin vcpu '%d' with libxenlight"), + _("Failed to pin vcpu '%1$d' with libxenlight"), vcpu); goto endjob; } @@ -2571,7 +2570,7 @@ libxlDomainGetVcpus(virDomainPtr dom, virVcpuInfoPtr = info, int maxinfo, if ((vcpuinfo =3D libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu, &hostcpus)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to list vcpus for domain '%d' with libxen= light"), + _("Failed to list vcpus for domain '%1$d' with libx= enlight"), vm->def->id); goto cleanup; } @@ -2676,7 +2675,7 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); goto cleanup; } =20 @@ -2719,7 +2718,7 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, con= st char * nativeFormat, } else { =20 virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); goto cleanup; } =20 @@ -2958,14 +2957,14 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, v= irDomainDiskDef *disk) =20 if (!origdisk) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No device with bus '%s' and target '%s'"), + _("No device with bus '%1$s' and target '%2$s'"), virDomainDiskBusTypeToString(disk->bus), disk->dst); goto cleanup; } =20 if (origdisk->device !=3D VIR_DOMAIN_DISK_DEVICE_CDROM) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Removable media not supported for %s device"), + _("Removable media not supported for %1$s device"), virDomainDiskDeviceTypeToString(disk->device)); goto cleanup; } @@ -2975,7 +2974,7 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, vir= DomainDiskDef *disk) =20 if ((ret =3D libxl_cdrom_insert(cfg->ctx, vm->def->id, &x_disk, NULL))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to change media for disk '%s'= "), + _("libxenlight failed to change media for disk '%1$= s'"), disk->dst); goto cleanup; } @@ -3010,7 +3009,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if (l_disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_XEN) { if (virDomainDiskIndexByName(vm->def, l_disk->dst, true) >= =3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s already exists"), l_disk->= dst); + _("target %1$s already exists"), l_disk= ->dst); goto cleanup; } =20 @@ -3031,7 +3030,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if ((ret =3D libxl_device_disk_add(cfg->ctx, vm->def->id, &x_disk, NULL)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to attach disk '%= s'"), + _("libxenlight failed to attach disk '%= 1$s'"), l_disk->dst); if (virDomainLockImageDetach(libxl_driver->lockManager, vm, l_disk->src) < 0) { @@ -3046,7 +3045,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) =20 } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be hotplugged."), + _("disk bus '%1$s' cannot be hotplugged."), virDomainDiskBusTypeToString(l_disk->bus)); } break; @@ -3055,7 +3054,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk device type '%s' cannot be hotplugged"), + _("disk device type '%1$s' cannot be hotplugged= "), virDomainDiskDeviceTypeToString(l_disk->device)= ); break; } @@ -3136,7 +3135,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate = *driver, =20 if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot plugged."), + _("'%1$s' controller cannot be hot plugged."), type); goto cleanup; } @@ -3150,7 +3149,7 @@ libxlDomainAttachControllerDevice(libxlDriverPrivate = *driver, =20 if (virDomainControllerFind(vm->def, controller->type, controller->idx= ) >=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s:%d already exists"), + _("target %1$s:%2$d already exists"), type, controller->idx); goto cleanup; } @@ -3234,7 +3233,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *dr= iver, =20 if (libxl_device_usbdev_add(cfg->ctx, vm->def->id, &usbdev, 0) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to attach usb device Busnum:%= 3x, Devnum:%3x"), + _("libxenlight failed to attach usb device Busnum:%= 1$3x, Devnum:%2$3x"), hostdev->source.subsys.u.usb.bus, hostdev->source.subsys.u.usb.device); goto reattach; @@ -3261,7 +3260,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *drive= r, { if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode '%s' not supported"), + _("hostdev mode '%1$s' not supported"), virDomainHostdevModeTypeToString(hostdev->mode)); return -1; } @@ -3279,7 +3278,7 @@ libxlDomainAttachHostDevice(libxlDriverPrivate *drive= r, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev subsys type '%s' not supported"), + _("hostdev subsys type '%1$s' not supported"), virDomainHostdevSubsysTypeToString(hostdev->source.= subsys.type)); return -1; } @@ -3305,7 +3304,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) dev->data.disk->dst, false)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("disk %s not found"), dev->data.disk-= >dst); + _("disk %1$s not found"), dev->data.dis= k->dst); goto cleanup; } =20 @@ -3317,7 +3316,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) if ((ret =3D libxl_device_disk_remove(cfg->ctx, vm->def->i= d, &x_disk, NULL)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to detach disk '%= s'"), + _("libxenlight failed to detach disk '%= 1$s'"), l_disk->dst); goto cleanup; } @@ -3332,7 +3331,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) =20 } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be hot unplugged."), + _("disk bus '%1$s' cannot be hot unplugged.= "), virDomainDiskBusTypeToString(dev->data.disk= ->bus)); } break; @@ -3342,7 +3341,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, vir= DomainDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot hot unplugged"), + _("device type '%1$s' cannot hot unplugged"), virDomainDiskDeviceTypeToString(dev->data.disk-= >device)); break; } @@ -3390,7 +3389,7 @@ libxlDomainAttachNetDevice(libxlDriverPrivate *driver, =20 if (virDomainHasNet(vm->def, net)) { virReportError(VIR_ERR_INVALID_ARG, - _("network device with mac %s already exists"), + _("network device with mac %1$s already exists"), virMacAddrFormat(&net->mac, mac)); goto cleanup; } @@ -3501,7 +3500,7 @@ libxlDomainAttachDeviceLive(libxlDriverPrivate *drive= r, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be attached"), + _("device type '%1$s' cannot be attached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -3524,7 +3523,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (virDomainDiskIndexByName(vmdef, disk->dst, true) >=3D 0) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s already exists."), disk->dst); + _("target %1$s already exists."), disk->dst= ); return -1; } virDomainDiskInsert(vmdef, disk); @@ -3550,7 +3549,7 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) net =3D dev->data.net; if (virDomainHasNet(vmdef, net)) { virReportError(VIR_ERR_INVALID_ARG, - _("network device with mac %s already exist= s"), + _("network device with mac %1$s already exi= sts"), virMacAddrFormat(&net->mac, mac)); return -1; } @@ -3721,7 +3720,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate = *driver, =20 if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot plugged."), + _("'%1$s' controller cannot be hot plugged."), type); goto cleanup; } @@ -3730,7 +3729,7 @@ libxlDomainDetachControllerDevice(libxlDriverPrivate = *driver, controller->type, controller->idx)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("controller %s:%d not found"), + _("controller %1$s:%2$d not found"), type, controller->idx); goto cleanup; } @@ -3779,7 +3778,7 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *dr= iver, idx =3D virDomainHostdevFind(vm->def, hostdev, &detach); if (idx < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("host USB device Busnum: %3x, Devnum: %3x not fou= nd"), + _("host USB device Busnum: %1$3x, Devnum: %2$3x not= found"), usbsrc->bus, usbsrc->device); goto cleanup; } @@ -3797,15 +3796,14 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivate *= driver, =20 if (!found) { virReportError(VIR_ERR_OPERATION_FAILED, - _("host USB device Busnum: %3x, Devnum: %3x not fou= nd"), + _("host USB device Busnum: %1$3x, Devnum: %2$3x not= found"), usbsrc->bus, usbsrc->device); goto cleanup; } =20 if (libxl_device_usbdev_remove(cfg->ctx, vm->def->id, &usbdev, 0) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxenlight failed to detach USB device " - "Busnum: %3x, Devnum: %3x"), + _("libxenlight failed to detach USB device Busnum: = %1$3x, Devnum: %2$3x"), usbsrc->bus, usbsrc->device); goto cleanup; } @@ -3833,7 +3831,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *drive= r, =20 if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode '%s' not supported"), + _("hostdev mode '%1$s' not supported"), virDomainHostdevModeTypeToString(hostdev->mode)); return -1; } @@ -3847,7 +3845,7 @@ libxlDomainDetachHostDevice(libxlDriverPrivate *drive= r, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), subsys->type); + _("unexpected hostdev type %1$d"), subsys->type= ); break; } =20 @@ -3973,7 +3971,7 @@ libxlDomainDetachDeviceLive(libxlDriverPrivate *drive= r, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be detached"), + _("device type '%1$s' cannot be detached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -3999,7 +3997,7 @@ libxlDomainDetachDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (!(detach =3D virDomainDiskRemoveByName(vmdef, disk->dst)))= { virReportError(VIR_ERR_INVALID_ARG, - _("no target device %s"), disk->dst); + _("no target device %1$s"), disk->dst); return -1; } virDomainDiskDefFree(detach); @@ -4091,7 +4089,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDoma= inDeviceDef *dev) case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' cannot be updated."), + _("disk bus '%1$s' cannot be updated."), virDomainDiskBusTypeToString(disk->bus)= ); break; } @@ -4125,7 +4123,7 @@ libxlDomainUpdateDeviceLive(virDomainObj *vm, virDoma= inDeviceDef *dev) case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be updated"), + _("device type '%1$s' cannot be updated"), virDomainDeviceTypeToString(dev->type)); break; } @@ -4144,7 +4142,7 @@ libxlDomainUpdateDeviceConfig(virDomainDef *vmdef, vi= rDomainDeviceDef *dev) disk =3D dev->data.disk; if (!(orig =3D virDomainDiskByTarget(vmdef, disk->dst))) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s doesn't exist."), disk->dst); + _("target %1$s doesn't exist."), disk->dst); return -1; } if (!(orig->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM)) { @@ -4526,7 +4524,7 @@ libxlNodeGetCellsFreeMemory(virConnectPtr conn, /* Check/sanitize the cell range */ if (startCell >=3D nr_nodes) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, nr_nodes - 1); goto cleanup; } @@ -4644,21 +4642,21 @@ libxlDomainSetAutostart(virDomainPtr dom, int autos= tart) if (autostart) { if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = %s"), + _("cannot create autostart directory = %1$s"), cfg->autostartDir); goto endjob; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s to '%= s'"), + _("Failed to create symlink '%1$s to = '%2$s'"), autostartLink, configFile); goto endjob; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno != =3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto endjob; } @@ -4719,8 +4717,8 @@ libxlDomainGetSchedulerType(virDomainPtr dom, int *np= arams) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler id for domain '%d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler id for domain '%1$d' wit= h libxenlight"), + vm->def->id); goto cleanup; } =20 @@ -4769,8 +4767,8 @@ libxlDomainGetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto cleanup; } =20 @@ -4846,8 +4844,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_get(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to get scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto endjob; } =20 @@ -4862,8 +4860,8 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr d= om, =20 if (libxl_domain_sched_params_set(cfg->ctx, vm->def->id, &sc_info) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set scheduler parameters for domain '%= d'" - " with libxenlight"), vm->def->id); + _("Failed to set scheduler parameters for domain '%= 1$d' with libxenlight"), + vm->def->id); goto endjob; } =20 @@ -4921,14 +4919,14 @@ libxlDomainOpenConsole(virDomainPtr dom, =20 if (!chr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find character device %s"), + _("cannot find character device %1$s"), NULLSTR(dev_name)); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), + _("character device %1$s is not using a PTY"), dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -5045,7 +5043,7 @@ libxlDomainGetNumaParameters(virDomainPtr dom, libxl_for_each_set_bit(j, nodemap) { if (virBitmapSetBit(nodes, j)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Node %zu out of range"), j); + _("Node %1$zu out of range"), j); goto cleanup; } } @@ -5187,7 +5185,7 @@ libxlDomainGetTotalCPUStats(libxlDriverPrivate *drive= r, =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto cleanup; } @@ -5227,7 +5225,7 @@ libxlDomainGetPerCPUStats(libxlDriverPrivate *driver, if ((vcpuinfo =3D libxl_list_vcpu(cfg->ctx, vm->def->id, &maxcpu, &hostcpus)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to list vcpus for domain '%d' with libxen= light"), + _("Failed to list vcpus for domain '%1$d' with libx= enlight"), vm->def->id); goto cleanup; } @@ -5322,7 +5320,7 @@ libxlDomainMemoryStats(virDomainPtr dom, =20 if (libxl_domain_info(cfg->ctx, &d_info, vm->def->id) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxl_domain_info failed for domain '%d'"), + _("libxl_domain_info failed for domain '%1$d'"), vm->def->id); goto endjob; } @@ -5556,7 +5554,7 @@ libxlDomainBlockStatsVBD(virDomainObj *vm, if ((virFileReadAll(name, 256, &val) < 0) || \ (sscanf(val, "%llu", &status) !=3D 1)) { \ virReportError(VIR_ERR_OPERATION_FAILED, \ - _("cannot read %s"), name); \ + _("cannot read %1$s"), name); \ goto cleanup; \ } \ VAR +=3D (status * MUL); \ @@ -5605,7 +5603,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_OPERATION_INVALID, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); return ret; } =20 @@ -5616,7 +5614,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, if (STREQ(disk_drv, "phy")) { if (disk_fmt !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unsupported format %s"), + _("unsupported format %1$s"), virStorageFileFormatTypeToString(disk_fmt)); return ret; } @@ -5624,7 +5622,7 @@ libxlDomainBlockStatsGatherSingle(virDomainObj *vm, ret =3D libxlDomainBlockStatsVBD(vm, disk->dst, stats); } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unsupported disk driver %s"), + _("unsupported disk driver %1$s"), disk_drv); } return ret; @@ -5847,7 +5845,7 @@ libxlConnectSupportsFeature(virConnectPtr conn, int f= eature) 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; case VIR_DRV_FEATURE_MIGRATION_V3: @@ -5880,7 +5878,7 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev, =20 if (STRNEQ(driverName, "xen")) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported driver name '%s'"), driverName); + _("unsupported driver name '%1$s'"), driverName); return -1; } =20 @@ -6164,8 +6162,7 @@ libxlDomainMigrateFinish3Params(virConnectPtr dconn, !(vm =3D virDomainObjListFindByName(driver->domains, dname))) { /* Migration obviously failed if the domain doesn't exist */ virReportError(VIR_ERR_OPERATION_FAILED, - _("Migration failed. No domain on destination host " - "with matching name '%s'"), + _("Migration failed. No domain on destination host = with matching name '%1$s'"), NULLSTR(dname)); return NULL; } @@ -6338,7 +6335,7 @@ libxlDomainInterfaceAddresses(virDomainPtr dom, =20 default: virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unsupported IP address data source %d"), + _("Unsupported IP address data source %1$d"), source); break; } @@ -6374,21 +6371,21 @@ libxlConnectGetDomainCapabilities(virConnectPtr con= n, if (virttype_str && (virttype =3D virDomainVirtTypeFromString(virttype_str)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (virttype !=3D VIR_DOMAIN_VIRT_XEN) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), + _("unknown virttype: %1$s"), virttype_str); goto cleanup; } =20 if (arch_str && (arch =3D virArchFromString(arch_str)) =3D=3D VIR_ARCH= _NONE) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown architecture: %s"), + _("unknown architecture: %1$s"), arch_str); goto cleanup; } diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 0867194d9e..961815f9f7 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -471,7 +471,7 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn, =20 if ((*mig)->xenMigStreamVer > LIBXL_SAVE_VERSION) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Xen migration stream version '%d' is not support= ed on this host"), + _("Xen migration stream version '%1$d' is not suppo= rted on this host"), (*mig)->xenMigStreamVer); return -1; } @@ -702,14 +702,14 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn, =20 if (uri =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("unable to parse URI: %s"), + _("unable to parse URI: %1$s"), uri_in); goto endjob; } =20 if (uri->server =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("missing host in migration URI: %s"), + _("missing host in migration URI: %1$s"), uri_in); goto endjob; } diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index f61719adac..d5a0399613 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -59,7 +59,7 @@ xenConfigGetBool(virConf *conf, *value =3D STREQ(val->str, "1") ? 1 : 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -88,12 +88,12 @@ xenConfigGetULong(virConf *conf, } else if (val->type =3D=3D VIR_CONF_STRING) { if (virStrToLong_ul(val->str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -122,12 +122,12 @@ xenConfigGetULongLong(virConf *conf, } else if (val->type =3D=3D VIR_CONF_STRING) { if (virStrToLong_ull(val->str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), name); + _("config value %1$s was malformed"), name); return -1; } return 0; @@ -150,7 +150,7 @@ xenConfigCopyStringInternal(virConf *conf, if (allowMissing) return 0; virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was missing"), name); + _("config value %1$s was missing"), name); return -1; } =20 @@ -203,13 +203,13 @@ xenConfigGetUUID(virConf *conf, const char *name, uns= igned char *uuid) =20 if (!string) { virReportError(VIR_ERR_CONF_SYNTAX, - _("%s can't be empty"), name); + _("%1$s can't be empty"), name); return -1; } =20 if (virUUIDParse(string, uuid) < 0) { virReportError(VIR_ERR_CONF_SYNTAX, - _("%s not parseable"), string); + _("%1$s not parseable"), string); return -1; } =20 @@ -249,7 +249,7 @@ xenConfigSetInt(virConf *conf, const char *setting, lon= g long l) virConfValue *value =3D NULL; =20 if ((long)l !=3D l) { - virReportError(VIR_ERR_OVERFLOW, _("failed to store %lld to %s"), + virReportError(VIR_ERR_OVERFLOW, _("failed to store %1$lld to %2$s= "), l, setting); return -1; } @@ -340,7 +340,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onPoweroff =3D virDomainLifecycleActionTypeFromString(on_pow= eroff)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_poweroff"), on_powero= ff); + _("unexpected value %1$s for on_poweroff"), on_powe= roff); return -1; } =20 @@ -349,7 +349,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onReboot =3D virDomainLifecycleActionTypeFromString(on_reboo= t)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_reboot"), on_reboot); + _("unexpected value %1$s for on_reboot"), on_reboot= ); return -1; } =20 @@ -358,7 +358,7 @@ xenParseEventsActions(virConf *conf, virDomainDef *def) =20 if ((def->onCrash =3D virDomainLifecycleActionTypeFromString(on_crash)= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected value %s for on_crash"), on_crash); + _("unexpected value %1$s for on_crash"), on_crash); return -1; } =20 @@ -401,7 +401,7 @@ xenParsePCI(char *entry) str =3D tokens[nexttoken]; if (!(nextstr =3D strchr(str, '.'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed PCI address %s"), str); + _("Malformed PCI address %1$s"), str); return NULL; } *nextstr =3D '\0'; @@ -427,7 +427,7 @@ xenParsePCI(char *entry) =20 if (!(val =3D strchr(options[i], '=3D'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed PCI options %s"), str); + _("Malformed PCI options %1$s"), str); return NULL; } *val =3D '\0'; @@ -587,7 +587,7 @@ xenParseHypervisorFeatures(virConf *conf, virDomainDef = *def) def->xen_passthrough_mode =3D VIR_DOMAIN_XEN_PASSTHROUGH_MODE_= SHARE_PT; } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid passthrough mode %s"), passthrough); + _("Invalid passthrough mode %1$s"), passthrough= ); } } =20 @@ -711,7 +711,7 @@ xenParseVfb(virConf *conf, virDomainDef *def) =20 if (virStrcpyStatic(vfb, *vfbs) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VFB %s too big for destination"), + _("VFB %1$s too big for destination"), *vfbs); goto cleanup; } @@ -745,7 +745,7 @@ xenParseVfb(virConf *conf, virDomainDef *def) if (virStrToLong_i(key + 11, NULL, 10, &graphics->data.vnc.port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid vncdisplay value '%s= '"), + _("invalid vncdisplay value '%1= $s'"), key + 11); goto cleanup; } @@ -826,7 +826,7 @@ xenParseSxprChar(const char *value, } else { if ((def->source->type =3D virDomainChrTypeFromString(prefix))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown chr device type '%s'"), prefix); + _("unknown chr device type '%1$s'"), prefix= ); goto error; } } @@ -1095,19 +1095,19 @@ xenParseSxprVifRate(const char *rate, unsigned long= long *kbytes_per_sec) regex =3D g_regex_new(vif_bytes_per_sec_re, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 if (!g_regex_match(regex, trate, 0, NULL)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid rate '%s' specified"), rate); + _("Invalid rate '%1$s' specified"), rate); return -1; } =20 if (virStrToLong_ull(rate, &suffix, 10, &tmp)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse rate '%s'"), rate); + _("Failed to parse rate '%1$s'"), rate); return -1; } =20 @@ -1178,7 +1178,7 @@ xenParseVif(char *entry, const char *vif_typename) if (mac) { if (virMacAddrParse(mac, &net->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed mac address '%s'"), mac); + _("malformed mac address '%1$s'"), mac); goto cleanup; } } @@ -1376,7 +1376,7 @@ xenParseGeneralMeta(virConf *conf, virDomainDef *def,= virCaps *caps) def->os.type =3D VIR_DOMAIN_OSTYPE_HVM; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("type %s is not supported"), str); + _("type %1$s is not supported"), str); return -1; } } else { @@ -1439,7 +1439,7 @@ xenParseConfigCommon(virConf *conf, return -1; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return -1; } =20 @@ -1527,7 +1527,7 @@ xenFormatSxprChr(virDomainChrDef *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chr device type '%s'"), type); + _("unsupported chr device type '%1$s'"), type); return -1; } =20 @@ -1657,7 +1657,7 @@ xenFormatNet(virConnectPtr conn, virObjectUnref(network); if (!bridge) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network %s is not active"), + _("network %1$s is not active"), net->data.network.name); return -1; } @@ -1679,7 +1679,7 @@ xenFormatNet(virConnectPtr conn, case VIR_DOMAIN_NET_TYPE_VDPA: case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%s'"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%1$s'"), virDomainNetTypeToString(net->type)); return -1; =20 @@ -1859,7 +1859,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset=3D'%s'"), + _("unsupported clock offset=3D'%1$s'"), virDomainClockOffsetTypeToString(def->clock.off= set)); return -1; } @@ -1876,7 +1876,7 @@ xenFormatTimeOffset(virConf *conf, virDomainDef *def) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset=3D'%s'"), + _("unsupported clock offset=3D'%1$s'"), virDomainClockOffsetTypeToString(def->clock.off= set)); return -1; } @@ -1896,7 +1896,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onPowero= ff))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onPowerof= f); + _("unexpected lifecycle action %1$d"), def->onPower= off); return -1; } if (xenConfigSetString(conf, "on_poweroff", lifecycle) < 0) @@ -1905,7 +1905,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onReboot= ))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onReboot); + _("unexpected lifecycle action %1$d"), def->onReboo= t); return -1; } if (xenConfigSetString(conf, "on_reboot", lifecycle) < 0) @@ -1914,7 +1914,7 @@ xenFormatEventActions(virConf *conf, virDomainDef *de= f) =20 if (!(lifecycle =3D virDomainLifecycleActionTypeToString(def->onCrash)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected lifecycle action %d"), def->onCrash); + _("unexpected lifecycle action %1$d"), def->onCrash= ); return -1; } if (xenConfigSetString(conf, "on_crash", lifecycle) < 0) @@ -2122,7 +2122,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainD= ef *def) return -1; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(def->clock.t= imers[i]->name)); return -1; } @@ -2135,7 +2135,7 @@ xenFormatHypervisorFeatures(virConf *conf, virDomainD= ef *def) case VIR_DOMAIN_TIMER_NAME_PIT: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(def->clock.timer= s[i]->name)); return -1; =20 @@ -2284,7 +2284,7 @@ xenFormatSound(virConf *conf, virDomainDef *def) for (i =3D 0; i < def->nsounds; i++) { if (!(model =3D virDomainSoundModelTypeToString(def->sounds[i]->mo= del))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected sound model %d"), + _("unexpected sound model %1$d"), def->sounds[i]->model); return -1; } @@ -2368,7 +2368,7 @@ xenFormatConfigCommon(virConf *conf, return -1; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return -1; } =20 diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index cfd56b3b05..d5076f2438 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -274,7 +274,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) =20 if (STRNEQ(cpuid_pairs[0], "host")) { virReportError(VIR_ERR_CONF_SYNTAX, - _("cpuid starting with %s is not supported, only li= bxl format is"), + _("cpuid starting with %1$s is not supported, only = libxl format is"), cpuid_pairs[0]); return -1; } @@ -285,7 +285,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) return -1; if (!name_and_value[0] || !name_and_value[1]) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid libxl cpuid key=3Dvalue element: %s"= ), + _("Invalid libxl cpuid key=3Dvalue element: %1$= s"), cpuid_pairs[i]); return -1; } @@ -301,7 +301,7 @@ xenParseXLCPUID(virConf *conf, virDomainDef *def) policy =3D VIR_CPU_FEATURE_OPTIONAL; } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid libxl cpuid value: %s"), + _("Invalid libxl cpuid value: %1$s"), cpuid_pairs[i]); return -1; } @@ -434,7 +434,7 @@ xenParseXLVnuma(virConf *conf, if (!str || !(data =3D strrchr(str, '=3D'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vnuma vnode invalid format '%s'"), + _("vnuma vnode invalid format '%1$s'"), str); return -1; } @@ -447,7 +447,7 @@ xenParseXLVnuma(virConf *conf, if ((virStrToLong_ui(data, NULL, 10, &cellid) < 0)= || (cellid >=3D nr_nodes)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma vnode %zu contains inv= alid pnode value '%s'"), + _("vnuma vnode %1$zu contains i= nvalid pnode value '%2$s'"), vnodeCnt, data); return -1; } @@ -477,7 +477,7 @@ xenParseXLVnuma(virConf *conf, =20 if (ndistances !=3D nr_nodes) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma pnode %d configured '%s' (= count %zu) doesn't fit the number of specified vnodes %zu"), + _("vnuma pnode %1$d configured '%2$= s' (count %3$zu) doesn't fit the number of specified vnodes %4$zu"), pnode, str, ndistances, nr_nodes); return -1; } @@ -493,7 +493,7 @@ xenParseXLVnuma(virConf *conf, =20 } else { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid vnuma configuration for = vnode %zu"), + _("Invalid vnuma configuration for = vnode %1$zu"), vnodeCnt); return -1; } @@ -506,7 +506,7 @@ xenParseXLVnuma(virConf *conf, (cpumask =3D=3D NULL) || (kbsize =3D=3D 0)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Incomplete vnuma configuration for vnode %zu= "), + _("Incomplete vnuma configuration for vnode %1$= zu"), vnodeCnt); return -1; } @@ -520,7 +520,7 @@ xenParseXLVnuma(virConf *conf, =20 if (def->maxvcpus < vcpus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vnuma configuration contains %zu vcpus, which is= greater than %zu maxvcpus"), + _("vnuma configuration contains %1$zu vcpus, which = is greater than %2$zu maxvcpus"), vcpus, def->maxvcpus); return -1; } @@ -693,7 +693,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def) =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk image format not supported: %s"= ), + _("disk image format not supported: %1$= s"), libxl_disk_format_to_string(libxldisk.f= ormat)); goto fail; } @@ -720,7 +720,7 @@ xenParseXLDisk(virConf *conf, virDomainDef *def) #endif default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk backend not supported: %s"), + _("disk backend not supported: %1$s"), libxl_disk_backend_to_string(libxldisk.= backend)); goto fail; } @@ -770,7 +770,7 @@ xenParseXLInputDevs(virConf *conf, virDomainDef *def) while (val) { if (val->type !=3D VIR_CONF_STRING) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("config value %s was malformed"), + _("config value %1$s was malformed"), "usbdevice"); return -1; } @@ -1448,14 +1448,14 @@ xenFormatXLDiskSrcNet(virStorageSource *src) case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, - _("Unsupported network block protocol '%s'"), + _("Unsupported network block protocol '%1$s'"), virStorageNetProtocolTypeToString(src->protocol)); return NULL; =20 case VIR_STORAGE_NET_PROTOCOL_RBD: if (strchr(src->path, ':')) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("':' not allowed in RBD source volume name '%= s'"), + _("':' not allowed in RBD source volume name '%= 1$s'"), src->path); return NULL; } diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c index 334de071ba..0031d6cbc6 100644 --- a/src/libxl/xen_xm.c +++ b/src/libxl/xen_xm.c @@ -186,7 +186,7 @@ xenParseXMDisk(char *entry, int hvm) VIR_FREE(driverType); if (virDomainDiskGetFormat(disk) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown driver type %s"), + _("Unknown driver type %1$s"), src); goto error; } @@ -297,7 +297,7 @@ xenFormatXMDisk(virConfValue *list, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported disk type %s"), + _("unsupported disk type %1$s"), virStorageTypeToString(virDomainDiskGetType= (disk))); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464724; cv=none; d=zohomail.com; s=zohoarc; b=hzsz2occliy8cYH0hzm1ipNtNZc8jOiFw7p1vD82bOJkbAWBS4zOesmq3TesMuQyfbcK1kj/H27hJAe8w3D1f3XQUKziEAjrPyO9kNdoGPzrti30fldI+ovp7IxRL7qqRCK4A1Qs1dLe6tHZWHkHxQz2s1VWvmdsRbDhPVYm5Bk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464724; 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=EgcpetDVLud7XuepogIW2oKzCgaJNyrrIBunt4xd1XA=; b=WIX53q2sXBsl7d6pFPV0lbrSKDPTa3L2ZTrtB4lz2VJg7LKE5RjSbXH+A8aDP1Z/UepEBJFZPyOPGmqBf9SJtWpyfetCZUVlk149qPw6Q4KBZuXpv/vLUrZ2wRnC95IY8uz1OcSloKON/RWZZxeODeCZkCmfwjNuz6nsF0QO4/g= 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 167846472443657.2008626198043; Fri, 10 Mar 2023 08:12:04 -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-583-ueR6PnmIN96j9vL74XsEbQ-1; Fri, 10 Mar 2023 11:11:23 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7E2463C10EC0; Fri, 10 Mar 2023 16:10:38 +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 541874015307; Fri, 10 Mar 2023 16:10:38 +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 16D5319472C7; Fri, 10 Mar 2023 16:10:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CD24F1946A54 for ; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BFE561121319; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A3541121315 for ; Fri, 10 Mar 2023 16:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464723; 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=EgcpetDVLud7XuepogIW2oKzCgaJNyrrIBunt4xd1XA=; b=FgbZcJfEzDKJP4gUcKdBpTgA6OodQMteaPETeok9v2mmZlQMY968//moZDBn5/2m9nmQ4m NeZ3gcPZP3Cw55rQWnQo5IfUPsmBmqkgkqJB561Fvv6Fywm8uqGGUjElUbgozLv7W+Itk0 Gclsg6dSCDRNmC7b78Tm/NkSxhWjFBg= X-MC-Unique: ueR6PnmIN96j9vL74XsEbQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 17/51] locking: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:33 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.2 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: 1678464725401100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/locking/lock_daemon.c | 26 ++++----- src/locking/lock_daemon_dispatch.c | 10 ++-- src/locking/lock_driver_lockd.c | 12 ++-- src/locking/lock_driver_sanlock.c | 94 +++++++++++++++--------------- src/locking/lock_manager.c | 8 +-- src/locking/sanlock_helper.c | 6 +- 6 files changed, 77 insertions(+), 79 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 6b0a8220e5..ba52ce7d77 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -187,7 +187,7 @@ virLockDaemonNewServerPostExecRestart(virNetDaemon *dmn= G_GNUC_UNUSED, dmn); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected server name '%s' during restart"), + _("Unexpected server name '%1$s' during restart"), name); return NULL; } @@ -461,14 +461,14 @@ virLockDaemonClientNew(virNetServerClient *client, =20 if (!privileged) { if (geteuid() !=3D clientuid) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; } } else { if (clientuid !=3D 0) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; @@ -716,7 +716,7 @@ virLockDaemonPreExecRestart(const char *state_file, =20 if (virFileWriteStr(state_file, state, 0700) < 0) { virReportSystemError(errno, - _("Unable to save state file %s"), state_file= ); + _("Unable to save state file %1$s"), state_fi= le); return -1; } =20 @@ -738,7 +738,7 @@ virLockDaemonUsage(const char *argv0, bool privileged) fprintf(stderr, _("\n" "Usage:\n" - " %s [options]\n" + " %1$s [options]\n" "\n" "Options:\n" " -h | --help Display program help:\n" @@ -757,13 +757,13 @@ virLockDaemonUsage(const char *argv0, bool privileged) " Default paths:\n" "\n" " Configuration file (unless overridden by -f):\n" - " %s/libvirt/virtlockd.conf\n" + " %1$s/libvirt/virtlockd.conf\n" "\n" " Sockets:\n" - " %s/libvirt/virtlockd-sock\n" + " %2$s/libvirt/virtlockd-sock\n" "\n" " PID file (unless overridden by -p):\n" - " %s/virtlockd.pid\n" + " %3$s/virtlockd.pid\n" "\n"), SYSCONFDIR, RUNSTATEDIR, @@ -823,7 +823,7 @@ int main(int argc, char **argv) { =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 @@ -903,7 +903,7 @@ int main(int argc, char **argv) { /* Read the config file if it exists */ if (remote_config_file && virLockDaemonConfigLoadFile(config, remote_config_file, implicit_c= onf) < 0) { - VIR_ERROR(_("Can't load config file: %s: %s"), + VIR_ERROR(_("Can't load config file: %1$s: %2$s"), virGetLastErrorMessage(), remote_config_file); exit(EXIT_FAILURE); } @@ -963,7 +963,7 @@ int main(int argc, char **argv) { old_umask =3D umask(077); VIR_DEBUG("Ensuring run dir '%s' exists", run_dir); if (g_mkdir_with_parents(run_dir, 0777) < 0) { - VIR_ERROR(_("unable to create rundir %s: %s"), run_dir, + VIR_ERROR(_("unable to create rundir %1$s: %2$s"), run_dir, g_strerror(errno)); ret =3D VIR_DAEMON_ERR_RUNDIR; umask(old_umask); @@ -987,13 +987,13 @@ int main(int argc, char **argv) { =20 if (godaemon) { if (chdir("/") < 0) { - VIR_ERROR(_("cannot change to root directory: %s"), + VIR_ERROR(_("cannot change to root directory: %1$s"), g_strerror(errno)); goto cleanup; } =20 if ((statuswrite =3D virDaemonForkIntoBackground(argv[0])) < 0= ) { - VIR_ERROR(_("Failed to fork as daemon: %s"), + VIR_ERROR(_("Failed to fork as daemon: %1$s"), g_strerror(errno)); goto cleanup; } diff --git a/src/locking/lock_daemon_dispatch.c b/src/locking/lock_daemon_d= ispatch.c index e65a2b340f..22c450acd9 100644 --- a/src/locking/lock_daemon_dispatch.c +++ b/src/locking/lock_daemon_dispatch.c @@ -67,7 +67,7 @@ virLockSpaceProtocolDispatchAcquireResource(virNetServer = *server G_GNUC_UNUSED, =20 if (!(lockspace =3D virLockDaemonFindLockSpace(lockDaemon, args->path)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace for path %s does not exist"), + _("Lockspace for path %1$s does not exist"), args->path); goto cleanup; } @@ -125,7 +125,7 @@ virLockSpaceProtocolDispatchCreateResource(virNetServer= *server G_GNUC_UNUSED, =20 if (!(lockspace =3D virLockDaemonFindLockSpace(lockDaemon, args->path)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace for path %s does not exist"), + _("Lockspace for path %1$s does not exist"), args->path); goto cleanup; } @@ -174,7 +174,7 @@ virLockSpaceProtocolDispatchDeleteResource(virNetServer= *server G_GNUC_UNUSED, =20 if (!(lockspace =3D virLockDaemonFindLockSpace(lockDaemon, args->path)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace for path %s does not exist"), + _("Lockspace for path %1$s does not exist"), args->path); goto cleanup; } @@ -229,7 +229,7 @@ virLockSpaceProtocolDispatchNew(virNetServer *server G_= GNUC_UNUSED, =20 if (virLockDaemonFindLockSpace(lockDaemon, args->path) !=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace for path %s already exists"), + _("Lockspace for path %1$s already exists"), args->path); goto cleanup; } @@ -324,7 +324,7 @@ virLockSpaceProtocolDispatchReleaseResource(virNetServe= r *server G_GNUC_UNUSED, =20 if (!(lockspace =3D virLockDaemonFindLockSpace(lockDaemon, args->path)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace for path %s does not exist"), + _("Lockspace for path %1$s does not exist"), args->path); goto cleanup; } diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lock= d.c index 4df12e0105..6b294e2954 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -85,7 +85,7 @@ static int virLockManagerLockDaemonLoadConfig(const char = *configFile) if (access(configFile, R_OK) =3D=3D -1) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to access config file %s"), + _("Unable to access config file %1$s"), configFile); return -1; } @@ -400,7 +400,7 @@ static int virLockManagerLockDaemonNew(virLockManager *= lock, /* ignored */ } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected parameter %s for object"), + _("Unexpected parameter %1$s for object"), params[i].key); goto cleanup; } @@ -426,7 +426,7 @@ static int virLockManagerLockDaemonNew(virLockManager *= lock, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown lock manager object type %d"), + _("Unknown lock manager object type %1$d"), type); goto cleanup; } @@ -498,7 +498,7 @@ static int virLockManagerGetLVMKey(const char *path, char **key G_GNUC_UNUSED) { - virReportSystemError(ENOSYS, _("Unable to get LVM key for %s"), path); + virReportSystemError(ENOSYS, _("Unable to get LVM key for %1$s"), path= ); return -1; } #endif @@ -601,7 +601,7 @@ static int virLockManagerLockDaemonAddResource(virLockM= anager *lock, path =3D params[i].value.str; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected parameter %s for lease resour= ce"), + _("Unexpected parameter %1$s for lease reso= urce"), params[i].key); return -1; } @@ -617,7 +617,7 @@ static int virLockManagerLockDaemonAddResource(virLockM= anager *lock, } break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown lock manager object type %d"), + _("Unknown lock manager object type %1$d"), type); return -1; } diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sa= nlock.c index 438779f926..dc24862a6f 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -101,7 +101,7 @@ virLockManagerSanlockError(int err, #if WITH_SANLOCK_STRERROR *message =3D g_strdup(sanlock_strerror(err)); #else - *message =3D g_strdup_printf(_("sanlock error %d"), err); + *message =3D g_strdup_printf(_("sanlock error %1$d"), err); #endif return true; } else { @@ -124,7 +124,7 @@ virLockManagerSanlockLoadConfig(virLockManagerSanlockDr= iver *driver, if (access(configFile, R_OK) =3D=3D -1) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to access config file %s"), + _("Unable to access config file %1$s"), configFile); return -1; } @@ -196,7 +196,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) if (virStrcpyStatic(ls.name, VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE) < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace path '%s' exceeded %d characters"), + _("Lockspace path '%1$s' exceeded %2$d characters"), VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE, SANLK_PATH_LEN); goto error; @@ -205,7 +205,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) ls.flags =3D 0; if (virStrcpy(ls.host_id_disk.path, path, SANLK_PATH_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace path '%s' exceeded %d characters"), + _("Lockspace path '%1$s' exceeded %2$d characters"), path, SANLK_PATH_LEN); goto error; } @@ -221,8 +221,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) dir =3D g_path_get_dirname(path); if (stat(dir, &st) < 0 || !S_ISDIR(st.st_mode)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create lockspace %s: parent direct= ory" - " does not exist or is not a directory"), + _("Unable to create lockspace %1$s: parent dire= ctory does not exist or is not a directory"), path); goto error; } @@ -233,7 +232,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) if ((fd =3D open(path, O_WRONLY|O_CREAT|O_EXCL, perms)) < 0) { if (errno !=3D EEXIST) { virReportSystemError(errno, - _("Unable to create lockspace %s"), + _("Unable to create lockspace %1$s"), path); goto error; } @@ -243,7 +242,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) if ((driver->user !=3D (uid_t) -1 || driver->group !=3D (gid_t= ) -1) && (fchown(fd, driver->user, driver->group) < 0)) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u= )"), path, (unsigned int) driver->user, (unsigned int) driver->group); @@ -254,12 +253,12 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriver *driver) char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to query sector size %s: %s"), + _("Unable to query sector size %1$s: %2= $s"), path, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to query sector size %s= "), + _("Unable to query sector size %1= $s"), path); } goto error_unlink; @@ -270,14 +269,14 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriver *driver) */ if (safezero(fd, 0, rv) < 0) { virReportSystemError(errno, - _("Unable to allocate lockspace %s"), + _("Unable to allocate lockspace %1$s"= ), path); goto error_unlink; } =20 if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("Unable to save lockspace %s"), + _("Unable to save lockspace %1$s"), path); goto error_unlink; } @@ -286,12 +285,12 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriver *driver) char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to initialize lockspace %s: %= s"), + _("Unable to initialize lockspace %1$s:= %2$s"), path, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to initialize lockspace= %s"), + _("Unable to initialize lockspace= %1$s"), path); } goto error_unlink; @@ -304,7 +303,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) (driver->group !=3D (gid_t) -1 && driver->group !=3D st.st_gi= d)) && (chown(path, driver->user, driver->group) < 0)) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), path, (unsigned int) driver->user, (unsigned int) driver->group); @@ -314,7 +313,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriver *driver) if ((driver->group !=3D (gid_t) -1 && (st.st_mode & 0060) !=3D 006= 0) && chmod(path, 0660) < 0) { virReportSystemError(errno, - _("cannot chmod '%s' to 0660"), + _("cannot chmod '%1$s' to 0660"), path); goto error; } @@ -344,12 +343,12 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriver *driver) char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to add lockspace %s: %s"), + _("Unable to add lockspace %1$s: %2$s"), path, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to add lockspace %s"), + _("Unable to add lockspace %1$s"), path); } goto error; @@ -454,7 +453,7 @@ static int virLockManagerSanlockNew(virLockManager *loc= k, =20 if (type !=3D VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unsupported object type %d"), type); + _("Unsupported object type %1$d"), type); return -1; } =20 @@ -528,7 +527,7 @@ static int virLockManagerSanlockAddLease(virLockManager= *lock, res->num_disks =3D 1; if (virStrcpy(res->name, name, SANLK_NAME_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resource name '%s' exceeds %d characters"), + _("Resource name '%1$s' exceeds %2$d characters"), name, SANLK_NAME_LEN); return -1; } @@ -537,7 +536,7 @@ static int virLockManagerSanlockAddLease(virLockManager= *lock, if (STREQ(params[i].key, "path")) { if (virStrcpy(res->disks[0].path, params[i].value.str, SANLK_P= ATH_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lease path '%s' exceeds %d characters"), + _("Lease path '%1$s' exceeds %2$d character= s"), params[i].value.str, SANLK_PATH_LEN); return -1; } @@ -546,7 +545,7 @@ static int virLockManagerSanlockAddLease(virLockManager= *lock, } else if (STREQ(params[i].key, "lockspace")) { if (virStrcpy(res->lockspace_name, params[i].value.str, SANLK_= NAME_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resource lockspace '%s' exceeds %d chara= cters"), + _("Resource lockspace '%1$s' exceeds %2$d c= haracters"), params[i].value.str, SANLK_NAME_LEN); return -1; } @@ -589,7 +588,7 @@ virLockManagerSanlockAddDisk(virLockManagerSanlockDrive= r *driver, return -1; if (virStrcpy(res->name, hash, SANLK_NAME_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("MD5 hash '%s' unexpectedly larger than %d charac= ters"), + _("MD5 hash '%1$s' unexpectedly larger than %2$d ch= aracters"), hash, (SANLK_NAME_LEN - 1)); return -1; } @@ -597,7 +596,7 @@ virLockManagerSanlockAddDisk(virLockManagerSanlockDrive= r *driver, path =3D g_strdup_printf("%s/%s", driver->autoDiskLeasePath, res->name= ); if (virStrcpy(res->disks[0].path, path, SANLK_PATH_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lease path '%s' exceeds %d characters"), + _("Lease path '%1$s' exceeds %2$d characters"), path, SANLK_PATH_LEN); return -1; } @@ -606,7 +605,7 @@ virLockManagerSanlockAddDisk(virLockManagerSanlockDrive= r *driver, VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE, SANLK_NAME_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resource lockspace '%s' exceeds %d characters"), + _("Resource lockspace '%1$s' exceeds %2$d character= s"), VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE, SANLK= _NAME_LEN); return -1; } @@ -631,7 +630,7 @@ virLockManagerSanlockCreateLease(virLockManagerSanlockD= river *driver, if ((fd =3D open(res->disks[0].path, O_WRONLY|O_CREAT|O_EXCL, 0600= )) < 0) { if (errno !=3D EEXIST) { virReportSystemError(errno, - _("Unable to create lockspace %s"), + _("Unable to create lockspace %1$s"), res->disks[0].path); return -1; } @@ -641,7 +640,7 @@ virLockManagerSanlockCreateLease(virLockManagerSanlockD= river *driver, if ((driver->user !=3D (uid_t) -1 || driver->group !=3D (gid_t= ) -1) && (fchown(fd, driver->user, driver->group) < 0)) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u= )"), res->disks[0].path, (unsigned int) driver->user, (unsigned int) driver->group); @@ -652,12 +651,12 @@ virLockManagerSanlockCreateLease(virLockManagerSanloc= kDriver *driver, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to query sector size %s: %s"), + _("Unable to query sector size %1$s: %2= $s"), res->disks[0].path, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to query sector size %s= "), + _("Unable to query sector size %1= $s"), res->disks[0].path); } goto error_unlink; @@ -668,14 +667,14 @@ virLockManagerSanlockCreateLease(virLockManagerSanloc= kDriver *driver, */ if (safezero(fd, 0, rv) < 0) { virReportSystemError(errno, - _("Unable to allocate lease %s"), + _("Unable to allocate lease %1$s"), res->disks[0].path); goto error_unlink; } =20 if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("Unable to save lease %s"), + _("Unable to save lease %1$s"), res->disks[0].path); goto error_unlink; } @@ -684,12 +683,12 @@ virLockManagerSanlockCreateLease(virLockManagerSanloc= kDriver *driver, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to initialize lease %s: %s"), + _("Unable to initialize lease %1$s: %2$= s"), res->disks[0].path, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to initialize lease %s"= ), + _("Unable to initialize lease %1$= s"), res->disks[0].path); } goto error_unlink; @@ -722,7 +721,7 @@ static int virLockManagerSanlockAddResource(virLockMana= ger *lock, =20 if (priv->res_count =3D=3D SANLK_MAX_RESOURCES) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many resources %d for object"), + _("Too many resources %1$d for object"), SANLK_MAX_RESOURCES); return -1; } @@ -757,7 +756,7 @@ static int virLockManagerSanlockAddResource(virLockMana= ger *lock, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown lock manager object type %d for domain l= ock object"), + _("Unknown lock manager object type %1$d for domain= lock object"), type); return -1; } @@ -788,7 +787,7 @@ virLockManagerSanlockRegisterKillscript(int sock, case VIR_DOMAIN_LOCK_FAILURE_IGNORE: case VIR_DOMAIN_LOCK_FAILURE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Failure action %s is not supported by sanlock"), + _("Failure action %1$s is not supported by sanlock"= ), virDomainLockFailureTypeToString(action)); return -1; } @@ -812,14 +811,13 @@ virLockManagerSanlockRegisterKillscript(int sock, /* sanlock_killpath() would just crop the strings */ if (strlen(path) >=3D SANLK_HELPER_PATH_LEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Sanlock helper path is longer than %d: '%s'"), + _("Sanlock helper path is longer than %1$d: '%2$s'"= ), SANLK_HELPER_PATH_LEN - 1, path); return -1; } if (strlen(args) >=3D SANLK_HELPER_ARGS_LEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Sanlock helper arguments are longer than %d:" - " '%s'"), + _("Sanlock helper arguments are longer than %1$d: '= %2$s'"), SANLK_HELPER_ARGS_LEN - 1, args); return -1; } @@ -828,7 +826,7 @@ virLockManagerSanlockRegisterKillscript(int sock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to register lock failure action: %s"), + _("Failed to register lock failure action: %1$s= "), NULLSTR(err)); VIR_FREE(err); } else { @@ -881,7 +879,7 @@ static int virLockManagerSanlockAcquire(virLockManager = *lock, char *err =3D NULL; if (virLockManagerSanlockError(sock, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open socket to sanlock daemon:= %s"), + _("Failed to open socket to sanlock daemon:= %1$s"), NULLSTR(err)); VIR_FREE(err); } else { @@ -919,12 +917,12 @@ static int virLockManagerSanlockAcquire(virLockManage= r *lock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse lock state %s: %s"), + _("Unable to parse lock state %1$s: %2$s"), state, NULLSTR(err)); VIR_FREE(err); } else { virReportSystemError(-rv, - _("Unable to parse lock state %s"), + _("Unable to parse lock state %1$s"), state); } goto error; @@ -943,7 +941,7 @@ static int virLockManagerSanlockAcquire(virLockManager = *lock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Failed to acquire lock: %s"), + _("Failed to acquire lock: %1$s"), NULLSTR(err)); VIR_FREE(err); } else { @@ -971,7 +969,7 @@ static int virLockManagerSanlockAcquire(virLockManager = *lock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to restrict process: %s"), + _("Failed to restrict process: %1$s"), NULLSTR(err)); VIR_FREE(err); } else { @@ -1027,7 +1025,7 @@ static int virLockManagerSanlockRelease(virLockManage= r *lock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to inquire lock: %s"), + _("Failed to inquire lock: %1$s"), NULLSTR(err)); VIR_FREE(err); } else { @@ -1046,7 +1044,7 @@ static int virLockManagerSanlockRelease(virLockManage= r *lock, char *err =3D NULL; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to release lock: %s"), + _("Failed to release lock: %1$s"), NULLSTR(err)); VIR_FREE(err); } else { @@ -1085,7 +1083,7 @@ static int virLockManagerSanlockInquire(virLockManage= r *lock, char *err; if (virLockManagerSanlockError(rv, &err)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to inquire lock: %s"), + _("Failed to inquire lock: %1$s"), NULLSTR(err)); VIR_FREE(err); } else { diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c index 5ab38785d4..6f5a7efdbc 100644 --- a/src/locking/lock_manager.c +++ b/src/locking/lock_manager.c @@ -43,7 +43,7 @@ VIR_LOG_INIT("locking.lock_manager"); #define CHECK_DRIVER(field, errret) \ if (!driver->field) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Missing '%s' field in lock manager driver"), \ + _("Missing '%1$s' field in lock manager driver"), \ #field); \ return errret; \ } @@ -51,7 +51,7 @@ VIR_LOG_INIT("locking.lock_manager"); #define CHECK_MANAGER(field, errret) \ if (!lock->driver->field) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Missing '%s' field in lock manager driver"), \ + _("Missing '%1$s' field in lock manager driver"), \ #field); \ return errret; \ } @@ -147,7 +147,7 @@ virLockManagerPlugin *virLockManagerPluginNew(const cha= r *name, =20 if (access(modfile, R_OK) < 0) { virReportSystemError(errno, - _("Plugin %s not accessible"), + _("Plugin %1$s not accessible"), modfile); goto cleanup; } @@ -155,7 +155,7 @@ virLockManagerPlugin *virLockManagerPluginNew(const cha= r *name, handle =3D dlopen(modfile, RTLD_NOW | RTLD_LOCAL); if (!handle) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to load plugin %s: %s"), + _("Failed to load plugin %1$s: %2$s"), modfile, dlerror()); goto cleanup; } diff --git a/src/locking/sanlock_helper.c b/src/locking/sanlock_helper.c index 0a2df9509f..1de52ef25c 100644 --- a/src/locking/sanlock_helper.c +++ b/src/locking/sanlock_helper.c @@ -15,7 +15,7 @@ getArgs(int argc, int act; =20 if (argc !=3D 4) { - fprintf(stderr, _("%s uri uuid action\n"), argv[0]); + fprintf(stderr, _("%1$s uri uuid action\n"), argv[0]); return -1; } =20 @@ -24,7 +24,7 @@ getArgs(int argc, =20 act =3D virDomainLockFailureTypeFromString(argv[3]); if (act < 0) { - fprintf(stderr, _("invalid failure action: '%s'\n"), argv[3]); + fprintf(stderr, _("invalid failure action: '%1$s'\n"), argv[3]); return -1; } *action =3D act; @@ -90,7 +90,7 @@ main(int argc, char **argv) case VIR_DOMAIN_LOCK_FAILURE_RESTART: case VIR_DOMAIN_LOCK_FAILURE_IGNORE: case VIR_DOMAIN_LOCK_FAILURE_LAST: - fprintf(stderr, _("unsupported failure action: '%s'\n"), + fprintf(stderr, _("unsupported failure action: '%1$s'\n"), virDomainLockFailureTypeToString(action)); break; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464731; cv=none; d=zohomail.com; s=zohoarc; b=e52SI5ulp4L5jU7vaf+eSMldiaNE7GCk5Q5bfw3lLkgogTYTAKRjtbYwbwSGDw7lS2Aka2XSJz2tWtc5Em5foY16ONSsTRDiodreeHxm5YbGsdPeoWEaxrDeZNmdUxZTjvQ6VVXcUyKG72OLdjgthT3rTooPZ7s6fsnC/KrDexs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464731; 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=BtN6M++X8D15ENxsBCBXBcbhed31V2BE0BbNTCUT8Wk=; b=lIalO9zJo66nSL8g/KJmqd376KMI5+hygSj9MQ8atidj+oCooF7cteIsEr6iei8iYQO8enGhhSxwb+6AlFgXGNppUJ3ygQV5+t16Yz7aYKyhq6EnUeAhYtY/meLJB9drY/bhAQd2xRJfA3dHZrw0FXL7vuh72PhvHjYnx/gCWcs= 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 1678464731326507.9705415334274; Fri, 10 Mar 2023 08:12: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-643-2bO5IAjINAmSpGrHoin9xA-1; Fri, 10 Mar 2023 11:11:16 -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 5FBB71C17441; Fri, 10 Mar 2023 16:10:39 +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 4CEB7440D8; Fri, 10 Mar 2023 16:10:39 +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 2F11A1946A4A; Fri, 10 Mar 2023 16:10:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C0BF41946A54 for ; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B671D2166B2B; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78A4B2166B2A for ; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464730; 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=BtN6M++X8D15ENxsBCBXBcbhed31V2BE0BbNTCUT8Wk=; b=YwyDKo9vpnaBsq45FIm3Mnf0kDAbBxp/gXVs+0iFVTdapfWCcP5AMC/J1I/e5rn1a47IMr MiuKZgcOxy3UebCS57TYxLv6t5RYJXbAgdCFBwdYeKCJ6Ldk4MpfKOkq6d7sS2OcwDRiCb f+PMNNG/XjVrv7Wq5NVU9rqvhZTk06c= X-MC-Unique: 2bO5IAjINAmSpGrHoin9xA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 18/51] logging: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:34 +0100 Message-Id: <534fade9c98455bbb115ab65fdb01157c8e26685.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678464733629100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/logging/log_cleaner.c | 2 +- src/logging/log_daemon.c | 26 +++++++++++++------------- src/logging/log_daemon_dispatch.c | 2 +- src/logging/log_handler.c | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c index 38f818f177..4ee91843aa 100644 --- a/src/logging/log_cleaner.c +++ b/src/logging/log_cleaner.c @@ -87,7 +87,7 @@ virLogCleanerParseFilename(const char *path, =20 if (virStrToLong_i(rotated_index_str, NULL, 10, rotated_index) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse rotated index from '%s'"), + _("Failed to parse rotated index from '%1$s'"), rotated_index_str); return NULL; } diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index b4db585810..daf7ef4b2f 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -190,7 +190,7 @@ virLogDaemonNewServerPostExecRestart(virNetDaemon *dmn, dmn); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected server name '%s' during restart"), + _("Unexpected server name '%1$s' during restart"), name); return NULL; } @@ -336,14 +336,14 @@ virLogDaemonClientNew(virNetServerClient *client, =20 if (!privileged) { if (geteuid() !=3D clientuid) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; } } else { if (clientuid !=3D 0) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; @@ -518,7 +518,7 @@ virLogDaemonPreExecRestart(const char *state_file, =20 if (virFileWriteStr(state_file, state, 0700) < 0) { virReportSystemError(errno, - _("Unable to save state file %s"), state_file= ); + _("Unable to save state file %1$s"), state_fi= le); return -1; } =20 @@ -540,7 +540,7 @@ virLogDaemonUsage(const char *argv0, bool privileged) fprintf(stderr, _("\n" "Usage:\n" - " %s [options]\n" + " %1$s [options]\n" "\n" "Options:\n" " -h | --help Display program help:\n" @@ -559,13 +559,13 @@ virLogDaemonUsage(const char *argv0, bool privileged) " Default paths:\n" "\n" " Configuration file (unless overridden by -f):\n" - " %s/libvirt/virtlogd.conf\n" + " %1$s/libvirt/virtlogd.conf\n" "\n" " Sockets:\n" - " %s/libvirt/virtlogd-sock\n" + " %2$s/libvirt/virtlogd-sock\n" "\n" " PID file (unless overridden by -p):\n" - " %s/virtlogd.pid\n" + " %3$s/virtlogd.pid\n" "\n"), SYSCONFDIR, RUNSTATEDIR, @@ -625,7 +625,7 @@ int main(int argc, char **argv) { =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 @@ -705,7 +705,7 @@ int main(int argc, char **argv) { /* Read the config file if it exists */ if (remote_config_file && virLogDaemonConfigLoadFile(config, remote_config_file, implicit_co= nf) < 0) { - VIR_ERROR(_("Can't load config file: %s: %s"), + VIR_ERROR(_("Can't load config file: %1$s: %2$s"), virGetLastErrorMessage(), remote_config_file); exit(EXIT_FAILURE); } @@ -764,7 +764,7 @@ int main(int argc, char **argv) { old_umask =3D umask(077); VIR_DEBUG("Ensuring run dir '%s' exists", run_dir); if (g_mkdir_with_parents(run_dir, 0777) < 0) { - VIR_ERROR(_("unable to create rundir %s: %s"), run_dir, + VIR_ERROR(_("unable to create rundir %1$s: %2$s"), run_dir, g_strerror(errno)); ret =3D VIR_DAEMON_ERR_RUNDIR; umask(old_umask); @@ -790,13 +790,13 @@ int main(int argc, char **argv) { =20 if (godaemon) { if (chdir("/") < 0) { - VIR_ERROR(_("cannot change to root directory: %s"), + VIR_ERROR(_("cannot change to root directory: %1$s"), g_strerror(errno)); goto cleanup; } =20 if ((statuswrite =3D virDaemonForkIntoBackground(argv[0])) < 0= ) { - VIR_ERROR(_("Failed to fork as daemon: %s"), + VIR_ERROR(_("Failed to fork as daemon: %1$s"), g_strerror(errno)); goto cleanup; } diff --git a/src/logging/log_daemon_dispatch.c b/src/logging/log_daemon_dis= patch.c index f7448155fc..f1c8163cca 100644 --- a/src/logging/log_daemon_dispatch.c +++ b/src/logging/log_daemon_dispatch.c @@ -117,7 +117,7 @@ virLogManagerProtocolDispatchDomainReadLogFile(virNetSe= rver *server G_GNUC_UNUSE =20 if (args->maxlen > VIR_LOG_MANAGER_PROTOCOL_STRING_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Requested data len %llu is larger than maximum %= d"), + _("Requested data len %1$llu is larger than maximum= %2$d"), (unsigned long long)args->maxlen, VIR_LOG_MANAGER_PROTOCOL_STRING_MAX); goto cleanup; diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index a739211c7c..71517bbbe5 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -354,7 +354,7 @@ virLogHandlerDomainOpenLogFile(virLogHandler *handler, if (STREQ(virRotatingFileWriterGetPath(handler->files[i]->file), path)) { virReportSystemError(EBUSY, - _("Cannot open log file: '%s'"), + _("Cannot open log file: '%1$s'"), path); goto error; } @@ -471,7 +471,7 @@ virLogHandlerDomainGetLogFilePosition(virLogHandler *ha= ndler, =20 if (!file) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No open log file %s"), + _("No open log file %1$s"), path); goto cleanup; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464684; cv=none; d=zohomail.com; s=zohoarc; b=LBXRhOg45GPcvF5HYf7uaO4VbIe/psC7JWCvUnGfNTk/N9At+FbLEb5t7NV8vUrC30ARyPO7dxf4pns7hnJGwiRVBXpTGTSEEvcXmuqxn03ldfwzm4daJBFNr3Ggratgf6HYCgfXtfnTzoe8y2C/eC08tXXkJcIk63fFTx4A2ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464684; 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=a261buZqROLzWO83O/vlX5zFUFCUFi2+hzjN2Jk9sgc=; b=a+Q57iZDepOU8nj+p2cbpa8DFMEZA68UK0RsCTw2CosZ5W5FYYoo8u1RcDSY9/L6IyMF9F9yyiiw3RFIHFy3OzlfiRZftGSSp8tQ2j6wlXE09dTNgNc+stdj0JPJffvp4FVHOq3nhxgrQgN02xMGNbm+w+bl2l5DLTfW9kxXST4= 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 1678464684750395.12913979182747; Fri, 10 Mar 2023 08:11:24 -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-102-mUDMumnmOY2hUaPpLCCFCw-1; Fri, 10 Mar 2023 11:11:15 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E568C100F914; Fri, 10 Mar 2023 16:10:40 +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 9AF4B492B09; Fri, 10 Mar 2023 16:10:40 +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 7FB991946A6F; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F70B1946A54 for ; Fri, 10 Mar 2023 16:10:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0CF39140EBF6; Fri, 10 Mar 2023 16:10:39 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E9AB140EBF4 for ; Fri, 10 Mar 2023 16:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464683; 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=a261buZqROLzWO83O/vlX5zFUFCUFi2+hzjN2Jk9sgc=; b=Xbe8J2ohPoXmFD5zRhLELtupd6PyRhJC/S0J93GEsXAMwnB5/5Lg3lHJLqIK7yuAa3kBQf tj65e19HiT442XjFMAUOfj/Vl78dG89q500MKOgrQqPOnbOiQRJF2K6pqf48C0IJPJaKnT J1aGVDef99AQ5wC7Obad8JhD5sjWCdU= X-MC-Unique: mUDMumnmOY2hUaPpLCCFCw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 19/51] lxc: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:35 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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.9 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: 1678464685164100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_container.c | 114 +++++++++++++++++++-------------------- src/lxc/lxc_controller.c | 78 +++++++++++++-------------- src/lxc/lxc_domain.c | 8 +-- src/lxc/lxc_driver.c | 104 +++++++++++++++++------------------ src/lxc/lxc_fuse.c | 4 +- src/lxc/lxc_hostdev.c | 6 +-- src/lxc/lxc_native.c | 26 ++++----- src/lxc/lxc_process.c | 38 ++++++------- 9 files changed, 190 insertions(+), 190 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index ee14570470..1b516bba73 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -382,7 +382,7 @@ virCgroup *virLXCCgroupCreate(virDomainDef *def, =20 if (!g_path_is_absolute(def->resource->partition)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Resource partition '%s' must start with '/'"), + _("Resource partition '%1$s' must start with '/'"), def->resource->partition); return NULL; } diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index a5401c2186..63cf283285 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -126,7 +126,7 @@ int lxcContainerHasReboot(void) =20 if (virStrToLong_i(buf, NULL, 10, &v) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed ctrl-alt-del setting '%s'"), buf); + _("Malformed ctrl-alt-del setting '%1$s'"), buf); return -1; } cmd =3D v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF; @@ -178,7 +178,7 @@ static virCommand *lxcContainerBuildInitCmd(virDomainDe= f *vmDef, for (i =3D 1; i < nttyPaths; i++) { if (!STRPREFIX(ttyPaths[i], "/dev/")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expected a /dev path for '%s'"), + _("Expected a /dev path for '%1$s'"), ttyPaths[i]); return NULL; } @@ -292,7 +292,7 @@ static int lxcContainerSetupFDs(int *ttyfd, =20 if (newfd < 0) { virReportSystemError(errno, - _("Cannot move fd %d out of the w= ay"), + _("Cannot move fd %1$d out of the= way"), passFDs[j]); goto cleanup; } @@ -310,7 +310,7 @@ static int lxcContainerSetupFDs(int *ttyfd, /* Finally we can move into our desired FD number */ if (dup2(passFDs[i], wantfd) < 0) { virReportSystemError(errno, - _("Cannot duplicate fd %d onto fd %d"), + _("Cannot duplicate fd %1$d onto fd %2$d"= ), passFDs[i], wantfd); goto cleanup; } @@ -532,7 +532,7 @@ static int lxcContainerUnmountSubtree(const char *prefi= x, /* This detaches the subtree */ if (umount2(mounts[nmounts-1], MNT_DETACH) < 0) { virReportSystemError(saveErrno, - _("Failed to unmount '%s' and could not d= etach subtree '%s'"), + _("Failed to unmount '%1$s' and could not= detach subtree '%2$s'"), failedUmount, mounts[nmounts-1]); return -1; } @@ -540,7 +540,7 @@ static int lxcContainerUnmountSubtree(const char *prefi= x, if (isOldRootFS && umount(mounts[nmounts-1]) < 0) { virReportSystemError(saveErrno, - _("Failed to unmount '%s' and could not u= nmount old root '%s'"), + _("Failed to unmount '%1$s' and could not= unmount old root '%2$s'"), failedUmount, mounts[nmounts-1]); return -1; } @@ -563,7 +563,7 @@ static int lxcContainerResolveSymlinks(virDomainFSDef *= fs, bool gentle) return 0; } else { virReportSystemError(errno, - _("Failed to access '%s'"), fs->src->path= ); + _("Failed to access '%1$s'"), fs->src->pa= th); return -1; } } @@ -575,7 +575,7 @@ static int lxcContainerResolveSymlinks(virDomainFSDef *= fs, bool gentle) return 0; } else { virReportSystemError(errno, - _("Failed to resolve symlink at %s"), + _("Failed to resolve symlink at %1$s"), fs->src->path); } return -1; @@ -612,7 +612,7 @@ static int lxcContainerPrepareRoot(virDomainDef *def, =20 if (root->type !=3D VIR_DOMAIN_FS_TYPE_BLOCK) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported root filesystem type %s"), + _("Unsupported root filesystem type %1$s"), virDomainFSTypeToString(root->type)); return -1; } @@ -656,7 +656,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) =20 if (g_mkdir_with_parents(oldroot, 0777) < 0) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), oldroot); return -1; } @@ -665,7 +665,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) * on separate filesystems */ if (mount("tmprootfs", oldroot, "tmpfs", 0, NULL) < 0) { virReportSystemError(errno, - _("Failed to mount empty tmpfs at %s"), + _("Failed to mount empty tmpfs at %1$s"), oldroot); return -1; } @@ -675,7 +675,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) =20 if (g_mkdir_with_parents(newroot, 0777) < 0) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), newroot); return -1; } @@ -683,7 +683,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) /* ... and mount our root onto it */ if (mount(root->src->path, newroot, "none", MS_BIND|MS_REC, NULL) < 0)= { virReportSystemError(errno, - _("Failed to bind %s to new root %s"), + _("Failed to bind %1$s to new root %2$s"), root->src->path, newroot); return -1; } @@ -691,7 +691,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) if (root->readonly) { if (mount(root->src->path, newroot, "none", MS_BIND|MS_REC|MS_RDON= LY|MS_REMOUNT, NULL) < 0) { virReportSystemError(errno, - _("Failed to make new root %s readonly"), + _("Failed to make new root %1$s readonly"= ), root->src->path); return -1; } @@ -701,7 +701,7 @@ static int lxcContainerPivotRoot(virDomainFSDef *root) * root->src bind-mounted onto '/new' */ if (chdir(newroot) < 0) { virReportSystemError(errno, - _("Failed to chdir into %s"), newroot); + _("Failed to chdir into %1$s"), newroot); return -1; } =20 @@ -800,7 +800,7 @@ static int lxcContainerSetReadOnly(void) VIR_DEBUG("Bind readonly %s", mounts[i]); if (mount(mounts[i], mounts[i], "none", MS_BIND|MS_REC|MS_RDONLY|M= S_REMOUNT, NULL) < 0) { virReportSystemError(errno, - _("Failed to make mount %s readonly"), + _("Failed to make mount %1$s readonly"), mounts[i]); return -1; } @@ -874,7 +874,7 @@ static int lxcContainerMountBasicFS(bool userns_enabled, =20 if (g_mkdir_with_parents(mnt->dst, 0777) < 0) { virReportSystemError(errno, - _("Failed to mkdir %s"), + _("Failed to mkdir %1$s"), mnt->dst); return -1; } @@ -892,7 +892,7 @@ static int lxcContainerMountBasicFS(bool userns_enabled, mnt_src, mnt->dst, mnt->type, mnt_mflags & ~MS_RDONLY); if (mount(mnt_src, mnt->dst, mnt->type, mnt_mflags & ~MS_RDONLY, N= ULL) < 0) { virReportSystemError(errno, - _("Failed to mount %s on %s type %s flags= =3D0x%x"), + _("Failed to mount %1$s on %2$s type %3$s= flags=3D0x%4$x"), mnt_src, mnt->dst, NULLSTR(mnt->type), mnt_mflags & ~MS_RDONLY); return -1; @@ -902,7 +902,7 @@ static int lxcContainerMountBasicFS(bool userns_enabled, mount(mnt_src, mnt->dst, "none", MS_BIND|MS_REMOUNT|mnt_mflags|MS_RDONLY, NULL) < 0) { virReportSystemError(errno, - _("Failed to re-mount %s on %s flags=3D0x= %x"), + _("Failed to re-mount %1$s on %2$s flags= =3D0x%3$x"), mnt_src, mnt->dst, MS_BIND|MS_REMOUNT|MS_RDONLY); return -1; @@ -927,7 +927,7 @@ static int lxcContainerMountProcFuse(virDomainDef *def, if (mount(meminfo_path, "/proc/meminfo", NULL, MS_BIND, NULL) < 0) { virReportSystemError(errno, - _("Failed to mount %s on /proc/meminfo"), + _("Failed to mount %1$s on /proc/meminfo"), meminfo_path); return -1; } @@ -963,7 +963,7 @@ static int lxcContainerMountFSDev(virDomainDef *def, =20 if (mount(path, "/dev", "none", flags, NULL) < 0) { virReportSystemError(errno, - _("Failed to mount %s on /dev"), + _("Failed to mount %1$s on /dev"), path); return -1; } @@ -992,7 +992,7 @@ static int lxcContainerMountFSDevPTS(virDomainDef *def, =20 if (mount(path, "/dev/pts", "none", flags, NULL) < 0) { virReportSystemError(errno, - _("Failed to mount %s on /dev/pts"), + _("Failed to mount %1$s on /dev/pts"), path); return -1; } @@ -1016,7 +1016,7 @@ static int lxcContainerSetupDevices(char **ttyPaths, = size_t nttyPaths) for (i =3D 0; i < G_N_ELEMENTS(links); i++) { if (symlink(links[i].src, links[i].dst) < 0) { virReportSystemError(errno, - _("Failed to symlink device %s to %s"), + _("Failed to symlink device %1$s to %2$s"= ), links[i].dst, links[i].src); return -1; } @@ -1052,20 +1052,20 @@ static int lxcContainerMountFSBind(virDomainFSDef *= fs, =20 if (stat(fs->dst, &st) < 0) { if (errno !=3D ENOENT) { - virReportSystemError(errno, _("Unable to stat bind target %s"), + virReportSystemError(errno, _("Unable to stat bind target %1$s= "), fs->dst); return -1; } /* ENOENT =3D> create the target dir or file */ if (stat(src, &st) < 0) { - virReportSystemError(errno, _("Unable to stat bind source %s"), + virReportSystemError(errno, _("Unable to stat bind source %1$s= "), src); return -1; } if (S_ISDIR(st.st_mode)) { if (g_mkdir_with_parents(fs->dst, 0777) < 0) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), fs->dst); return -1; } @@ -1075,14 +1075,14 @@ static int lxcContainerMountFSBind(virDomainFSDef *= fs, if (fd < 0) { if (errno !=3D EEXIST) { virReportSystemError(errno, - _("Failed to create bind target %= s"), + _("Failed to create bind target %= 1$s"), fs->dst); return -1; } } if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("Failed to close bind target %s"), + _("Failed to close bind target %1$s"), fs->dst); return -1; } @@ -1091,7 +1091,7 @@ static int lxcContainerMountFSBind(virDomainFSDef *fs, =20 if (mount(src, fs->dst, "none", MS_BIND, NULL) < 0) { virReportSystemError(errno, - _("Failed to bind mount directory %s to %s"), + _("Failed to bind mount directory %1$s to %2$= s"), src, fs->dst); return -1; } @@ -1100,7 +1100,7 @@ static int lxcContainerMountFSBind(virDomainFSDef *fs, VIR_DEBUG("Binding %s readonly", fs->dst); if (mount(src, fs->dst, "none", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL= ) < 0) { virReportSystemError(errno, - _("Failed to make directory %s readonly"), + _("Failed to make directory %1$s readonly= "), fs->dst); } } @@ -1123,7 +1123,7 @@ lxcContainerMountDetectFilesystem(const char *src, ch= ar **type) =20 if ((fd =3D open(src, O_RDONLY)) < 0) { virReportSystemError(errno, - _("Unable to open filesystem %s"), src); + _("Unable to open filesystem %1$s"), src); return -1; } =20 @@ -1134,7 +1134,7 @@ lxcContainerMountDetectFilesystem(const char *src, ch= ar **type) } if (blkid_probe_set_device(blkid, fd, 0, 0) < 0) { virReportSystemError(EINVAL, - _("Unable to associate device %s with blkid l= ibrary"), + _("Unable to associate device %1$s with blkid= library"), src); goto cleanup; } @@ -1150,11 +1150,11 @@ lxcContainerMountDetectFilesystem(const char *src, = char **type) =20 if (rc =3D=3D -2) { virReportSystemError(EINVAL, - _("Too many filesystems detected for %s"), + _("Too many filesystems detected for %1$s= "), src); } else { virReportSystemError(errno, - _("Unable to detect filesystem for %s"), + _("Unable to detect filesystem for %1$s"), src); } goto cleanup; @@ -1162,7 +1162,7 @@ lxcContainerMountDetectFilesystem(const char *src, ch= ar **type) =20 if (blkid_probe_lookup_value(blkid, "TYPE", &data, NULL) < 0) { virReportSystemError(ENOENT, - _("Unable to find filesystem type for %s"), + _("Unable to find filesystem type for %1$s"), src); goto cleanup; } @@ -1229,7 +1229,7 @@ static int lxcContainerMountFSBlockAuto(virDomainFSDe= f *fs, } =20 virReportSystemError(errno, - _("Unable to read %s"), + _("Unable to read %1$s"), fslist); goto cleanup; } @@ -1259,7 +1259,7 @@ static int lxcContainerMountFSBlockAuto(virDomainFSDe= f *fs, */ if (gotStar && !tryProc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s has unexpected '*' before last line"), + _("%1$s has unexpected '*' before last line"), fslist); goto cleanup; } @@ -1283,7 +1283,7 @@ static int lxcContainerMountFSBlockAuto(virDomainFSDe= f *fs, continue; =20 virReportSystemError(errno, - _("Failed to mount device %s to %s"), + _("Failed to mount device %1$s to %2$s"), src, fs->dst); goto cleanup; } @@ -1305,7 +1305,7 @@ static int lxcContainerMountFSBlockAuto(virDomainFSDe= f *fs, =20 if (ret !=3D 0) { virReportSystemError(ENODEV, - _("Failed to mount device %s to %s, unable to= detect filesystem"), + _("Failed to mount device %1$s to %2$s, unabl= e to detect filesystem"), src, fs->dst); } =20 @@ -1334,7 +1334,7 @@ static int lxcContainerMountFSBlockHelper(virDomainFS= Def *fs, =20 if (g_mkdir_with_parents(fs->dst, 0777) < 0) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), fs->dst); return -1; } @@ -1347,7 +1347,7 @@ static int lxcContainerMountFSBlockHelper(virDomainFS= Def *fs, src, fs->dst, format, sec_mount_options); if (mount(src, fs->dst, format, fsflags, sec_mount_options) < 0) { virReportSystemError(errno, - _("Failed to mount device %s to %s as %s"= ), + _("Failed to mount device %1$s to %2$s as= %3$s"), src, fs->dst, format); return -1; } @@ -1388,14 +1388,14 @@ static int lxcContainerMountFSTmpfs(virDomainFSDef = *fs, =20 if (g_mkdir_with_parents(fs->dst, 0777) < 0) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), fs->dst); return -1; } =20 if (mount("tmpfs", fs->dst, "tmpfs", MS_NOSUID|MS_NODEV, data) < 0) { virReportSystemError(errno, - _("Failed to mount directory %s as tmpfs"), + _("Failed to mount directory %1$s as tmpfs"), fs->dst); return -1; } @@ -1404,7 +1404,7 @@ static int lxcContainerMountFSTmpfs(virDomainFSDef *f= s, VIR_DEBUG("Binding %s readonly", fs->dst); if (mount(fs->dst, fs->dst, "none", MS_BIND|MS_REMOUNT|MS_RDONLY, = NULL) < 0) { virReportSystemError(errno, - _("Failed to make directory %s readonly"), + _("Failed to make directory %1$s readonly= "), fs->dst); return -1; } @@ -1439,7 +1439,7 @@ static int lxcContainerMountFS(virDomainFSDef *fs, * should have associated the file with a loopback * device and changed this to TYPE_BLOCK for us */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected filesystem type %s"), + _("Unexpected filesystem type %1$s"), virDomainFSTypeToString(fs->type)); return -1; case VIR_DOMAIN_FS_TYPE_TEMPLATE: @@ -1447,7 +1447,7 @@ static int lxcContainerMountFS(virDomainFSDef *fs, case VIR_DOMAIN_FS_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot mount filesystem type %s"), + _("Cannot mount filesystem type %1$s"), virDomainFSTypeToString(fs->type)); return -1; } @@ -1496,7 +1496,7 @@ int lxcContainerSetupHostdevCapsMakePath(const char *= dev) *tmp =3D '\0'; if (g_mkdir_with_parents(dir, 0777) < 0) { virReportSystemError(errno, - _("Failed to create directory for '%s' de= v '%s'"), + _("Failed to create directory for '%1$s' = dev '%2$s'"), dir, dev); return -1; } @@ -1747,7 +1747,7 @@ static int lxcContainerDropCapabilities(virDomainDef = *def, CAPNG_INHERITABLE | CAPNG_BOUNDING= _SET, capsMapping[i])) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to add capability %s: %d"), + _("Failed to add capability %1$s: %2$d"), virDomainProcessCapsFeatureTypeToString(i),= ret); return -1; } @@ -1779,7 +1779,7 @@ static int lxcContainerDropCapabilities(virDomainDef = *def, CAPNG_INHERITABLE | CAPNG_BO= UNDING_SET, capsMapping[i])) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to remove capability %s: %d"), + _("Failed to remove capability %1$s: %2$d"), virDomainProcessCapsFeatureTypeToString(i),= ret); return -1; } @@ -1794,7 +1794,7 @@ static int lxcContainerDropCapabilities(virDomainDef = *def, =20 if ((ret =3D capng_apply(CAPNG_SELECT_BOTH)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to apply capabilities: %d"), ret); + _("Failed to apply capabilities: %1$d"), ret); return -1; } =20 @@ -1850,7 +1850,7 @@ static int lxcContainerSetUserGroup(virCommand *cmd, =20 if (vmDef->os.inituser) { if (virGetUserID(vmDef->os.inituser, &uid) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("User %s doesn't exis= t"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("User %1$s doesn't ex= ist"), vmDef->os.inituser); return -1; } @@ -1860,7 +1860,7 @@ static int lxcContainerSetUserGroup(virCommand *cmd, * shells to have job control. */ if (chown(ttyPath, uid, -1) < 0) { virReportSystemError(errno, - _("Failed to change ownership of tty %s"), + _("Failed to change ownership of tty %1$s= "), ttyPath); return -1; } @@ -1868,7 +1868,7 @@ static int lxcContainerSetUserGroup(virCommand *cmd, =20 if (vmDef->os.initgroup) { if (virGetGroupID(vmDef->os.initgroup, &gid) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Group %s doesn't exi= st"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Group %1$s doesn't e= xist"), vmDef->os.initgroup); return -1; } @@ -1982,7 +1982,7 @@ static int lxcContainerChild(void *data) ttyfd =3D open(ttyPath, O_RDWR); if (ttyfd < 0) { virReportSystemError(errno, - _("Failed to open tty %s"), + _("Failed to open tty %1$s"), ttyPath); goto cleanup; } @@ -1998,7 +1998,7 @@ static int lxcContainerChild(void *data) =20 if (!virFileExists(vmDef->os.init)) { virReportSystemError(errno, - _("cannot find init path '%s' relative to con= tainer root"), + _("cannot find init path '%1$s' relative to c= ontainer root"), vmDef->os.init); goto cleanup; } @@ -2069,7 +2069,7 @@ static int lxcContainerChild(void *data) if (ret !=3D 0) { VIR_DEBUG("Tearing down container"); fprintf(stderr, - _("Failure in libvirt_lxc startup: %s\n"), + _("Failure in libvirt_lxc startup: %1$s\n"), virGetLastErrorMessage()); } =20 @@ -2218,7 +2218,7 @@ int lxcContainerChown(virDomainDef *def, const char *= path) =20 if (chown(path, uid, gid) < 0) { virReportSystemError(errno, - _("Failed to change owner of %s to %u:%u"), + _("Failed to change owner of %1$s to %2$u:%3$= u"), path, uid, gid); return -1; } diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 9be79fa356..60b961dcb5 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -367,7 +367,7 @@ static int virLXCControllerValidateNICs(virLXCControlle= r *ctrl) { if (ctrl->def->nnets !=3D ctrl->nveths) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("expecting %zu veths, but got %zu"), + _("expecting %1$zu veths, but got %2$zu"), ctrl->def->nnets, ctrl->nveths); return -1; } @@ -425,7 +425,7 @@ static int virLXCControllerGetNICIndexes(virLXCControll= er *ctrl) case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported net type %s"), + _("Unsupported net type %1$s"), virDomainNetTypeToString(actualType)); return -1; case VIR_DOMAIN_NET_TYPE_LAST: @@ -443,7 +443,7 @@ static int virLXCControllerValidateConsoles(virLXCContr= oller *ctrl) { if (ctrl->def->nconsoles !=3D ctrl->nconsoles) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("expecting %zu consoles, but got %zu tty file han= dlers"), + _("expecting %1$zu consoles, but got %2$zu tty file= handlers"), ctrl->def->nconsoles, ctrl->nconsoles); return -1; } @@ -581,7 +581,7 @@ static int virLXCControllerAppendNBDPids(virLXCControll= er *ctrl, loops++; } else { virReportSystemError(errno, - _("Cannot check NBD device %s pid"), + _("Cannot check NBD device %1$s pid"), dev + 5); return -1; } @@ -625,7 +625,7 @@ static int virLXCControllerSetupLoopDevices(virLXCContr= oller *ctrl) if (fs->format !=3D VIR_STORAGE_FILE_RAW && fs->format !=3D VIR_STORAGE_FILE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("fs format %s is not supported"), + _("fs format %1$s is not supported"), virStorageFileFormatTypeToString(fs->format= )); return -1; } @@ -648,7 +648,7 @@ static int virLXCControllerSetupLoopDevices(virLXCContr= oller *ctrl) return -1; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("fs driver %s is not supported"), + _("fs driver %1$s is not supported"), virDomainFSDriverTypeToString(fs->fsdriver)); return -1; } @@ -676,7 +676,7 @@ static int virLXCControllerSetupLoopDevices(virLXCContr= oller *ctrl) if (format !=3D VIR_STORAGE_FILE_RAW && format !=3D VIR_STORAGE_FILE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk format %s is not supported"), + _("disk format %1$s is not supported"), virStorageFileFormatTypeToString(format)); return -1; } @@ -696,7 +696,7 @@ static int virLXCControllerSetupLoopDevices(virLXCContr= oller *ctrl) if (disk->cachemode !=3D VIR_DOMAIN_DISK_CACHE_DEFAULT && disk->cachemode !=3D VIR_DOMAIN_DISK_CACHE_DISABLE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Disk cache mode %s is not supported"), + _("Disk cache mode %1$s is not supported"), virDomainDiskCacheTypeToString(disk->cachem= ode)); return -1; } @@ -710,7 +710,7 @@ static int virLXCControllerSetupLoopDevices(virLXCContr= oller *ctrl) return -1; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk driver %s is not supported"), + _("disk driver %1$s is not supported"), driver); return -1; } @@ -981,7 +981,7 @@ static int lxcControllerClearCapabilities(void) =20 if ((ret =3D capng_apply(CAPNG_SELECT_BOTH)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to apply capabilities: %d"), ret); + _("failed to apply capabilities: %1$d"), ret); return -1; } #else @@ -1366,7 +1366,7 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntry *m= ap, VIR_DEBUG("Set '%s' to '%s'", path, virBufferCurrentContent(&map_value= )); =20 if (virFileWriteStr(path, virBufferCurrentContent(&map_value), 0) < 0)= { - virReportSystemError(errno, _("unable write to %s"), path); + virReportSystemError(errno, _("unable write to %1$s"), path); return -1; } =20 @@ -1470,7 +1470,7 @@ static int virLXCControllerPopulateDevices(virLXCCont= roller *ctrl) if (mknod(path, S_IFCHR, dev) < 0 || chmod(path, devs[i].mode)) { virReportSystemError(errno, - _("Failed to make device %s"), + _("Failed to make device %1$s"), path); return -1; } @@ -1513,7 +1513,7 @@ virLXCControllerSetupTimers(virLXCController *ctrl) case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: case VIR_DOMAIN_TIMER_NAME_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(timer->name)); return -1; case VIR_DOMAIN_TIMER_NAME_RTC: @@ -1532,7 +1532,7 @@ virLXCControllerSetupTimers(virLXCController *ctrl) continue; =20 if (stat(timer_dev, &sb) < 0) { - virReportSystemError(errno, _("Unable to access %s"), + virReportSystemError(errno, _("Unable to access %1$s"), timer_dev); return -1; } @@ -1541,7 +1541,7 @@ virLXCControllerSetupTimers(virLXCController *ctrl) if (mknod(path, S_IFCHR, dev) < 0 || chmod(path, sb.st_mode)) { virReportSystemError(errno, - _("Failed to make device %s"), + _("Failed to make device %1$s"), path); return -1; } @@ -1577,13 +1577,13 @@ virLXCControllerSetupHostdevSubsysUSB(virDomainDef = *vmDef, =20 if (stat(src, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), src); + _("Unable to access %1$s"), src); return -1; } =20 if (!S_ISCHR(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("USB source %s was not a character device"), + _("USB source %1$s was not a character device"), src); return -1; } @@ -1592,7 +1592,7 @@ virLXCControllerSetupHostdevSubsysUSB(virDomainDef *v= mDef, =20 if (g_mkdir_with_parents(dstdir, 0777) < 0) { virReportSystemError(errno, - _("Unable to create %s"), dstdir); + _("Unable to create %1$s"), dstdir); return -1; } =20 @@ -1600,7 +1600,7 @@ virLXCControllerSetupHostdevSubsysUSB(virDomainDef *v= mDef, dstfile, major(sb.st_rdev), minor(sb.st_rdev)); if (mknod(dstfile, mode, sb.st_rdev) < 0) { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), dstfile); return -1; } @@ -1645,21 +1645,21 @@ virLXCControllerSetupHostdevCapsStorage(virDomainDe= f *vmDef, =20 if (stat(dev, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), + _("Unable to access %1$s"), dev); goto cleanup; } =20 if (!S_ISBLK(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Storage source %s must be a block device"), + _("Storage source %1$s must be a block device"), dev); goto cleanup; } =20 if (lxcContainerSetupHostdevCapsMakePath(dst) < 0) { virReportError(errno, - _("Failed to create directory for device %s"), + _("Failed to create directory for device %1$s"), dev); goto cleanup; } @@ -1670,7 +1670,7 @@ virLXCControllerSetupHostdevCapsStorage(virDomainDef = *vmDef, major(sb.st_rdev), minor(sb.st_rdev)); if (mknod(dst, mode, sb.st_rdev) < 0) { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), dst); goto cleanup; } @@ -1719,21 +1719,21 @@ virLXCControllerSetupHostdevCapsMisc(virDomainDef *= vmDef, =20 if (stat(dev, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), + _("Unable to access %1$s"), dev); goto cleanup; } =20 if (!S_ISCHR(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Storage source %s must be a character device"), + _("Storage source %1$s must be a character device"), dev); goto cleanup; } =20 if (lxcContainerSetupHostdevCapsMakePath(dst) < 0) { virReportError(errno, - _("Failed to create directory for device %s"), + _("Failed to create directory for device %1$s"), dst); goto cleanup; } @@ -1744,7 +1744,7 @@ virLXCControllerSetupHostdevCapsMisc(virDomainDef *vm= Def, major(sb.st_rdev), minor(sb.st_rdev)); if (mknod(dst, mode, sb.st_rdev) < 0) { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), dev); goto cleanup; } @@ -1776,7 +1776,7 @@ virLXCControllerSetupHostdevSubsys(virDomainDef *vmDe= f, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device mode %s"), + _("Unsupported host device mode %1$s"), virDomainHostdevSubsysTypeToString(def->source.subs= ys.type)); return -1; } @@ -1804,7 +1804,7 @@ virLXCControllerSetupHostdevCaps(virDomainDef *vmDef, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device mode %s"), + _("Unsupported host device mode %1$s"), virDomainHostdevCapsTypeToString(def->source.subsys= .type)); return -1; } @@ -1836,7 +1836,7 @@ virLXCControllerSetupAllHostdevs(virLXCController *ct= rl) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device mode %s"), + _("Unsupported host device mode %1$s"), virDomainHostdevModeTypeToString(def->mode)); return -1; } @@ -1873,13 +1873,13 @@ static int virLXCControllerSetupDisk(virLXCControll= er *ctrl, =20 if (stat(def->src->path, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), tmpsrc); + _("Unable to access %1$s"), tmpsrc); goto cleanup; } =20 if (!S_ISCHR(sb.st_mode) && !S_ISBLK(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Disk source %s must be a character/block device"= ), + _("Disk source %1$s must be a character/block devic= e"), tmpsrc); goto cleanup; } @@ -1901,7 +1901,7 @@ static int virLXCControllerSetupDisk(virLXCController= *ctrl, dst, major(sb.st_rdev), minor(sb.st_rdev), tmpsrc); if (mknod(dst, mode, sb.st_rdev) < 0) { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), dst); goto cleanup; } @@ -2013,7 +2013,7 @@ static int lxcSetPersonality(virDomainDef *def) VIR_DEBUG("Setting personality to %s", virArchToString(altArch)); if (personality(PER_LINUX32) < 0) { - virReportSystemError(errno, _("Unable to request personality f= or %s on %s"), + virReportSystemError(errno, _("Unable to request personality f= or %1$s on %2$s"), virArchToString(altArch), virArchToString(virArchFromHost())); return -1; @@ -2111,7 +2111,7 @@ virLXCControllerSetupDevPTS(virLXCController *ctrl) =20 if (g_mkdir_with_parents(devpts, 0777) < 0) { virReportSystemError(errno, - _("Failed to make path %s"), + _("Failed to make path %1$s"), devpts); return -1; } @@ -2130,7 +2130,7 @@ virLXCControllerSetupDevPTS(virLXCController *ctrl) devpts, MS_NOSUID, opts); if (mount("devpts", devpts, "devpts", MS_NOSUID, opts) < 0) { virReportSystemError(errno, - _("Failed to mount devpts on %s"), + _("Failed to mount devpts on %1$s"), devpts); return -1; } @@ -2488,7 +2488,7 @@ int main(int argc, char *argv[]) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 @@ -2673,7 +2673,7 @@ int main(int argc, char *argv[]) if (pid > 0) { if ((rc =3D virPidFileWrite(LXC_STATE_DIR, name, pid)) < 0) { virReportSystemError(-rc, - _("Unable to write pid file '%s/%s.pi= d'"), + _("Unable to write pid file '%1$s/%2$= s.pid'"), LXC_STATE_DIR, name); _exit(1); } @@ -2703,7 +2703,7 @@ int main(int argc, char *argv[]) cleanup: if (rc < 0) { fprintf(stderr, - _("Failure in libvirt_lxc startup: %s\n"), + _("Failure in libvirt_lxc startup: %1$s\n"), virGetLastErrorMessage()); } =20 diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index 1a39129f82..e8c87423bf 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -112,7 +112,7 @@ lxcDomainDefNamespaceParse(xmlXPathContextPtr ctxt, if ((feature =3D virLXCDomainNamespaceTypeFromString( (const char *)nodes[i]->name)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported Namespace feature: %s"), + _("unsupported Namespace feature: %1$s"), nodes[i]->name); goto cleanup; } @@ -127,7 +127,7 @@ lxcDomainDefNamespaceParse(xmlXPathContextPtr ctxt, if ((lxcDef->ns_source[feature] =3D virLXCDomainNamespaceSourceTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown LXC namespace source '%s'"), + _("Unknown LXC namespace source '%1$s'"), tmp); goto cleanup; } @@ -313,7 +313,7 @@ lxcDomainInitctlCallback(pid_t pid G_GNUC_UNUSED, if (errno =3D=3D ENOENT) continue; =20 - virReportSystemError(errno, _("Unable to stat %s"), fifo); + virReportSystemError(errno, _("Unable to stat %1$s"), fifo); return -1; } =20 @@ -361,7 +361,7 @@ virLXCDomainSetRunlevel(virDomainObj *vm, if (errno =3D=3D ENOENT) continue; =20 - virReportSystemError(errno, _("Unable to stat %s"), fifo); + virReportSystemError(errno, _("Unable to stat %1$s"), fifo); goto cleanup; } =20 diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index b1d53659d7..075b5eec94 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -104,7 +104,7 @@ lxcDomObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); return NULL; } @@ -137,7 +137,7 @@ static virDrvOpenStatus lxcConnectOpen(virConnectPtr co= nn, STRNEQ(conn->uri->path, "/") && STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected LXC URI path '%s', try lxc:///system"= ), + _("Unexpected LXC URI path '%1$s', try lxc:///syste= m"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -216,7 +216,7 @@ static virDomainPtr lxcDomainLookupByID(virConnectPtr c= onn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching id %d"), id); + _("No domain with matching id %1$d"), id); goto cleanup; } =20 @@ -243,7 +243,7 @@ static virDomainPtr lxcDomainLookupByUUID(virConnectPtr= conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching uuid '%s'"), uuidstr); + _("No domain with matching uuid '%1$s'"), uuidstr); goto cleanup; } =20 @@ -267,7 +267,7 @@ static virDomainPtr lxcDomainLookupByName(virConnectPtr= conn, vm =3D virDomainObjListFindByName(driver->domains, name); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching name '%s'"), name); + _("No domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -932,7 +932,7 @@ static char *lxcConnectDomainXMLFromNative(virConnectPt= r conn, =20 if (STRNEQ(nativeFormat, LXC_CONFIG_FORMAT)) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), nativeFormat); + _("unsupported config type %1$s"), nativeFormat); return NULL; } =20 @@ -1223,7 +1223,7 @@ static int lxcNodeGetSecurityModel(virConnectPtr conn, if (virStrcpy(secmodel->model, caps->host.secModels[0].model, VIR_SECURITY_MODEL_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security model string exceeds max %d bytes"), + _("security model string exceeds max %1$d bytes"), VIR_SECURITY_MODEL_BUFLEN - 1); return -1; } @@ -1231,7 +1231,7 @@ static int lxcNodeGetSecurityModel(virConnectPtr conn, if (virStrcpy(secmodel->doi, caps->host.secModels[0].doi, VIR_SECURITY_DOI_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security DOI string exceeds max %d bytes"), + _("security DOI string exceeds max %1$d bytes"), VIR_SECURITY_DOI_BUFLEN-1); return -1; } @@ -1499,7 +1499,7 @@ static int lxcStateInitialize(bool privileged, =20 if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { virReportSystemError(errno, - _("Failed to mkdir %s"), + _("Failed to mkdir %1$s"), cfg->stateDir); goto cleanup; } @@ -1621,7 +1621,7 @@ lxcConnectSupportsFeature(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; case VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION: @@ -1649,7 +1649,7 @@ static int lxcConnectGetVersion(virConnectPtr conn, u= nsigned long *version) return -1; =20 if (virStringParseVersion(version, ver.release, true) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown release: %s"), v= er.release); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown release: %1$s"),= ver.release); return -1; } =20 @@ -1688,7 +1688,7 @@ lxcDomainInterfaceAddresses(virDomainPtr dom, =20 default: virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unknown IP address data source %d"), + _("Unknown IP address data source %1$d"), source); break; } @@ -2051,13 +2051,13 @@ lxcDomainBlockStats(virDomainPtr dom, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); goto endjob; } =20 if (!disk->info.alias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing disk device alias name for %s"), disk->d= st); + _("missing disk device alias name for %1$s"), disk-= >dst); goto endjob; } =20 @@ -2135,13 +2135,13 @@ lxcDomainBlockStatsFlags(virDomainPtr dom, } else { if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); goto endjob; } =20 if (!disk->info.alias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing disk device alias name for %s"), dis= k->dst); + _("missing disk device alias name for %1$s"), d= isk->dst); goto endjob; } =20 @@ -2474,21 +2474,21 @@ static int lxcDomainSetAutostart(virDomainPtr dom, if (autostart) { if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) { virReportSystemError(errno, - _("Cannot create autostart directory %s"), + _("Cannot create autostart directory %1$s= "), cfg->autostartDir); goto endjob; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s to '%s'"), + _("Failed to create symlink '%1$s to '%2$= s'"), autostartLink, configFile); goto endjob; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno !=3D E= NOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto endjob; } @@ -2724,14 +2724,14 @@ lxcDomainOpenConsole(virDomainPtr dom, =20 if (!chr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find console device '%s'"), + _("cannot find console device '%1$s'"), dev_name ? dev_name : _("default")); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), + _("character device %1$s is not using a PTY"), dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -2762,7 +2762,7 @@ lxcDomainSendProcessSignal(virDomainPtr dom, =20 if (signum >=3D VIR_DOMAIN_PROCESS_SIGNAL_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("signum value %d is out of range"), + _("signum value %1$d is out of range"), signum); return -1; } @@ -2806,7 +2806,7 @@ lxcDomainSendProcessSignal(virDomainPtr dom, */ if (kill(victim, signum) < 0) { virReportSystemError(errno, - _("Unable to send %d signal to process %d"), + _("Unable to send %1$d signal to process %2$d= "), signum, victim); goto endjob; } @@ -2891,7 +2891,7 @@ lxcDomainShutdownFlags(virDomainPtr dom, if (kill(priv->initpid, SIGTERM) < 0 && errno !=3D ESRCH) { virReportSystemError(errno, - _("Unable to send SIGTERM to init pid %ll= u"), + _("Unable to send SIGTERM to init pid %1$= llu"), (long long)priv->initpid); goto endjob; } @@ -2966,7 +2966,7 @@ lxcDomainReboot(virDomainPtr dom, if (kill(priv->initpid, SIGHUP) < 0 && errno !=3D ESRCH) { virReportSystemError(errno, - _("Unable to send SIGTERM to init pid %ll= u"), + _("Unable to send SIGTERM to init pid %1$= llu"), (long long)priv->initpid); goto endjob; } @@ -2997,7 +2997,7 @@ lxcDomainAttachDeviceConfig(virDomainDef *vmdef, disk =3D dev->data.disk; if (virDomainDiskIndexByName(vmdef, disk->dst, true) >=3D 0) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s already exists."), disk->dst); + _("target %1$s already exists."), disk->dst); return -1; } virDomainDiskInsert(vmdef, disk); @@ -3144,7 +3144,7 @@ lxcDomainDetachDeviceConfig(virDomainDef *vmdef, disk =3D dev->data.disk; if (!(det_disk =3D virDomainDiskRemoveByName(vmdef, disk->dst))) { virReportError(VIR_ERR_INVALID_ARG, - _("no target device %s"), disk->dst); + _("no target device %1$s"), disk->dst); return -1; } virDomainDiskDefFree(det_disk); @@ -3228,7 +3228,7 @@ lxcDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNU= SED, =20 if (virFileMakeParentPath(data->file) < 0) { virReportSystemError(errno, - _("Unable to create %s"), data->file); + _("Unable to create %1$s"), data->file); goto cleanup; } =20 @@ -3243,7 +3243,7 @@ lxcDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNU= SED, data->file, major(data->dev), minor(data->dev)); if (mknod(data->file, data->mode, data->dev) < 0) { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), data->file); goto cleanup; } @@ -3301,7 +3301,7 @@ lxcDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNU= SED, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected device type %d"), + _("Unexpected device type %1$d"), data->def->type); goto cleanup; } @@ -3359,7 +3359,7 @@ lxcDomainAttachDeviceUnlinkHelper(pid_t pid G_GNUC_UN= USED, VIR_DEBUG("Unlinking %s", path); if (unlink(path) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove device %s"), path); + _("Unable to remove device %1$s"), path); return -1; } =20 @@ -3423,19 +3423,19 @@ lxcDomainAttachDeviceDiskLive(virLXCDriver *driver, =20 if (virDomainDiskIndexByName(vm->def, def->dst, true) >=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s already exists"), def->dst); + _("target %1$s already exists"), def->dst); goto cleanup; } =20 if (stat(src, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), src); + _("Unable to access %1$s"), src); goto cleanup; } =20 if (!S_ISBLK(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Disk source %s must be a block device"), + _("Disk source %1$s must be a block device"), src); goto cleanup; } @@ -3648,13 +3648,13 @@ lxcDomainAttachDeviceHostdevSubsysUSBLive(virLXCDri= ver *driver, =20 if (stat(src, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), src); + _("Unable to access %1$s"), src); goto cleanup; } =20 if (!S_ISCHR(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("USB source %s was not a character device"), + _("USB source %1$s was not a character device"), src); goto cleanup; } @@ -3717,14 +3717,14 @@ lxcDomainAttachDeviceHostdevStorageLive(virLXCDrive= r *driver, =20 if (stat(def->source.caps.u.storage.block, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), + _("Unable to access %1$s"), def->source.caps.u.storage.block); goto cleanup; } =20 if (!S_ISBLK(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Hostdev source %s must be a block device"), + _("Hostdev source %1$s must be a block device"), def->source.caps.u.storage.block); goto cleanup; } @@ -3790,14 +3790,14 @@ lxcDomainAttachDeviceHostdevMiscLive(virLXCDriver *= driver, =20 if (stat(def->source.caps.u.misc.chardev, &sb) < 0) { virReportSystemError(errno, - _("Unable to access %s"), + _("Unable to access %1$s"), def->source.caps.u.misc.chardev); goto cleanup; } =20 if (!S_ISCHR(sb.st_mode)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Hostdev source %s must be a block device"), + _("Hostdev source %1$s must be a block device"), def->source.caps.u.misc.chardev); goto cleanup; } @@ -3850,7 +3850,7 @@ lxcDomainAttachDeviceHostdevSubsysLive(virLXCDriver *= driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device type %s"), + _("Unsupported host device type %1$s"), virDomainHostdevSubsysTypeToString(dev->data.hostde= v->source.subsys.type)); return -1; } @@ -3871,7 +3871,7 @@ lxcDomainAttachDeviceHostdevCapsLive(virLXCDriver *dr= iver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device type %s"), + _("Unsupported host device type %1$s"), virDomainHostdevCapsTypeToString(dev->data.hostdev-= >source.caps.type)); return -1; } @@ -3906,7 +3906,7 @@ lxcDomainAttachDeviceHostdevLive(virLXCDriver *driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device mode %s"), + _("Unsupported host device mode %1$s"), virDomainHostdevModeTypeToString(dev->data.hostdev-= >mode)); return -1; } @@ -3966,7 +3966,7 @@ lxcDomainAttachDeviceLive(virLXCDriver *driver, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be attached"), + _("device type '%1$s' cannot be attached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -3995,7 +3995,7 @@ lxcDomainDetachDeviceDiskLive(virDomainObj *vm, dev->data.disk->dst, false)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("disk %s not found"), dev->data.disk->dst); + _("disk %1$s not found"), dev->data.disk->dst); return -1; } =20 @@ -4193,7 +4193,7 @@ lxcDomainDetachDeviceHostdevStorageLive(virDomainObj = *vm, dev->data.hostdev, &def)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("hostdev %s not found"), + _("hostdev %1$s not found"), dev->data.hostdev->source.caps.u.storage.block); return -1; } @@ -4240,7 +4240,7 @@ lxcDomainDetachDeviceHostdevMiscLive(virDomainObj *vm, dev->data.hostdev, &def)) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("hostdev %s not found"), + _("hostdev %1$s not found"), dev->data.hostdev->source.caps.u.misc.chardev); return -1; } @@ -4280,7 +4280,7 @@ lxcDomainDetachDeviceHostdevSubsysLive(virLXCDriver *= driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device type %s"), + _("Unsupported host device type %1$s"), virDomainHostdevSubsysTypeToString(dev->data.hostde= v->source.subsys.type)); return -1; } @@ -4300,7 +4300,7 @@ lxcDomainDetachDeviceHostdevCapsLive(virDomainObj *vm, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device type %s"), + _("Unsupported host device type %1$s"), virDomainHostdevCapsTypeToString(dev->data.hostdev-= >source.caps.type)); return -1; } @@ -4329,7 +4329,7 @@ lxcDomainDetachDeviceHostdevLive(virLXCDriver *driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported host device mode %s"), + _("Unsupported host device mode %1$s"), virDomainHostdevModeTypeToString(dev->data.hostdev-= >mode)); return -1; } @@ -4382,7 +4382,7 @@ lxcDomainDetachDeviceLive(virLXCDriver *driver, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device type '%s' cannot be detached"), + _("device type '%1$s' cannot be detached"), virDomainDeviceTypeToString(dev->type)); break; } @@ -5064,7 +5064,7 @@ lxcDomainGetHostname(virDomainPtr dom, =20 if (!hostname) { virReportError(VIR_ERR_NO_HOSTNAME, - _("no hostname found for domain %s"), + _("no hostname found for domain %1$s"), vm->def->name); goto endjob; } diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index a99b44327f..a11cbbaff7 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -208,7 +208,7 @@ lxcProcReadMeminfo(char *hostpath, =20 fp =3D fopen(hostpath, "r"); if (fp =3D=3D NULL) { - virReportSystemError(errno, _("Cannot open %s"), hostpath); + virReportSystemError(errno, _("Cannot open %1$s"), hostpath); return -errno; } =20 @@ -373,7 +373,7 @@ lxcSetupFuse(struct virLXCFuse **f, fuse->mountpoint =3D g_strdup_printf("%s/%s.fuse/", LXC_STATE_DIR, def= ->name); =20 if (g_mkdir_with_parents(fuse->mountpoint, 0777) < 0) { - virReportSystemError(errno, _("Cannot create %s"), + virReportSystemError(errno, _("Cannot create %1$s"), fuse->mountpoint); goto error; } diff --git a/src/lxc/lxc_hostdev.c b/src/lxc/lxc_hostdev.c index ceb637955b..d18d61cb19 100644 --- a/src/lxc/lxc_hostdev.c +++ b/src/lxc/lxc_hostdev.c @@ -78,7 +78,7 @@ int virLXCPrepareHostDevices(virLXCDriver *driver, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported hostdev type %s"), + _("Unsupported hostdev type %1$s"), virDomainHostdevSubsysTypeToString(dev->sou= rce.subsys.type)); return -1; } @@ -92,7 +92,7 @@ int virLXCPrepareHostDevices(virLXCDriver *driver, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported hostdev type %s"), + _("Unsupported hostdev type %1$s"), virDomainHostdevSubsysTypeToString(dev->sou= rce.subsys.type)); return -1; } @@ -101,7 +101,7 @@ int virLXCPrepareHostDevices(virLXCDriver *driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported hostdev mode %s"), + _("Unsupported hostdev mode %1$s"), virDomainHostdevModeTypeToString(dev->mode)); return -1; } diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 3d0060e1b0..d311f5a5ad 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -221,7 +221,7 @@ lxcConvertSize(const char *size, unsigned long long *va= lue) =20 if (STREQ(unit, "%")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("can't convert relative size: '%s'"), + _("can't convert relative size: '%1$s'"), size); return -1; } else { @@ -233,7 +233,7 @@ lxcConvertSize(const char *size, unsigned long long *va= lue) =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to convert size: '%s'"), + _("failed to convert size: '%1$s'"), size); return -1; } @@ -543,7 +543,7 @@ lxcNetworkParseDataIPs(const char *name, virStrToLong_ui(ipparts[1], NULL, 10, &ip->prefix) < 0) { =20 virReportError(VIR_ERR_INVALID_ARG, - _("Invalid CIDR address: '%s'"), value->str); + _("Invalid CIDR address: '%1$s'"), value->str); return -1; } =20 @@ -772,7 +772,7 @@ lxcCreateConsoles(virDomainDef *def, virConf *propertie= s) } =20 if (virStrToLong_i(value, NULL, 10, &nbttys) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse int: '%s= '"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse int: '%1= $s'"), value); return -1; } @@ -815,7 +815,7 @@ lxcIdmapWalkCallback(const char *name, virConfValue *va= lue, void *data) =20 if (sscanf(value->str, "%c %lu %lu %lu", &type, &target, &start, &count) !=3D 4) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid %s: '%s'"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid %1$s: '%2$s'"), name, value->str); return -1; } @@ -903,7 +903,7 @@ lxcSetCpuTune(virDomainDef *def, virConf *properties) =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse integer: '%s'"), value); + _("failed to parse integer: '%1$s'"), value); return -1; } =20 @@ -955,7 +955,7 @@ lxcBlkioDeviceWalkCallback(const char *name, virConfVal= ue *value, void *data) =20 if (!parts[0] || !parts[1]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid %s value: '%s'"), + _("invalid %1$s value: '%2$s'"), name, value->str); return -1; } @@ -978,34 +978,34 @@ lxcBlkioDeviceWalkCallback(const char *name, virConfV= alue *value, void *data) if (STREQ(name, "lxc.cgroup.blkio.device_weight")) { if (virStrToLong_ui(parts[1], NULL, 10, &device->weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse device weight: '%s'"), parts= [1]); + _("failed to parse device weight: '%1$s'"), par= ts[1]); return -1; } } else if (STREQ(name, "lxc.cgroup.blkio.throttle.read_bps_device")) { if (virStrToLong_ull(parts[1], NULL, 10, &device->rbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse read_bps_device: '%s'"), + _("failed to parse read_bps_device: '%1$s'"), parts[1]); return -1; } } else if (STREQ(name, "lxc.cgroup.blkio.throttle.write_bps_device")) { if (virStrToLong_ull(parts[1], NULL, 10, &device->wbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse write_bps_device: '%s'"), + _("failed to parse write_bps_device: '%1$s'"), parts[1]); return -1; } } else if (STREQ(name, "lxc.cgroup.blkio.throttle.read_iops_device")) { if (virStrToLong_ui(parts[1], NULL, 10, &device->riops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse read_iops_device: '%s'"), + _("failed to parse read_iops_device: '%1$s'"), parts[1]); return -1; } } else if (STREQ(name, "lxc.cgroup.blkio.throttle.write_iops_device"))= { if (virStrToLong_ui(parts[1], NULL, 10, &device->wiops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse write_iops_device: '%s'"), + _("failed to parse write_iops_device: '%1$s'"), parts[1]); return -1; } @@ -1025,7 +1025,7 @@ lxcSetBlkioTune(virDomainDef *def, virConf *propertie= s) &value) > 0) { if (virStrToLong_ui(value, NULL, 10, &def->blkio.weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse integer: '%s'"), value); + _("failed to parse integer: '%1$s'"), value); return -1; } } diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 14fe60b074..d003742fa1 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -404,7 +404,7 @@ static int virLXCProcessSetupNamespaceName(virLXCDriver= *driver, vm =3D virDomainObjListFindByName(driver->domains, name); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("No domain with matching name '%s'"), name); + _("No domain with matching name '%1$s'"), name); return -1; } =20 @@ -420,7 +420,7 @@ static int virLXCProcessSetupNamespaceName(virLXCDriver= *driver, =20 if ((fd =3D open(path, O_RDONLY)) < 0) { virReportSystemError(errno, - _("failed to open ns %s"), + _("failed to open ns %1$s"), virLXCDomainNamespaceTypeToString(ns_type)); goto cleanup; } @@ -438,7 +438,7 @@ static int virLXCProcessSetupNamespacePID(int ns_type, = const char *name) int fd =3D open(path, O_RDONLY); if (fd < 0) { virReportSystemError(errno, - _("failed to open ns %s"), + _("failed to open ns %1$s"), virLXCDomainNamespaceTypeToString(ns_type)); return -1; } @@ -461,7 +461,7 @@ static int virLXCProcessSetupNamespaceNet(int ns_type, = const char *name) fd =3D open(path, O_RDONLY); if (fd < 0) { virReportSystemError(errno, - _("failed to open netns %s"), name); + _("failed to open netns %1$s"), name); return -1; } return fd; @@ -600,7 +600,7 @@ virLXCProcessSetupInterfaces(virLXCDriver *driver, case VIR_DOMAIN_NET_TYPE_VDS: case VIR_DOMAIN_NET_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unsupported network type %s"), + _("Unsupported network type %1$s"), virDomainNetTypeToString(type)); goto cleanup; =20 @@ -752,7 +752,7 @@ virLXCProcessGetNsInode(pid_t pid, =20 if (stat(path, &sb) < 0) { virReportSystemError(errno, - _("Unable to stat %s"), path); + _("Unable to stat %1$s"), path); return -1; } =20 @@ -883,7 +883,7 @@ int virLXCProcessStop(virLXCDriver *driver, * libvirt_lxc process */ if (virProcessKillPainfully(vm->pid, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Processes %d refused to die"), (int)vm->pid); + _("Processes %1$d refused to die"), (int)vm->pi= d); return -1; } } @@ -1049,7 +1049,7 @@ virLXCProcessReadLogOutputData(virDomainObj *vm, =20 if (got =3D=3D buflen-1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Out of space while reading log output: %s"), + _("Out of space while reading log output: %1$s"= ), buf); return -1; } @@ -1062,7 +1062,7 @@ virLXCProcessReadLogOutputData(virDomainObj *vm, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Timed out while reading log output: %s"), + _("Timed out while reading log output: %1$s"), buf); =20 return -1; @@ -1080,14 +1080,14 @@ virLXCProcessReadLogOutput(virDomainObj *vm, =20 if ((fd =3D open(logfile, O_RDONLY)) < 0) { virReportSystemError(errno, - _("Unable to open log file %s"), + _("Unable to open log file %1$s"), logfile); return -1; } =20 if (lseek(fd, pos, SEEK_SET) < 0) { virReportSystemError(errno, - _("Unable to seek log file %s to %llu"), + _("Unable to seek log file %1$s to %2$llu"), logfile, (unsigned long long)pos); return -1; } @@ -1127,7 +1127,7 @@ virLXCProcessReportStartupLogError(virDomainObj *vm, return 0; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("guest failed to start: %s"), errbuf); + _("guest failed to start: %1$s"), errbuf); =20 return -1; } @@ -1238,7 +1238,7 @@ int virLXCProcessStart(virLXCDriver * driver, =20 if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) { virReportSystemError(errno, - _("Cannot create log directory '%s'"), + _("Cannot create log directory '%1$s'"), cfg->logDir); return -1; } @@ -1349,7 +1349,7 @@ int virLXCProcessStart(virLXCDriver * driver, if ((logfd =3D open(logfile, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR|S_IWUSR)) < 0) { virReportSystemError(errno, - _("Failed to open '%s'"), + _("Failed to open '%1$s'"), logfile); goto cleanup; } @@ -1410,7 +1410,7 @@ int virLXCProcessStart(virLXCDriver * driver, /* In case there isn't an error in the logs report one based on th= e exit status */ if (WIFEXITED(status)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("guest failed to start: unexpected exit statu= s %d"), + _("guest failed to start: unexpected exit statu= s %1$d"), WEXITSTATUS(status)); } else { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -1425,7 +1425,7 @@ int virLXCProcessStart(virLXCDriver * driver, goto cleanup; =20 /* In case there isn't an error in the logs report that we failed = to read the pidfile */ - virReportSystemError(-r, _("Failed to read pid file %s"), pidfile); + virReportSystemError(-r, _("Failed to read pid file %1$s"), pidfil= e); goto cleanup; } =20 @@ -1477,7 +1477,7 @@ int virLXCProcessStart(virLXCDriver * driver, =20 if (!priv->cgroup) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No valid cgroup for machine %s"), + _("No valid cgroup for machine %1$s"), vm->def->name); goto cleanup; } @@ -1568,7 +1568,7 @@ virLXCProcessAutostartDomain(virDomainObj *vm, virDomainAuditStart(vm, "booted", rc >=3D 0); =20 if (rc < 0) { - VIR_ERROR(_("Failed to autostart VM '%s': %s"), + VIR_ERROR(_("Failed to autostart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); return -1; @@ -1668,7 +1668,7 @@ virLXCProcessReconnectDomain(virDomainObj *vm, =20 if (!priv->cgroup) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No valid cgroup for machine %s"), + _("No valid cgroup for machine %1$s"), vm->def->name); goto error; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464691; cv=none; d=zohomail.com; s=zohoarc; b=XTtkyh4rlN7LN3X43S9AvBDF91yEDhqM7Qb2vf/RC9QXHJCEFB9xvppt/HaJxTn/h5oeuef9FV14S4i8rKKLem1Z8nfflM5hofjR+PtI/a1FVZSbCPVs5W3BMJmK6BR7cS5R3LGs0sq9/nXtZ91pqkZIbGGgIqRANoXi6IPMsvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464691; 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=5ycBh9RdGVlZpdswGk0Bt+QGV02rfWf+5YJ9wE5QNSs=; b=JKd7amZlLA0FtQKh1QfsVZBd6YXaApjV6IsieXdZJaB3cPYm/uDRUvF50uTEU7UnPrCnOjfVVrZN6IzHsNXprDXxjx3MtHBbWGM9iShNB4Eu1TmssFPgn76bgse2E511YFt+uoQD5fabZoQvnJ6PcJlZC01b7WsLVvmz5SaiTyc= 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 1678464691611372.96365375309085; Fri, 10 Mar 2023 08:11:31 -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-369-m0AhDcfiO3ubWQasumxVdw-1; Fri, 10 Mar 2023 11:11:24 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12CBD3815F75; Fri, 10 Mar 2023 16:10:45 +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 ED2E7492B07; Fri, 10 Mar 2023 16:10:44 +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 DCADD1946A75; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 64FA31946A73 for ; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5C17B2166B2A; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA7862166B37 for ; Fri, 10 Mar 2023 16:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464690; 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=5ycBh9RdGVlZpdswGk0Bt+QGV02rfWf+5YJ9wE5QNSs=; b=G+pA7gwk6ZTHG1D8bgNPffvn8uPHelezqXchn8u/yQj+645XMCJ8KOk+4G+lOxVkn8HRoN vCxnYNlDd7j7Mvg1TGR8tPqB+2qcrauwxLVpgGF4T1eZbMmBhSu8BFIsaYJV7q3bn32LY9 u+Mz4WinAzAIno6lmJmGwa/+tRj03ZM= X-MC-Unique: m0AhDcfiO3ubWQasumxVdw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 20/51] network: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:36 +0100 Message-Id: <7dd481a79067ff0281c3d89d71b34efaa1ecd711.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.9 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: 1678464693168100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/network/bridge_driver.c | 188 +++++++++++------------------- src/network/bridge_driver_conf.c | 2 +- src/network/bridge_driver_linux.c | 12 +- src/network/leaseshelper.c | 12 +- 4 files changed, 81 insertions(+), 133 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 3fa56bfc09..97e099880b 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -248,7 +248,7 @@ networkObjFromNetwork(virNetworkPtr net) if (!obj) { virUUIDFormat(net->uuid, uuidstr); virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching uuid '%s' (%s)"), + _("no network with matching uuid '%1$s' (%2$s)"), uuidstr, net->name); } =20 @@ -827,7 +827,7 @@ networkConnectSupportsFeature(virConnectPtr conn, int f= eature) 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; case VIR_DRV_FEATURE_MIGRATION_V2: @@ -937,8 +937,7 @@ networkDnsmasqConfLocalPTRs(virBuffer *buf, if (rc =3D=3D -2) { int family =3D VIR_SOCKET_ADDR_FAMILY(&ip->address); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PTR domain for %s network with prefix %u= " - "cannot be automatically created"), + _("PTR domain for %1$s network with prefix = %2$u cannot be automatically created"), (family =3D=3D AF_INET) ? "IPv4" : "IPv6", virNetworkIPDefPrefix(ip)); } @@ -968,7 +967,7 @@ networkDnsmasqConfDHCP(virBuffer *buf, prefix =3D virNetworkIPDefPrefix(ipdef); if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge '%s' has an invalid prefix"), + _("bridge '%1$s' has an invalid prefix"), bridge); return -1; } @@ -993,8 +992,7 @@ networkDnsmasqConfDHCP(virBuffer *buf, =20 if (virSocketAddrPrefixToNetmask(prefix, &netmask, AF_INET) < = 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to translate bridge '%s' " - "prefix %d to netmask"), + _("Failed to translate bridge '%1$s' prefix= %2$d to netmask"), bridge, prefix); return -1; } @@ -1247,15 +1245,13 @@ networkDnsmasqConfContents(virNetworkObj *obj, */ if (!dns->srvs[i].service) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing required 'service' " - "attribute in SRV record of network '%s'"= ), + _("Missing required 'service' attribute in = SRV record of network '%1$s'"), def->name); return -1; } if (!dns->srvs[i].protocol) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing required 'service' " - "attribute in SRV record of network '%s'"= ), + _("Missing required 'service' attribute in = SRV record of network '%1$s'"), def->name); return -1; } @@ -1433,7 +1429,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverSta= te *driver, /* Write the file */ if (virFileWriteStr(configfile, configstr, 0600) < 0) { virReportSystemError(errno, - _("couldn't write dnsmasq config file '%s'"), + _("couldn't write dnsmasq config file '%1$s'"= ), configfile); return -1; } @@ -1487,7 +1483,7 @@ networkStartDhcpDaemon(virNetworkDriverState *driver, return 0; =20 if (g_mkdir_with_parents(cfg->pidDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create directory %s"), cfg->= pidDir); + virReportSystemError(errno, _("cannot create directory %1$s"), cfg= ->pidDir); return -1; } =20 @@ -1496,7 +1492,7 @@ networkStartDhcpDaemon(virNetworkDriverState *driver, =20 if (g_mkdir_with_parents(cfg->dnsmasqStateDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create directory %s"), + _("cannot create directory %1$s"), cfg->dnsmasqStateDir); return -1; } @@ -1778,7 +1774,7 @@ networkSetIPv6Sysctl(const char *bridge, =20 if (virFileWriteStr(field, sysctl_setting, 0) < 0) { virReportSystemError(errno, - _("cannot write to '%s' on bridge '%s'"), + _("cannot write to '%1$s' on bridge '%2$s'"), field, bridge); return -1; } @@ -1839,7 +1835,7 @@ networkAddAddrToBridge(virNetworkObj *obj, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge '%s' has an invalid netmask or IP address= "), + _("bridge '%1$s' has an invalid netmask or IP addre= ss"), def->bridge); return -1; } @@ -1879,8 +1875,7 @@ networkAddRouteToBridge(virNetworkObj *obj, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' has an invalid netmask " - "or IP address in route definition"), + _("network '%1$s' has an invalid netmask or IP addr= ess in route definition"), def->name); return -1; } @@ -1922,7 +1917,7 @@ networkStartNetworkVirtual(virNetworkDriverState *dri= ver, * conscience, log an error and fail at this point. */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' has no bridge name defined"), + _("network '%1$s' has no bridge name defined"), def->name); return -1; } @@ -2148,7 +2143,7 @@ networkCreateInterfacePool(virNetworkDef *netdef) =20 if (virNetDevGetVirtualFunctions(netdef->forward.pfs->dev, &vfs) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get Virtual functions on %s"), + _("Could not get Virtual functions on %1$s"), netdef->forward.pfs->dev); goto cleanup; } @@ -2207,7 +2202,7 @@ networkCreateInterfacePool(virNetworkDef *netdef) * failure */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("No usable Vf's present on SRIOV PF %s"), + _("No usable Vf's present on SRIOV PF %1$s"), netdef->forward.pfs->dev); goto cleanup; } @@ -2431,7 +2426,7 @@ networkLookupByUUID(virConnectPtr conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching uuid '%s'"), + _("no network with matching uuid '%1$s'"), uuidstr); goto cleanup; } @@ -2460,7 +2455,7 @@ networkLookupByName(virConnectPtr conn, obj =3D virNetworkObjFindByName(driver->networks, name); if (!obj) { virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching name '%s'"), name); + _("no network with matching name '%1$s'"), name); goto cleanup; } def =3D virNetworkObjGetDef(obj); @@ -2670,7 +2665,7 @@ networkFindUnusedBridgeName(virNetworkObjList *nets, } while (++id <=3D MAX_BRIDGE_ID); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Bridge generation exceeded max id %d"), + _("Bridge generation exceeded max id %1$d"), MAX_BRIDGE_ID); return -1; } @@ -2692,7 +2687,7 @@ networkBridgeNameValidate(virNetworkObjList *nets, if (def->bridge && !strstr(def->bridge, "%d")) { if (virNetworkObjBridgeInUse(nets, def->bridge, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge name '%s' already in use."), + _("bridge name '%1$s' already in use."), def->bridge); return -1; } @@ -2755,32 +2750,28 @@ networkValidate(virNetworkDriverState *driver, */ if (def->mac_specified) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wi= th forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (virNetworkDefGetIPByIndex(def, AF_UNSPEC, 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wit= h forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (def->dns.ntxts || def->dns.nhosts || def->dns.nsrvs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wi= th forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (def->domain) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s= with forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; @@ -2796,8 +2787,7 @@ networkValidate(virNetworkDriverState *driver, if (def->bandwidth && !bandwidthAllowed) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported network-wide element " - "in network %s with forward mode=3D'%s'"), + _("Unsupported network-wide element in = network %1$s with forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type)); return -1; @@ -2825,11 +2815,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (def->forward.type =3D=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev network '%s' lists '%s' " - "in the device pool, but hostdev " - "networks require all devices to " - "be listed by PCI address, not " - "network device name"), + _("hostdev network '%1$s' lists '%2$s' in t= he device pool, but hostdev networks require all devices to be listed by PC= I address, not network device name"), def->name, iface->device.dev); return -1; } @@ -2840,11 +2826,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (def->forward.type !=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("network '%s' has forward mode '%s' " - " but lists a device by PCI address " - "in the device pool. This is only " - "supported for networks with forward " - "mode 'hostdev'"), + _("network '%1$s' has forward mode '%2$s' b= ut lists a device by PCI address in the device pool. This is only supported= for networks with forward mode 'hostdev'"), def->name, virNetworkForwardTypeToString(def->forward.= type)); return -1; @@ -2855,8 +2837,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (!virPCIIsVirtualFunction(sysfs_path)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device '%s' in network '%s' is not " - "an SR-IOV Virtual Function"), + _("device '%1$s' in network '%2$s' is not a= n SR-IOV Virtual Function"), sysfs_path, def->name); return -1; } @@ -2870,8 +2851,7 @@ networkValidate(virNetworkDriverState *driver, } if ((def->forward.npfs > 0) + usesInterface + usesAddress > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("
, , and elements of " - " in network %s are mutually exclusive"), + _("
, , and elements of in network %1$s are mutually exclusive"), def->name); return -1; } @@ -2944,9 +2924,7 @@ networkValidate(virNetworkDriverState *driver, if (def->portGroups[i].isDefault) { if (defaultPortGroup) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("network '%s' has multiple default " - " elements (%s and %s), " - "but only one default is allowed"), + _("network '%1$s' has multiple default elements (%2$s and %3$s), but only one default is allowed"), def->name, defaultPortGroup->name, def->portGroups[i].name); return -1; @@ -2956,16 +2934,14 @@ networkValidate(virNetworkDriverState *driver, for (j =3D i + 1; j < def->nPortGroups; j++) { if (STREQ(def->portGroups[i].name, def->portGroups[j].name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("multiple elements with the " - "same name (%s) in network '%s'"), + _("multiple elements with the s= ame name (%1$s) in network '%2$s'"), def->portGroups[i].name, def->name); return -1; } } if (def->portGroups[i].bandwidth && !bandwidthAllowed) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network '= %s' " - "in portgroup '%s' with forward mode=3D'%s'"), + _("Unsupported element in network '= %1$s' in portgroup '%2$s' with forward mode=3D'%3$s'"), def->name, def->portGroups[i].name, virNetworkForwardTypeToString(def->forward.type= )); return -1; @@ -2979,8 +2955,7 @@ networkValidate(virNetworkDriverState *driver, * checks were done in the loop above. */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" element specified for network %s, " - "whose type doesn't support vlan configuration"), + _(" element specified for network %1$s, whose= type doesn't support vlan configuration"), def->name); return -1; } @@ -2989,9 +2964,7 @@ networkValidate(virNetworkDriverState *driver, for (i =3D 0; i < def->nPortGroups; i++) { if (def->portGroups[i].bandwidth) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported element " - "in of " - "network '%s' with forward mode=3D'%s'"), + _("unsupported element in of network '%2$s' with forward mode=3D'%3$s'"), def->portGroups[i].name, def->name, virNetworkForwardTypeToString(def->forward.= type)); return -1; @@ -3433,7 +3406,7 @@ networkDestroy(virNetworkPtr net) =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -3513,7 +3486,7 @@ networkGetBridgeName(virNetworkPtr net) =20 if (!(def->bridge)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' does not have a bridge name."), + _("network '%1$s' does not have a bridge name."), def->name); goto cleanup; } @@ -3588,21 +3561,21 @@ networkSetAutostart(virNetworkPtr net, if (new_autostart) { if (g_mkdir_with_parents(cfg->networkAutostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = '%s'"), + _("cannot create autostart directory = '%1$s'"), cfg->networkAutostartDir); goto cleanup; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s' to '= %s'"), + _("Failed to create symlink '%1$s' to= '%2$s'"), autostartLink, configFile); goto cleanup; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno != =3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto cleanup; } @@ -3671,7 +3644,7 @@ networkGetDHCPLeases(virNetworkPtr net, rv =3D 0; } else { virReportSystemError(errno, - _("Unable to read leases file: %s"), + _("Unable to read leases file: %1$s"), custom_lease_file); } goto cleanup; @@ -3684,7 +3657,7 @@ networkGetDHCPLeases(virNetworkPtr net, =20 if (!(leases_array =3D virJSONValueFromString(lease_entries))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid json in file: %s"), custom_lease_file); + _("invalid json in file: %1$s"), custom_lease_file); goto cleanup; } =20 @@ -3868,7 +3841,7 @@ networkAllocatePort(virNetworkObj *obj, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), netdef->name); return -1; } @@ -3940,8 +3913,7 @@ networkAllocatePort(virNetworkObj *obj, =20 if (port->virtPortProfile) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported for = network " - "'%s' which uses IP forwarding"), + _(" not supported fo= r network '%2$s' which uses IP forwarding"), virNetDevVPortTypeToString(port->virtPortProfil= e->virtPortType), netdef->name); return -1; @@ -3964,8 +3936,7 @@ networkAllocatePort(virNetworkObj *obj, } if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' requires exclusive access " - "to interfaces, but none are available"), + _("network '%1$s' requires exclusive access to = interfaces, but none are available"), netdef->name); return -1; } @@ -3978,9 +3949,7 @@ networkAllocatePort(virNetworkObj *obj, if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBG && port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported = for network " - "'%s' which uses an SR-IOV Virtual Functi= on " - "via PCI passthrough"), + _(" not supporte= d for network '%2$s' which uses an SR-IOV Virtual Function via PCI passthro= ugh"), virNetDevVPortTypeToString(port->virtPortPr= ofile->virtPortType), netdef->name); return -1; @@ -4003,8 +3972,7 @@ networkAllocatePort(virNetworkObj *obj, /* only type=3D'openvswitch' is allowed for bridges */ if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VP= ORT_PROFILE_OPENVSWITCH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not suppor= ted for network " - "'%s' which uses a bridge device"), + _(" not supp= orted for network '%2$s' which uses a bridge device"), virNetDevVPortTypeToString(port->virtPo= rtProfile->virtPortType), netdef->name); return -1; @@ -4040,8 +4008,7 @@ networkAllocatePort(virNetworkObj *obj, if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBG && port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported = for network " - "'%s' which uses a macvtap device"), + _(" not supporte= d for network '%2$s' which uses a macvtap device"), virNetDevVPortTypeToString(port->virtPortPr= ofile->virtPortType), netdef->name); return -1; @@ -4053,8 +4020,7 @@ networkAllocatePort(virNetworkObj *obj, */ if ((netdef->forward.nifs <=3D 0) && (netdef->forward.npfs <=3D 0)= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a direct mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a direct mode, but has n= o forward dev and no interface pool"), netdef->name); return -1; } else { @@ -4093,8 +4059,7 @@ networkAllocatePort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' requires exclusive access " - "to interfaces, but none are available"), + _("network '%1$s' requires exclusive access= to interfaces, but none are available"), netdef->name); return -1; } @@ -4162,7 +4127,7 @@ networkNotifyPort(virNetworkObj *obj, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), netdef->name); return -1; } @@ -4200,8 +4165,7 @@ networkNotifyPort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have dev=3D'%s' " - "in use by network port '%s'"), + _("network '%1$s' doesn't have dev=3D'%2$s' in = use by network port '%3$s'"), netdef->name, port->plug.direct.linkdev, port->uuid); return -1; @@ -4217,8 +4181,7 @@ networkNotifyPort(virNetworkObj *obj, port->virtPortProfile && (port->virtPortProfile->virtPortType =3D=3D VIR_NETDEV_VPORT= _PROFILE_8021QBH)))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' claims dev=3D'%s' is already in= " - "use by a different port"), + _("network '%1$s' claims dev=3D'%2$s' is alread= y in use by a different port"), netdef->name, port->plug.direct.linkdev); return -1; } @@ -4242,8 +4205,7 @@ networkNotifyPort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have " - "PCI device %04x:%02x:%02x.%x in use by netwo= rk port"), + _("network '%1$s' doesn't have PCI device %2$04= x:%3$02x:%4$02x.%5$x in use by network port"), netdef->name, port->plug.hostdevpci.addr.domain, port->plug.hostdevpci.addr.bus, @@ -4259,9 +4221,7 @@ networkNotifyPort(virNetworkObj *obj, if ((dev->connections > 0) && netdef->forward.type =3D=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' claims the PCI device at " - "domain=3D%d bus=3D%d slot=3D%d function=3D%d= " - "is already in use by a different network por= t"), + _("network '%1$s' claims the PCI device at doma= in=3D%2$d bus=3D%3$d slot=3D%4$d function=3D%5$d is already in use by a dif= ferent network port"), netdef->name, dev->device.pci.domain, dev->device.pci.bus, dev->device.pci.slot, dev->device.pci.function); @@ -4332,8 +4292,7 @@ networkReleasePort(virNetworkObj *obj, case VIR_NETWORK_PORT_PLUG_TYPE_DIRECT: if (netdef->forward.nifs =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a direct mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a direct mode, but has n= o forward dev and no interface pool"), netdef->name); return -1; } @@ -4349,8 +4308,7 @@ networkReleasePort(virNetworkObj *obj, =20 if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have dev=3D'%s' " - "in use by domain"), + _("network '%1$s' doesn't have dev=3D'%2$s' in = use by domain"), netdef->name, port->plug.direct.linkdev); return -1; } @@ -4359,8 +4317,7 @@ networkReleasePort(virNetworkObj *obj, case VIR_NETWORK_PORT_PLUG_TYPE_HOSTDEV_PCI: if (netdef->forward.nifs =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a hostdev mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a hostdev mode, but has = no forward dev and no interface pool"), netdef->name); return -1; } @@ -4377,8 +4334,7 @@ networkReleasePort(virNetworkObj *obj, =20 if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have " - "PCI device %04x:%02x:%02x.%x in use by domai= n"), + _("network '%1$s' doesn't have PCI device %2$04= x:%3$02x:%4$02x.%5$x in use by domain"), netdef->name, port->plug.hostdevpci.addr.domain, port->plug.hostdevpci.addr.bus, @@ -4446,8 +4402,7 @@ networkCheckBandwidth(virNetworkObj *obj, if (virNetDevBandwidthHasFloor(ifaceBand) && !virNetDevBandwidthSupportsFloor(def->forward.type)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Invalid use of 'floor' on interface with MAC add= ress %s " - "- 'floor' is only supported for interface type '= network' with forward type 'nat', 'route', 'open' or none"), + _("Invalid use of 'floor' on interface with MAC add= ress %1$s - 'floor' is only supported for interface type 'network' with for= ward type 'nat', 'route', 'open' or none"), ifmac); return -1; } @@ -4455,8 +4410,7 @@ networkCheckBandwidth(virNetworkObj *obj, if (virNetDevBandwidthHasFloor(ifaceBand) && !(netBand && netBand->in)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Invalid use of 'floor' on interface with MAC " - "address %s - network '%s' has no inbound QoS set= "), + _("Invalid use of 'floor' on interface with MAC add= ress %1$s - network '%2$s' has no inbound QoS set"), ifmac, def->name); return -1; } @@ -4485,9 +4439,7 @@ networkCheckBandwidth(virNetworkObj *obj, tmp_new_rate =3D netBand->in->peak; if (tmp_floor_sum > netBand->in->peak) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Cannot plug '%s' interface into '%s' because= " - "new combined inbound floor=3D%llu would over= commit " - "peak=3D%llu on network '%s'"), + _("Cannot plug '%1$s' interface into '%2$s' bec= ause new combined inbound floor=3D%3$llu would overcommit peak=3D%4$llu on = network '%5$s'"), ifmac, def->bridge, tmp_floor_sum, @@ -4499,9 +4451,7 @@ networkCheckBandwidth(virNetworkObj *obj, /* tmp_floor_sum can be between 'average' and 'peak' iff 'peak' is= set. * Otherwise, tmp_floor_sum must be below 'average'. */ virReportError(VIR_ERR_OPERATION_INVALID, - _("Cannot plug '%s' interface into '%s' because " - "new combined inbound floor=3D%llu would overcomm= it " - "average=3D%llu on network '%s'"), + _("Cannot plug '%1$s' interface into '%2$s' because= new combined inbound floor=3D%3$llu would overcommit average=3D%4$llu on n= etwork '%5$s'"), ifmac, def->bridge, tmp_floor_sum, @@ -4809,7 +4759,7 @@ networkPortLookupByUUID(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4851,7 +4801,7 @@ networkPortCreateXML(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4919,7 +4869,7 @@ networkPortGetXMLDesc(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4959,7 +4909,7 @@ networkPortDelete(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5007,7 +4957,7 @@ networkPortSetParameters(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5098,7 +5048,7 @@ networkPortGetParameters(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5160,7 +5110,7 @@ networkListAllPorts(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } diff --git a/src/network/bridge_driver_conf.c b/src/network/bridge_driver_c= onf.c index 664e42bf99..a2edafa837 100644 --- a/src/network/bridge_driver_conf.c +++ b/src/network/bridge_driver_conf.c @@ -118,7 +118,7 @@ virNetworkDriverConfigNew(bool privileged) return NULL; =20 if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create directory %s"), cfg->= stateDir); + virReportSystemError(errno, _("cannot create directory %1$s"), cfg= ->stateDir); return NULL; } =20 diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index d9597d91be..860793fba6 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -266,7 +266,7 @@ int networkCheckRouteCollision(virNetworkDef *def) if ((net_dest =3D=3D addr_val) && (netmask.data.inet4.sin_addr.s_addr =3D=3D mask_val)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network is already in use by interface %= s"), + _("Network is already in use by interface %= 1$s"), iface); return -1; } @@ -291,8 +291,7 @@ int networkCheckRouteCollision(virNetworkDef *def) if (!addr_str) virResetLastError(); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Route address '%s' conflicts " - "with IP address for '%s'"), + _("Route address '%1$s' conflicts with IP a= ddress for '%2$s'"), NULLSTR(addr_str), iface); return -1; } @@ -317,7 +316,7 @@ networkAddMasqueradingFirewallRules(virFirewall *fw, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid prefix or netmask for '%s'"), + _("Invalid prefix or netmask for '%1$s'"), def->bridge); return -1; } @@ -506,7 +505,7 @@ networkAddRoutingFirewallRules(virFirewall *fw, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid prefix or netmask for '%s'"), + _("Invalid prefix or netmask for '%1$s'"), def->bridge); return -1; } @@ -833,8 +832,7 @@ int networkAddFirewallRules(virNetworkDef *def) */ if (virFirewallDIsRegistered() < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("zone %s requested for network %s " - "but firewalld is not active"), + _("zone %1$s requested for network %2$s but fir= ewalld is not active"), def->bridgeZone, def->name); return -1; } diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index 9ee42045d9..e1c0e81828 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -49,9 +49,9 @@ G_GNUC_NORETURN static void usage(int status) { if (status) { - fprintf(stderr, _("%s: try --help for more details\n"), program_na= me); + fprintf(stderr, _("%1$s: try --help for more details\n"), program_= name); } else { - printf(_("Usage: %s add|old|del|init mac|clientid ip [hostname]\n" + printf(_("Usage: %1$s add|old|del|init mac|clientid ip [hostname]\= n" "Designed for use with 'dnsmasq --dhcp-script'\n" "Refer to man page of dnsmasq for more details'\n"), program_name); @@ -103,7 +103,7 @@ main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), program_name); + fprintf(stderr, _("%1$s: initialization failed\n"), program_name); exit(EXIT_FAILURE); } =20 @@ -137,7 +137,7 @@ main(int argc, char **argv) mac =3D argv[2]; =20 if ((action =3D virLeaseActionTypeFromString(argv[1])) < 0) { - fprintf(stderr, _("Unsupported action: %s\n"), argv[1]); + fprintf(stderr, _("Unsupported action: %1$s\n"), argv[1]); exit(EXIT_FAILURE); } =20 @@ -161,7 +161,7 @@ main(int argc, char **argv) /* Try to claim the pidfile, exiting if we can't */ if ((pid_file_fd =3D virPidFileAcquirePathFull(pid_file, true, false, = getpid())) < 0) { fprintf(stderr, - _("Unable to acquire PID file: %s\n errno=3D%d"), + _("Unable to acquire PID file: %1$s\n errno=3D%2$d"), pid_file, errno); goto cleanup; } @@ -170,7 +170,7 @@ main(int argc, char **argv) * corresponding custom lease file exists. If not, 'touch' it */ if (virFileTouch(custom_lease_file, 0644) < 0) { fprintf(stderr, - _("Unable to create: %s\n errno=3D%d"), + _("Unable to create: %1$s\n errno=3D%2$d"), custom_lease_file, errno); goto cleanup; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464753; cv=none; d=zohomail.com; s=zohoarc; b=KAzrf0VKbgOua2hspcOslXmUQXWjvAxAA5iLLr7eaAzlV7hEtIqxDC6hagxff1DqtQRg97zKB1tzd2baddlizblt4mSigsfmk4T+nL8s6YrtKsY4mVVi65PpahcGystVyX8cz7joLTc07G3bWlURGDNm+4eCr4cnbePpnP1Ng6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464753; 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=dvocpbLDY+rDSSA7gRWpYlSw7It/GGuGJ6VK/VBqKNs=; b=KK4ZcrQc5OT4VqHofKQ/OAEHnkaybj7m5bb/HqDQIRSdVKVXCHxpbxHa94oavANRcCd2BI0QdzHHSZUt5wc1KbS8Isq5f0pU1CAItmUm2ftKjuk29q3IwT1UNHDRmixM1Ggx2a4PvqhVWvASp4fbNLNBxTYeyipF/U4Fo1I6dRw= 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 1678464753662823.7517863494503; Fri, 10 Mar 2023 08:12:33 -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-491-DxN_2D6NNXyt9sXV3MZ0yg-1; Fri, 10 Mar 2023 11:11:28 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C886D80D11C; Fri, 10 Mar 2023 16:10:45 +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 A6E36C15BAD; Fri, 10 Mar 2023 16:10:45 +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 9546619472C4; Fri, 10 Mar 2023 16:10:45 +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 7A63619472C0 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 72791C16022; Fri, 10 Mar 2023 16:10:41 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18D82C15BA0 for ; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464752; 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=dvocpbLDY+rDSSA7gRWpYlSw7It/GGuGJ6VK/VBqKNs=; b=EmpcAUpYXGXsVt0zF507HpMTFt2tiAGdLJNKYO3oU015UZzr5n/Jt6RKJL6+qNWuT7sH34 ncjOr/8ifY/y+voKKAi3TVB7GxS67bH6xFdAe5pOZ9aqQmwy8gKPp4nuPTtA4udE8jmnhe 4sfUfJ7i28i5scvtbby406NvVquVG7g= X-MC-Unique: DxN_2D6NNXyt9sXV3MZ0yg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 21/51] node_device: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:37 +0100 Message-Id: <870dc05cc9911298d0762424e0ebb0057ebbbd22.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.8 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: 1678464755426100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/node_device/node_device_driver.c | 37 ++++++++++----------- src/node_device/node_device_udev.c | 49 ++++++++++++++-------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 355ab31745..3cac25a10c 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -136,7 +136,7 @@ nodeDeviceUpdateDriverName(virNodeDeviceDef *def) =20 if (virFileResolveLink(driver_link, &devpath) < 0) { virReportSystemError(errno, - _("cannot resolve driver link %s"), driver_li= nk); + _("cannot resolve driver link %1$s"), driver_= link); return -1; } =20 @@ -236,7 +236,7 @@ nodeDeviceObjFindByName(const char *name) =20 if (!(obj =3D virNodeDeviceObjListFindByName(driver->devs, name))) { virReportError(VIR_ERR_NO_NODE_DEVICE, - _("no node device with matching name '%s'"), + _("no node device with matching name '%1$s'"), name); } =20 @@ -735,7 +735,7 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def, default: /* SHOULD NEVER HAPPEN */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown Command '%i'"), cmd_type); + _("Unknown Command '%1$i'"), cmd_type); return NULL; } =20 @@ -744,7 +744,7 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def, case MDEVCTL_CMD_DEFINE: if (!def->caps->data.mdev.parent_addr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find parent device '%s'"), def->pa= rent); + _("unable to find parent device '%1$s'"), def->= parent); return NULL; } =20 @@ -802,7 +802,7 @@ virMdevctlCreate(virNodeDeviceDef *def, char **uuid) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to start mediated device: %s"), + _("Unable to start mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -832,7 +832,7 @@ virMdevctlDefine(virNodeDeviceDef *def, char **uuid) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to define mediated device: %s"), + _("Unable to define mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -913,8 +913,7 @@ nodeDeviceCreateXML(virConnectPtr conn, =20 if (device =3D=3D NULL) virReportError(VIR_ERR_NO_NODE_DEVICE, - _("no node device for '%s' with matching " - "wwnn '%s' and wwpn '%s'"), + _("no node device for '%1$s' with matching wwnn= '%2$s' and wwpn '%3$s'"), def->name, wwnn, wwpn); } else if (nodeDeviceHasCapability(def, VIR_NODE_DEV_CAP_MDEV)) { device =3D nodeDeviceCreateXMLMdev(conn, def); @@ -944,7 +943,7 @@ virMdevctlStop(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to destroy '%s': %s"), def->name, + _("Unable to destroy '%1$s': %2$s"), def->name, MDEVCTL_ERROR(errmsg)); return -1; } @@ -970,7 +969,7 @@ virMdevctlUndefine(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to undefine mediated device: %s"), + _("Unable to undefine mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -996,7 +995,7 @@ virMdevctlStart(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create mediated device: %s"), + _("Unable to create mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -1279,7 +1278,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (!(obj =3D virNodeDeviceObjListFindByName(driver->devs, parent)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find parent '%s' definition"), parent= ); + _("cannot find parent '%1$s' definition"), pare= nt); goto cleanup; } =20 @@ -1296,7 +1295,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (!virNodeDeviceObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Device '%s' is not active"), def->name); + _("Device '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1317,7 +1316,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (fd < 0 && errno =3D=3D EBUSY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to destroy '%s': device in use"), + _("Unable to destroy '%1$s': device in use"), def->name); goto cleanup; } @@ -1478,7 +1477,7 @@ nodeDeviceUndefine(virNodeDevice *device, =20 if (!virNodeDeviceObjIsPersistent(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Node device '%s' is not defined"), + _("Node device '%1$s' is not defined"), def->name); goto cleanup; } @@ -1712,7 +1711,7 @@ nodeDeviceUpdateMediatedDevices(void) =20 if ((data.ndefs =3D virMdevctlListDefined(&defs, &errmsg)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to query mdevs from mdevctl: %s"), errmsg= ); + _("failed to query mdevs from mdevctl: %1$s"), errm= sg); return -1; } =20 @@ -1837,7 +1836,7 @@ nodeDeviceSetAutostart(virNodeDevice *device, =20 if (virMdevctlSetAutostart(def, autostart, &errmsg) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set autostart on '%s': %s"), + _("Unable to set autostart on '%1$s': %2$s"= ), def->name, errmsg && errmsg[0] !=3D '\0' ? errmsg : _(= "Unknown Error")); goto cleanup; @@ -1923,7 +1922,7 @@ static int nodeDeviceDefValidateMdev(virNodeDeviceDef= *def, obj =3D virNodeDeviceObjListFindByName(driver->devs, def->parent); if (!obj) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid parent device '%s'"), + _("invalid parent device '%1$s'"), def->parent); return -1; } @@ -1933,7 +1932,7 @@ static int nodeDeviceDefValidateMdev(virNodeDeviceDef= *def, * device and stored it in the mdev caps */ if (!mdev->parent_addr) { virReportError(VIR_ERR_PARSE_FAILED, - _("Unable to find address for parent device '%s'"), + _("Unable to find address for parent device '%1$s'"= ), def->parent); return -1; } diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 5782aa43c8..4c37ec3189 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -186,14 +186,14 @@ udevGetIntProperty(struct udev_device *udev_device, str =3D udevGetDeviceProperty(udev_device, property_key); if (!str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing udev property '%s' on '%s'"), + _("Missing udev property '%1$s' on '%2$s'"), property_key, udev_device_get_sysname(udev_device)); return -1; } =20 if (virStrToLong_i(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse int '%s' from udev property '%s'= on '%s'"), + _("Failed to parse int '%1$s' from udev property '%= 2$s' on '%3$s'"), str, property_key, udev_device_get_sysname(udev_dev= ice)); return -1; } @@ -212,14 +212,14 @@ udevGetUintProperty(struct udev_device *udev_device, str =3D udevGetDeviceProperty(udev_device, property_key); if (!str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing udev property '%s' on '%s'"), + _("Missing udev property '%1$s' on '%2$s'"), property_key, udev_device_get_sysname(udev_device)); return -1; } =20 if (virStrToLong_ui(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse uint '%s' from udev property '%s= ' on '%s'"), + _("Failed to parse uint '%1$s' from udev property '= %2$s' on '%3$s'"), str, property_key, udev_device_get_sysname(udev_dev= ice)); return -1; } @@ -271,7 +271,7 @@ udevGetIntSysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_i(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to int"), str); + _("Failed to convert '%1$s' to int"), str); return -1; } =20 @@ -291,7 +291,7 @@ udevGetUintSysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_ui(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to unsigned int"), str); + _("Failed to convert '%1$s' to unsigned int"), str); return -1; } =20 @@ -310,7 +310,7 @@ udevGetUint64SysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_ull(str, NULL, 0, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to unsigned long long"), = str); + _("Failed to convert '%1$s' to unsigned long long")= , str); return -1; } =20 @@ -385,7 +385,7 @@ udevProcessPCI(struct udev_device *device, virStrToLong_ui(p + 1, &p, 16, &pci_dev->slot) < 0 || p =3D=3D NUL= L || virStrToLong_ui(p + 1, &p, 16, &pci_dev->function) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the PCI address from sysfs path:= '%s'"), + _("failed to parse the PCI address from sysfs path:= '%1$s'"), def->sysfs_path); goto cleanup; } @@ -469,7 +469,7 @@ udevProcessMdevParent(struct udev_device *device, =20 if (virMediatedDeviceParentGetAddress(def->sysfs_path, &mdev_parent->a= ddress) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find address for mdev parent device '%= s'"), + _("Unable to find address for mdev parent device '%= 1$s'"), def->name); return -1; } @@ -636,7 +636,7 @@ udevProcessSCSIHost(struct udev_device *device G_GNUC_U= NUSED, if (!(str =3D STRSKIP(filename, "host")) || virStrToLong_ui(str, NULL, 0, &scsi_host->host) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse SCSI host '%s'"), + _("failed to parse SCSI host '%1$s'"), filename); return -1; } @@ -745,7 +745,7 @@ udevProcessSCSIDevice(struct udev_device *device G_GNUC= _UNUSED, virStrToLong_ui(p + 1, &p, 10, &scsi->target) < 0 || p =3D=3D NULL= || virStrToLong_ui(p + 1, &p, 10, &scsi->lun) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the SCSI address from filename: = '%s'"), + _("failed to parse the SCSI address from filename: = '%1$s'"), filename); return -1; } @@ -765,7 +765,7 @@ udevProcessSCSIDevice(struct udev_device *device G_GNUC= _UNUSED, cleanup: if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to process SCSI device with sysfs path '%= s'"), + _("Failed to process SCSI device with sysfs path '%= 1$s'"), def->sysfs_path); } return ret; @@ -1062,13 +1062,13 @@ udevProcessMediatedDevice(struct udev_device *dev, =20 if (virFileWaitForExists(linkpath, 10, 100) < 0) { virReportSystemError(errno, - _("failed to wait for file '%s' to appear"), + _("failed to wait for file '%1$s' to appear"), linkpath); return -1; } =20 if (virFileResolveLink(linkpath, &canonicalpath) < 0) { - virReportSystemError(errno, _("failed to resolve '%s'"), linkpath); + virReportSystemError(errno, _("failed to resolve '%1$s'"), linkpat= h); return -1; } =20 @@ -1088,7 +1088,7 @@ udevProcessMediatedDevice(struct udev_device *dev, =20 if (!data->parent_addr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get parent of '%s'"), + _("Could not get parent of '%1$s'"), udev_device_get_syspath(dev)); return -1; } @@ -1113,7 +1113,7 @@ udevGetCCWAddress(const char *sysfs_path, &data->ccw_dev.ssid, &data->ccw_dev.devno) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the CCW address from sysfs path:= '%s'"), + _("failed to parse the CCW address from sysfs path:= '%1$s'"), sysfs_path); return -1; } @@ -1188,7 +1188,7 @@ udevGetVDPACharDev(const char *sysfs_path, =20 if (!virFileExists(chardev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vDPA chardev path '%s' does not exist"), + _("vDPA chardev path '%1$s' does not exist"= ), chardev); return -1; } @@ -1230,7 +1230,7 @@ udevProcessAPCard(struct udev_device *device, virStrToLong_ui(c + 1 + strlen("card"), NULL, 16, &data->ap_card.ap_adapter) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the AP Card from sysfs path: '%s= '"), + _("failed to parse the AP Card from sysfs path: '%1= $s'"), def->sysfs_path); return -1; } @@ -1255,7 +1255,7 @@ udevProcessAPQueue(struct udev_device *device, virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_adapter) < 0 || virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_domain) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the AP Queue from sysfs path: '%= s'"), + _("failed to parse the AP Queue from sysfs path: '%= 1$s'"), def->sysfs_path); return -1; } @@ -1511,7 +1511,7 @@ udevSetParent(struct udev_device *device, parent_sysfs_path =3D udev_device_get_syspath(parent_device); if (parent_sysfs_path =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get syspath for parent of '%s'"), + _("Could not get syspath for parent of '%1$s'"), udev_device_get_syspath(parent_device)); return -1; } @@ -1795,8 +1795,7 @@ udevEventMonitorSanityCheck(udevEventData *priv, rc =3D udev_monitor_get_fd(priv->udev_monitor); if (fd !=3D rc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File descriptor returned by udev %d does not " - "match node device file descriptor %d"), + _("File descriptor returned by udev %1$d does not m= atch node device file descriptor %2$d"), fd, rc); =20 /* this is a non-recoverable error, let's remove the handle, so th= at we @@ -1934,7 +1933,7 @@ udevGetDMIData(virNodeDevCapSystem *syscap) device =3D udev_device_new_from_syspath(udev, DMI_DEVPATH); if (device =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get udev device for syspath '%s'"), + _("Failed to get udev device for syspath '%1$s'= "), DMI_DEVPATH); return; } @@ -2153,7 +2152,7 @@ monitorFileRecursively(udevEventData *udev, error: g_list_free_full(monitors, g_object_unref); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to monitor directory: %s"), error->message); + _("Unable to monitor directory: %1$s"), error->message); g_clear_error(&error); return NULL; } @@ -2272,7 +2271,7 @@ nodeStateInitialize(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 From nobody Fri Apr 19 05:30:58 2024 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=1678464971; cv=none; d=zohomail.com; s=zohoarc; b=f9UVFqxtAyl/ZgjvJTtU1hYMWhYtNBn7IBBWm6TRAYTjOByXTt5CDi4ONoeMkVg5U6mvr8w11xMt6ZrcWtxfsNEOmwMOhiQdp4TVfU0gzDruWda6bLp+qPDqiipmZP361aUD6/TjAtEnf7ASxm984PN8CVxTCXWKAMuXXrAM4Lc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464971; 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=pIddJfr3GAokfEhOjNMbYnIPZ3npHPiDVjmnzLChjpo=; b=BtG0krRFqSr18f322dMP9gb1/nOobLyHeduJe9pVo/2lcn5IkfFPy9FJONvA+yDic/NYc18/nQPpoxXj69t8Ra+e6LSkccJ1b/sMNkAoDKJD9pgA40BesZalEaCsHP0+I56Di9oh2DRVa0bk3upwg3YpviWNtZp1LeS/dyLOgc0= 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 1678464971118815.8895185020709; Fri, 10 Mar 2023 08:16:11 -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-543-DzU87vM7NhieyKjC3UPTeg-1; Fri, 10 Mar 2023 11:11:12 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3ABE288434F; Fri, 10 Mar 2023 16:10:46 +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 049154051E51; Fri, 10 Mar 2023 16:10:46 +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 E9E0E1946A79; Fri, 10 Mar 2023 16:10:45 +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 8438819472C8 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 821B3C16025; Fri, 10 Mar 2023 16:10:42 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2714DC15BA0 for ; Fri, 10 Mar 2023 16:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464942; 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=pIddJfr3GAokfEhOjNMbYnIPZ3npHPiDVjmnzLChjpo=; b=Lpq32BSAIY6SZtgZu48c2CcyhHJBnPTKU3X+4KShfSwOLqwAEftGvRLi1trkBW8XLPoiE9 jqkPZ2oqqo+Qk1tgez54If299JfwNYHTOV5VChQeiOc5GNgP2kAUVva9JEI+lVLXUioTZy 3dUX7WRH/NmHZ3/5+7zs6ZhQHu9Ou1k= X-MC-Unique: DzU87vM7NhieyKjC3UPTeg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 22/51] nwfilter: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:38 +0100 Message-Id: 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.1 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: 1678464973005100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/nwfilter/nwfilter_dhcpsnoop.c | 67 +++++++++++------------ src/nwfilter/nwfilter_driver.c | 18 +++--- src/nwfilter/nwfilter_ebiptables_driver.c | 16 +++--- src/nwfilter/nwfilter_gentech_driver.c | 19 +++---- src/nwfilter/nwfilter_learnipaddr.c | 9 ++- 5 files changed, 60 insertions(+), 69 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcp= snoop.c index 20afc1b2d4..3dc0b777e9 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -485,8 +485,7 @@ virNWFilterSnoopReqNew(const char *ifkey) =20 if (ifkey =3D=3D NULL || strlen(ifkey) !=3D VIR_IFKEY_LEN - 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterSnoopReqNew called with invalid " - "key \"%s\" (%zu)"), + _("virNWFilterSnoopReqNew called with invalid key \= "%1$s\" (%2$zu)"), NULLSTR_EMPTY(ifkey), ifkey ? strlen(ifkey) : 0); return NULL; @@ -955,26 +954,26 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAd= dr *mac, pcap_set_immediate_mode(handle, 1) < 0 || pcap_activate(handle) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("setup of pcap handle failed: %s"), + _("setup of pcap handle failed: %1$s"), pcap_geterr(handle)); goto cleanup; } =20 if (pcap_compile(handle, &fp, ext_filter, 1, PCAP_NETMASK_UNKNOWN) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pcap_compile: %s"), pcap_geterr(handle)); + _("pcap_compile: %1$s"), pcap_geterr(handle)); goto cleanup; } =20 if (pcap_setfilter(handle, &fp) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pcap_setfilter: %s"), pcap_geterr(handle)); + _("pcap_setfilter: %1$s"), pcap_geterr(handle)); goto cleanup_freecode; } =20 if (pcap_setdirection(handle, dir) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pcap_setdirection: %s"), + _("pcap_setdirection: %1$s"), pcap_geterr(handle)); goto cleanup_freecode; } @@ -1004,8 +1003,8 @@ static void virNWFilterDHCPDecodeWorker(void *jobdata= , void *opaque) req->jobCompletionStatus =3D -1; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Instantiation of rules failed on " - "interface '%s'"), req->binding->portdevname); + _("Instantiation of rules failed on interface '%1$s= '"), + req->binding->portdevname); } ignore_value(!!g_atomic_int_dec_and_test(job->qCtr)); } @@ -1306,7 +1305,7 @@ virNWFilterDHCPSnoopThread(void *req0) /* protect req->binding->portdevname */ VIR_WITH_MUTEX_LOCK_GUARD(&req->lock) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("interface '%s' failing; reopenin= g"), + _("interface '%1$s' failing; reopen= ing"), req->binding->portdevname); if (req->binding->portdevname) pcapConf[i].handle =3D @@ -1359,8 +1358,8 @@ virNWFilterDHCPSnoopThread(void *req0) pcapConf[i].dir, &pcapConf[i].qCtr) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Job submission failed on " - "interface '%s'"), req->binding->port= devname); + _("Job submission failed on interface '= %1$s'"), + req->binding->portdevname); error =3D true; break; } @@ -1468,8 +1467,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdr= iver, req->binding->portdevname, req->ifkey) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterDHCPSnoopReq ifname map failed" - " on interface \"%s\" key \"%s\""), binding->port= devname, + _("virNWFilterDHCPSnoopReq ifname map failed on int= erface \"%1$s\" key \"%2$s\""), + binding->portdevname, ifkey); goto exit_snoopunlock; } @@ -1477,8 +1476,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdr= iver, if (isnewreq && virHashAddEntry(virNWFilterSnoopState.snoopReqs, ifkey, req) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterDHCPSnoopReq req add failed on" - " interface \"%s\" ifkey \"%s\""), binding->portd= evname, + _("virNWFilterDHCPSnoopReq req add failed on interf= ace \"%1$s\" ifkey \"%2$s\""), + binding->portdevname, ifkey); goto exit_rem_ifnametokey; } @@ -1489,8 +1488,8 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *techdr= iver, if (virThreadCreateFull(&thread, false, virNWFilterDHCPSnoopThread, "dhcp-snoop", false, req) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterDHCPSnoopReq virThreadCreate " - "failed on interface '%s'"), binding->portdevname= ); + _("virNWFilterDHCPSnoopReq virThreadCreate failed o= n interface '%1$s'"), + binding->portdevname); goto exit_snoopreq_unlock; } =20 @@ -1501,15 +1500,15 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriver *tech= driver, req->threadkey =3D virNWFilterSnoopActivate(req); if (!req->threadkey) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Activation of snoop request failed on " - "interface '%s'"), req->binding->portdevname); + _("Activation of snoop request failed on interface = '%1$s'"), + req->binding->portdevname); goto exit_snoopreq_unlock; } =20 if (virNWFilterSnoopReqRestore(req) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Restoring of leases failed on " - "interface '%s'"), req->binding->portdevname); + _("Restoring of leases failed on interface '%1$s'"), + req->binding->portdevname); goto exit_snoop_cancel; } =20 @@ -1677,17 +1676,17 @@ virNWFilterSnoopLeaseFileRefresh(void) int tfd; =20 if (g_mkdir_with_parents(LEASEFILE_DIR, 0700) < 0) { - virReportError(errno, _("mkdir(\"%s\")"), LEASEFILE_DIR); + virReportError(errno, _("mkdir(\"%1$s\")"), LEASEFILE_DIR); return; } =20 if (unlink(TMPLEASEFILE) < 0 && errno !=3D ENOENT) - virReportSystemError(errno, _("unlink(\"%s\")"), TMPLEASEFILE); + virReportSystemError(errno, _("unlink(\"%1$s\")"), TMPLEASEFILE); =20 /* lease file loaded, delete old one */ tfd =3D open(TMPLEASEFILE, O_CREAT|O_RDWR|O_TRUNC|O_EXCL, 0644); if (tfd < 0) { - virReportSystemError(errno, _("open(\"%s\")"), TMPLEASEFILE); + virReportSystemError(errno, _("open(\"%1$s\")"), TMPLEASEFILE); return; } =20 @@ -1701,13 +1700,13 @@ virNWFilterSnoopLeaseFileRefresh(void) } =20 if (VIR_CLOSE(tfd) < 0) { - virReportSystemError(errno, _("unable to close %s"), TMPLEASEFILE); + virReportSystemError(errno, _("unable to close %1$s"), TMPLEASEFIL= E); /* assuming the old lease file is still better, skip the renaming = */ goto cleanup; } =20 if (rename(TMPLEASEFILE, LEASEFILE) < 0) { - virReportSystemError(errno, _("rename(\"%s\", \"%s\")"), + virReportSystemError(errno, _("rename(\"%1$s\", \"%2$s\")"), TMPLEASEFILE, LEASEFILE); unlink(TMPLEASEFILE); } @@ -1737,8 +1736,8 @@ virNWFilterSnoopLeaseFileLoad(void) =20 if (line[strlen(line)-1] !=3D '\n') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterSnoopLeaseFileLoad lease file " - "line %d corrupt"), ln); + _("virNWFilterSnoopLeaseFileLoad lease file lin= e %1$d corrupt"), + ln); break; } ln++; @@ -1746,8 +1745,8 @@ virNWFilterSnoopLeaseFileLoad(void) if (sscanf(line, "%llu %54s %15s %15s", &timeout, ifkey, ipstr, srvstr) < 4) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterSnoopLeaseFileLoad lease file " - "line %d corrupt"), ln); + _("virNWFilterSnoopLeaseFileLoad lease file lin= e %1$d corrupt"), + ln); break; } ipl.timeout =3D timeout; @@ -1764,15 +1763,15 @@ virNWFilterSnoopLeaseFileLoad(void) if (tmp < 0) { virNWFilterSnoopReqPut(req); virReportError(VIR_ERR_INTERNAL_ERROR, - _("virNWFilterSnoopLeaseFileLoad req add" - " failed on interface \"%s\""), ifkey); + _("virNWFilterSnoopLeaseFileLoad req add fa= iled on interface \"%1$s\""), + ifkey); continue; } } =20 if (virSocketAddrParseIPv4(&ipl.ipAddress, ipstr) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("line %d corrupt ipaddr \"%s\""), + _("line %1$d corrupt ipaddr \"%2$s\""), ln, ipstr); virNWFilterSnoopReqPut(req); continue; @@ -1917,7 +1916,7 @@ virNWFilterDHCPSnoopEnd(const char *ifname) req =3D virNWFilterSnoopReqGetByIFKey(ifkey); if (!req) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("ifkey \"%s\" has no req"), ifkey); + _("ifkey \"%1$s\" has no req"), ifkey); return; } =20 diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 3803850e26..09719edd75 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -248,7 +248,7 @@ nwfilterStateInitialize(bool privileged, driver->stateDir =3D g_strdup(RUNSTATEDIR "/libvirt/nwfilter"); =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; } @@ -282,7 +282,7 @@ nwfilterStateInitialize(bool privileged, driver->configDir =3D g_strdup(SYSCONFDIR "/libvirt/nwfilter"); =20 if (g_mkdir_with_parents(driver->configDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create config directory '%s'= "), + virReportSystemError(errno, _("cannot create config directory '%1$= s'"), driver->configDir); goto error; } @@ -290,7 +290,7 @@ nwfilterStateInitialize(bool privileged, driver->bindingDir =3D g_strdup(RUNSTATEDIR "/libvirt/nwfilter-binding= "); =20 if (g_mkdir_with_parents(driver->bindingDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create config directory '%s'= "), + virReportSystemError(errno, _("cannot create config directory '%1$= s'"), driver->bindingDir); goto error; } @@ -359,7 +359,7 @@ nwfilterConnectOpen(virConnectPtr conn, =20 if (STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected nwfilter URI path '%s', try nwfilter:= ///system"), + _("unexpected nwfilter URI path '%1$s', try nwfilte= r:///system"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -405,7 +405,7 @@ nwfilterObjFromNWFilter(const unsigned char *uuid) if (!(obj =3D virNWFilterObjListFindByUUID(driver->nwfilters, uuid))) { virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_NWFILTER, - _("no nwfilter with matching uuid '%s'"), uuidstr); + _("no nwfilter with matching uuid '%1$s'"), uuidstr= ); } return obj; } @@ -452,7 +452,7 @@ nwfilterLookupByName(virConnectPtr conn, =20 if (!obj) { virReportError(VIR_ERR_NO_NWFILTER, - _("no nwfilter with matching name '%s'"), name); + _("no nwfilter with matching name '%1$s'"), name); return NULL; } def =3D virNWFilterObjGetDef(obj); @@ -661,7 +661,7 @@ nwfilterBindingLookupByPortDev(virConnectPtr conn, portdev); if (!obj) { virReportError(VIR_ERR_NO_NWFILTER_BINDING, - _("no nwfilter binding for port dev '%s'"), portdev= ); + _("no nwfilter binding for port dev '%1$s'"), portd= ev); goto cleanup; } =20 @@ -706,7 +706,7 @@ nwfilterBindingGetXMLDesc(virNWFilterBindingPtr binding, binding->portdev); if (!obj) { virReportError(VIR_ERR_NO_NWFILTER_BINDING, - _("no nwfilter binding for port dev '%s'"), binding= ->portdev); + _("no nwfilter binding for port dev '%1$s'"), bindi= ng->portdev); goto cleanup; } =20 @@ -790,7 +790,7 @@ nwfilterBindingDelete(virNWFilterBindingPtr binding) obj =3D virNWFilterBindingObjListFindByPortDev(driver->bindings, bindi= ng->portdev); if (!obj) { virReportError(VIR_ERR_NO_NWFILTER_BINDING, - _("no nwfilter binding for port dev '%s'"), binding= ->portdev); + _("no nwfilter binding for port dev '%1$s'"), bindi= ng->portdev); return -1; } =20 diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfil= ter_ebiptables_driver.c index 24c0db5bde..99a74a60e5 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -153,8 +153,8 @@ printVar(virNWFilterVarCombIter *vars, =20 varName =3D virNWFilterVarAccessGetVarName(item->varAccess); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Buffer too small to print variable " - "'%s' into"), varName); + _("Buffer too small to print variable '%1$s' in= to"), + varName); return -1; } =20 @@ -295,7 +295,7 @@ _printDataType(virNWFilterVarCombIter *vars, case DATATYPE_STRINGCOPY: case DATATYPE_BOOLEAN: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot print data type %x"), item->datatype); + _("Cannot print data type %1$x"), item->datatype); return -1; case DATATYPE_LAST: default: @@ -1441,7 +1441,7 @@ _iptablesCreateRuleInstance(virFirewall *fw, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected protocol %d"), + _("Unexpected protocol %1$d"), rule->prtclType); return -1; } @@ -1846,8 +1846,7 @@ ebtablesCreateRuleInstance(virFirewall *fw, if (reverse && HAS_ENTRY_ITEM(&rule->p.stpHdrFilter.ethHdr.dataSrcMACAddr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("STP filtering in %s direction with " - "source MAC address set is not supported"), + _("STP filtering in %1$s direction with source = MAC address set is not supported"), virNWFilterRuleDirectionTypeToString( VIR_NWFILTER_RULE_DIRECTION_INOUT)); return -1; @@ -2351,7 +2350,7 @@ ebtablesCreateRuleInstance(virFirewall *fw, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected rule protocol %d"), + _("Unexpected rule protocol %1$d"), rule->prtclType); return -1; } @@ -3126,8 +3125,7 @@ iptablesCheckBridgeNFCallEnabled(bool isIPv6) if (buffer[0] =3D=3D '0') { char msg[256]; g_snprintf(msg, sizeof(msg), - _("To enable ip%stables filtering for the V= M do " - "'echo 1 > %s'"), + _("To enable ip%1$stables filtering for the= VM do 'echo 1 > %2$s'"), isIPv6 ? "6" : "", pathname); VIR_WARN("%s", msg); diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index 979b13fa2c..72e24e2f08 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -514,8 +514,7 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdri= ver, } else { rc =3D -1; virReportError(VIR_ERR_PARSE_FAILED, - _("filter '%s' " - "learning value '%s' invalid."), + _("filter '%1$s' learning value '%2$s' inva= lid."), filter->name, learning); goto error; } @@ -576,8 +575,8 @@ virNWFilterDoInstantiate(virNWFilterTechDriver *techdri= ver, buf =3D virNWFilterPrintVars(missing_vars, ", ", false, reportIP); if (buf) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot instantiate filter due to unresolvable " - "variables or unavailable list elements: %s"), bu= f); + _("Cannot instantiate filter due to unresolvable va= riables or unavailable list elements: %1$s"), + buf); } =20 rc =3D -1; @@ -632,8 +631,7 @@ virNWFilterInstantiateFilterUpdate(virNWFilterDriverSta= te *driver, =20 if (!techdriver) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get access to ACL tech " - "driver '%s'"), + _("Could not get access to ACL tech driver '%1$s'"), drvname); return -1; } @@ -779,8 +777,7 @@ virNWFilterRollbackUpdateFilter(virNWFilterBindingDef *= binding) techdriver =3D virNWFilterTechDriverForName(drvname); if (!techdriver) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get access to ACL tech " - "driver '%s'"), + _("Could not get access to ACL tech driver '%1$s'"), drvname); return -1; } @@ -805,8 +802,7 @@ virNWFilterTearOldFilter(virNWFilterBindingDef *binding) techdriver =3D virNWFilterTechDriverForName(drvname); if (!techdriver) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get access to ACL tech " - "driver '%s'"), + _("Could not get access to ACL tech driver '%1$s'"), drvname); return -1; } @@ -830,8 +826,7 @@ _virNWFilterTeardownFilter(const char *ifname) =20 if (!techdriver) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get access to ACL tech " - "driver '%s'"), + _("Could not get access to ACL tech driver '%1$s'"), drvname); return -1; } diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_le= arnipaddr.c index 0f3042a893..90e9a21a4e 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -155,7 +155,7 @@ virNWFilterLockIface(const char *ifname) =20 if (virStrcpyStatic(ifaceLock->ifname, ifname) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("interface name %s does not fit into buff= er"), + _("interface name %1$s does not fit into bu= ffer"), ifaceLock->ifname); g_free(ifaceLock); return -1; @@ -607,8 +607,8 @@ learnIPAddressThread(void *arg) =20 if ((inetaddr =3D virSocketAddrFormat(&sa)) !=3D NULL) { if (virNWFilterIPAddrMapAddIPAddr(req->binding->portdevname, i= netaddr) < 0) { - VIR_ERROR(_("Failed to add IP address %s to IP address " - "cache for interface %s"), inetaddr, req->bindin= g->portdevname); + VIR_ERROR(_("Failed to add IP address %1$s to IP address c= ache for interface %2$s"), + inetaddr, req->binding->portdevname); } =20 ret =3D virNWFilterInstantiateFilterLate(req->driver, @@ -620,8 +620,7 @@ learnIPAddressThread(void *arg) } else { if (showError) virReportSystemError(req->status, - _("encountered an error on interface %s " - "index %d"), + _("encountered an error on interface %1$s= index %2$d"), req->binding->portdevname, req->ifindex); =20 techdriver->applyDropAllRules(req->binding->portdevname); --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678465004; cv=none; d=zohomail.com; s=zohoarc; b=mr74GBXAtBcS05uMKZqjKG6zpHZZ+gEZS/5Qo4LwkHcfcPewKQaT+Y3lNWvtbSepWg29XYoI0Z3MQ/kH15NS8p9udXLcNTsK4IAbJv2Yzet3hl9PwRiDtUXbkZNfb3qy+5KzS8hEkfqWpMbGJkMhUHuiXCuZA29pcDjkMDrxXX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678465004; 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=IdPjxOErqmfkZ8EV4vuzmhVXPX7ULUIrxIDaPUEIOos=; b=FgloI6shn1rPp3Adg8x8Cq1lyYtqesU7V2Liai/kkLJsoJDIuKkovUV35R/IYVcC8CdRjDqRou00wFx530nOuuaItiQ6i41rsqHpX2xnrhf4+QSEIlaKGH23IkMlsh82UOKN2Evk0rFPIQ10JL7oJpJA4DhDdvsmzZJxGr7ITiY= 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 1678465004342147.96043854353388; Fri, 10 Mar 2023 08:16:44 -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-589-rXvjxMJONA2mx3Gv4OPPQw-1; Fri, 10 Mar 2023 11:11:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6EDD6884369; Fri, 10 Mar 2023 16:10:47 +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 58D162026D4B; Fri, 10 Mar 2023 16:10:47 +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 47A8019472CA; Fri, 10 Mar 2023 16:10:47 +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 8CEF519472D1 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 94FE14051E44; Fri, 10 Mar 2023 16:10:43 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3AA8C4051E4A for ; Fri, 10 Mar 2023 16:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678465003; 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=IdPjxOErqmfkZ8EV4vuzmhVXPX7ULUIrxIDaPUEIOos=; b=Qfpry5OE/51qOqKO+oZt7ZMHwUEj0Os/f8E4URejttbNptyiES/zsWeAVLvk9qSmQOPbCJ GSLwT0YqKGeSCTtVuhfNXg2Zb4+N90ur8OALUwEDKT50xcD3Ozwort2ab59hjUtkkHnUZZ i9PinR2OCqVirsGhlVY8BYi8K76niM8= X-MC-Unique: rXvjxMJONA2mx3Gv4OPPQw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 23/51] openvz: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:39 +0100 Message-Id: <4895d5bbbed401e4baa6bac7a573ebd41d1b5fd8.1678463799.git.jdenemar@redhat.com> 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.4 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: 1678465005145100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/openvz/openvz_conf.c | 29 +++++++++++++------------ src/openvz/openvz_driver.c | 43 +++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index c28d0e9f43..1331860a82 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -174,7 +174,7 @@ openvzReadNetworkConf(virDomainDef *def, ret =3D openvzReadVPSConfigParam(veid, "IP_ADDRESS", &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read 'IP_ADDRESS' from config for cont= ainer %d"), + _("Could not read 'IP_ADDRESS' from config for cont= ainer %1$d"), veid); goto error; } else if (ret > 0) { @@ -200,7 +200,7 @@ openvzReadNetworkConf(virDomainDef *def, ret =3D openvzReadVPSConfigParam(veid, "NETIF", &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read 'NETIF' from config for container= %d"), + _("Could not read 'NETIF' from config for container= %1$d"), veid); goto error; } else if (ret > 0) { @@ -283,7 +283,7 @@ openvzReadFSConf(virDomainDef *def, ret =3D openvzReadVPSConfigParam(veid, "OSTEMPLATE", &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read 'OSTEMPLATE' from config for cont= ainer %d"), + _("Could not read 'OSTEMPLATE' from config for cont= ainer %1$d"), veid); goto error; } else if (ret > 0) { @@ -297,7 +297,7 @@ openvzReadFSConf(virDomainDef *def, ret =3D openvzReadVPSConfigParam(veid, "VE_PRIVATE", &temp); if (ret <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read 'VE_PRIVATE' from config for = container %d"), + _("Could not read 'VE_PRIVATE' from config for = container %1$d"), veid); goto error; } @@ -319,7 +319,7 @@ openvzReadFSConf(virDomainDef *def, if (ret > 0) { if (openvzParseBarrierLimit(temp, &barrier, &limit)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read '%s' from config for containe= r %d"), + _("Could not read '%1$s' from config for contai= ner %2$d"), param, veid); goto error; } else { @@ -365,15 +365,15 @@ openvzReadMemConf(virDomainDef *def, int veid) ret =3D openvzReadVPSConfigParam(veid, param, &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read '%s' from config for container %d= "), + _("Could not read '%1$s' from config for container = %2$d"), param, veid); goto error; } else if (ret > 0) { ret =3D openvzParseBarrierLimit(temp, &barrier, NULL); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse barrier of '%s' " - "from config for container %d"), param, veid); + _("Could not parse barrier of '%1$s' from confi= g for container %2$d"), + param, veid); goto error; } if (barrier =3D=3D LONG_MAX) @@ -387,15 +387,15 @@ openvzReadMemConf(virDomainDef *def, int veid) ret =3D openvzReadVPSConfigParam(veid, param, &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read '%s' from config for container %d= "), + _("Could not read '%1$s' from config for container = %2$d"), param, veid); goto error; } else if (ret > 0) { ret =3D openvzParseBarrierLimit(temp, &barrier, &limit); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse barrier and limit of '%s' " - "from config for container %d"), param, veid); + _("Could not parse barrier and limit of '%1$s' = from config for container %2$d"), + param, veid); goto error; } if (barrier =3D=3D LONG_MAX) @@ -490,7 +490,7 @@ int openvzLoadDomains(struct openvz_driver *driver) ret =3D openvzReadVPSConfigParam(veid, "CPUS", &temp); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read config for container %d"), + _("Could not read config for container %1$d"), veid); return -1; } else if (ret > 0) { @@ -860,7 +860,7 @@ openvzGetVPSUUID(int vpsid, char *uuidstr, size_t len) if (iden !=3D NULL && uuidbuf !=3D NULL && STREQ(iden, "#UUID:")) { if (virStrcpy(uuidstr, uuidbuf, len) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid uuid %s"), uuidbuf); + _("invalid uuid %1$s"), uuidbuf); goto cleanup; } break; @@ -1034,8 +1034,7 @@ openvzDomainDeviceDefPostParse(virDomainDeviceDef *de= v, if (dev->type =3D=3D VIR_DOMAIN_DEVICE_HOSTDEV && dev->data.hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIE= S) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode 'capabilities' is not " - "supported in %s"), + _("hostdev mode 'capabilities' is not supported in = %1$s"), virDomainVirtTypeToString(def->virtType)); return -1; } diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 5c18f5238b..69e4c9899b 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -79,7 +79,7 @@ openvzDomObjFromDomainLocked(struct openvz_driver *driver, virUUIDFormat(uuid, uuidstr); =20 virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); return NULL; } =20 @@ -235,7 +235,7 @@ openvzDomainGetHostname(virDomainPtr dom, unsigned int = flags) /* vzlist prints an unset hostname as '-' */ if (STREQ(hostname, "-")) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Hostname of '%s' is unset"), vm->def->name); + _("Hostname of '%1$s' is unset"), vm->def->name); VIR_FREE(hostname); } =20 @@ -258,7 +258,7 @@ static virDomainPtr openvzDomainLookupByID(virConnectPt= r conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id '%d'"), id); + _("no domain with matching id '%1$d'"), id); goto cleanup; } =20 @@ -330,7 +330,7 @@ static virDomainPtr openvzDomainLookupByName(virConnect= Ptr conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -361,7 +361,7 @@ static int openvzDomainGetInfo(virDomainPtr dom, } else { if (openvzGetProcessInfo(&(info->cpuTime), dom->id) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot read cputime for domain %d"), dom->id= ); + _("cannot read cputime for domain %1$d"), dom->= id); goto cleanup; } } @@ -969,7 +969,7 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned = int flags) =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), dom->name); + _("no domain with matching name '%1$s'"), dom->name= ); goto cleanup; } =20 @@ -1106,7 +1106,7 @@ static int openvzConnectGetMaxVcpus(virConnectPtr con= n G_GNUC_UNUSED, return 1028; /* OpenVZ has no limitation */ =20 virReportError(VIR_ERR_INVALID_ARG, - _("unknown type '%s'"), type); + _("unknown type '%1$s'"), type); return -1; } =20 @@ -1116,7 +1116,7 @@ openvzDomainGetVcpusFlags(virDomainPtr dom G_GNUC_UNU= SED, { if (flags !=3D (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported flags (0x%x)"), flags); + _("unsupported flags (0x%1$x)"), flags); return -1; } =20 @@ -1166,7 +1166,7 @@ static int openvzDomainSetVcpusFlags(virDomainPtr dom= , unsigned int nvcpus, =20 if (flags !=3D VIR_DOMAIN_AFFECT_LIVE) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported flags (0x%x)"), flags); + _("unsupported flags (0x%1$x)"), flags); return -1; } =20 @@ -1225,7 +1225,7 @@ static virDrvOpenStatus openvzConnectOpen(virConnectP= tr conn, /* If path isn't /system, then they typoed, so tell them correct path = */ if (STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected OpenVZ URI path '%s', try openvz:///s= ystem"), + _("unexpected OpenVZ URI path '%1$s', try openvz://= /system"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -1330,7 +1330,7 @@ static int openvzConnectListDomains(virConnectPtr con= n G_GNUC_UNUSED, break; if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse VPS ID %s"), buf); + _("Could not parse VPS ID %1$s"), buf); continue; } ids[got++] =3D veid; @@ -1378,7 +1378,7 @@ static int openvzConnectListDefinedDomains(virConnect= Ptr conn G_GNUC_UNUSED, break; if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse VPS ID %s"), buf); + _("Could not parse VPS ID %1$s"), buf); continue; } g_snprintf(vpsname, sizeof(vpsname), "%d", veid); @@ -1502,14 +1502,14 @@ openvzDomainGetBarrierLimit(virDomainPtr domain, virSkipSpaces(&tmp); if (virStrToLong_ull(tmp, &endp, 10, barrier) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Can't parse limit from vzlist output '%s'"), out= put); + _("Can't parse limit from vzlist output '%1$s'"), o= utput); return -1; } tmp =3D endp; virSkipSpaces(&tmp); if (virStrToLong_ull(tmp, &endp, 10, limit) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Can't parse barrier from vzlist output '%s'"), o= utput); + _("Can't parse barrier from vzlist output '%1$s'"),= output); return -1; } =20 @@ -1528,7 +1528,7 @@ openvzDomainSetBarrierLimit(virDomainPtr domain, /* LONG_MAX indicates unlimited so reject larger values */ if (barrier > LONG_MAX || limit > LONG_MAX) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to set %s for %s: value too large"), para= m, + _("Failed to set %1$s for %2$s: value too large"), = param, domain->name); return -1; } @@ -1748,7 +1748,7 @@ openvzUpdateDevice(virDomainDef *vmdef, =20 if (pos < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s doesn't exist."), fs->dst); + _("target %1$s doesn't exist."), fs->dst); return -1; } cur =3D vmdef->fss[pos]; @@ -1770,7 +1770,7 @@ openvzUpdateDevice(virDomainDef *vmdef, cur->space_soft_limit =3D fs->space_soft_limit; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can't modify device type '%s'"), + _("Can't modify device type '%1$s'"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -1917,7 +1917,7 @@ openvzConnectSupportsFeature(virConnectPtr conn G_GNU= C_UNUSED, int feature) 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; case VIR_DRV_FEATURE_MIGRATION_PARAMS: @@ -2044,14 +2044,14 @@ openvzDomainMigratePrepare3Params(virConnectPtr dco= nn, =20 if (uri =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("unable to parse URI: %s"), + _("unable to parse URI: %1$s"), uri_in); goto error; } =20 if (uri->server =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("missing host in migration URI: %s"), + _("missing host in migration URI: %1$s"), uri_in); goto error; } @@ -2157,8 +2157,7 @@ openvzDomainMigrateFinish3Params(virConnectPtr dconn, !(vm =3D virDomainObjListFindByName(driver->domains, dname))) { /* Migration obviously failed if the domain doesn't exist */ virReportError(VIR_ERR_OPERATION_FAILED, - _("Migration failed. No domain on destination host " - "with matching name '%s'"), + _("Migration failed. No domain on destination host = with matching name '%1$s'"), NULLSTR(dname)); goto cleanup; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464798; cv=none; d=zohomail.com; s=zohoarc; b=Z8BweiwFMWtV8VA8Dt6x+VFs1d9PLOGrV7+T7Cd19jXQm0o6mEDdaqTadBa1b0pH14uyUYiJ3ZtM9cCohbg7xcj0ySIh++4o6VvuKMaKE0LqcO7K0VN06c8Syc66ZY5B7gt+o9FD//lH+CXxvZQgrREo/1MEWtNrjwlw9gxjdxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464798; 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=r3y9Wk/9QMcDhdk3FOG9Th2EqntVt+JatUYk/pWU5Ms=; b=kG1L71CwmxtIayQgJ4XPTqNMRtWeF5Xb6t0Gvub955zihdQPcZSQUtHahEqwpv8+E04KMHCYUv0xOIIo+UzSeYs1mO6q0NWa5a04jvLABkrA2I3hR2mBK508Ah/rTyqJtK9WipAjCZE4ufOmaaFhfTFL4M/IoBD58nCg5ESfNfE= 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 1678464798904934.8426172789135; Fri, 10 Mar 2023 08:13:18 -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-267-B5EGlZPhOv6c5wGMSKgySg-1; Fri, 10 Mar 2023 11:11:24 -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 7CD9D8564EB; Fri, 10 Mar 2023 16:10:45 +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 60F7B492B14; Fri, 10 Mar 2023 16:10:45 +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 31DB21946A7D; Fri, 10 Mar 2023 16:10:45 +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 B6A671946A69 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A727E492B02; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D733492B00 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464797; 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=r3y9Wk/9QMcDhdk3FOG9Th2EqntVt+JatUYk/pWU5Ms=; b=df+V39v2Daz6AMmdE/Nx0eElh+eYIN2ZpSxNL3bmN6MkwIgehn68qu3r4aoRMpcJG+j/FP kDSwK2QlDf95FYB9UDhkjGwlwDwwdFdW/21z1W7vXNBd1yn0mnPorGaaN+XvKNsi12DBqG e+s4xV2NM+9Xe7HF92tIQbsmHmkV/S0= X-MC-Unique: B5EGlZPhOv6c5wGMSKgySg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 24/51] qemu/qemu_command: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:40 +0100 Message-Id: <63fce2f9d7a4132665ca4d37836c9626c69d7de8.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.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: 1678464799700100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_command.c | 82 ++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 929bcc0be1..843dd103c7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -357,7 +357,7 @@ qemuBuildDeviceAddressPCIGetBus(const virDomainDef *dom= ainDef, =20 if (!contAlias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device alias was not set for PCI control= ler with index '%u' required for device at address '%s'"), + _("Device alias was not set for PCI control= ler with index '%1$u' required for device at address '%2$s'"), info->addr.pci.bus, devStr); return NULL; } @@ -382,7 +382,7 @@ qemuBuildDeviceAddressPCIGetBus(const virDomainDef *dom= ainDef, =20 if (!contAlias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find PCI controller with index '%u' re= quired for device at address '%s'"), + _("Could not find PCI controller with index '%1$u' = required for device at address '%2$s'"), info->addr.pci.bus, devStr); return NULL; } @@ -467,7 +467,7 @@ qemuBuildDeviceAddresDriveProps(virJSONValue *props, case VIR_DOMAIN_DISK_BUS_SCSI: if (!(controller =3D virDomainDeviceFindSCSIController(domainDef, = &info->addr.drive))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find a SCSI controller for idx=3D%= d"), + _("unable to find a SCSI controller for idx=3D%= 1$d"), info->addr.drive.controller); return -1; } @@ -511,7 +511,7 @@ qemuBuildDeviceAddresDriveProps(virJSONValue *props, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected SCSI controller model %d"), + _("Unexpected SCSI controller model %1$d"), controller->model); return -1; } @@ -527,7 +527,7 @@ qemuBuildDeviceAddresDriveProps(virJSONValue *props, case VIR_DOMAIN_DISK_BUS_LAST: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("address type drive is not supported for bus '%s'= "), + _("address type drive is not supported for bus '%1$= s'"), NULLSTR(virDomainDiskBusTypeToString(info->addr.dri= ve.diskbus))); return -1; } @@ -778,7 +778,7 @@ qemuDeviceVideoGetModel(virQEMUCaps *qemuCaps, =20 if (!model || STREQ(model, "")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid model for video type '%s'"), + _("invalid model for video type '%1$s'"), virDomainVideoTypeToString(video->type)); return NULL; } @@ -1003,7 +1003,7 @@ qemuBuildVirtioDevGetConfig(const virDomainDeviceDef = *device, case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected address type for '%s'"), baseName); + _("Unexpected address type for '%1$s'"), baseName); return -1; =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: @@ -1020,8 +1020,7 @@ qemuBuildVirtioDevGetConfig(const virDomainDeviceDef = *device, if (has_tmodel || has_ntmodel) { if (info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio (non-)transitional models are not " - "supported for address type=3D%s"), + _("virtio (non-)transitional models are not sup= ported for address type=3D%1$s"), virDomainDeviceAddressTypeToString(info->type)); } =20 @@ -1532,7 +1531,7 @@ qemuBuildChardevCommand(virCommand *cmd, case VIR_DOMAIN_CHR_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chardev '%s'"), + _("unsupported chardev '%1$s'"), virDomainChrTypeToString(dev->type)); return -1; } @@ -1860,7 +1859,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, case VIR_DOMAIN_DISK_BUS_LAST: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported disk bus '%s' with device setup"), + _("unsupported disk bus '%1$s' with device setup"), NULLSTR(virDomainDiskBusTypeToString(disk->bus))); return NULL; } @@ -1897,7 +1896,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, =20 if (virStrToLong_ull(disk->wwn, NULL, 16, &w) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Failed to parse wwn '%s' as number"), disk->= wwn); + _("Failed to parse wwn '%1$s' as number"), disk= ->wwn); return NULL; } =20 @@ -2493,7 +2492,7 @@ qemuValidateDomainDeviceDefControllerUSB(const virDom= ainControllerDef *def, =20 if (!virQEMUCapsGet(qemuCaps, qemuControllerModelUSBToCaps(def->model)= )) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("USB controller model '%s' not supported in this = QEMU binary"), + _("USB controller model '%1$s' not supported in thi= s QEMU binary"), virDomainControllerModelUSBTypeToString(def->model)= ); return -1; } @@ -2502,7 +2501,7 @@ qemuValidateDomainDeviceDefControllerUSB(const virDom= ainControllerDef *def, if (def->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI && def->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("usb controller type '%s' doesn't support 'po= rts' with this QEMU binary"), + _("usb controller type '%1$s' doesn't support '= ports' with this QEMU binary"), virDomainControllerModelUSBTypeToString(def->mo= del)); return -1; } @@ -2637,13 +2636,13 @@ qemuBuildControllerSCSIDevProps(virDomainController= Def *def, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_NCR53C90: /* It is built-in dev = */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported controller model: %s"), + _("Unsupported controller model: %1$s"), virDomainControllerModelSCSITypeToString(def->model= )); return NULL; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected SCSI controller model %d"), + _("Unexpected SCSI controller model %1$d"), def->model); return NULL; } @@ -2679,7 +2678,7 @@ qemuBuildControllerPCIDevProps(virDomainControllerDef= *def, =20 if (!modelName) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown virDomainControllerPCIModelName value: %= d"), + _("Unknown virDomainControllerPCIModelName value: %= 1$d"), pciopts->modelName); return -1; } @@ -2753,7 +2752,7 @@ qemuBuildControllerPCIDevProps(virDomainControllerDef= *def, case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected PCI controller model %d"), + _("Unexpected PCI controller model %1$d"), def->model); return -1; } @@ -2850,7 +2849,7 @@ qemuBuildControllerDevProps(const virDomainDef *domai= nDef, case VIR_DOMAIN_CONTROLLER_TYPE_ISA: case VIR_DOMAIN_CONTROLLER_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported controller type: %s"), + _("Unsupported controller type: %1$s"), virDomainControllerTypeToString(def->type)); return -1; } @@ -3825,7 +3824,7 @@ qemuBuildHostNetProps(virDomainObj *vm, =20 if (net->script && netType !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("scripts are not supported on interfaces of type = %s"), + _("scripts are not supported on interfaces of type = %1$s"), virDomainNetTypeToString(netType)); return NULL; } @@ -4023,7 +4022,7 @@ qemuBuildHostNetProps(virDomainObj *vm, case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("network device type '%s' is not supported by thi= s hypervisor"), + _("network device type '%1$s' is not supported by t= his hypervisor"), virDomainNetTypeToString(netType)); return NULL; =20 @@ -4643,7 +4642,7 @@ qemuBuildPCIHostdevDevProps(const virDomainDef *def, case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN: case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid PCI passthrough type '%s'"), + _("invalid PCI passthrough type '%1$s'"), virDomainHostdevSubsysPCIBackendTypeToString(pcisrc= ->backend)); return NULL; } @@ -4846,28 +4845,28 @@ qemuOpenChrChardevUNIXSocket(const virDomainChrSour= ceDef *dev) addr.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.sun_path, dev->data.nix.path) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("UNIX socket path '%s' too long"), + _("UNIX socket path '%1$s' too long"), dev->data.nix.path); goto error; } =20 if (unlink(dev->data.nix.path) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to unlink %s"), + _("Unable to unlink %1$s"), dev->data.nix.path); goto error; } =20 if (bind(fd, (struct sockaddr *)&addr, addrlen) < 0) { virReportSystemError(errno, - _("Unable to bind to UNIX socket path '%s'"), + _("Unable to bind to UNIX socket path '%1$s'"= ), dev->data.nix.path); goto error; } =20 if (listen(fd, 1) < 0) { virReportSystemError(errno, - _("Unable to listen to UNIX socket path '%s'"= ), + _("Unable to listen to UNIX socket path '%1$s= '"), dev->data.nix.path); goto error; } @@ -5190,7 +5189,7 @@ qemuBuildVirtioSerialPortDevProps(const virDomainDef = *def, dev->target.name && STRNEQ(dev->target.name, "com.redhat.spice.0")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported spicevmc target name '%s'"), + _("Unsupported spicevmc target name '%1$s'"), dev->target.name); return NULL; } @@ -5629,7 +5628,7 @@ qemuBuildSmbiosCommandLine(virCommand *cmd, =20 if (!source) { virReportError(VIR_ERR_XML_ERROR, - _("Domain '%s' sysinfo are not available"), + _("Domain '%1$s' sysinfo are not available"), def->name); return -1; } @@ -5811,7 +5810,7 @@ qemuBuildClockArgStr(virDomainClockDef *def) case VIR_DOMAIN_CLOCK_OFFSET_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported clock offset '%s'"), + _("unsupported clock offset '%1$s'"), virDomainClockOffsetTypeToString(def->offset)); return NULL; } @@ -6201,7 +6200,7 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, virBufferAddLit(buf, "host"); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected host-model CPU for %s architectur= e"), + _("unexpected host-model CPU for %1$s architect= ure"), virArchToString(def->os.arch)); return -1; } @@ -6219,8 +6218,8 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, cpu->features && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU features not supported by hypervisor for %s " - "architecture"), virArchToString(def->os.arch)); + _("CPU features not supported by hypervisor for %1$= s architecture"), + virArchToString(def->os.arch)); return -1; } =20 @@ -6519,8 +6518,7 @@ qemuBuildCpuCommandLine(virCommand *cmd, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU flags requested but can't determine " - "default CPU for arch %s"), + _("CPU flags requested but can't determine defa= ult CPU for arch %1$s"), virArchToString(def->os.arch)); return -1; } @@ -8354,7 +8352,7 @@ qemuInterfaceVhostuserConnect(virCommand *cmd, case VIR_DOMAIN_CHR_TYPE_DBUS: case VIR_DOMAIN_CHR_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("vhost-user type '%s' not supported"), + _("vhost-user type '%1$s' not supported"), virDomainChrTypeToString(net->data.vhostuser->type)= ); return -1; } @@ -9095,7 +9093,7 @@ qemuBuildSerialCommandLine(virCommand *cmd, =20 if (caps && !virQEMUCapsGet(qemuCaps, caps)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' is not supported in this QEMU binar= y"), + _("'%1$s' is not supported in this QEMU bin= ary"), virDomainChrSerialTargetModelTypeToString(s= erial->targetModel)); return -1; } @@ -9378,15 +9376,15 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev, return -1; =20 if ((*tpmfd =3D open(tpmdev, O_RDWR)) < 0) { - virReportSystemError(errno, _("Could not open TPM device %s"), + virReportSystemError(errno, _("Could not open TPM device %1$s"), tpmdev); return -1; } =20 if ((*cancelfd =3D open(cancel_path, O_WRONLY)) < 0) { virReportSystemError(errno, - _("Could not open TPM device's cancel " - "path %s"), cancel_path); + _("Could not open TPM device's cancel path %1= $s"), + cancel_path); VIR_FORCE_CLOSE(*tpmfd); return -1; } @@ -9928,7 +9926,7 @@ qemuBuildCommandLineValidate(virQEMUDriver *driver, def->os.type =3D=3D VIR_DOMAIN_OSTYPE_XEN || def->os.type =3D=3D VIR_DOMAIN_OSTYPE_LINUX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu emulator '%s' does not support xen"), + _("qemu emulator '%1$s' does not support xen"), def->emulator); return -1; } @@ -10488,7 +10486,7 @@ qemuBuildSerialChrDeviceProps(const virDomainDef *d= ef, =20 if (caps && !virQEMUCapsGet(qemuCaps, caps)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' is not supported in this QEMU binary"), + _("'%1$s' is not supported in this QEMU binary"= ), virDomainChrSerialTargetModelTypeToString(seria= l->targetModel)); return NULL; } @@ -10620,7 +10618,7 @@ qemuBuildConsoleChrDeviceProps(const virDomainDef *= def, case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_OPENVZ: case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported console target type %s"), + _("unsupported console target type %1$s"), NULLSTR(virDomainChrConsoleTargetTypeToString(chr->= targetType))); break; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464697; cv=none; d=zohomail.com; s=zohoarc; b=hs10PPHX6975PWT+lRLz0dkstpJBW71j3Te84QZzs4ogwssGHGRLeIFGIXTY59v5vGVUhbCqnBWfCpBE6W+cCnLOmcD2NAwwBUWPP52UUlK2+cI/UTHVCmQ5B7ifH+9No8/Xl+XAOBaSrCBm9DrpmamIcSxhms3g0Jt45E3RY2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464697; 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=yrR09S5/OQBY7B6V/Z6dlxK6BHb35Q8Vw/6WrL+tlx4=; b=IIe/gkMN8g8CFOWGVwCVXQFSKhx6+kMY6+IlkAGepSqUsRlKDdj0KAZyg9fyX6D8YOKDutdvsqFf9FF9yw911HRIURFg6MPdpHpkO/lYVTejVqCOzLhNcEDhILD8LbC5B1KmO13EE9drfKxqH3RK1uRwa+bHIoVTEIhziVRMxXI= 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 1678464697575468.82864450373336; Fri, 10 Mar 2023 08:11:37 -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-563-Uz8q_pudNxaK-LsE3FIaSA-1; Fri, 10 Mar 2023 11:11:28 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBFDB830F81; Fri, 10 Mar 2023 16:10:47 +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 C34D714171BE; Fri, 10 Mar 2023 16:10:47 +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 9055319472CD; Fri, 10 Mar 2023 16:10:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 11C6F1946A71 for ; Fri, 10 Mar 2023 16:10:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 04C7A2166B2D; Fri, 10 Mar 2023 16:10:46 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82E932166B2B for ; Fri, 10 Mar 2023 16:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464696; 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=yrR09S5/OQBY7B6V/Z6dlxK6BHb35Q8Vw/6WrL+tlx4=; b=Vz62LhxRZmL0EhCe7gjkTVJ/5AQ97tOQuArKV9Pr4iJX3HcrafVfXEZ2Fe7NEFMmzPvFDv Uz8gWPpzoAaOBJRWC1GzQvQ2oAyz0epQvt6mlEPOgCSZwEW/HQmbHmjSZAXfqzRIbhJTlG SXfhK2PxL1+KmA33Frx7YZ3VL2u19Z0= X-MC-Unique: Uz8q_pudNxaK-LsE3FIaSA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 25/51] qemu/qemu_domain: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:41 +0100 Message-Id: <9159eadd2c3451b5b37149678c0a789395da00fa.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.7 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: 1678464699145100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 188 +++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 103 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0feab09bee..e27b805bb0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -446,7 +446,7 @@ qemuDomainObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); return NULL; } @@ -612,7 +612,7 @@ qemuDomainMasterKeyReadFile(qemuDomainObjPrivate *priv) =20 if (!virFileExists(path)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain master key file doesn't exist in %s"), + _("domain master key file doesn't exist in %1$s"), priv->libDir); goto error; } @@ -633,7 +633,7 @@ qemuDomainMasterKeyReadFile(qemuDomainObjPrivate *priv) =20 if (masterKeyLen !=3D QEMU_DOMAIN_MASTER_KEY_LEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid master key read, size=3D%zd"), masterKey= Len); + _("invalid master key read, size=3D%1$zd"), masterK= eyLen); goto error; } =20 @@ -1378,7 +1378,7 @@ qemuDomainSecretInfoTLSNew(qemuDomainObjPrivate *priv, =20 if (virUUIDParse(secretUUID, seclookupdef.u.uuid) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("malformed TLS secret uuid '%s' provided"), + _("malformed TLS secret uuid '%1$s' provided"), secretUUID); return NULL; } @@ -2616,12 +2616,12 @@ qemuDomainObjPrivateXMLParseVcpu(xmlNodePtr node, if (idstr && (virStrToLong_uip(idstr, NULL, 10, &idx) < 0)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse vcpu index '%s'"), idstr); + _("cannot parse vcpu index '%1$s'"), idstr); return -1; } if (!(vcpu =3D virDomainDefGetVcpu(def, idx))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid vcpu index '%u'"), idx); + _("invalid vcpu index '%1$u'"), idx); return -1; } =20 @@ -3090,7 +3090,7 @@ qemuDomainObjPrivateXMLParseSlirpFeatures(xmlNodePtr = featuresNode, feature =3D qemuSlirpFeatureTypeFromString(str); if (feature < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown slirp feature %s"), str); + _("Unknown slirp feature %1$s"), str); return -1; } =20 @@ -3143,7 +3143,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, default: VIR_FREE(monitorpath); virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported monitor type '%s'"), + _("unsupported monitor type '%1$s'"), virDomainChrTypeToString(priv->monConfig->type)); return -1; } @@ -3166,7 +3166,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, =20 if (ns < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed namespace name: %s"), + _("malformed namespace name: %1$s"), next->name); return -1; } @@ -3206,7 +3206,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, int flag =3D virQEMUCapsTypeFromString(str); if (flag < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown qemu capabilities flag %s"),= str); + _("Unknown qemu capabilities flag %1$s"= ), str); return -1; } virQEMUCapsSet(qemuCaps, flag); @@ -3600,7 +3600,7 @@ qemuDomainDefNamespaceParseOverrideProperties(qemuDom= ainXmlNsOverrideProperty *p case QEMU_DOMAIN_XML_NS_OVERRIDE_SIGNED: if (virStrToLong_ll(prop->value, NULL, 10, &ll) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid value '%s' of 'value' attribute = of 'qemu:property'"), + _("invalid value '%1$s' of 'value' attribut= e of 'qemu:property'"), prop->value); return -1; } @@ -3610,7 +3610,7 @@ qemuDomainDefNamespaceParseOverrideProperties(qemuDom= ainXmlNsOverrideProperty *p case QEMU_DOMAIN_XML_NS_OVERRIDE_UNSIGNED: if (virStrToLong_ullp(prop->value, NULL, 10, &ull) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid value '%s' of 'value' attribute = of 'qemu:property'"), + _("invalid value '%1$s' of 'value' attribut= e of 'qemu:property'"), prop->value); return -1; } @@ -3620,7 +3620,7 @@ qemuDomainDefNamespaceParseOverrideProperties(qemuDom= ainXmlNsOverrideProperty *p case QEMU_DOMAIN_XML_NS_OVERRIDE_BOOL: if (STRNEQ(prop->value, "true") && STRNEQ(prop->value, "false"= )) { virReportError(VIR_ERR_XML_ERROR, - _("invalid value '%s' of 'value' attribute = of 'qemu:property'"), + _("invalid value '%1$s' of 'value' attribut= e of 'qemu:property'"), prop->value); return -1; } @@ -3921,7 +3921,7 @@ qemuDomainDefSuggestDefaultAudioBackend(virQEMUDriver= *driver, } else { if (((*audioBackend) =3D qemuAudioDriverTypeFromString(audioen= v)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown QEMU_AUDIO_DRV setting %s"), aud= ioenv); + _("unknown QEMU_AUDIO_DRV setting %1$s"), a= udioenv); return -1; } } @@ -3933,7 +3933,7 @@ qemuDomainDefSuggestDefaultAudioBackend(virQEMUDriver= *driver, (((*audioSDLDriver) =3D virDomainAudioSDLDriverTypeFromString(sdldriver)) <=3D 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown SDL_AUDIODRIVER setting %s"), sdldri= ver); + _("unknown SDL_AUDIODRIVER setting %1$s"), sdld= river); return -1; } } @@ -4180,9 +4180,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, if (pciRoot >=3D 0) { if (def->controllers[pciRoot]->model !=3D VIR_DOMAIN_CONTROLLE= R_MODEL_PCI_ROOT) { virReportError(VIR_ERR_XML_ERROR, - _("The PCI controller with index=3D'0' must= be " - "model=3D'pci-root' for this machine type= , " - "but model=3D'%s' was found instead"), + _("The PCI controller with index=3D'0' must= be model=3D'pci-root' for this machine type, but model=3D'%1$s' was found = instead"), virDomainControllerModelPCITypeToString(def= ->controllers[pciRoot]->model)); return -1; } @@ -4203,9 +4201,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, if (pciRoot >=3D 0) { if (def->controllers[pciRoot]->model !=3D VIR_DOMAIN_CONTROLLE= R_MODEL_PCIE_ROOT) { virReportError(VIR_ERR_XML_ERROR, - _("The PCI controller with index=3D'0' must= be " - "model=3D'pcie-root' for this machine typ= e, " - "but model=3D'%s' was found instead"), + _("The PCI controller with index=3D'0' must= be model=3D'pcie-root' for this machine type, but model=3D'%1$s' was found= instead"), virDomainControllerModelPCITypeToString(def= ->controllers[pciRoot]->model)); return -1; } @@ -4478,7 +4474,7 @@ qemuDomainDefMachinePostParse(virDomainDef *def, def->virtType= ); if (!machine) { virReportError(VIR_ERR_INVALID_ARG, - _("could not get preferred machine for %s type= =3D%s"), + _("could not get preferred machine for %1$s typ= e=3D%2$s"), def->emulator, virDomainVirtTypeToString(def->virtType)); return -1; @@ -4809,7 +4805,7 @@ qemuDomainDefPostParseBasic(virDomainDef *def, if (!(def->emulator =3D virQEMUCapsGetDefaultEmulator( driver->hostarch, def->os.arch))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("No emulator found for arch '%s'"), + _("No emulator found for arch '%1$s'"), virArchToString(def->os.arch)); return 1; } @@ -4907,7 +4903,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef = *net, actualType =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER || actualType =3D=3D VIR_DOMAIN_NET_TYPE_VDPA)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - multiqueue is not supported f= or network interfaces of type %s"), + _("interface %1$s - multiqueue is not supported= for network interfaces of type %2$s"), macstr, virDomainNetTypeToString(actualType)); return -1; } @@ -4925,14 +4921,14 @@ qemuDomainValidateActualNetDef(const virDomainNetDe= f *net, actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE || actualType =3D=3D VIR_DOMAIN_NET_TYPE_ETHERNET)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - filterref is not supported fo= r network interfaces of type %s"), + _("interface %1$s - filterref is not supported = for network interfaces of type %2$s"), macstr, virDomainNetTypeToString(actualType)); return -1; } if (vport && vport->virtPortType !=3D VIR_NETDEV_VPORT_PROFILE_NON= E) { /* currently none of the defined virtualport types support ipt= ables */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - filterref is not supported fo= r network interfaces with virtualport type %s"), + _("interface %1$s - filterref is not supported = for network interfaces with virtualport type %2$s"), macstr, virNetDevVPortTypeToString(vport->virtP= ortType)); return -1; } @@ -4943,7 +4939,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef = *net, actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE || actualType =3D=3D VIR_DOMAIN_NET_TYPE_ETHERNET)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - custom tap device path is not sup= ported for network interfaces of type %s"), + _("interface %1$s - custom tap device path is not s= upported for network interfaces of type %2$s"), macstr, virDomainNetTypeToString(actualType)); return -1; } @@ -4951,7 +4947,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef = *net, if (net->teaming && net->teaming->type =3D=3D VIR_DOMAIN_NET_TEAMING_T= YPE_TRANSIENT && actualType !=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - teaming transient device must be = type=3D'hostdev', not '%s'"), + _("interface %1$s - teaming transient device must b= e type=3D'hostdev', not '%2$s'"), macstr, virDomainNetTypeToString(actualType)); return -1; } @@ -5315,30 +5311,27 @@ qemuDomainShmemDefPostParse(virDomainShmemDef *shm) if (!shm->server.enabled) { if (shm->model =3D=3D VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' is supported " - "only with server option enabled"), + _("shmem model '%1$s' is supported only with se= rver option enabled"), virDomainShmemModelTypeToString(shm->model)); return -1; } =20 if (shm->msi.enabled) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' doesn't support " - "msi"), + _("shmem model '%1$s' doesn't support msi"), virDomainShmemModelTypeToString(shm->model)); } } else { if (shm->model =3D=3D VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_PLAIN) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' is supported " - "only with server option disabled"), + _("shmem model '%1$s' is supported only with se= rver option disabled"), virDomainShmemModelTypeToString(shm->model)); return -1; } =20 if (shm->size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' does not support size setti= ng"), + _("shmem model '%1$s' does not support size set= ting"), virDomainShmemModelTypeToString(shm->model)); return -1; } @@ -5418,8 +5411,7 @@ qemuDomainControllerDefPostParse(virDomainControllerD= ef *cont, if (cont->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB1 || cont->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("USB controller model type 'qusb1' or 'qusb2'= " - "is not supported in %s"), + _("USB controller model type 'qusb1' or 'qusb2'= is not supported in %1$s"), virDomainVirtTypeToString(def->virtType)); return -1; } @@ -5427,7 +5419,7 @@ qemuDomainControllerDefPostParse(virDomainControllerD= ef *cont, cont->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI)= && cont->opts.usbopts.ports > QEMU_USB_XHCI_MAXPORTS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' controller only supports up to '%u' por= ts"), + _("'%1$s' controller only supports up to '%2$u'= ports"), virDomainControllerModelUSBTypeToString(cont->m= odel), QEMU_USB_XHCI_MAXPORTS); return -1; @@ -5472,10 +5464,7 @@ qemuDomainControllerDefPostParse(virDomainController= Def *cont, cont->opts.pciopts.numaNode >=3D (int)virDomainNumaGetNodeCount(def->numa)) { virReportError(VIR_ERR_XML_ERROR, - _("%s with index %d is " - "configured for a NUMA node (%d) " - "not present in the domain's " - " array (%zu)"), + _("%1$s with index %2$d is configured for a NUM= A node (%3$d) not present in the domain's array (%4$zu)"), virDomainControllerModelPCITypeToString(cont->m= odel), cont->idx, cont->opts.pciopts.numaNode, virDomainNumaGetNodeCount(def->numa)); @@ -6348,7 +6337,7 @@ qemuDomainObjExitRemote(virDomainObj *obj, =20 if (checkActive && !virDomainObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("domain '%s' is not running"), + _("domain '%1$s' is not running"), obj->def->name); return -1; } @@ -6791,7 +6780,7 @@ qemuDomainObjCheckMachineTaint(virQEMUDriver *driver, obj->def->virtType, obj->def->os.machine)) { qemuDomainObjTaintMsg(driver, obj, VIR_DOMAIN_TAINT_DEPRECATED_CON= FIG, logCtxt, - _("machine type '%s'"), + _("machine type '%1$s'"), obj->def->os.machine); } } @@ -6818,7 +6807,7 @@ qemuDomainObjCheckCPUTaint(virQEMUDriver *driver, obj->def->virtType, obj->def->cpu->model)) { qemuDomainObjTaintMsg(driver, obj, VIR_DOMAIN_TAINT_DEPRECATED= _CONFIG, logCtxt, - _("CPU model '%s'"), + _("CPU model '%1$s'"), obj->def->cpu->model); } break; @@ -6960,12 +6949,12 @@ qemuDomainLogContext *qemuDomainLogContextNew(virQE= MUDriver *driver, goto error; } else { if ((ctxt->writefd =3D open(ctxt->path, O_WRONLY | O_CREAT | O_APP= END, S_IRUSR | S_IWUSR)) < 0) { - virReportSystemError(errno, _("failed to create logfile %s"), + virReportSystemError(errno, _("failed to create logfile %1$s"), ctxt->path); goto error; } if (virSetCloseExec(ctxt->writefd) < 0) { - virReportSystemError(errno, _("failed to set close-on-exec fla= g on %s"), + virReportSystemError(errno, _("failed to set close-on-exec fla= g on %1$s"), ctxt->path); goto error; } @@ -6976,26 +6965,26 @@ qemuDomainLogContext *qemuDomainLogContextNew(virQE= MUDriver *driver, if (mode =3D=3D QEMU_DOMAIN_LOG_CONTEXT_MODE_START && !driver->privileged && ftruncate(ctxt->writefd, 0) < 0) { - virReportSystemError(errno, _("failed to truncate %s"), + virReportSystemError(errno, _("failed to truncate %1$s"), ctxt->path); goto error; } =20 if (mode =3D=3D QEMU_DOMAIN_LOG_CONTEXT_MODE_START) { if ((ctxt->readfd =3D open(ctxt->path, O_RDONLY)) < 0) { - virReportSystemError(errno, _("failed to open logfile %s"), + virReportSystemError(errno, _("failed to open logfile %1$s= "), ctxt->path); goto error; } if (virSetCloseExec(ctxt->readfd) < 0) { - virReportSystemError(errno, _("failed to set close-on-exec= flag on %s"), + virReportSystemError(errno, _("failed to set close-on-exec= flag on %1$s"), ctxt->path); goto error; } } =20 if ((ctxt->pos =3D lseek(ctxt->writefd, 0, SEEK_END)) < 0) { - virReportSystemError(errno, _("failed to seek in log file %s"), + virReportSystemError(errno, _("failed to seek in log file %1$s= "), ctxt->path); goto error; } @@ -7127,7 +7116,7 @@ qemuDomainLogAppendMessage(virQEMUDriver *driver, goto cleanup; } else { if ((writefd =3D open(path, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR= | S_IWUSR)) < 0) { - virReportSystemError(errno, _("failed to create logfile %s"), + virReportSystemError(errno, _("failed to create logfile %1$s"), path); goto cleanup; } @@ -7206,7 +7195,7 @@ qemuDomainSnapshotWriteMetadata(virDomainObj *vm, =20 snapDir =3D g_strdup_printf("%s/%s", snapshotDir, vm->def->name); if (g_mkdir_with_parents(snapDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create snapshot directory '%= s'"), + virReportSystemError(errno, _("cannot create snapshot directory '%= 1$s'"), snapDir); return -1; } @@ -7250,7 +7239,7 @@ qemuDomainSnapshotForEachQcow2Raw(virQEMUDriver *driv= er, =20 if (!virStorageSourceIsLocalStorage(def->disks[i]->src)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("can't manipulate inactive snapshots of disk = '%s'"), + _("can't manipulate inactive snapshots of disk = '%1$s'"), def->disks[i]->dst); return -1; } @@ -7271,7 +7260,7 @@ qemuDomainSnapshotForEachQcow2Raw(virQEMUDriver *driv= er, "-d", false, i); } virReportError(VIR_ERR_OPERATION_INVALID, - _("Disk device '%s' does not support snapshotti= ng"), + _("Disk device '%1$s' does not support snapshot= ting"), def->disks[i]->dst); return -1; } @@ -7681,8 +7670,8 @@ qemuDomainStorageSourceValidateDepth(virStorageSource= *src, if (nlayers > QEMU_DOMAIN_STORAGE_SOURCE_CHAIN_MAX_DEPTH) { if (diskdst) virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("backing chains more than 200 layers deep are= not " - "supported for disk '%s'"), diskdst); + _("backing chains more than 200 layers deep are= not supported for disk '%1$s'"), + diskdst); else virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("backing chains more than 200 layers deep are= not " @@ -8199,7 +8188,7 @@ qemuDomainDiskChangeSupported(virDomainDiskDef *disk, break; \ if (disk->field !=3D orig_disk->field) { \ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, \ - _("cannot modify field '%s' of the disk"), \ + _("cannot modify field '%1$s' of the disk"), \ field_name); \ return false; \ } \ @@ -8211,7 +8200,7 @@ qemuDomainDiskChangeSupported(virDomainDiskDef *disk, break; \ if (STRNEQ_NULLABLE(disk->field, orig_disk->field)) { \ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, \ - _("cannot modify field '%s' of the disk"), \ + _("cannot modify field '%1$s' of the disk"), \ field_name); \ return false; \ } \ @@ -8221,7 +8210,7 @@ qemuDomainDiskChangeSupported(virDomainDiskDef *disk, CHECK_EQ(bus, "bus", false); if (STRNEQ(disk->dst, orig_disk->dst)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot modify field '%s' of the disk"), + _("cannot modify field '%1$s' of the disk"), "target"); return false; } @@ -8311,7 +8300,7 @@ qemuDomainDiskChangeSupported(virDomainDiskDef *disk, if (disk->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && !virDomainDeviceInfoAddressIsEqual(&disk->info, &orig_disk->info))= { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot modify field '%s' of the disk"), + _("cannot modify field '%1$s' of the disk"), "address"); return false; } @@ -8336,7 +8325,7 @@ qemuDomainDiskChangeSupported(virDomainDiskDef *disk, if (!virStoragePRDefIsEqual(disk->src->pr, orig_disk->src->pr)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot modify field '%s' of the disk"), + _("cannot modify field '%1$s' of the disk"), "reservations"); return false; } @@ -8355,7 +8344,7 @@ qemuDomainDiskBlockJobIsActive(virDomainDiskDef *disk) =20 if (disk->mirror) { virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, - _("disk '%s' already in active block job"), + _("disk '%1$s' already in active block job"), disk->dst); =20 return true; @@ -8364,7 +8353,7 @@ qemuDomainDiskBlockJobIsActive(virDomainDiskDef *disk) if (diskPriv->blockjob && qemuBlockJobIsRunning(diskPriv->blockjob)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("disk '%s' already in active block job"), + _("disk '%1$s' already in active block job"), disk->dst); return true; } @@ -8488,8 +8477,7 @@ qemuDomainABIStabilityCheck(const virDomainDef *src, =20 if (src->mem.source !=3D dst->mem.source) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memoryBacking source '%s' doesn't " - "match source memoryBacking source'%s'"), + _("Target memoryBacking source '%1$s' doesn't match= source memoryBacking source'%2$s'"), virDomainMemorySourceTypeToString(dst->mem.source), virDomainMemorySourceTypeToString(src->mem.source)); return false; @@ -8501,8 +8489,7 @@ qemuDomainABIStabilityCheck(const virDomainDef *src, =20 if (STRNEQ_NULLABLE(srcAlias, dstAlias)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target memory device alias '%s' doesn't " - "match source alias '%s'"), + _("Target memory device alias '%1$s' doesn't ma= tch source alias '%2$s'"), NULLSTR(srcAlias), NULLSTR(dstAlias)); return false; } @@ -8671,8 +8658,8 @@ qemuDomainAlignMemorySizes(virDomainDef *def) =20 if (mem > maxmemkb) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory size of NUMA node '%zu' overflowed af= ter " - "alignment"), i); + _("memory size of NUMA node '%1$zu' overflowed = after alignment"), + i); return -1; } virDomainNumaSetNodeMemorySize(def->numa, i, mem); @@ -8711,8 +8698,8 @@ qemuDomainAlignMemorySizes(virDomainDef *def) =20 if (def->mems[i]->size > maxmemkb) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("size of memory module '%zu' overflowed after= " - "alignment"), i); + _("size of memory module '%1$zu' overflowed aft= er alignment"), + i); return -1; } } @@ -9067,8 +9054,7 @@ qemuCheckMemoryDimmConflict(const virDomainDef *def, =20 if (mem->info.addr.dimm.slot =3D=3D tmp->info.addr.dimm.slot) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory device slot '%u' is already being " - "used by another memory device"), + _("memory device slot '%1$u' is already being = used by another memory device"), mem->info.addr.dimm.slot); return true; } @@ -9076,8 +9062,7 @@ qemuCheckMemoryDimmConflict(const virDomainDef *def, if (mem->info.addr.dimm.base !=3D 0 && mem->info.addr.dimm.base =3D=3D tmp->info.addr.dimm.base) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory device base '0x%llx' is already bein= g " - "used by another memory device"), + _("memory device base '0x%1$llx' is already be= ing used by another memory device"), mem->info.addr.dimm.base); return true; } @@ -9116,8 +9101,7 @@ qemuDomainDefValidateMemoryHotplugDevice(const virDom= ainMemoryDef *mem, if (mem->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM) { if (mem->info.addr.dimm.slot >=3D def->mem.memory_slots) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory device slot '%u' exceeds slots " - "count '%u'"), + _("memory device slot '%1$u' exceeds slots = count '%2$u'"), mem->info.addr.dimm.slot, def->mem.memory_s= lots); return -1; } @@ -9145,7 +9129,7 @@ qemuDomainDefValidateMemoryHotplugDevice(const virDom= ainMemoryDef *mem, if (mem->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && mem->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("only 'pci' addresses are supported for the %= s device"), + _("only 'pci' addresses are supported for the %= 1$s device"), virDomainMemoryModelTypeToString(mem->model)); return -1; } @@ -9153,7 +9137,7 @@ qemuDomainDefValidateMemoryHotplugDevice(const virDom= ainMemoryDef *mem, =20 case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hotplug is not supported for the %s device"), + _("hotplug is not supported for the %1$s device"), virDomainMemoryModelTypeToString(mem->model)); return -1; =20 @@ -9233,7 +9217,7 @@ qemuDomainDefValidateMemoryHotplug(const virDomainDef= *def, =20 if (nmems > def->mem.memory_slots) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory device count '%u' exceeds slots count '%u= '"), + _("memory device count '%1$u' exceeds slots count '= %2$u'"), nmems, def->mem.memory_slots); return -1; } @@ -9749,13 +9733,13 @@ qemuDomainValidateVcpuInfo(virDomainObj *vm) =20 if (vcpu->online && vcpupriv->tid =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu didn't report thread id for vcpu '%zu'"= ), i); + _("qemu didn't report thread id for vcpu '%1$zu= '"), i); return -1; } =20 if (!vcpu->online && vcpupriv->tid !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu reported thread id for inactive vcpu '%= zu'"), + _("qemu reported thread id for inactive vcpu '%= 1$zu'"), i); return -1; } @@ -10026,7 +10010,7 @@ qemuDomainDiskByName(virDomainDef *def, =20 if (!(ret =3D virDomainDiskByName(def, name, true))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' not found in domain"), name); + _("disk '%1$s' not found in domain"), name); return NULL; } =20 @@ -10284,7 +10268,7 @@ qemuDomainPrepareStorageSourceTLS(virStorageSource = *src, case VIR_STORAGE_NET_PROTOCOL_SSH: if (src->haveTLS =3D=3D VIR_TRISTATE_BOOL_YES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("TLS transport is not supported for disk prot= ocol '%s'"), + _("TLS transport is not supported for disk prot= ocol '%1$s'"), virStorageNetProtocolTypeToString(src->protocol= )); return -1; } @@ -10619,13 +10603,13 @@ qemuDomainGetStorageSourceByDevstr(const char *de= vstr, =20 if (virStorageFileParseBackingStoreStr(devstr, &target, &idx) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("failed to parse block device '%s'"), devstr); + _("failed to parse block device '%1$s'"), devstr); return NULL; } =20 if (!(disk =3D virDomainDiskByTarget(def, target))) { virReportError(VIR_ERR_INVALID_ARG, - _("failed to find disk '%s'"), target); + _("failed to find disk '%1$s'"), target); return NULL; } =20 @@ -10661,7 +10645,7 @@ qemuDomainGetStorageSourceByDevstr(const char *devs= tr, } =20 virReportError(VIR_ERR_INVALID_ARG, - _("failed to find disk '%s'"), devstr); + _("failed to find disk '%1$s'"), devstr); return NULL; } =20 @@ -10990,7 +10974,7 @@ qemuDomainPrepareStorageSourceFDs(virStorageSource = *src, =20 if (!(fdt =3D virHashLookup(priv->fds, src->fdgroup))) { virReportError(VIR_ERR_INVALID_ARG, - _("file descriptor group '%s' was not associated wi= th the domain"), + _("file descriptor group '%1$s' was not associated = with the domain"), src->fdgroup); return -1; } @@ -11013,7 +10997,7 @@ qemuDomainPrepareStorageSourceFDs(virStorageSource = *src, =20 if (tmpfd < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to duplicate file descriptor for fd g= roup '%s'"), + _("failed to duplicate file descriptor for fd g= roup '%1$s'"), src->fdgroup); return -1; } @@ -11521,21 +11505,21 @@ qemuDomainDiskBlockJobIsSupported(virDomainDiskDe= f *disk) { if (qemuDiskBusIsSD(disk->bus)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("block jobs are not supported on disk '%s' using = bus 'sd'"), + _("block jobs are not supported on disk '%1$s' usin= g bus 'sd'"), disk->dst); return false; } =20 if (disk->transient) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("block jobs are not supported on transient disk '= %s'"), + _("block jobs are not supported on transient disk '= %1$s'"), disk->dst); return false; } =20 if (virStorageSourceGetActualType(disk->src) =3D=3D VIR_STORAGE_TYPE_V= HOST_USER) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("block jobs are not supported on vhostuser disk '= %s'"), + _("block jobs are not supported on vhostuser disk '= %1$s'"), disk->dst); return false; } @@ -11615,10 +11599,8 @@ virQEMUFileOpenAs(uid_t fallback_uid, =20 case -1: virReportSystemError(-fd, oflags & O_CREAT - ? _("Failed to create file " - "'%s': couldn't determine fs = type") - : _("Failed to open file " - "'%s': couldn't determine fs = type"), + ? _("Failed to create file '%1$s'= : couldn't determine fs type") + : _("Failed to open file '%1$s': = couldn't determine fs type"), path); goto cleanup; =20 @@ -11647,8 +11629,8 @@ virQEMUFileOpenAs(uid_t fallback_uid, fallback_uid, fallback_gid, vfoflags | VIR_FILE_OPEN_FORK)) < 0) { virReportSystemError(-fd, oflags & O_CREAT - ? _("Error from child process creatin= g '%s'") - : _("Error from child process opening= '%s'"), + ? _("Error from child process creatin= g '%1$s'") + : _("Error from child process opening= '%1$s'"), path); goto cleanup; } @@ -11661,8 +11643,8 @@ virQEMUFileOpenAs(uid_t fallback_uid, =20 error: virReportSystemError(-fd, oflags & O_CREAT - ? _("Failed to create file '%s'") - : _("Failed to open file '%s'"), + ? _("Failed to create file '%1$s'") + : _("Failed to open file '%1$s'"), path); goto cleanup; } @@ -11790,14 +11772,14 @@ qemuDomainNamePathsCleanup(virQEMUDriverConfig *c= fg, =20 if (virFileExists(cfg_file) && unlink(cfg_file) < 0) { - virReportSystemError(errno, _("Failed to unlink '%s'"), cfg_file); + virReportSystemError(errno, _("Failed to unlink '%1$s'"), cfg_file= ); if (!bestEffort) return -1; } =20 if (virFileIsLink(autostart_link) =3D=3D 1 && unlink(autostart_link) < 0) { - virReportSystemError(errno, _("Failed to unlink '%s'"), autostart_= link); + virReportSystemError(errno, _("Failed to unlink '%1$s'"), autostar= t_link); if (!bestEffort) return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464699; cv=none; d=zohomail.com; s=zohoarc; b=hENZIyRBoiD9+KHgXTu/8aGw6EFIeno+DYEzUsdSw4VhAEL4xraaZWH0lJbGJugdp/LWEoHDemIjQEKt06t8ycRaoX7s1VUQVGafOsxKxXiOvx8d+a5/ycso6I4Awg+xz9UJ1D0znW2N2b7NEfcBNVGe2PInHzYNSQLI32ThF14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464699; 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=pJj9q4yTP3l9y4eREudHsRQrzvWMBOCigIRwpLJbK8M=; b=Yc5RCmtlb10EoeUEKggXZCtadZ0yvg971piLMJgK18QdOizQNMFgNXowiqSVHF+J7LiIXH+Peeie72zFrADQgGQsIcIQcsUc/RzfXTuQrjtqxl40dfXOrE9Rknac4UZczM6tN1ymz7deNVNSgIC0rn5UOPr+OLDG5RizYx7xJTk= 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 1678464699178947.6366703874409; Fri, 10 Mar 2023 08:11:39 -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-651-_dQftbgqMkOIro9WVQ53xQ-1; Fri, 10 Mar 2023 11:11:27 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F7293C16E96; Fri, 10 Mar 2023 16:10:49 +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 34688492B04; Fri, 10 Mar 2023 16:10:49 +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 197FB19472C0; Fri, 10 Mar 2023 16:10:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9105919472DB for ; Fri, 10 Mar 2023 16:10:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8BF7D140EBF6; Fri, 10 Mar 2023 16:10:47 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id B35FE1415117 for ; Fri, 10 Mar 2023 16:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464698; 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=pJj9q4yTP3l9y4eREudHsRQrzvWMBOCigIRwpLJbK8M=; b=d31B3ufnf26HHei3CqwXeZRSDmYtnkgU51GMVDVDVhvFA7JZOu7tslOn/1ZovXmmPN141e bunCm4voTAxarRKv/0Wtt6WqemI5MzIbI2RbIvxVpw1v/VZEJODxzs6YJ3D3aRCux8PoGM 16FuWkhoUCMxEKvuzwDpIRAbjyJzh4c= X-MC-Unique: _dQftbgqMkOIro9WVQ53xQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 26/51] qemu/qemu_driver: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:42 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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.9 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: 1678464701201100008 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 428 +++++++++++++++++++---------------------- 1 file changed, 203 insertions(+), 225 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fd8136be37..13f8458d4d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -188,7 +188,7 @@ qemuAutostartDomain(virDomainObj *vm, if (qemuProcessBeginJob(vm, VIR_DOMAIN_JOB_OPERATION_START, flags) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to start job on VM '%s': %s"), + _("Failed to start job on VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); goto cleanup; } @@ -196,7 +196,7 @@ qemuAutostartDomain(virDomainObj *vm, if (qemuDomainObjStart(NULL, driver, vm, flags, VIR_ASYNC_JOB_START) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart VM '%s': %s"), + _("Failed to autostart VM '%1$s': %2$s"), vm->def->name, virGetLastErrorMessage()); } =20 @@ -370,7 +370,7 @@ qemuDomainSnapshotLoad(virDomainObj *vm, if (virFileReadAll(fullpath, 1024*1024*1, &xmlStr) < 0) { /* Nothing we can do here, skip this one */ virReportSystemError(errno, - _("Failed to read snapshot file %s"), + _("Failed to read snapshot file %1$s"), fullpath); continue; } @@ -382,7 +382,7 @@ qemuDomainSnapshotLoad(virDomainObj *vm, if (snapdef =3D=3D NULL) { /* Nothing we can do here, skip this one */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse snapshot XML from file '%s'"= ), + _("Failed to parse snapshot XML from file '%1$s= '"), fullpath); continue; } @@ -391,20 +391,20 @@ qemuDomainSnapshotLoad(virDomainObj *vm, if (cur && snap) { if (current) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many snapshots claiming to be curren= t for domain %s"), + _("Too many snapshots claiming to be curren= t for domain %1$s"), vm->def->name); current =3D snap; } } if (direrr < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to fully read directory %s"), + _("Failed to fully read directory %1$s"), snapDir); =20 virDomainSnapshotSetCurrent(vm->snapshots, current); if (virDomainSnapshotUpdateRelations(vm->snapshots) < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Snapshots have inconsistent relations for domain= %s"), + _("Snapshots have inconsistent relations for domain= %1$s"), vm->def->name); =20 /* FIXME: qemu keeps internal track of snapshots. We can get access @@ -465,7 +465,7 @@ qemuDomainCheckpointLoad(virDomainObj *vm, if (virFileReadAll(fullpath, 1024*1024*1, &xmlStr) < 0) { /* Nothing we can do here, skip this one */ virReportSystemError(errno, - _("Failed to read checkpoint file %s"), + _("Failed to read checkpoint file %1$s"), fullpath); continue; } @@ -482,12 +482,12 @@ qemuDomainCheckpointLoad(virDomainObj *vm, } if (direrr < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to fully read directory %s"), + _("Failed to fully read directory %1$s"), chkDir); =20 if (virDomainCheckpointUpdateRelations(vm->checkpoints, ¤t) < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Checkpoints have inconsistent relations for doma= in %s"), + _("Checkpoints have inconsistent relations for doma= in %1$s"), vm->def->name); virDomainCheckpointSetCurrent(vm->checkpoints, current); =20 @@ -610,69 +610,69 @@ qemuStateInitialize(bool privileged, goto error; =20 if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create state dir %s"), + virReportSystemError(errno, _("Failed to create state dir %1$s"), cfg->stateDir); goto error; } if (g_mkdir_with_parents(cfg->libDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create lib dir %s"), + virReportSystemError(errno, _("Failed to create lib dir %1$s"), cfg->libDir); goto error; } if (g_mkdir_with_parents(cfg->cacheDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create cache dir %s"), + virReportSystemError(errno, _("Failed to create cache dir %1$s"), cfg->cacheDir); goto error; } if (g_mkdir_with_parents(cfg->saveDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create save dir %s"), + virReportSystemError(errno, _("Failed to create save dir %1$s"), cfg->saveDir); goto error; } if (g_mkdir_with_parents(cfg->snapshotDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create snapshot dir %s"), + virReportSystemError(errno, _("Failed to create snapshot dir %1$s"= ), cfg->snapshotDir); goto error; } if (g_mkdir_with_parents(cfg->checkpointDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create checkpoint dir %s"= ), + virReportSystemError(errno, _("Failed to create checkpoint dir %1$= s"), cfg->checkpointDir); goto error; } if (g_mkdir_with_parents(cfg->autoDumpPath, 0777) < 0) { - virReportSystemError(errno, _("Failed to create dump dir %s"), + virReportSystemError(errno, _("Failed to create dump dir %1$s"), cfg->autoDumpPath); goto error; } if (g_mkdir_with_parents(cfg->channelTargetDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create channel target dir= %s"), + virReportSystemError(errno, _("Failed to create channel target dir= %1$s"), cfg->channelTargetDir); goto error; } if (g_mkdir_with_parents(cfg->nvramDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create nvram dir %s"), + virReportSystemError(errno, _("Failed to create nvram dir %1$s"), cfg->nvramDir); goto error; } if (g_mkdir_with_parents(cfg->memoryBackingDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create memory backing dir= %s"), + virReportSystemError(errno, _("Failed to create memory backing dir= %1$s"), cfg->memoryBackingDir); goto error; } if (g_mkdir_with_parents(cfg->slirpStateDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create slirp state dir %s= "), + virReportSystemError(errno, _("Failed to create slirp state dir %1= $s"), cfg->slirpStateDir); goto error; } if (g_mkdir_with_parents(cfg->passtStateDir, 0777) < 0) { - virReportSystemError(errno, _("Failed to create passt state dir %s= "), + virReportSystemError(errno, _("Failed to create passt state dir %1= $s"), cfg->passtStateDir); goto error; } =20 if (virDirCreate(cfg->dbusStateDir, 0770, cfg->user, cfg->group, VIR_DIR_CREATE_ALLOW_EXIST) < 0) { - virReportSystemError(errno, _("Failed to create dbus state dir %s"= ), + virReportSystemError(errno, _("Failed to create dbus state dir %1$= s"), cfg->dbusStateDir); goto error; } @@ -694,7 +694,7 @@ qemuStateInitialize(bool privileged, if (cfg->macFilter) { if (!(qemu_driver->ebtables =3D ebtablesContextNew("qemu"))) { virReportSystemError(errno, - _("failed to enable mac filter in '%s'"), + _("failed to enable mac filter in '%1$s'"= ), __FILE__); goto error; } @@ -747,35 +747,35 @@ qemuStateInitialize(bool privileged, =20 if (chown(cfg->libDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to use= r %d:%d"), + _("unable to set ownership of '%1$s' to u= ser %2$d:%3$d"), cfg->libDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->saveDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->saveDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->snapshotDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->snapshotDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->checkpointDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->checkpointDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->autoDumpPath, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->autoDumpPath, (int)cfg->user, (int)cfg->group); goto error; @@ -784,42 +784,42 @@ qemuStateInitialize(bool privileged, =20 if (chown(channeldir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), channeldir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->channelTargetDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->channelTargetDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->nvramDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->nvramDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->memoryBackingDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->memoryBackingDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->slirpStateDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->slirpStateDir, (int)cfg->user, (int)cfg->group); goto error; } if (chown(cfg->passtStateDir, cfg->user, cfg->group) < 0) { virReportSystemError(errno, - _("unable to set ownership of '%s' to %d:= %d"), + _("unable to set ownership of '%1$s' to %= 2$d:%3$d"), cfg->passtStateDir, (int)cfg->user, (int)cfg->group); goto error; @@ -1131,8 +1131,7 @@ static virDrvOpenStatus qemuConnectOpen(virConnectPtr= conn, =20 if (STRNEQ(root, qemu_driver->embeddedRoot)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot open embedded driver at path '%s', " - "already open with path '%s'"), + _("Cannot open embedded driver at path '%1$s', = already open with path '%2$s'"), root, qemu_driver->embeddedRoot); return VIR_DRV_OPEN_ERROR; } @@ -1182,7 +1181,7 @@ qemuConnectSupportsFeature(virConnectPtr conn, int fe= ature) 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; case VIR_DRV_FEATURE_MIGRATION_V2: @@ -1264,7 +1263,7 @@ qemuConnectGetMaxVcpus(virConnectPtr conn G_GNUC_UNUS= ED, const char *type) return virHostCPUGetKVMMaxVCPUs(); =20 virReportError(VIR_ERR_INVALID_ARG, - _("unknown type '%s'"), type); + _("unknown type '%1$s'"), type); return -1; } =20 @@ -1305,7 +1304,7 @@ qemuGetSchedstatDelay(unsigned long long *cpudelay, =20 if (sscanf(buf, "%*u %llu", cpudelay) !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse schedstat info at '%s'"), + _("Unable to parse schedstat info at '%1$s'"), path); return -1; } @@ -1400,7 +1399,7 @@ static virDomainPtr qemuDomainLookupByID(virConnectPt= r conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id %d"), id); + _("no domain with matching id %1$d"), id); goto cleanup; } =20 @@ -1427,7 +1426,7 @@ static virDomainPtr qemuDomainLookupByUUID(virConnect= Ptr conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); goto cleanup; } =20 @@ -1452,7 +1451,7 @@ static virDomainPtr qemuDomainLookupByName(virConnect= Ptr conn, =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -2439,7 +2438,7 @@ static int qemuDomainSendKey(virDomainPtr domain, keycodes[i]); if (keycode < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot translate keycode %u of %s codese= t to qnum keycode"), + _("cannot translate keycode %1$u of %2$s co= deset to qnum keycode"), keycodes[i], virKeycodeSetTypeToString(codeset)); return -1; @@ -2981,7 +2980,7 @@ qemuDomainManagedSaveRemove(virDomainPtr dom, unsigne= d int flags) =20 if (unlink(name) < 0) { virReportSystemError(errno, - _("Failed to remove managed save file '%s'"), + _("Failed to remove managed save file '%1$s'"= ), name); goto cleanup; } @@ -3021,7 +3020,7 @@ qemuDumpWaitForCompletion(virDomainObj *vm) if (privJobCurrent->stats.dump.status =3D=3D QEMU_MONITOR_DUMP_STATUS_= FAILED) { if (vm->job->error) virReportError(VIR_ERR_OPERATION_FAILED, - _("memory-only dump failed: %s"), + _("memory-only dump failed: %1$s"), vm->job->error); else virReportError(VIR_ERR_OPERATION_FAILED, "%s", @@ -3059,8 +3058,7 @@ qemuDumpToFd(virQEMUDriver *driver, =20 if (rc <=3D 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported dumpformat '%s' " - "for this QEMU binary"), + _("unsupported dumpformat '%1$s' for this QEMU = binary"), dumpformat); qemuDomainObjExitMonitor(vm); return -1; @@ -3123,7 +3121,7 @@ doCoreDump(virQEMUDriver *driver, if (dump_flags & VIR_DUMP_MEMORY_ONLY) { if (!(memory_dump_format =3D qemuDumpFormatTypeToString(dumpformat= ))) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown dumpformat '%d'"), dumpformat); + _("unknown dumpformat '%1$d'"), dumpformat); goto cleanup; } =20 @@ -3152,7 +3150,7 @@ doCoreDump(virQEMUDriver *driver, =20 if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("unable to close file %s"), + _("unable to close file %1$s"), path); goto cleanup; } @@ -3354,7 +3352,7 @@ qemuDomainScreenshot(virDomainPtr dom, tmp =3D g_strdup_printf("%s/qemu.screendump.XXXXXX", priv->libDir); =20 if ((tmp_fd =3D g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IW= USR)) =3D=3D -1) { - virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"), tmp); + virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"), tmp); goto endjob; } unlink_tmp =3D true; @@ -3369,7 +3367,7 @@ qemuDomainScreenshot(virDomainPtr dom, qemuDomainObjExitMonitor(vm); =20 if (VIR_CLOSE(tmp_fd) < 0) { - virReportSystemError(errno, _("unable to close %s"), tmp); + virReportSystemError(errno, _("unable to close %1$s"), tmp); goto endjob; } =20 @@ -4103,8 +4101,7 @@ qemuDomainSetVcpusAgent(virDomainObj *vm, =20 if (nvcpus > virDomainDefGetVcpus(vm->def)) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpu count is greater than the count " - "of enabled vcpus in the domain: %d > %d"), + _("requested vcpu count is greater than the count o= f enabled vcpus in the domain: %1$d > %2$d"), nvcpus, virDomainDefGetVcpus(vm->def)); goto cleanup; } @@ -4274,7 +4271,7 @@ qemuDomainPinVcpuLive(virDomainObj *vm, =20 if (!(vcpuinfo =3D virDomainDefGetVcpu(def, vcpu))) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %d is out of range of live cpu count %d"), + _("vcpu %1$d is out of range of live cpu count %2$d= "), vcpu, virDomainDefGetVcpusMax(def)); goto cleanup; } @@ -4359,7 +4356,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom, if (persistentDef && !(vcpuinfo =3D virDomainDefGetVcpu(persistentDef, vcpu))) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %d is out of range of persistent cpu count = %d"), + _("vcpu %1$d is out of range of persistent cpu coun= t %2$d"), vcpu, virDomainDefGetVcpus(persistentDef)); goto endjob; } @@ -4875,7 +4872,7 @@ qemuDomainPinIOThread(virDomainPtr dom, =20 if (!(iothrid =3D virDomainIOThreadIDFind(def, iothread_id))) { virReportError(VIR_ERR_INVALID_ARG, - _("iothread %d not found"), iothread_id); + _("iothread %1$d not found"), iothread_id); goto endjob; } =20 @@ -4887,8 +4884,8 @@ qemuDomainPinIOThread(virDomainPtr dom, goto endjob; if (virDomainCgroupSetupCpusetCpus(cgroup_iothread, pcpumap) <= 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("failed to set cpuset.cpus in cgroup" - " for iothread %d"), iothread_id); + _("failed to set cpuset.cpus in cgroup for = iothread %1$d"), + iothread_id); goto endjob; } } @@ -4920,7 +4917,7 @@ qemuDomainPinIOThread(virDomainPtr dom, =20 if (!(iothrid =3D virDomainIOThreadIDFind(persistentDef, iothread_= id))) { virReportError(VIR_ERR_INVALID_ARG, - _("iothreadid %d not found"), iothread_id); + _("iothreadid %1$d not found"), iothread_id); goto endjob; } =20 @@ -4986,8 +4983,7 @@ qemuDomainHotplugAddIOThread(virDomainObj *vm, =20 if (new_niothreads !=3D exp_niothreads) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("got wrong number of IOThread ids from QEMU monit= or. " - "got %d, wanted %d"), + _("got wrong number of IOThread ids from QEMU monit= or. got %1$d, wanted %2$d"), new_niothreads, exp_niothreads); goto cleanup; } @@ -5003,7 +4999,7 @@ qemuDomainHotplugAddIOThread(virDomainObj *vm, =20 if (idx =3D=3D new_niothreads) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find new IOThread '%u' in QEMU monitor."), + _("cannot find new IOThread '%1$u' in QEMU monitor.= "), iothread_id); goto cleanup; } @@ -5118,8 +5114,7 @@ qemuDomainHotplugDelIOThread(virDomainObj *vm, =20 if (new_niothreads !=3D exp_niothreads) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("got wrong number of IOThread ids from QEMU monit= or. " - "got %d, wanted %d"), + _("got wrong number of IOThread ids from QEMU monit= or. got %1$d, wanted %2$d"), new_niothreads, exp_niothreads); goto cleanup; } @@ -5238,28 +5233,28 @@ qemuDomainIOThreadParseParams(virTypedParameterPtr = params, =20 if (iothread->set_poll_max_ns && iothread->poll_max_ns > INT_MAX) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-max-ns (%llu) must be less than or equal to= %d"), + _("poll-max-ns (%1$llu) must be less than or equal = to %2$d"), iothread->poll_max_ns, INT_MAX); return -1; } =20 if (iothread->set_poll_grow && iothread->poll_grow > INT_MAX) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-grow (%u) must be less than or equal to %d"= ), + _("poll-grow (%1$u) must be less than or equal to %= 2$d"), iothread->poll_grow, INT_MAX); return -1; } =20 if (iothread->set_poll_shrink && iothread->poll_shrink > INT_MAX) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-shrink (%u) must be less than or equal to %= d"), + _("poll-shrink (%1$u) must be less than or equal to= %2$d"), iothread->poll_shrink, INT_MAX); return -1; } =20 if (iothread->set_thread_pool_min && iothread->thread_pool_min < -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("thread_pool_min (%d) must be equal to or greater= than -1"), + _("thread_pool_min (%1$d) must be equal to or great= er than -1"), iothread->thread_pool_min); return -1; } @@ -5267,7 +5262,7 @@ qemuDomainIOThreadParseParams(virTypedParameterPtr pa= rams, if (iothread->set_thread_pool_max && (iothread->thread_pool_max < -1 || iothread->thread_pool_max =3D= =3D 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("thread_pool_max (%d) must be a positive number o= r -1"), + _("thread_pool_max (%1$d) must be a positive number= or -1"), iothread->thread_pool_max); return -1; } @@ -5303,7 +5298,7 @@ qemuDomainIOThreadValidate(virDomainIOThreadIDDef *io= threaddef, if (iothread.set_thread_pool_min) { if (live && iothread.thread_pool_min < 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("thread_pool_min (%d) must be equal to or gre= ater than 0 for live change"), + _("thread_pool_min (%1$d) must be equal to or g= reater than 0 for live change"), iothread.thread_pool_min); return -1; } @@ -5314,7 +5309,7 @@ qemuDomainIOThreadValidate(virDomainIOThreadIDDef *io= threaddef, if (iothread.set_thread_pool_max) { if (live && iothread.thread_pool_max < 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("thread_pool_max (%d) must be equal to or gre= ater than 0 for live change"), + _("thread_pool_max (%1$d) must be equal to or g= reater than 0 for live change"), iothread.thread_pool_max); return -1; } @@ -5324,7 +5319,7 @@ qemuDomainIOThreadValidate(virDomainIOThreadIDDef *io= threaddef, =20 if (thread_pool_min > thread_pool_max) { virReportError(VIR_ERR_OPERATION_INVALID, - _("thread_pool_min (%d) can't be greater than threa= d_pool_max (%d)"), + _("thread_pool_min (%1$d) can't be greater than thr= ead_pool_max (%2$d)"), thread_pool_min, thread_pool_max); return -1; } @@ -5395,7 +5390,7 @@ qemuDomainChgIOThread(virQEMUDriver *driver, =20 if (!iothreaddef) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find IOThread '%u' in iothreadids= "), + _("cannot find IOThread '%1$u' in iothreadi= ds"), iothread.iothread_id); goto endjob; } @@ -5438,7 +5433,7 @@ qemuDomainChgIOThread(virQEMUDriver *driver, =20 if (!iothreaddef) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find IOThread '%u' in iothreadids= "), + _("cannot find IOThread '%1$u' in iothreadi= ds"), iothread.iothread_id); goto endjob; } @@ -5709,7 +5704,7 @@ static int qemuNodeGetSecurityModel(virConnectPtr con= n, if (virStrcpy(secmodel->model, caps->host.secModels[0].model, VIR_SECURITY_MODEL_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security model string exceeds max %d bytes"), + _("security model string exceeds max %1$d bytes"), VIR_SECURITY_MODEL_BUFLEN - 1); return -1; } @@ -5717,7 +5712,7 @@ static int qemuNodeGetSecurityModel(virConnectPtr con= n, if (virStrcpy(secmodel->doi, caps->host.secModels[0].doi, VIR_SECURITY_DOI_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security DOI string exceeds max %d bytes"), + _("security DOI string exceeds max %1$d bytes"), VIR_SECURITY_DOI_BUFLEN - 1); return -1; } @@ -5957,7 +5952,7 @@ qemuDomainSaveImageDefineXML(virConnectPtr conn, cons= t char *path, goto cleanup; =20 if (lseek(fd, 0, SEEK_SET) !=3D 0) { - virReportSystemError(errno, _("cannot seek in '%s'"), path); + virReportSystemError(errno, _("cannot seek in '%1$s'"), path); goto cleanup; } =20 @@ -5965,7 +5960,7 @@ qemuDomainSaveImageDefineXML(virConnectPtr conn, cons= t char *path, goto cleanup; =20 if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("failed to write header data to '%s'= "), path); + virReportSystemError(errno, _("failed to write header data to '%1$= s'"), path); goto cleanup; } =20 @@ -6109,8 +6104,7 @@ qemuDomainObjRestore(virConnectPtr conn, virUUIDFormat(vm->def->uuid, vm_uuidstr); virUUIDFormat(def->uuid, def_uuidstr); virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot restore domain '%s' uuid %s from a file" - " which belongs to domain '%s' uuid %s"), + _("cannot restore domain '%1$s' uuid %2$s from a fi= le which belongs to domain '%3$s' uuid %4$s"), vm->def->name, vm_uuidstr, def->name, def_uuidstr); goto cleanup; @@ -6238,7 +6232,7 @@ static char *qemuConnectDomainXMLToNative(virConnectP= tr conn, =20 if (STRNEQ(format, QEMU_CONFIG_FORMAT_ARGV)) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported config type %s"), format); + _("unsupported config type %1$s"), format); return NULL; } =20 @@ -6342,7 +6336,7 @@ qemuDomainObjStart(virConnectPtr conn, if (force_boot) { if (unlink(managed_save) < 0) { virReportSystemError(errno, - _("cannot remove managed save file %s= "), + _("cannot remove managed save file %1= $s"), managed_save); return ret; } @@ -6583,8 +6577,7 @@ qemuDomainUndefineFlags(virDomainPtr dom, (nsnapshots =3D virDomainSnapshotObjListNum(vm->snapshots, NULL, 0= ))) { if (!(flags & VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("cannot delete inactive domain with %d " - "snapshots"), + _("cannot delete inactive domain with %1$d snap= shots"), nsnapshots); goto endjob; } @@ -6596,8 +6589,7 @@ qemuDomainUndefineFlags(virDomainPtr dom, NULL, flags)) > 0) { if (!(flags & VIR_DOMAIN_UNDEFINE_CHECKPOINTS_METADATA)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("cannot delete inactive domain with %d " - "checkpoints"), + _("cannot delete inactive domain with %1$d chec= kpoints"), ncheckpoints); goto endjob; } @@ -6632,7 +6624,7 @@ qemuDomainUndefineFlags(virDomainPtr dom, if ((flags & VIR_DOMAIN_UNDEFINE_NVRAM)) { if (unlink(nvram_path) < 0) { virReportSystemError(errno, - _("failed to remove nvram: %s"), + _("failed to remove nvram: %1$s"), nvram_path); goto endjob; } @@ -6825,7 +6817,7 @@ qemuDomainAttachDeviceLive(virDomainObj *vm, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("live attach of device '%s' is not supported"), + _("live attach of device '%1$s' is not supported"), virDomainDeviceTypeToString(dev->type)); break; } @@ -6859,7 +6851,7 @@ qemuDomainChangeDiskLive(virDomainObj *vm, =20 if (!(orig_disk =3D virDomainDiskByTarget(vm->def, disk->dst))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("disk '%s' not found"), disk->dst); + _("disk '%1$s' not found"), disk->dst); return -1; } =20 @@ -6923,7 +6915,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC: case VIR_DOMAIN_MEMORY_MODEL_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory of model '%s'"), + _("cannot modify memory of model '%1$s'"), virDomainMemoryModelTypeToString(oldDef->model)); return false; break; @@ -6931,7 +6923,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, =20 if (oldDef->model !=3D newDef->model) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory model from '%s' to '%s'"), + _("cannot modify memory model from '%1$s' to '%2$s'= "), virDomainMemoryModelTypeToString(oldDef->model), virDomainMemoryModelTypeToString(newDef->model)); return false; @@ -6939,7 +6931,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, =20 if (oldDef->access !=3D newDef->access) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory access from '%s' to '%s'"), + _("cannot modify memory access from '%1$s' to '%2$s= '"), virDomainMemoryAccessTypeToString(oldDef->access), virDomainMemoryAccessTypeToString(newDef->access)); return false; @@ -6947,7 +6939,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, =20 if (oldDef->discard !=3D newDef->discard) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory discard from '%s' to '%s'"), + _("cannot modify memory discard from '%1$s' to '%2$= s'"), virTristateBoolTypeToString(oldDef->discard), virTristateBoolTypeToString(newDef->discard)); return false; @@ -6962,7 +6954,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, =20 if (oldDef->pagesize !=3D newDef->pagesize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory pagesize from '%llu' to '%l= lu'"), + _("cannot modify memory pagesize from '%1$llu' to '= %2$llu'"), oldDef->pagesize, newDef->pagesize); return false; @@ -6970,7 +6962,7 @@ qemuDomainChangeMemoryLiveValidateChange(const virDom= ainMemoryDef *oldDef, =20 if (STRNEQ_NULLABLE(oldDef->nvdimmPath, newDef->nvdimmPath)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory path from '%s' to '%s'"), + _("cannot modify memory path from '%1$s' to '%2$s'"= ), NULLSTR(oldDef->nvdimmPath), NULLSTR(newDef->nvdimmPath)); return false; @@ -6978,41 +6970,41 @@ qemuDomainChangeMemoryLiveValidateChange(const virD= omainMemoryDef *oldDef, =20 if (oldDef->alignsize !=3D newDef->alignsize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory align size from '%llu' to '= %llu'"), + _("cannot modify memory align size from '%1$llu' to= '%2$llu'"), oldDef->alignsize, newDef->alignsize); return false; } =20 if (oldDef->nvdimmPmem !=3D newDef->nvdimmPmem) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory pmem from '%d' to '%d'"), + _("cannot modify memory pmem from '%1$d' to '%2$d'"= ), oldDef->nvdimmPmem, newDef->nvdimmPmem); return false; } =20 if (oldDef->targetNode !=3D newDef->targetNode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory targetNode from '%d' to '%d= '"), + _("cannot modify memory targetNode from '%1$d' to '= %2$d'"), oldDef->targetNode, newDef->targetNode); return false; } =20 if (oldDef->size !=3D newDef->size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory size from '%llu' to '%llu'"= ), + _("cannot modify memory size from '%1$llu' to '%2$l= lu'"), oldDef->size, newDef->size); return false; } =20 if (oldDef->labelsize !=3D newDef->labelsize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory label size from '%llu' to '= %llu'"), + _("cannot modify memory label size from '%1$llu' to= '%2$llu'"), oldDef->labelsize, newDef->labelsize); return false; } if (oldDef->blocksize !=3D newDef->blocksize) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot modify memory block size from '%llu' to '= %llu'"), + _("cannot modify memory block size from '%1$llu' to= '%2$llu'"), oldDef->blocksize, newDef->blocksize); return false; } @@ -7049,7 +7041,7 @@ qemuDomainChangeMemoryLive(virQEMUDriver *driver G_GN= UC_UNUSED, oldDef =3D virDomainMemoryFindByDeviceInfo(vm->def, &dev->data.memory-= >info, NULL); if (!oldDef) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory '%s' not found"), dev->data.memory->info.= alias); + _("memory '%1$s' not found"), dev->data.memory->inf= o.alias); return -1; } =20 @@ -7137,7 +7129,7 @@ qemuDomainUpdateDeviceLive(virDomainObj *vm, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("live update of device '%s' is not supported"), + _("live update of device '%1$s' is not supported"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -7183,7 +7175,7 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, disk =3D dev->data.disk; if (virDomainDiskIndexByName(vmdef, disk->dst, true) >=3D 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("target %s already exists"), disk->dst); + _("target %1$s already exists"), disk->dst); return -1; } if (virDomainDiskTranslateSourcePool(disk) < 0) @@ -7224,7 +7216,7 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, lease =3D dev->data.lease; if (virDomainLeaseIndex(vmdef, lease) >=3D 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Lease %s in lockspace %s already exists"), + _("Lease %1$s in lockspace %2$s already exists"= ), lease->key, NULLSTR(lease->lockspace)); return -1; } @@ -7240,7 +7232,7 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, virDomainControllerFind(vmdef, controller->type, controller->idx) >=3D 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("controller index=3D'%d' already exists"), + _("controller index=3D'%1$d' already exists"), controller->idx); return -1; } @@ -7350,7 +7342,7 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("persistent attach of device '%s' is not support= ed"), + _("persistent attach of device '%1$s' is not suppo= rted"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -7389,7 +7381,7 @@ qemuDomainDetachDeviceConfig(virDomainDef *vmdef, disk =3D dev->data.disk; if (!(det_disk =3D virDomainDiskRemoveByName(vmdef, disk->dst))) { virReportError(VIR_ERR_DEVICE_MISSING, - _("no target device %s"), disk->dst); + _("no target device %1$s"), disk->dst); return -1; } virDomainDiskDefFree(det_disk); @@ -7430,7 +7422,7 @@ qemuDomainDetachDeviceConfig(virDomainDef *vmdef, lease =3D dev->data.lease; if (!(det_lease =3D virDomainLeaseRemove(vmdef, lease))) { virReportError(VIR_ERR_DEVICE_MISSING, - _("Lease %s in lockspace %s does not exist"), + _("Lease %1$s in lockspace %2$s does not exist"= ), lease->key, NULLSTR(lease->lockspace)); return -1; } @@ -7557,7 +7549,7 @@ qemuDomainDetachDeviceConfig(virDomainDef *vmdef, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("persistent detach of device '%s' is not supporte= d"), + _("persistent detach of device '%1$s' is not suppor= ted"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -7587,7 +7579,7 @@ qemuDomainUpdateDeviceConfig(virDomainDef *vmdef, newDisk =3D dev->data.disk; if ((pos =3D virDomainDiskIndexByName(vmdef, newDisk->dst, false))= < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("target %s doesn't exist."), newDisk->dst); + _("target %1$s doesn't exist."), newDisk->dst); return -1; } =20 @@ -7607,7 +7599,7 @@ qemuDomainUpdateDeviceConfig(virDomainDef *vmdef, pos =3D qemuDomainFindGraphicsIndex(vmdef, newGraphics); if (pos < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find existing graphics type '%s' devi= ce to modify"), + _("cannot find existing graphics type '%1$s' de= vice to modify"), virDomainGraphicsTypeToString(newGraphics->type= )); return -1; } @@ -7683,7 +7675,7 @@ qemuDomainUpdateDeviceConfig(virDomainDef *vmdef, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("persistent update of device '%s' is not supporte= d"), + _("persistent update of device '%1$s' is not suppor= ted"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -8222,14 +8214,14 @@ static int qemuDomainSetAutostart(virDomainPtr dom, if (autostart) { if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = %s"), + _("cannot create autostart directory = %1$s"), cfg->autostartDir); goto endjob; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s to '%= s'"), + _("Failed to create symlink '%1$s to = '%2$s'"), autostartLink, configFile); goto endjob; } @@ -8238,7 +8230,7 @@ static int qemuDomainSetAutostart(virDomainPtr dom, errno !=3D ENOENT && errno !=3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto endjob; } @@ -8754,7 +8746,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom, =20 if (mode < 0 || mode >=3D VIR_DOMAIN_NUMATUNE_MEM_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported numatune mode: '%d'"), mode); + _("unsupported numatune mode: '%1$d'"), mod= e); goto cleanup; } =20 @@ -8765,7 +8757,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom, =20 if (virBitmapIsAllClear(nodeset)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Invalid nodeset of 'numatune': %s"), + _("Invalid nodeset of 'numatune': %1$s"), param->value.s); goto cleanup; } @@ -9172,7 +9164,7 @@ qemuSetIOThreadsBWLive(virDomainObj *vm, virCgroup *c= group, #define SCHED_RANGE_CHECK(VAR, NAME, MIN, MAX) \ if (((VAR) > 0 && (VAR) < (MIN)) || (VAR) > (MAX)) { \ virReportError(VIR_ERR_INVALID_ARG, \ - _("value of '%s' is out of range [%lld, %lld]"), \ + _("value of '%1$s' is out of range [%2$lld, %3$lld]= "), \ NAME, MIN, MAX); \ rc =3D -1; \ goto endjob; \ @@ -9725,7 +9717,7 @@ qemuDomainBlockResize(virDomainPtr dom, if ((flags & VIR_DOMAIN_BLOCK_RESIZE_BYTES) =3D=3D 0) { if (size > ULLONG_MAX / 1024) { virReportError(VIR_ERR_OVERFLOW, - _("size must be less than %llu"), + _("size must be less than %1$llu"), ULLONG_MAX / 1024); return -1; } @@ -9748,7 +9740,7 @@ qemuDomainBlockResize(virDomainPtr dom, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' was not found in the domain config"), = path); + _("disk '%1$s' was not found in the domain config")= , path); goto endjob; } =20 @@ -9767,7 +9759,7 @@ qemuDomainBlockResize(virDomainPtr dom, =20 if (virStorageSourceIsEmpty(disk->src) || disk->src->readonly) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("can't resize empty or readonly disk '%s'"), + _("can't resize empty or readonly disk '%1$s'"), disk->dst); goto endjob; } @@ -9841,7 +9833,7 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, =20 if (*path) { if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { - virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %s"), pat= h); + virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %1$s"), p= ath); return -1; } =20 @@ -9858,7 +9850,7 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, =20 if (!entryname) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing disk device alias name for %s"), dis= k->dst); + _("missing disk device alias name for %1$s"), d= isk->dst); return -1; } } @@ -9881,7 +9873,7 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, =20 if (!(stats =3D virHashLookup(blockstats, entryname))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find statistics for device '%s'"), en= tryname); + _("cannot find statistics for device '%1$s'"), = entryname); return -1; } =20 @@ -9913,7 +9905,7 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, =20 if (!(stats =3D virHashLookup(blockstats, entryname))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find statistics for device '%s'")= , entryname); + _("cannot find statistics for device '%1$s'= "), entryname); return -1; } =20 @@ -10021,7 +10013,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, long long tmp; \ if (VIR_ASSIGN_IS_OVERFLOW(tmp, (blockstats->VAR))) { \ virReportError(VIR_ERR_OVERFLOW, \ - _("value of '%s' is too large"), NAME); \ + _("value of '%1$s' is too large"), NAME); \ goto endjob; \ } \ if (virTypedParameterAssign(params + nstats, NAME, \ @@ -10186,8 +10178,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, =20 if (!qosSupported) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("setting bandwidth on interfaces of " - "type '%s' is not implemented yet"), + _("setting bandwidth on interfaces of type '%1$s' i= s not implemented yet"), virDomainNetTypeToString(actualType)); goto endjob; } @@ -10259,8 +10250,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, =20 virMacAddrFormat(&net->mac, ifmac); virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Invalid use of 'floor' on interface with= MAC address %s " - "- 'floor' is only supported for interface = type 'network' with forward type 'nat', 'route', 'open' or none"), + _("Invalid use of 'floor' on interface with= MAC address %1$s - 'floor' is only supported for interface type 'network' = with forward type 'nat', 'route', 'open' or none"), ifmac); goto endjob; } @@ -10567,7 +10557,7 @@ qemuDomainBlockPeek(virDomainPtr dom, =20 if (disk->src->format !=3D VIR_STORAGE_FILE_RAW) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("peeking is only supported for disk with 'raw' fo= rmat not '%s'"), + _("peeking is only supported for disk with 'raw' fo= rmat not '%1$s'"), virStorageFileFormatTypeToString(disk->src->format)= ); goto cleanup; } @@ -10585,8 +10575,7 @@ qemuDomainBlockPeek(virDomainPtr dom, if ((nread =3D virStorageSourceRead(disk->src, offset, size, &tmpbuf))= < 0) { if (nread =3D=3D -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("storage file reading is not supported for " - "storage type %s (protocol: %s)"), + _("storage file reading is not supported for st= orage type %1$s (protocol: %2$s)"), virStorageTypeToString(disk->src->type), virStorageNetProtocolTypeToString(disk->src->pr= otocol)); } @@ -10595,7 +10584,7 @@ qemuDomainBlockPeek(virDomainPtr dom, =20 if (nread < size) { virReportError(VIR_ERR_INVALID_ARG, - _("'%s' starting from %llu has only %zd bytes avail= able"), + _("'%1$s' starting from %2$llu has only %3$zd bytes= available"), path, offset, nread); goto cleanup; } @@ -10650,7 +10639,7 @@ qemuDomainMemoryPeek(virDomainPtr dom, /* Create a temporary filename. */ if ((fd =3D g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)= ) =3D=3D -1) { virReportSystemError(errno, - _("g_mkstemp(\"%s\") failed"), tmp); + _("g_mkstemp(\"%1$s\") failed"), tmp); goto endjob; } =20 @@ -10673,8 +10662,8 @@ qemuDomainMemoryPeek(virDomainPtr dom, /* Read the memory file into buffer. */ if (saferead(fd, buffer, size) =3D=3D (ssize_t)-1) { virReportSystemError(errno, - _("failed to read temporary file " - "created with template %s"), tmp); + _("failed to read temporary file created with= template %1$s"), + tmp); goto endjob; } =20 @@ -10729,7 +10718,7 @@ qemuDomainStorageOpenStat(virQEMUDriver *driver G_G= NUC_UNUSED, return -1; =20 if (fstat(*ret_fd, ret_sb) < 0) { - virReportSystemError(errno, _("cannot stat file '%s'"), src->p= ath); + virReportSystemError(errno, _("cannot stat file '%1$s'"), src-= >path); VIR_FORCE_CLOSE(*ret_fd); return -1; } @@ -10742,7 +10731,7 @@ qemuDomainStorageOpenStat(virQEMUDriver *driver G_G= NUC_UNUSED, =20 if (virStorageSourceStat(src, ret_sb) < 0) { virStorageSourceDeinit(src); - virReportSystemError(errno, _("failed to stat remote file '%s'= "), + virReportSystemError(errno, _("failed to stat remote file '%1$= s'"), NULLSTR(src->path)); return -1; } @@ -10861,7 +10850,7 @@ qemuStorageLimitsRefresh(virQEMUDriver *driver, =20 if (virStorageSourceIsLocalStorage(src)) { if ((len =3D virFileReadHeaderFD(fd, VIR_STORAGE_MAX_HEADER, &buf)= ) < 0) { - virReportSystemError(errno, _("cannot read header '%s'"), + virReportSystemError(errno, _("cannot read header '%1$s'"), src->path); goto cleanup; } @@ -10921,7 +10910,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path %s not assigned to domain"), path); + _("invalid path %1$s not assigned to domain"), path= ); goto endjob; } =20 @@ -10933,7 +10922,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, =20 if (virStorageSourceIsEmpty(disk->src)) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' does not currently have a source assig= ned"), + _("disk '%1$s' does not currently have a source ass= igned"), path); goto endjob; } @@ -11124,7 +11113,7 @@ qemuDomainMigratePrepareTunnel(virConnectPtr dconn, =20 if (virLockManagerPluginUsesState(driver->lockManager)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot use migrate v2 protocol with lock manager= %s"), + _("Cannot use migrate v2 protocol with lock manager= %1$s"), virLockManagerPluginGetName(driver->lockManager)); return -1; } @@ -11178,7 +11167,7 @@ qemuDomainMigratePrepare2(virConnectPtr dconn, =20 if (virLockManagerPluginUsesState(driver->lockManager)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot use migrate v2 protocol with lock manager= %s"), + _("Cannot use migrate v2 protocol with lock manager= %1$s"), virLockManagerPluginGetName(driver->lockManager)); return -1; } @@ -11221,7 +11210,7 @@ qemuDomainMigratePerform(virDomainPtr dom, =20 if (virLockManagerPluginUsesState(driver->lockManager)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot use migrate v2 protocol with lock manager= %s"), + _("Cannot use migrate v2 protocol with lock manager= %1$s"), virLockManagerPluginGetName(driver->lockManager)); goto cleanup; } @@ -11276,7 +11265,7 @@ qemuDomainMigrateFinish2(virConnectPtr dconn, vm =3D virDomainObjListFindByName(driver->domains, dname); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), dname); + _("no domain with matching name '%1$s'"), dname); qemuMigrationDstErrorReport(driver, dname); return NULL; } @@ -11811,7 +11800,7 @@ qemuDomainMigrateFinish3(virConnectPtr dconn, vm =3D virDomainObjListFindByName(driver->domains, dname); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), dname); + _("no domain with matching name '%1$s'"), dname); qemuMigrationDstErrorReport(driver, dname); return NULL; } @@ -11859,7 +11848,7 @@ qemuDomainMigrateFinish3Params(virConnectPtr dconn, vm =3D virDomainObjListFindByName(driver->domains, dname); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), dname); + _("no domain with matching name '%1$s'"), dname); qemuMigrationDstErrorReport(driver, dname); return NULL; } @@ -11945,7 +11934,7 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev, * the previously supported 'kvm' driver is provided below. */ if (STRNEQ(driverName, "vfio") && STRNEQ(driverName, "kvm")) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown driver name '%s'"), driverName); + _("unknown driver name '%1$s'"), driverName); return -1; } =20 @@ -12105,8 +12094,7 @@ qemuConnectCompareHypervisorCPU(virConnectPtr conn, =20 if (!hvCPU || hvCPU->fallback !=3D VIR_CPU_FALLBACK_FORBID) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("QEMU '%s' does not support reporting CPU model f= or " - "virttype '%s'"), + _("QEMU '%1$s' does not support reporting CPU model= for virttype '%2$s'"), virQEMUCapsGetBinary(qemuCaps), virDomainVirtTypeToString(virttype)); goto cleanup; @@ -12137,8 +12125,8 @@ qemuConnectCompareHypervisorCPU(virConnectPtr conn, hvCPU, cpu, failIncompatible); } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("comparing with the hypervisor CPU is not support= ed " - "for arch %s"), virArchToString(arch)); + _("comparing with the hypervisor CPU is not support= ed for arch %1$s"), + virArchToString(arch)); } =20 cleanup: @@ -12244,18 +12232,18 @@ qemuConnectCPUModelBaseline(virQEMUCaps *qemuCaps, for (i =3D 0; i < ncpus; i++) { if (!cpus[i]) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid CPU definition at index %zu"), i); + _("invalid CPU definition at index %1$zu"), i); return NULL; } if (!cpus[i]->model) { virReportError(VIR_ERR_INVALID_ARG, - _("no CPU model specified at index %zu"), i); + _("no CPU model specified at index %1$zu"), i); return NULL; } =20 if (!virDomainCapsCPUModelsGet(cpuModels, cpus[i]->model)) { virReportError(VIR_ERR_INVALID_ARG, - _("CPU model '%s' not supported by hypervisor"), + _("CPU model '%1$s' not supported by hypervisor= "), cpus[i]->model); return NULL; } @@ -12343,8 +12331,7 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn, if (!(cpuModels =3D virQEMUCapsGetCPUModels(qemuCaps, virttype, NULL, = NULL)) || cpuModels->nmodels =3D=3D 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("QEMU '%s' does not support any CPU models for " - "virttype '%s'"), + _("QEMU '%1$s' does not support any CPU models for = virttype '%2$s'"), virQEMUCapsGetBinary(qemuCaps), virDomainVirtTypeToString(virttype)); goto cleanup; @@ -12376,8 +12363,8 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn, goto cleanup; } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("computing baseline hypervisor CPU is not support= ed " - "for arch %s"), virArchToString(arch)); + _("computing baseline hypervisor CPU is not support= ed for arch %1$s"), + virArchToString(arch)); goto cleanup; } =20 @@ -12461,7 +12448,7 @@ qemuDomainGetJobInfoDumpStats(virDomainObj *vm, case QEMU_MONITOR_DUMP_STATUS_FAILED: case QEMU_MONITOR_DUMP_STATUS_LAST: virReportError(VIR_ERR_OPERATION_FAILED, - _("dump query failed, status=3D%d"), + _("dump query failed, status=3D%1$d"), privJob->stats.dump.status); return -1; break; @@ -12998,7 +12985,7 @@ qemuDomainMigrateSetMaxSpeed(virDomainPtr dom, =20 if (bandwidth > max) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), max + 1); + _("bandwidth must be less than %1$llu"), max + 1); goto cleanup; } =20 @@ -13082,8 +13069,7 @@ qemuDomainMigrationGetPostcopyBandwidth(virDomainOb= j *vm, =20 if (bw > ULONG_MAX) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth %llu is greater than %lu which is the " - "maximum value supported by this API"), + _("bandwidth %1$llu is greater than %2$lu which is = the maximum value supported by this API"), bw, ULONG_MAX); goto cleanup; } @@ -13449,7 +13435,7 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr sn= apshot, =20 if (!snap->def->parent_name) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("snapshot '%s' does not have a parent"), + _("snapshot '%1$s' does not have a parent"), snap->def->name); goto cleanup; } @@ -13754,7 +13740,7 @@ qemuDomainCheckpointGetParent(virDomainCheckpointPt= r checkpoint, =20 if (!chk->def->parent_name) { virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, - _("checkpoint '%s' does not have a parent"), + _("checkpoint '%1$s' does not have a parent"), chk->def->name); goto cleanup; } @@ -13977,14 +13963,14 @@ qemuDomainOpenConsole(virDomainPtr dom, =20 if (!chr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find character device %s"), + _("cannot find character device %1$s"), NULLSTR(dev_name)); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_PTY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("character device %s is not using a PTY"), + _("character device %1$s is not using a PTY"), dev_name ? dev_name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -14048,14 +14034,14 @@ qemuDomainOpenChannel(virDomainPtr dom, =20 if (!chr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find channel %s"), + _("cannot find channel %1$s"), NULLSTR(name)); goto cleanup; } =20 if (chr->source->type !=3D VIR_DOMAIN_CHR_TYPE_UNIX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("channel %s is not using a UNIX socket"), + _("channel %1$s is not using a UNIX socket"), name ? name : NULLSTR(chr->info.alias)); goto cleanup; } @@ -14148,7 +14134,7 @@ qemuDomainBlockPullCommon(virDomainObj *vm, if (!(flags & VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES)) { if (speed > LLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), + _("bandwidth must be less than %1$llu"), LLONG_MAX >> 20); goto endjob; } @@ -14222,7 +14208,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, =20 if (!(job =3D qemuBlockJobDiskGetJob(disk))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk %s does not have an active block job"), dis= k->dst); + _("disk %1$s does not have an active block job"), d= isk->dst); goto endjob; } =20 @@ -14231,7 +14217,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, if (job->state =3D=3D QEMU_BLOCKJOB_STATE_ABORTING || job->state =3D=3D QEMU_BLOCKJOB_STATE_PIVOTING) { virReportError(VIR_ERR_OPERATION_INVALID, - _("block job on disk '%s' is still being ended"), + _("block job on disk '%1$s' is still being ended"), disk->dst); goto endjob; } @@ -14271,11 +14257,11 @@ qemuDomainBlockJobAbort(virDomainPtr dom, job->state =3D=3D QEMU_BLOCKJOB_STATE_FAILED) { if (job->errmsg) { virReportError(VIR_ERR_OPERATION_FAILED, - _("block job '%s' failed while pivoting: %s= "), + _("block job '%1$s' failed while pivoting: = %2$s"), job->name, job->errmsg); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("block job '%s' failed while pivoting"), + _("block job '%1$s' failed while pivoting"), job->name); } =20 @@ -14341,7 +14327,7 @@ qemuBlockJobInfoTranslate(qemuMonitorBlockJobInfo *= rawInfo, info->bandwidth =3D rawInfo->bandwidth; if (info->bandwidth !=3D rawInfo->bandwidth) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth %llu cannot be represented in result"), + _("bandwidth %1$llu cannot be represented in result= "), rawInfo->bandwidth); return -1; } @@ -14428,7 +14414,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom, if (!(flags & VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES)) { if (speed > LLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), + _("bandwidth must be less than %1$llu"), LLONG_MAX >> 20); return -1; } @@ -14452,7 +14438,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom, =20 if (!(job =3D qemuBlockJobDiskGetJob(disk))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk %s does not have an active block job"), dis= k->dst); + _("disk %1$s does not have an active block job"), d= isk->dst); goto endjob; } =20 @@ -14493,14 +14479,14 @@ qemuDomainBlockCopyValidateMirror(virStorageSourc= e *mirror, =20 if (*reuse || desttype =3D=3D VIR_STORAGE_TYPE_BLOCK) { virReportSystemError(errno, - _("missing destination file for disk %s: = %s"), + _("missing destination file for disk %1$s= : %2$s"), dst, mirror->path); return -1; } } else { if (virStorageSourceStat(mirror, &st) < 0) { virReportSystemError(errno, - _("unable to stat block copy target '%s'"= ), + _("unable to stat block copy target '%1$s= '"), mirror->path); return -1; } @@ -14512,16 +14498,14 @@ qemuDomainBlockCopyValidateMirror(virStorageSourc= e *mirror, } else { if (st.st_size && !(*reuse)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("external destination file for disk %s al= ready " - "exists and is not a block device: %s"), + _("external destination file for disk %1$s = already exists and is not a block device: %2$s"), dst, mirror->path); return -1; } =20 if (desttype =3D=3D VIR_STORAGE_TYPE_BLOCK) { virReportError(VIR_ERR_INVALID_ARG, - _("blockdev flag requested for disk %s, but= file " - "'%s' is not a block device"), + _("blockdev flag requested for disk %1$s, b= ut file '%2$s' is not a block device"), dst, mirror->path); return -1; } @@ -14627,8 +14611,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, =20 if (bandwidth > LLONG_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("bandwidth must be less than " - "'%llu' bytes/s (%llu MiB/s)"), + _("bandwidth must be less than '%1$llu' bytes/s (%2= $llu MiB/s)"), LLONG_MAX, LLONG_MAX >> 20); return -1; } @@ -14686,8 +14669,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, * file is not possible */ if (mirror_shallow && !existing && mirror->format =3D=3D VIR_STORAGE_F= ILE_RAW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shallow copy of disk '%s' into a raw file " - "is not possible"), + _("shallow copy of disk '%1$s' into a raw file is n= ot possible"), disk->dst); goto endjob; } @@ -14939,7 +14921,7 @@ qemuDomainBlockRebase(virDomainPtr dom, const char = *path, const char *base, if (!(flags & VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES)) { if (speed > LLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), + _("bandwidth must be less than %1$llu"), LLONG_MAX >> 20); goto cleanup; } @@ -15018,7 +15000,7 @@ qemuDomainBlockCopy(virDomainPtr dom, const char *d= isk, const char *destxml, if (sizeof(unsigned long)< sizeof(bandwidth) && param->value.ul > ULONG_MAX * (1ULL << 20)) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu bytes"), + _("bandwidth must be less than %1$llu bytes= "), ULONG_MAX * (1ULL << 20)); goto cleanup; } @@ -15104,7 +15086,7 @@ qemuDomainBlockCommit(virDomainPtr dom, if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES)) { if (speed > LLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), + _("bandwidth must be less than %1$llu"), LLONG_MAX >> 20); goto endjob; } @@ -15170,7 +15152,7 @@ qemuDomainOpenGraphics(virDomainPtr dom, =20 if (idx >=3D vm->def->ngraphics) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No graphics backend with index %d"), idx); + _("No graphics backend with index %1$d"), idx); goto endjob; } switch (vm->def->graphics[idx]->type) { @@ -15188,7 +15170,7 @@ qemuDomainOpenGraphics(virDomainPtr dom, case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can only open VNC, SPICE or D-Bus p2p graphics b= ackends, not %s"), + _("Can only open VNC, SPICE or D-Bus p2p graphics b= ackends, not %1$s"), virDomainGraphicsTypeToString(vm->def->graphics[idx= ]->type)); goto endjob; case VIR_DOMAIN_GRAPHICS_TYPE_LAST: @@ -15241,7 +15223,7 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom, =20 if (idx >=3D vm->def->ngraphics) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No graphics backend with index %d"), idx); + _("No graphics backend with index %1$d"), idx); goto cleanup; } switch (vm->def->graphics[idx]->type) { @@ -15259,7 +15241,7 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom, case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can only open VNC, SPICE or D-Bus p2p graphics b= ackends, not %s"), + _("Can only open VNC, SPICE or D-Bus p2p graphics b= ackends, not %1$s"), virDomainGraphicsTypeToString(vm->def->graphics[idx= ]->type)); goto cleanup; case VIR_DOMAIN_GRAPHICS_TYPE_LAST: @@ -15562,8 +15544,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, =20 if (param->value.ul > QEMU_BLOCK_IOTUNE_MAX) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("block I/O throttle limit value must" - " be no more than %llu"), QEMU_BLOCK_IOTUNE_M= AX); + _("block I/O throttle limit value must be no mo= re than %1$llu"), + QEMU_BLOCK_IOTUNE_MAX); goto endjob; } =20 @@ -15679,21 +15661,18 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (!info.val) { \ if (QEMU_BLOCK_IOTUNE_SET_##_bool) { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("cannot reset '%s' when " \ - "'%s' is set"), \ + _("cannot reset '%1$s' when '%2$s' = is set"), \ #val, #val "_max"); \ } else { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("value '%s' cannot be set if " \ - "'%s' is not set"), \ + _("value '%1$s' cannot be set if '%= 2$s' is not set"), \ #val "_max", #val); \ } \ goto endjob; \ } \ if (info.val##_max < info.val) { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("value '%s' cannot be " \ - "smaller than '%s'"), \ + _("value '%1$s' cannot be smaller than = '%2$s'"), \ #val "_max", #val); \ goto endjob; \ } \ @@ -15738,7 +15717,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (persistentDef) { if (!(conf_disk =3D virDomainDiskByName(persistentDef, path, true)= )) { virReportError(VIR_ERR_INVALID_ARG, - _("missing persistent configuration for disk '%= s'"), + _("missing persistent configuration for disk '%= 1$s'"), path); goto endjob; } @@ -15854,7 +15833,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom, if (persistentDef) { if (!(disk =3D virDomainDiskByName(persistentDef, path, true))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' was not found in the domain config= "), + _("disk '%1$s' was not found in the domain conf= ig"), path); goto endjob; } @@ -16250,7 +16229,7 @@ qemuDomainPMSuspendForDuration(virDomainPtr dom, target =3D=3D VIR_NODE_SUSPEND_TARGET_DISK || target =3D=3D VIR_NODE_SUSPEND_TARGET_HYBRID)) { virReportError(VIR_ERR_INVALID_ARG, - _("Unknown suspend target: %u"), + _("Unknown suspend target: %1$u"), target); return -1; } @@ -16617,7 +16596,7 @@ qemuConnectGetCPUModelNames(virConnectPtr conn, =20 if (!(arch =3D virArchFromString(archName))) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find architecture %s"), + _("cannot find architecture %1$s"), archName); return -1; } @@ -16744,7 +16723,7 @@ qemuDomainGetHostname(virDomainPtr dom, =20 if (!hostname) { virReportError(VIR_ERR_NO_HOSTNAME, - _("no hostname found for domain %s"), + _("no hostname found for domain %1$s"), vm->def->name); goto cleanup; } @@ -18430,7 +18409,7 @@ qemuDomainGetStatsCheckSupport(unsigned int *stats, if (enforce && *stats & ~supportedstats) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Stats types bits 0x%x are not supported by this = daemon or QEMU"), + _("Stats types bits 0x%1$x are not supported by thi= s daemon or QEMU"), *stats & ~supportedstats); return -1; } @@ -18808,7 +18787,7 @@ qemuDomainInterfaceAddresses(virDomainPtr dom, =20 default: virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unknown IP address data source %d"), + _("Unknown IP address data source %1$d"), source); break; } @@ -18935,7 +18914,7 @@ qemuDomainRenameCallback(virDomainObj *vm, =20 if (strchr(new_name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), new_name); + _("name %1$s cannot contain '/'"), new_name); return -1; } =20 @@ -18961,7 +18940,7 @@ qemuDomainRenameCallback(virDomainObj *vm, =20 if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s to '%s'"), + _("Failed to create symlink '%1$s to '%2$= s'"), new_dom_autostart_link, new_dom_cfg_file); return -1; } @@ -19087,8 +19066,8 @@ qemuDomainGetGuestVcpusParams(virTypedParameterPtr = *params, for (i =3D 0; i < ninfo; i++) { if (virBitmapSetBit(vcpus, info[i].id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vcpu id '%u' reported by guest agent is out = of " - "range"), info[i].id); + _("vcpu id '%1$u' reported by guest agent is ou= t of range"), + info[i].id); goto cleanup; } =20 @@ -19219,7 +19198,7 @@ qemuDomainSetGuestVcpus(virDomainPtr dom, =20 if (!state && !info[i].offlinable) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("vCPU '%u' is not offlinable"), info[i].id); + _("vCPU '%1$u' is not offlinable"), info[i].id); goto endjob; } =20 @@ -19232,7 +19211,7 @@ qemuDomainSetGuestVcpus(virDomainPtr dom, if (!virBitmapIsAllClear(map)) { char *tmp =3D virBitmapFormat(map); virReportError(VIR_ERR_INVALID_ARG, - _("guest is missing vCPUs '%s'"), NULLSTR(tmp)); + _("guest is missing vCPUs '%1$s'"), NULLSTR(tmp)); VIR_FREE(tmp); goto endjob; } @@ -19300,7 +19279,7 @@ qemuDomainSetVcpu(virDomainPtr dom, if (persistentDef) { if (lastvcpu >=3D virDomainDefGetVcpusMax(persistentDef)) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %zd is not present in persistent config= "), + _("vcpu %1$zd is not present in persistent conf= ig"), lastvcpu); goto endjob; } @@ -19309,7 +19288,7 @@ qemuDomainSetVcpu(virDomainPtr dom, if (def) { if (lastvcpu >=3D virDomainDefGetVcpusMax(def)) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu %zd is not present in live config"), + _("vcpu %1$zd is not present in live config"), lastvcpu); goto endjob; } @@ -19875,7 +19854,7 @@ qemuDomainGetGuestInfoCheckSupport(unsigned int typ= es, =20 if (types !=3D *supportedTypes) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported guest information types '0x%x'"), + _("unsupported guest information types '0x%1$x'"), types & ~qemuDomainGetGuestInfoSupportedTypes); return -1; } @@ -20282,8 +20261,7 @@ qemuDomainAgentSetResponseTimeout(virDomainPtr dom, =20 if (timeout < VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN) { virReportError(VIR_ERR_INVALID_ARG, - _("guest agent timeout '%d' is " - "less than the minimum '%d'"), + _("guest agent timeout '%1$d' is less than the mini= mum '%2$d'"), timeout, VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN); return -1; } @@ -20442,7 +20420,7 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom, if (seconds < MIN_DIRTYRATE_CALC_PERIOD || seconds > MAX_DIRTYRATE_CALC_PERIOD) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("seconds=3D%d is invalid, please choose value wit= hin [%d, %d]."), + _("seconds=3D%1$d is invalid, please choose value w= ithin [%2$d, %3$d]."), seconds, MIN_DIRTYRATE_CALC_PERIOD, MAX_DIRTYRATE_CALC_PERIOD); @@ -20560,7 +20538,7 @@ qemuDomainFDAssociate(virDomainPtr domain, for (i =3D 0; i < new->nfds; i++) { if ((new->fds[i] =3D dup(fds[i])) < 0) { virReportSystemError(errno, - _("failed to duplicate passed fd with ind= ex '%zu'"), + _("failed to duplicate passed fd with ind= ex '%1$zu'"), i); goto cleanup; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464688; cv=none; d=zohomail.com; s=zohoarc; b=DJrSiXCnNApSZWvSYnzw2ZhEeewy3ZwVRNNf9OBHFs+KBnmFez+aTXD/aggRWhvp9ft143+aSD7bGy1TTYzFfGIncAI03xFugUTh8JAmhj0tG7Nhxk5r0EDrBajJwPe7ZdLdAehWJ7C2ZPqSxwjOMGwrY2yAKYcVPd5PLOW4wbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464688; 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=FB0lPuI2BDx3/xYeo6TFzq9dpwGZ17m4T9zcXjh0cPA=; b=Zrg9RmwGUb17vEChF9kjsrVhO+uKjYQYkEbnmLzck1kt+m2h/RI69ar0sZV1N2+glVUhAOksK/YJ5p4d9tbRlsy+Gm37jfm9JCroqRIUaUll2MmEVh7zWMk55bbxyK7WBH9PbdmWRUAThyhcJjeuRDkpKsurd/l61yLEsvj3qAI= 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 1678464688135439.02746440267913; Fri, 10 Mar 2023 08:11:28 -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-538-JXcSqaezPPGBeN3dIE_5LA-1; Fri, 10 Mar 2023 11:11:23 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3047A3C16EB4; Fri, 10 Mar 2023 16:10:50 +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 194CE140EBF4; Fri, 10 Mar 2023 16:10:50 +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 0B2F719472C2; Fri, 10 Mar 2023 16:10:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CB5011946A66 for ; Fri, 10 Mar 2023 16:10:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C579540C945A; Fri, 10 Mar 2023 16:10:48 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E7DE4015307 for ; Fri, 10 Mar 2023 16:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464687; 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=FB0lPuI2BDx3/xYeo6TFzq9dpwGZ17m4T9zcXjh0cPA=; b=MPqqNQ+1ngHkKtclLzbP0jN0FxH2F6G4MZW0t8ciq2H3tXYAeWw1/0gS7WqF45qDxoJ0DL 8gdupYfcek+r9YVrXIYaxHV3bZlsg5RvJwTvfw1F1teqHP1iGyk8bLj+i57qqY9Itp5Xqe 3HzSwidtgV8e3J8LARn9/UvNMcZIkIM= X-MC-Unique: JXcSqaezPPGBeN3dIE_5LA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 27/51] qemu/qemu_hotplug: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:43 +0100 Message-Id: <89e76eb1201d0b4132b1289a17f47bab6c9510e1.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.7 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: 1678464689148100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_hotplug.c | 160 ++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 88 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index da17525824..e753c20471 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -259,7 +259,7 @@ qemuHotplugWaitForTrayEject(virDomainObj *vm, * error. Report the failure in an off-chance that it didn't. = */ if (virGetLastErrorCode() =3D=3D VIR_ERR_OK) { virReportError(VIR_ERR_OPERATION_FAILED, - _("timed out waiting to open tray of '%s'"), + _("timed out waiting to open tray of '%1$s'= "), disk->dst); } return -1; @@ -767,7 +767,7 @@ int qemuDomainAttachControllerDevice(virDomainObj *vm, =20 if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot plugged."), + _("'%1$s' controller cannot be hot plugged."), virDomainControllerTypeToString(controller->type)); return -1; } @@ -782,7 +782,7 @@ int qemuDomainAttachControllerDevice(virDomainObj *vm, =20 if (virDomainControllerFind(vm->def, controller->type, controller->idx= ) >=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("target %s:%d already exists"), + _("target %1$s:%2$d already exists"), type, controller->idx); return -1; } @@ -939,7 +939,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver *d= river, /* We should have an address already, so make sure */ if (disk->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected disk address type %s"), + _("unexpected disk address type %1$s"), virDomainDeviceAddressTypeToString(disk->info.t= ype)); goto cleanup; } @@ -975,7 +975,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver *d= river, case VIR_DOMAIN_DISK_BUS_NONE: case VIR_DOMAIN_DISK_BUS_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("disk bus '%s' cannot be hotplugged."), + _("disk bus '%1$s' cannot be hotplugged."), virDomainDiskBusTypeToString(disk->bus)); } =20 @@ -1241,7 +1241,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, case VIR_DOMAIN_NET_TYPE_VDS: case VIR_DOMAIN_NET_TYPE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("hotplug of interface type of %s is not implement= ed yet"), + _("hotplug of interface type of %1$s is not impleme= nted yet"), virDomainNetTypeToString(actualType)); goto cleanup; } @@ -1498,7 +1498,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver, case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN: case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("QEMU does not support device assignment mode '%s= '"), + _("QEMU does not support device assignment mode '%1= $s'"), virDomainHostdevSubsysPCIBackendTypeToString(backen= d)); goto error; break; @@ -2763,7 +2763,7 @@ qemuDomainAttachHostDevice(virQEMUDriver *driver, { if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hotplug is not supported for hostdev mode '%s'"), + _("hotplug is not supported for hostdev mode '%1$s'= "), virDomainHostdevModeTypeToString(hostdev->mode)); return -1; } @@ -2798,7 +2798,7 @@ qemuDomainAttachHostDevice(virQEMUDriver *driver, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hotplug is not supported for hostdev subsys type= '%s'"), + _("hotplug is not supported for hostdev subsys type= '%1$s'"), virDomainHostdevSubsysTypeToString(hostdev->source.= subsys.type)); return -1; } @@ -2829,7 +2829,7 @@ qemuDomainAttachShmemDevice(virDomainObj *vm, =20 case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("live attach of shmem model '%s' is not supported= "), + _("live attach of shmem model '%1$s' is not support= ed"), virDomainShmemModelTypeToString(shmem->model)); G_GNUC_FALLTHROUGH; case VIR_DOMAIN_SHMEM_MODEL_LAST: @@ -2928,7 +2928,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm, =20 if (watchdog->model !=3D VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("hotplug of watchdog of model %s is not supported= "), + _("hotplug of watchdog of model %1$s is not support= ed"), virDomainWatchdogModelTypeToString(watchdog->model)= ); goto cleanup; } @@ -3058,7 +3058,7 @@ qemuDomainAttachInputDevice(virDomainObj *vm, case VIR_DOMAIN_INPUT_BUS_NONE: case VIR_DOMAIN_INPUT_BUS_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("input device on bus '%s' cannot be hot plugged."= ), + _("input device on bus '%1$s' cannot be hot plugged= ."), virDomainInputBusTypeToString(input->bus)); return -1; } @@ -3326,7 +3326,7 @@ qemuDomainChangeNetBridge(virDomainObj *vm, =20 if (virNetDevExists(newbridge) !=3D 1) { virReportError(VIR_ERR_OPERATION_FAILED, - _("bridge %s doesn't exist"), newbridge); + _("bridge %1$s doesn't exist"), newbridge); return -1; } =20 @@ -3396,7 +3396,7 @@ qemuDomainChangeNetFilter(virDomainObj *vm, case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("filters not supported on interfaces of type %s"), + _("filters not supported on interfaces of type %1$s= "), virDomainNetTypeToString(virDomainNetGetActualType(= newdev))); return -1; case VIR_DOMAIN_NET_TYPE_LAST: @@ -3414,8 +3414,7 @@ qemuDomainChangeNetFilter(virDomainObj *vm, virErrorPtr errobj; =20 virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to add new filter rules to '%s' " - "- attempting to restore old rules"), + _("failed to add new filter rules to '%1$s' - attem= pting to restore old rules"), olddev->ifname); virErrorPreserveLast(&errobj); ignore_value(virDomainConfNWFilterInstantiate(vm->def->name, @@ -3490,7 +3489,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, oldType =3D=3D VIR_DOMAIN_NET_TYPE_VDPA) { /* no changes are possible to a type=3D'hostdev' or type=3D'vdpa' = interface */ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change config of '%s' network interface t= ype"), + _("cannot change config of '%1$s' network interface= type"), virDomainNetTypeToString(oldType)); goto cleanup; } @@ -3513,8 +3512,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, char oldmac[VIR_MAC_STRING_BUFLEN], newmac[VIR_MAC_STRING_BUFLEN]; =20 virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change network interface mac address " - "from %s to %s"), + _("cannot change network interface mac address from= %1$s to %2$s"), virMacAddrFormat(&olddev->mac, oldmac), virMacAddrFormat(&newdev->mac, newmac)); goto cleanup; @@ -3523,7 +3521,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, if (STRNEQ_NULLABLE(virDomainNetGetModelString(olddev), virDomainNetGetModelString(newdev))) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot modify network device model from %s to %s= "), + _("cannot modify network device model from %1$s to = %2$s"), NULLSTR(virDomainNetGetModelString(olddev)), NULLSTR(virDomainNetGetModelString(newdev))); goto cleanup; @@ -3531,7 +3529,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, =20 if (olddev->model !=3D newdev->model) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot modify network device model from %s to %s= "), + _("cannot modify network device model from %1$s to = %2$s"), virDomainNetModelTypeToString(olddev->model), virDomainNetModelTypeToString(newdev->model)); goto cleanup; @@ -3701,7 +3699,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, newType =3D=3D VIR_DOMAIN_NET_TYPE_VDPA) { /* can't turn it into a type=3D'hostdev' or type=3D'vdpa' interfac= e */ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change network interface type to '%s'"), + _("cannot change network interface type to '%1$s'"), virDomainNetTypeToString(newType)); goto cleanup; } @@ -3758,7 +3756,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unable to change config on '%s' network type= "), + _("unable to change config on '%1$s' network ty= pe"), virDomainNetTypeToString(newdev->type)); goto cleanup; case VIR_DOMAIN_NET_TYPE_LAST: @@ -3848,7 +3846,7 @@ qemuDomainChangeNet(virQEMUDriver *driver, =20 if (needReconnect) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unable to change config on '%s' network type"), + _("unable to change config on '%1$s' network type"), virDomainNetTypeToString(newdev->type)); goto cleanup; } @@ -4075,15 +4073,15 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, =20 if (!olddev) { virReportError(VIR_ERR_DEVICE_MISSING, - _("cannot find existing graphics device to modify o= f " - "type '%s'"), type); + _("cannot find existing graphics device to modify o= f type '%1$s'"), + type); return -1; } =20 if (dev->nListens !=3D olddev->nListens) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change the number of listen addresses " - "on '%s' graphics"), type); + _("cannot change the number of listen addresses on = '%1$s' graphics"), + type); return -1; } =20 @@ -4093,8 +4091,8 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, =20 if (newlisten->type !=3D oldlisten->type) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change the type of listen address " - "on '%s' graphics"), type); + _("cannot change the type of listen address on = '%1$s' graphics"), + type); return -1; } =20 @@ -4102,8 +4100,8 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS: if (STRNEQ_NULLABLE(newlisten->address, oldlisten->address)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change listen address setting " - "on '%s' graphics"), type); + _("cannot change listen address setting on = '%1$s' graphics"), + type); return -1; } =20 @@ -4112,8 +4110,8 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK: if (STRNEQ_NULLABLE(newlisten->network, oldlisten->network)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change listen address setting " - "on '%s' graphics"), type); + _("cannot change listen address setting on = '%1$s' graphics"), + type); return -1; } =20 @@ -4122,8 +4120,8 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET: if (STRNEQ_NULLABLE(newlisten->socket, oldlisten->socket)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot change listen socket setting " - "on '%s' graphics"), type); + _("cannot change listen socket setting on '= %1$s' graphics"), + type); return -1; } break; @@ -4231,7 +4229,7 @@ qemuDomainChangeGraphics(virQEMUDriver *driver, case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_DBUS: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to change config on '%s' graphics type"),= type); + _("unable to change config on '%1$s' graphics type"= ), type); break; case VIR_DOMAIN_GRAPHICS_TYPE_LAST: default: @@ -5152,7 +5150,7 @@ qemuDomainRemoveDevice(virQEMUDriver *driver, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("don't know how to remove a %s device"), + _("don't know how to remove a %1$s device"), virDomainDeviceTypeToString(dev->type)); break; } @@ -5292,7 +5290,7 @@ qemuDomainDetachPrepDisk(virDomainObj *vm, =20 if ((idx =3D qemuFindDisk(vm->def, match->dst)) < 0) { virReportError(VIR_ERR_DEVICE_MISSING, - _("disk %s not found"), match->dst); + _("disk %1$s not found"), match->dst); return -1; } *detach =3D disk =3D vm->def->disks[idx]; @@ -5334,7 +5332,7 @@ qemuDomainDetachPrepDisk(virDomainObj *vm, =20 case VIR_DOMAIN_DISK_DEVICE_FLOPPY: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("disk device type '%s' cannot be detached"), + _("disk device type '%1$s' cannot be detached"), virDomainDiskDeviceTypeToString(disk->device)); return -1; =20 @@ -5467,14 +5465,14 @@ qemuDomainDetachPrepController(virDomainObj *vm, =20 if (match->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("'%s' controller cannot be hot unplugged."), + _("'%1$s' controller cannot be hot unplugged."), virDomainControllerTypeToString(match->type)); return -1; } =20 if ((idx =3D virDomainControllerFind(vm->def, match->type, match->idx)= ) < 0) { virReportError(VIR_ERR_DEVICE_MISSING, - _("controller %s:%d not found"), + _("controller %1$s:%2$d not found"), virDomainControllerTypeToString(match->type), match->idx); return -1; @@ -5508,7 +5506,7 @@ qemuDomainDetachPrepHostdev(virDomainObj *vm, =20 if (match->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hot unplug is not supported for hostdev mode '%s= '"), + _("hot unplug is not supported for hostdev mode '%1= $s'"), virDomainHostdevModeTypeToString(match->mode)); return -1; } @@ -5528,11 +5526,11 @@ qemuDomainDetachPrepHostdev(virDomainObj *vm, case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB: if (usbsrc->bus && usbsrc->device) { virReportError(VIR_ERR_DEVICE_MISSING, - _("host usb device %03d.%03d not found"), + _("host usb device %1$03d.%2$03d not found"= ), usbsrc->bus, usbsrc->device); } else { virReportError(VIR_ERR_DEVICE_MISSING, - _("host usb device vendor=3D0x%.4x product= =3D0x%.4x not found"), + _("host usb device vendor=3D0x%1$.4x produc= t=3D0x%2$.4x not found"), usbsrc->vendor, usbsrc->product); } break; @@ -5541,13 +5539,13 @@ qemuDomainDetachPrepHostdev(virDomainObj *vm, VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) { virDomainHostdevSubsysSCSIiSCSI *iscsisrc =3D &scsisrc->u.= iscsi; virReportError(VIR_ERR_DEVICE_MISSING, - _("host scsi iSCSI path %s not found"), + _("host scsi iSCSI path %1$s not found"), iscsisrc->src->path); } else { virDomainHostdevSubsysSCSIHost *scsihostsrc =3D &scsisrc->u.host; virReportError(VIR_ERR_DEVICE_MISSING, - _("host scsi device %s:%u:%u.%llu not foun= d"), + _("host scsi device %1$s:%2$u:%3$u.%4$llu = not found"), scsihostsrc->adapter, scsihostsrc->bus, scsihostsrc->target, scsihostsrc->unit); } @@ -5555,14 +5553,14 @@ qemuDomainDetachPrepHostdev(virDomainObj *vm, } case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV: virReportError(VIR_ERR_DEVICE_MISSING, - _("mediated device '%s' not found"), + _("mediated device '%1$s' not found"), mdevsrc->uuidstr); break; case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST: break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected hostdev type %d"), subsys->type); + _("unexpected hostdev type %1$d"), subsys->type= ); break; } return -1; @@ -5582,8 +5580,7 @@ qemuDomainDetachPrepShmem(virDomainObj *vm, =20 if ((idx =3D virDomainShmemDefFind(vm->def, match)) < 0) { virReportError(VIR_ERR_DEVICE_MISSING, - _("model '%s' shmem device not present " - "in domain configuration"), + _("model '%1$s' shmem device not present in domain = configuration"), virDomainShmemModelTypeToString(match->model)); return -1; } @@ -5597,7 +5594,7 @@ qemuDomainDetachPrepShmem(virDomainObj *vm, =20 case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("live detach of shmem model '%s' is not supported= "), + _("live detach of shmem model '%1$s' is not support= ed"), virDomainShmemModelTypeToString(shmem->model)); G_GNUC_FALLTHROUGH; case VIR_DOMAIN_SHMEM_MODEL_LAST: @@ -5625,7 +5622,7 @@ qemuDomainDetachPrepWatchdog(virDomainObj *vm, =20 if ((*detach)->model !=3D VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("hot unplug of watchdog of model %s is not suppor= ted"), + _("hot unplug of watchdog of model %1$s is not supp= orted"), virDomainWatchdogModelTypeToString((*detach)->model= )); return -1; } @@ -5683,8 +5680,7 @@ qemuDomainDetachDeviceChr(virQEMUDriver *driver, =20 if (!(tmpChr =3D virDomainChrFind(vmdef, chr))) { virReportError(VIR_ERR_DEVICE_MISSING, - _("chr type '%s' device not present " - "in domain configuration"), + _("chr type '%1$s' device not present in domain con= figuration"), virDomainChrDeviceTypeToString(chr->deviceType)); goto cleanup; } @@ -5735,8 +5731,7 @@ qemuDomainDetachPrepRNG(virDomainObj *vm, =20 if ((idx =3D virDomainRNGFind(vm->def, match)) < 0) { virReportError(VIR_ERR_DEVICE_MISSING, - _("model '%s' RNG device not present " - "in domain configuration"), + _("model '%1$s' RNG device not present in domain co= nfiguration"), virDomainRNGBackendTypeToString(match->model)); return -1; } @@ -5759,8 +5754,7 @@ qemuDomainDetachPrepMemory(virDomainObj *vm, =20 if ((idx =3D virDomainMemoryFindByDef(vm->def, match)) < 0) { virReportError(VIR_ERR_DEVICE_MISSING, - _("model '%s' memory device not present " - "in the domain configuration"), + _("model '%1$s' memory device not present in the do= main configuration"), virDomainMemoryModelTypeToString(match->model)); return -1; } @@ -5791,7 +5785,7 @@ qemuDomainDetachPrepInput(virDomainObj *vm, case VIR_DOMAIN_INPUT_BUS_XEN: case VIR_DOMAIN_INPUT_BUS_PARALLELS: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("input device on bus '%s' cannot be detached"), + _("input device on bus '%1$s' cannot be detached"), virDomainInputBusTypeToString(input->bus)); return -1; =20 @@ -5860,7 +5854,7 @@ qemuDomainDetachDeviceLease(virQEMUDriver *driver, =20 if ((idx =3D virDomainLeaseIndex(vm->def, lease)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Lease %s in lockspace %s does not exist"), + _("Lease %1$s in lockspace %2$s does not exist"), lease->key, NULLSTR(lease->lockspace)); return -1; } @@ -5993,7 +5987,7 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, case VIR_DOMAIN_DEVICE_CRYPTO: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("live detach of device '%s' is not supported"), + _("live detach of device '%1$s' is not supported"), virDomainDeviceTypeToString(match->type)); return -1; } @@ -6007,7 +6001,7 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, * return have a virDeviceInfo in them. */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("device of type '%s' has no device info"), + _("device of type '%1$s' has no device info"), virDomainDeviceTypeToString(detach.type)); return -1; } @@ -6017,15 +6011,14 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, =20 if (!info->alias) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot detach %s device with no alias"), + _("Cannot detach %1$s device with no alias"), virDomainDeviceTypeToString(detach.type)); return -1; } =20 if (qemuIsMultiFunctionDevice(vm->def, info)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot hot unplug %s device with multifunction P= CI guest address: " - VIR_PCI_DEVICE_ADDRESS_FMT), + _("cannot hot unplug %1$s device with multifunction= PCI guest address: %2$04x:%3$02x:%4$02x.%5$d"), virDomainDeviceTypeToString(detach.type), info->addr.pci.domain, info->addr.pci.bus, info->addr.pci.slot, info->addr.pci.function); @@ -6040,9 +6033,7 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, info->addr.pci.bus); if (controllerIdx < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot hot unplug %s device with PCI guest a= ddress: " - VIR_PCI_DEVICE_ADDRESS_FMT - " - controller not found"), + _("cannot hot unplug %1$s device with PCI guest= address: %2$04x:%3$02x:%4$02x.%5$d - controller not found"), virDomainDeviceTypeToString(detach.type), info->addr.pci.domain, info->addr.pci.bus, info->addr.pci.slot, info->addr.pci.function); @@ -6052,9 +6043,7 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, controller =3D vm->def->controllers[controllerIdx]; if (controller->opts.pciopts.hotplug =3D=3D VIR_TRISTATE_SWITCH_OF= F) { virReportError(VIR_ERR_OPERATION_FAILED, - _("cannot hot unplug %s device with PCI guest a= ddress: " - VIR_PCI_DEVICE_ADDRESS_FMT - " - not allowed by controller"), + _("cannot hot unplug %1$s device with PCI guest= address: %2$04x:%3$02x:%4$02x.%5$d - not allowed by controller"), virDomainDeviceTypeToString(detach.type), info->addr.pci.domain, info->addr.pci.bus, info->addr.pci.slot, info->addr.pci.function); @@ -6130,7 +6119,7 @@ qemuDomainRemoveVcpu(virDomainObj *vm, =20 if (offlineVcpuWithTid !=3D -1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu reported thread id for inactive vcpu '%zu'"= ), + _("qemu reported thread id for inactive vcpu '%1$zu= '"), offlineVcpuWithTid); virDomainAuditVcpu(vm, oldvcpus, oldvcpus - nvcpus, "update", fals= e); return -1; @@ -6180,7 +6169,7 @@ qemuDomainHotplugDelVcpu(virQEMUDriver *driver, =20 if (!vcpupriv->alias) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("vcpu '%u' can't be unplugged"), vcpu); + _("vcpu '%1$u' can't be unplugged"), vcpu); return -1; } =20 @@ -6277,7 +6266,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriver *driver, =20 if (vcpuTidMissing && qemuDomainHasVcpuPids(vm)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu didn't report thread id for vcpu '%zu'"), i= ); + _("qemu didn't report thread id for vcpu '%1$zu'"),= i); return -1; } =20 @@ -6505,16 +6494,14 @@ qemuDomainSetVcpusInternal(virQEMUDriver *driver, =20 if (def && nvcpus > virDomainDefGetVcpusMax(def)) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpus is greater than max allowable" - " vcpus for the live domain: %u > %u"), + _("requested vcpus is greater than max allowable vc= pus for the live domain: %1$u > %2$u"), nvcpus, virDomainDefGetVcpusMax(def)); return -1; } =20 if (persistentDef && nvcpus > virDomainDefGetVcpusMax(persistentDef)) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpus is greater than max allowable" - " vcpus for the persistent domain: %u > %u"), + _("requested vcpus is greater than max allowable vc= pus for the persistent domain: %1$u > %2$u"), nvcpus, virDomainDefGetVcpusMax(persistentDef)); return -1; } @@ -6586,13 +6573,13 @@ qemuDomainFilterHotplugVcpuEntities(virDomainDef *d= ef, =20 if (vcpu->online =3D=3D state) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%zd' is already in requested state"), = next); + _("vcpu '%1$zd' is already in requested state")= , next); return NULL; } =20 if (vcpu->online && !vcpu->hotpluggable) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%zd' can't be hotunplugged"), next); + _("vcpu '%1$zd' can't be hotunplugged"), next); return NULL; } } @@ -6608,17 +6595,14 @@ qemuDomainFilterHotplugVcpuEntities(virDomainDef *d= ef, =20 if (vcpupriv->vcpus =3D=3D 0) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%zd' belongs to a larger hotpluggable = entity, " - "but siblings were not selected"), next); + _("vcpu '%1$zd' belongs to a larger hotpluggabl= e entity, but siblings were not selected"), next); return NULL; } =20 for (i =3D next + 1; i < next + vcpupriv->vcpus; i++) { if (!virBitmapIsBitSet(map, i)) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%zu' was not selected but it belon= gs to " - "hotpluggable entity '%zd-%zd' which was " - "partially selected"), + _("vcpu '%1$zu' was not selected but it bel= ongs to hotpluggable entity '%2$zd-%3$zd' which was partially selected"), i, next, next + vcpupriv->vcpus - 1); return NULL; } @@ -6661,8 +6645,8 @@ qemuDomainVcpuValidateConfig(virDomainDef *def, =20 if (vcpu->online && vcpu->hotpluggable =3D=3D VIR_TRISTATE_BOOL_NO= ) { virReportError(VIR_ERR_INVALID_ARG, - _("vcpu '%zd' can't be modified as it is follow= ed " - "by non-hotpluggable online vcpus"), firstvcp= u); + _("vcpu '%1$zd' can't be modified as it is foll= owed by non-hotpluggable online vcpus"), + firstvcpu); return -1; } } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464745; cv=none; d=zohomail.com; s=zohoarc; b=DJws46PFZtkuOPAeT7JkXazQHS2R20lA5jeDL+U9AZUUWFixBovW6Tv0AaBaSNF/HvCYjsupKrh13TwoaEa6Qdt440wVzbMNOT9UNiX8suIpbzvVSSb/mwS6hl4k6+hAIpAsFCtrE3EVcmlhGRNx3kmHdNiazV41M4xJuclPNDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464745; 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=37ByEOGzWnCx+yAJyPKvwNK65p5NaAswm/i4vMfSTyg=; b=MhaB2KmC9lxrjIQi3biKwH3v/LqmSa3I/B2LsDHS9s38mKF3i2pxPDTSCWOVro4QsKpPAE0N69+FS9rklKpV69ucQseM8FHaqPhbqUEMH1lmpDgCn0egGNLzVtO3jpiw/CIrqK5BU2+2QfLuhIYgAECumySWQ2e5m8v4GJP/l+Y= 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 1678464745732491.81993029614193; Fri, 10 Mar 2023 08:12:25 -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-473-JyahTM9kNsegGZ90iYd-vQ-1; Fri, 10 Mar 2023 11:11:34 -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 95AB3857F47; Fri, 10 Mar 2023 16:10:51 +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 7E4BE1121315; Fri, 10 Mar 2023 16:10:51 +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 68CE91946A6F; Fri, 10 Mar 2023 16:10:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 107881946A74 for ; Fri, 10 Mar 2023 16:10:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E94B42026D68; Fri, 10 Mar 2023 16:10:49 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F3DA2026D4B for ; Fri, 10 Mar 2023 16:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464744; 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=37ByEOGzWnCx+yAJyPKvwNK65p5NaAswm/i4vMfSTyg=; b=S+e8FHUQ9ng0cwuNVsYwhmafynMf3+a4S75ogd8Vku7UwwQzZNm4bywMCrMFUzawn7OtUV wVIgDcgXX3F2CJmvQUyIcgeunQaUfqz0+Un/sTPvUqLFRvkT5LWpuuDF0eT4qGGIK0epLl lHJ6S1v6OEeCTfm9CjuxrCY7x4pFCJw= X-MC-Unique: JyahTM9kNsegGZ90iYd-vQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 28/51] qemu/qemu_migration: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:44 +0100 Message-Id: <91bcdd3de20aa2c79ae253b01594d14062e776ae.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: 1678464747426100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 105 +++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2720f0b083..a18910f7ad 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -90,7 +90,7 @@ qemuMigrationJobIsAllowed(virDomainObj *vm) if (vm->job->asyncJob =3D=3D VIR_ASYNC_JOB_MIGRATION_IN || vm->job->asyncJob =3D=3D VIR_ASYNC_JOB_MIGRATION_OUT) { virReportError(VIR_ERR_OPERATION_INVALID, - _("another migration job is already running for dom= ain '%s'"), + _("another migration job is already running for dom= ain '%1$s'"), vm->def->name); return false; } @@ -139,7 +139,7 @@ qemuMigrationCheckPhase(virDomainObj *vm, if (phase < QEMU_MIGRATION_PHASE_POSTCOPY_FAILED && phase < vm->job->phase) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("migration protocol going backwards %s =3D> %s"), + _("migration protocol going backwards %1$s =3D> %2$= s"), qemuMigrationJobPhaseTypeToString(vm->job->phase), qemuMigrationJobPhaseTypeToString(phase)); return -1; @@ -190,9 +190,9 @@ qemuMigrationJobIsActive(virDomainObj *vm, const char *msg; =20 if (job =3D=3D VIR_ASYNC_JOB_MIGRATION_IN) - msg =3D _("domain '%s' is not processing incoming migration"); + msg =3D _("domain '%1$s' is not processing incoming migration"= ); else - msg =3D _("domain '%s' is not being migrated"); + msg =3D _("domain '%1$s' is not being migrated"); =20 virReportError(VIR_ERR_OPERATION_INVALID, msg, vm->def->name); return false; @@ -250,7 +250,7 @@ qemuMigrationSrcRestoreDomainState(virQEMUDriver *drive= r, virDomainObj *vm) /* Hm, we already know we are in error here. We don't want to * overwrite the previous error, though, so we just throw some= thing * to the logs and hope for the best */ - VIR_ERROR(_("Failed to resume guest %s after failure"), vm->de= f->name); + VIR_ERROR(_("Failed to resume guest %1$s after failure"), vm->= def->name); goto cleanup; } ret =3D true; @@ -291,7 +291,7 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, =20 if (!(volName =3D strrchr(basePath, '/'))) { virReportError(VIR_ERR_INVALID_ARG, - _("malformed disk path: %s"), + _("malformed disk path: %1$s"), disk->src->path); goto cleanup; } @@ -340,7 +340,7 @@ qemuMigrationDstPrecreateDisk(virConnectPtr *conn, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot precreate storage for disk type '%s'"), + _("cannot precreate storage for disk type '%1$s'"), virStorageTypeToString(disk->src->type)); goto cleanup; } @@ -446,7 +446,7 @@ qemuMigrationDstPrecreateStorage(virDomainObj *vm, =20 if (!(disk =3D virDomainDiskByTarget(vm->def, nbd->disks[i].target= ))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find disk by target: %s"), + _("unable to find disk by target: %1$s"), nbd->disks[i].target); goto cleanup; } @@ -526,7 +526,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, return -1; =20 if (!uri->scheme) { - virReportError(VIR_ERR_INVALID_ARG, _("No URI scheme specified= : %s"), nbdURI); + virReportError(VIR_ERR_INVALID_ARG, _("No URI scheme specified= : %1$s"), nbdURI); return -1; } =20 @@ -537,7 +537,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, * we should rather error out instead of auto-allocating a= port * as that would be the exact opposite of what was request= ed. */ virReportError(VIR_ERR_INVALID_ARG, - _("URI with tcp scheme did not provide a se= rver part: %s"), + _("URI with tcp scheme did not provide a se= rver part: %1$s"), nbdURI); return -1; } @@ -554,7 +554,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, server.socket =3D (char *)uri->path; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Unsupported scheme in disks URI: %s"), + _("Unsupported scheme in disks URI: %1$s"), uri->scheme); return -1; } @@ -574,7 +574,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, =20 if (disk->src->readonly || virStorageSourceIsEmpty(disk->src)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Cannot migrate empty or read-only disk %s"), + _("Cannot migrate empty or read-only disk %1$s"= ), disk->dst); goto cleanup; } @@ -655,11 +655,11 @@ qemuMigrationNBDReportMirrorError(qemuBlockJobData *j= ob, { if (job->errmsg) { virReportError(VIR_ERR_OPERATION_FAILED, - _("migration of disk %s failed: %s"), + _("migration of disk %1$s failed: %2$s"), diskdst, job->errmsg); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("migration of disk %s failed"), diskdst); + _("migration of disk %1$s failed"), diskdst); } } =20 @@ -692,7 +692,7 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObj *vm, =20 if (!(job =3D qemuBlockJobDiskGetJob(disk))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing block job data for disk '%s'"), disk= ->dst); + _("missing block job data for disk '%1$s'"), di= sk->dst); return -1; } =20 @@ -1158,7 +1158,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver, =20 if (mirror_speed > LLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, - _("bandwidth must be less than %llu"), + _("bandwidth must be less than %1$llu"), LLONG_MAX >> 20); return -1; } @@ -1201,7 +1201,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver, return -1; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Unsupported scheme in disks URI: %s"), + _("Unsupported scheme in disks URI: %1$s"), uri->scheme); return -1; } @@ -1232,7 +1232,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver, =20 if (vm->job->abortJob) { vm->job->current->status =3D VIR_DOMAIN_JOB_STATUS_CANCELED; - virReportError(VIR_ERR_OPERATION_ABORTED, _("%s: %s"), + virReportError(VIR_ERR_OPERATION_ABORTED, _("%1$s: %2$s"), virDomainAsyncJobTypeToString(vm->job->asyncJob= ), _("canceled by client")); return -1; @@ -1286,7 +1286,7 @@ qemuMigrationSrcIsAllowedHostdev(const virDomainDef *= def) case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST: case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot migrate a domain with "), + _("cannot migrate a domain with "), virDomainHostdevSubsysTypeToString(hostdev-= >source.subsys.type)); return false; =20 @@ -1311,11 +1311,11 @@ qemuMigrationSrcIsAllowedHostdev(const virDomainDef= *def) virDomainNetType actualType =3D virDomainNetGetActualT= ype(hostdev->parentnet); =20 virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot migrate a domain with "), + _("cannot migrate a domain with "), virDomainNetTypeToString(actualType)); } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("cannot migrate a domain with "), + _("cannot migrate a domain with "), virDomainHostdevSubsysTypeToString(host= dev->source.subsys.type)); } return false; @@ -1388,7 +1388,7 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm, =20 if (nsnapshots > 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("cannot migrate domain with %d snapshots"), + _("cannot migrate domain with %1$d snapshots"), nsnapshots); return false; } @@ -1412,7 +1412,7 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm, if (blockers && blockers[0]) { g_autofree char *reasons =3D g_strjoinv("; ", blockers); virReportError(VIR_ERR_OPERATION_INVALID, - _("cannot migrate domain: %s"), reasons); + _("cannot migrate domain: %1$s"), reasons); return false; } } else { @@ -1500,8 +1500,7 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm, } if (shmem->role !=3D VIR_DOMAIN_SHMEM_ROLE_MASTER) { virReportError(VIR_ERR_OPERATION_INVALID, - _("shmem device '%s' cannot be migrated, " - "only shmem with role=3D'%s' can be migra= ted"), + _("shmem device '%1$s' cannot be migrated, = only shmem with role=3D'%2$s' can be migrated"), shmem->name, virDomainShmemRoleTypeToString(VIR_DOMAIN_S= HMEM_ROLE_MASTER)); return false; @@ -1860,31 +1859,31 @@ qemuMigrationJobCheckStatus(virDomainObj *vm, switch (jobData->status) { case VIR_DOMAIN_JOB_STATUS_NONE: virReportError(VIR_ERR_OPERATION_FAILED, - _("job '%s' is not active"), + _("job '%1$s' is not active"), qemuMigrationJobName(vm)); return -1; =20 case VIR_DOMAIN_JOB_STATUS_FAILED: if (error) { virReportError(VIR_ERR_OPERATION_FAILED, - _("job '%s' failed: %s"), + _("job '%1$s' failed: %2$s"), qemuMigrationJobName(vm), error); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("job '%s' unexpectedly failed"), + _("job '%1$s' unexpectedly failed"), qemuMigrationJobName(vm)); } return -1; =20 case VIR_DOMAIN_JOB_STATUS_CANCELED: virReportError(VIR_ERR_OPERATION_ABORTED, - _("job '%s' canceled by client"), + _("job '%1$s' canceled by client"), qemuMigrationJobName(vm)); return -1; =20 case VIR_DOMAIN_JOB_STATUS_POSTCOPY_PAUSED: virReportError(VIR_ERR_OPERATION_FAILED, - _("job '%s' failed in post-copy phase"), + _("job '%1$s' failed in post-copy phase"), qemuMigrationJobName(vm)); return -1; =20 @@ -1937,7 +1936,7 @@ qemuMigrationAnyCompleted(virDomainObj *vm, virDomainObjGetState(vm, &pauseReason) =3D=3D VIR_DOMAIN_PAUSED && pauseReason =3D=3D VIR_DOMAIN_PAUSED_IOERROR) { virReportError(VIR_ERR_OPERATION_FAILED, - _("job '%s' failed due to I/O error"), + _("job '%1$s' failed due to I/O error"), qemuMigrationJobName(vm)); goto error; } @@ -2109,7 +2108,7 @@ qemuMigrationSrcGraphicsRelocate(virDomainObj *vm, =20 if ((type =3D virDomainGraphicsTypeFromString(uri->scheme)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown graphics type %s"), uri->scheme); + _("unknown graphics type %1$s"), uri->scheme); return -1; } =20 @@ -2124,7 +2123,7 @@ qemuMigrationSrcGraphicsRelocate(virDomainObj *vm, if (STRCASEEQ(param->name, "tlsPort")) { if (virStrToLong_i(param->value, NULL, 10, &tlsPort) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid tlsPort number: %s"), + _("invalid tlsPort number: %1$s"), param->value); return -1; } @@ -2180,8 +2179,8 @@ qemuMigrationDstOPDRelocate(virQEMUDriver *driver G_G= NUC_UNUSED, if (virNetDevOpenvswitchSetMigrateData(cookie->network->net[i]= .portdata, netptr->ifname) !=3D 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to run command to set OVS port da= ta for " - "interface %s"), netptr->ifname); + _("Unable to run command to set OVS port da= ta for interface %1$s"), + netptr->ifname); return -1; } break; @@ -2621,7 +2620,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, =20 if (j =3D=3D vm->def->ndisks) { virReportError(VIR_ERR_INVALID_ARG, - _("disk target %s not found"), + _("disk target %1$s not found"), migrate_disks[i]); return NULL; } @@ -2688,14 +2687,14 @@ qemuMigrationAnyCanResume(virDomainObj *vm, if (vm->job->asyncOwner !=3D 0 && vm->job->asyncOwner !=3D virThreadSelfID()) { virReportError(VIR_ERR_OPERATION_INVALID, - _("migration of domain %s is being actively monitor= ed by another thread"), + _("migration of domain %1$s is being actively monit= ored by another thread"), vm->def->name); return false; } =20 if (!virDomainObjIsPostcopy(vm, vm->job)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("migration of domain %s is not in post-copy phase= "), + _("migration of domain %1$s is not in post-copy pha= se"), vm->def->name); return false; } @@ -2703,14 +2702,14 @@ qemuMigrationAnyCanResume(virDomainObj *vm, if (vm->job->phase < QEMU_MIGRATION_PHASE_POSTCOPY_FAILED && !virDomainObjIsFailedPostcopy(vm, vm->job)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("post-copy migration of domain %s has not failed"= ), + _("post-copy migration of domain %1$s has not faile= d"), vm->def->name); return false; } =20 if (vm->job->phase > expectedPhase) { virReportError(VIR_ERR_OPERATION_INVALID, - _("resuming failed post-copy migration of domain %s= already in progress"), + _("resuming failed post-copy migration of domain %1= $s already in progress"), vm->def->name); return false; } @@ -2997,7 +2996,7 @@ qemuMigrationDstPrepareAnyBlockDirtyBitmaps(virDomain= Obj *vm, =20 if (!(nodedata =3D virHashLookup(blockNamedNodeData, disk->nodenam= e))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find data for block node '%s'"), + _("failed to find data for block node '%1$s'"), disk->nodename); return -1; } @@ -3443,7 +3442,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver, vm =3D virDomainObjListFindByName(driver->domains, def->name); if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), def->name); + _("no domain with matching name '%1$s'"), def->name= ); qemuMigrationDstErrorReport(driver, def->name); return -1; } @@ -3746,7 +3745,7 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, =20 if (uri->scheme =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("missing scheme in migration URI: %s"), + _("missing scheme in migration URI: %1$s"), uri_in); goto cleanup; } @@ -3755,7 +3754,7 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, STRNEQ(uri->scheme, "rdma") && STRNEQ(uri->scheme, "unix")) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("unsupported scheme %s in migration URI %s"), + _("unsupported scheme %1$s in migration URI %2$= s"), uri->scheme, uri_in); goto cleanup; } @@ -3765,8 +3764,9 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, listenAddress =3D uri->path; } else { if (uri->server =3D=3D NULL) { - virReportError(VIR_ERR_INVALID_ARG, _("missing host in mig= ration" - " URI: %s"), uri_in); + virReportError(VIR_ERR_INVALID_ARG, + _("missing host in migration URI: %1$s"), + uri_in); goto cleanup; } =20 @@ -4332,7 +4332,7 @@ qemuMigrationSrcConnect(virQEMUDriver *driver, =20 /* Migration expects a blocking FD */ if (virSetBlocking(spec->dest.fd.qemu, true) < 0) { - virReportSystemError(errno, _("Unable to set FD %d blocking"), + virReportSystemError(errno, _("Unable to set FD %1$d blocking"), spec->dest.fd.qemu); goto cleanup; } @@ -4604,7 +4604,7 @@ qemuMigrationSrcStart(virDomainObj *vm, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected migration schema: %d"), spec->destType); + _("unexpected migration schema: %1$d"), spec->destType); return -1; } =20 @@ -4745,8 +4745,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, if (virLockManagerPluginUsesState(driver->lockManager) && !cookieout) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Migration with lock driver %s requires" - " cookie support"), + _("Migration with lock driver %1$s requires cookie = support"), virLockManagerPluginGetName(driver->lockManager)); return -1; } @@ -4884,7 +4883,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, * as this is a critical section so we are guaranteed * vm->job->abortJob will not change */ vm->job->current->status =3D VIR_DOMAIN_JOB_STATUS_CANCELED; - virReportError(VIR_ERR_OPERATION_ABORTED, _("%s: %s"), + virReportError(VIR_ERR_OPERATION_ABORTED, _("%1$s: %2$s"), virDomainAsyncJobTypeToString(vm->job->asyncJob), _("canceled by client")); goto exit_monitor; @@ -5130,7 +5129,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, =20 if (uribits->scheme =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing scheme in migration URI: %s"), + _("missing scheme in migration URI: %1$s"), uri); return -1; } @@ -6302,7 +6301,7 @@ qemuMigrationDstVPAssociatePortProfiles(virDomainDef = *def) VIR_NETDEV_VPORT_PROFILE_OP= _MIGRATE_IN_FINISH, false) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Port profile Associate failed for %s"), + _("Port profile Associate failed for %1$s"), net->ifname); goto err_exit; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464728; cv=none; d=zohomail.com; s=zohoarc; b=hzOLpfGXoS3zu/SlmfacCocuo9BNyQAQTEBkjOrh4THYCFKMkWycCwnOY1jetgYgvyLu9OMHnY5PQbXta0Ij0zQxHiYv5Me1SrcUSCaXdDD5z/K8dIRL7l6VStNTYekOjM7+k96yVycI1BWKZoVz9/S8GMEHbNSDWZ+Vw6CAI0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464728; 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=sY58AWIzWsurJwU6np2zeeQ+E6RhFXgw9udG8KltzWI=; b=gPTTroJ4UZZ8x481lFg5dgRXdaWd2UicnZdBezw2XeZUssVql2Xw00mjDrsZosDpG1risYMkGGqCgnn5NmGaboKSNbQuu9QA3GIcWhQ62qLA0yckBS1IjP8gVYXyCI2KvMXBkerfsWjBaRufRAn+GQPzvsOgzwY14FvAIp1+6tA= 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 1678464728655721.9056332902326; Fri, 10 Mar 2023 08:12:08 -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-396-WPJmGhVYMvmYEwu27rmqsg-1; Fri, 10 Mar 2023 11:11:35 -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 C99561871CD7; Fri, 10 Mar 2023 16:10:52 +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 B40BE492C3E; Fri, 10 Mar 2023 16:10:52 +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 A5B531946A69; Fri, 10 Mar 2023 16:10:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3181A1946587 for ; Fri, 10 Mar 2023 16:10:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2510D1121318; Fri, 10 Mar 2023 16:10:51 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB14F1121315 for ; Fri, 10 Mar 2023 16:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464727; 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=sY58AWIzWsurJwU6np2zeeQ+E6RhFXgw9udG8KltzWI=; b=H9RzRBn9Angi1uG7pLbMQ0cA9aTBxZPVSkPyafmodTN2+9tpo9gmOUA01tUITm5n/r1NFY EnrlyZLABxRvQCaD/NTuQO/nFQG/6uzG0jnQVodiCJwJx7PkLHXBGbiQeF3vCxvTHmXOJA 6YNvm8bYiuy8vlkSoyg0lVhMNKcqEDk= X-MC-Unique: WPJmGhVYMvmYEwu27rmqsg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 29/51] qemu/qemu_monitor_json: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:45 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1678464729302100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor_json.c | 91 ++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index f4416c929f..3b42b28fa1 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -195,7 +195,7 @@ qemuMonitorJSONIOProcessLine(qemuMonitor *mon, =20 if (virJSONValueGetType(obj) !=3D VIR_JSON_TYPE_OBJECT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parsed JSON reply '%s' isn't an object"), line); + _("Parsed JSON reply '%1$s' isn't an object"), line= ); return -1; } =20 @@ -215,11 +215,11 @@ qemuMonitorJSONIOProcessLine(qemuMonitor *mon, return 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected JSON reply '%s'"), line); + _("Unexpected JSON reply '%1$s'"), line); } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown JSON reply '%s'"), line); + _("Unknown JSON reply '%1$s'"), line); } =20 return -1; @@ -362,11 +362,11 @@ qemuMonitorJSONCheckErrorFull(virJSONValue *cmd, /* Only send the user the command name + friendly error */ if (!error) virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU command '%s'"), + _("unable to execute QEMU command '%1$s'"), qemuMonitorJSONCommandName(cmd)); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU command '%s': %s"), + _("unable to execute QEMU command '%1$s': %2$s"= ), qemuMonitorJSONCommandName(cmd), qemuMonitorJSONStringifyError(error)); =20 @@ -382,7 +382,7 @@ qemuMonitorJSONCheckErrorFull(virJSONValue *cmd, return -1; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU command '%s'"), + _("unable to execute QEMU command '%1$s'"), qemuMonitorJSONCommandName(cmd)); return -1; } @@ -416,7 +416,7 @@ qemuMonitorJSONGetReply(virJSONValue *cmd, VIR_DEBUG("Unexpected return type %d (expecting %d) for command %s= : %s", virJSONValueGetType(data), type, cmdstr, retstr); virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected type returned by QEMU command '%s'"), + _("unexpected type returned by QEMU command '%1$s'"= ), qemuMonitorJSONCommandName(cmd)); =20 return NULL; @@ -632,7 +632,7 @@ qemuMonitorJSONGuestPanicExtractInfo(virJSONValue *data) return qemuMonitorJSONGuestPanicExtractInfoS390(data); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown panic info type '%s'"), NULLSTR(type)); + _("unknown panic info type '%1$s'"), NULLSTR(type)); return NULL; } =20 @@ -1261,7 +1261,7 @@ qemuMonitorJSONExtractDumpStats(virJSONValue *result, ret->status =3D qemuMonitorDumpStatusTypeFromString(statusstr); if (ret->status < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("incomplete result, unknown status string '%s'"), + _("incomplete result, unknown status string '%1$s'"= ), statusstr); return -1; } @@ -1389,7 +1389,7 @@ qemuMonitorJSONHumanCommand(qemuMonitor *mon, =20 if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Human monitor command is not available to run %s= "), + _("Human monitor command is not available to run %1= $s"), cmd_str); return -1; } @@ -1763,7 +1763,7 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *mon, case VIR_DOMAIN_VIDEO_TYPE_VGA: if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb", &prop= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'vgamem_mb'"= ), + _("QOM Object '%1$s' has no property 'vgamem_mb= '"), path); return -1; } @@ -1772,7 +1772,7 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *mon, case VIR_DOMAIN_VIDEO_TYPE_QXL: if (qemuMonitorJSONGetObjectProperty(mon, path, "vram_size", &prop= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'vram_size'"= ), + _("QOM Object '%1$s' has no property 'vram_size= '"), path); return -1; } @@ -1780,14 +1780,14 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *m= on, =20 if (qemuMonitorJSONGetObjectProperty(mon, path, "ram_size", &prop)= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'ram_size'"), + _("QOM Object '%1$s' has no property 'ram_size'= "), path); return -1; } video->ram =3D prop.val.ul / 1024; if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb", &prop= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'vgamem_mb'"= ), + _("QOM Object '%1$s' has no property 'vgamem_mb= '"), path); return -1; } @@ -1796,7 +1796,7 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitor *mon, case VIR_DOMAIN_VIDEO_TYPE_VMVGA: if (qemuMonitorJSONGetObjectProperty(mon, path, "vgamem_mb", &prop= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'vgamem_mb'"= ), + _("QOM Object '%1$s' has no property 'vgamem_mb= '"), path); return -1; } @@ -1842,7 +1842,7 @@ qemuMonitorJSONUpdateVideoVram64Size(qemuMonitor *mon, if (qemuMonitorJSONGetObjectProperty(mon, path, "vram64_size_mb", &prop) = < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QOM Object '%s' has no property 'vram64_= size_mb'"), + _("QOM Object '%1$s' has no property 'vram6= 4_size_mb'"), path); return -1; } @@ -2157,7 +2157,7 @@ qemuMonitorJSONBlockInfoAdd(GHashTable *table, =20 if (g_hash_table_contains(table, entryname)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Duplicate block info for '%s'"), entryname); + _("Duplicate block info for '%1$s'"), entryname); return -1; } =20 @@ -2209,7 +2209,7 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, =20 if (virJSONValueObjectGetBoolean(dev, "removable", &info.removable= ) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot read %s value"), + _("cannot read %1$s value"), "removable"); return -1; } @@ -2268,7 +2268,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *de= v, (*nstats)++; \ if (virJSONValueObjectGetNumberUlong(stats, NAME, &VAR) < 0) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("cannot read %s statistic"), NAME); \ + _("cannot read %1$s statistic"), NAME); \ return NULL; \ } \ } @@ -2931,7 +2931,7 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValue *r= eply, stats->status =3D qemuMonitorMigrationStatusTypeFromString(statusstr); if (stats->status < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected migration status in %s"), statusstr); + _("unexpected migration status in %1$s"), statusstr= ); return -1; } =20 @@ -3675,14 +3675,14 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValue *msg, if (!(element =3D virJSONValueArrayGet(table, i)) || !(tmp =3D virJSONValueGetString(element))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or invalid element %zu of 'unicast' " - "list in query-rx-filter response"), i); + _("Missing or invalid element %1$zu of 'unicast= ' list in query-rx-filter response"), + i); return -1; } if (virMacAddrParse(tmp, &fil->unicast.table[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid mac address '%s' in 'unicast-table' " - "array in query-rx-filter response"), tmp); + _("invalid mac address '%1$s' in 'unicast-table= ' array in query-rx-filter response"), + tmp); return -1; } } @@ -3714,14 +3714,14 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValue *msg, if (!(element =3D virJSONValueArrayGet(table, i)) || !(tmp =3D virJSONValueGetString(element))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or invalid element %zu of 'multicast= ' " - "list in query-rx-filter response"), i); + _("Missing or invalid element %1$zu of 'multica= st' list in query-rx-filter response"), + i); return -1; } if (virMacAddrParse(tmp, &fil->multicast.table[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid mac address '%s' in 'multicast-table= ' " - "array in query-rx-filter response"), tmp); + _("invalid mac address '%1$s' in 'multicast-tab= le' array in query-rx-filter response"), + tmp); return -1; } } @@ -3746,8 +3746,8 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValue *msg, if (!(element =3D virJSONValueArrayGet(table, i)) || virJSONValueGetNumberUint(element, &fil->vlan.table[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or invalid element %zu of 'vlan-tabl= e' " - "array in query-rx-filter response"), i); + _("Missing or invalid element %1$zu of 'vlan-ta= ble' array in query-rx-filter response"), + i); return -1; } } @@ -3842,7 +3842,7 @@ qemuMonitorJSONExtractChardevInfo(virJSONValue *reply, =20 if (virHashAddEntry(info, alias, entry) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to add chardev '%s' info"), alias); + _("failed to add chardev '%1$s' info"), alias); goto cleanup; } =20 @@ -4137,7 +4137,7 @@ int qemuMonitorJSONSendKey(qemuMonitor *mon, =20 if (keycodes[i] > 0xffff) { virReportError(VIR_ERR_OPERATION_FAILED, - _("keycode %zu is invalid: 0x%X"), i, keycodes[= i]); + _("keycode %1$zu is invalid: 0x%2$X"), i, keyco= des[i]); return -1; } =20 @@ -4316,7 +4316,7 @@ qemuMonitorJSONBlockJobError(virJSONValue *cmd, if ((error =3D virJSONValueObjectGet(reply, "error")) && (qemuMonitorJSONErrorIsClass(error, "DeviceNotActive"))) { virReportError(VIR_ERR_OPERATION_INVALID, - _("No active block job '%s'"), jobname); + _("No active block job '%1$s'"), jobname); return -1; } =20 @@ -4511,8 +4511,7 @@ int qemuMonitorJSONOpenGraphics(qemuMonitor *mon, FIELD, \ &reply->STORE) < 0) { \ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, \ - _("block_io_throttle field '%s' missing " \ - "in qemu's output"), \ + _("block_io_throttle field '%1$s' missing in qemu's= output"), \ #STORE); \ return -1; \ } @@ -4587,7 +4586,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValue *io_t= hrottle, =20 if (!found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find throttling info for device '%s'"), + _("cannot find throttling info for device '%1$s'"), drivealias ? drivealias : qdevid); return -1; } @@ -5033,20 +5032,20 @@ qemuMonitorJSONParseCPUModelData(virJSONValue *data, { if (!(*cpu_model =3D virJSONValueObjectGetObject(data, "model"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s reply data was missing 'model'"), cmd_name); + _("%1$s reply data was missing 'model'"), cmd_name); return -1; } =20 if (!(*cpu_name =3D virJSONValueObjectGetString(*cpu_model, "name"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s reply data was missing 'name'"), cmd_name); + _("%1$s reply data was missing 'name'"), cmd_name); return -1; } =20 if (!(*cpu_props =3D virJSONValueObjectGetObject(*cpu_model, "props"))= && fail_no_props) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s reply data was missing 'props'"), cmd_name); + _("%1$s reply data was missing 'props'"), cmd_name); return -1; } =20 @@ -5565,7 +5564,7 @@ int qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, break; case QEMU_MONITOR_OBJECT_PROPERTY_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("qom-get invalid object property type %d"), + _("qom-get invalid object property type %1$d"), prop->type); return -1; break; @@ -5653,7 +5652,7 @@ int qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, break; case QEMU_MONITOR_OBJECT_PROPERTY_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("qom-set invalid object property type %d"), + _("qom-set invalid object property type %1$d"), prop->type); return -1; =20 @@ -6586,7 +6585,7 @@ qemuMonitorJSONAttachCharDevGetProps(const char *chrI= D, case VIR_DOMAIN_CHR_TYPE_STDIO: case VIR_DOMAIN_CHR_TYPE_NMDM: virReportError(VIR_ERR_OPERATION_FAILED, - _("Hotplug unsupported for char device type '%s'"), + _("Hotplug unsupported for char device type '%1$s'"= ), virDomainChrTypeToString(chr->type)); return NULL; =20 @@ -6763,7 +6762,7 @@ qemuMonitorJSONParseCPUx86FeatureWord(virJSONValue *d= ata, cpuid->edx =3D features; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown CPU register '%s'"), reg); + _("unknown CPU register '%1$s'"), reg); return -1; } =20 @@ -7116,7 +7115,7 @@ qemuMonitorJSONGetIOThreads(qemuMonitor *mon, if (virStrToLong_ui(tmp + strlen("iothread"), NULL, 10, &info->iothread_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to find iothread id for '%s'"), + _("failed to find iothread id for '%1$s'"), tmp); goto cleanup; } @@ -8560,7 +8559,7 @@ qemuMonitorJSONExtractDirtyRateInfo(virJSONValue *dat= a, =20 if ((status =3D qemuMonitorDirtyRateStatusTypeFromString(statusstr)) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown dirty rate status: %s"), statusstr); + _("Unknown dirty rate status: %1$s"), statusstr); return -1; } info->status =3D status; @@ -8590,7 +8589,7 @@ qemuMonitorJSONExtractDirtyRateInfo(virJSONValue *dat= a, if ((modestr =3D virJSONValueObjectGetString(data, "mode"))) { if ((mode =3D qemuMonitorDirtyRateCalcModeTypeFromString(modestr))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown dirty page rate calculation mode: %s"), = modestr); + _("Unknown dirty page rate calculation mode: %1$s")= , modestr); return -1; } info->mode =3D mode; --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464734; cv=none; d=zohomail.com; s=zohoarc; b=Kh6lF08llI0ybG3f2DZk1XFiget6W/ixJ0eTqPWTa/hBoN2nluBfTA3NZXSyMlBMhdU71PzMhv1UkVkBCUOO1H4aew98589tQeAED2O6HllVIA/vWRXIxZfVrSgYoYQ8NISADpZISZJT+Iqy5D0VHNwSE+0rsHJE1l80UvPpP7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464734; 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=d2+RUz0LbAD0X2YB/mvYgzXjwPREt9PlDoRddTWaDTE=; b=c9YhPiQMpdwIcX2BTqIsw8jFANyQku1JKVWFqxotTTVh3/hm5vvx48GYxQN3aQQmyYGOhaU9eqYuZf4LOc0v6XWwPtXHrlwnKTkfReik5wtH68QMoTLVU7TvFrQ49DaV65KGcETgnqyjxBcbbAiDN9vYFsZGB5Ea/x5CvF4QSY0= 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 16784647349754.669213822672646; Fri, 10 Mar 2023 08:12:14 -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-155-MNhZpVNTNTqf-lwUyf8uDg-1; Fri, 10 Mar 2023 11:11:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9CFD8857F71; Fri, 10 Mar 2023 16:10:53 +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 7C98A403570E; Fri, 10 Mar 2023 16:10:53 +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 71F501946A4A; Fri, 10 Mar 2023 16:10:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3C6601946A76 for ; Fri, 10 Mar 2023 16:10:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 32F134014D1B; Fri, 10 Mar 2023 16:10:52 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD9EA4014CF3 for ; Fri, 10 Mar 2023 16:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464733; 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=d2+RUz0LbAD0X2YB/mvYgzXjwPREt9PlDoRddTWaDTE=; b=OrpcJ/0szCnAz+4VP0VXUzbu4ApWZycj7PXW2hrnnd6gdzBAPh7CH7mTJ0eJkSr1C29hnK FCakM+PwYzgLPXLU2U6H/V1VE8G9toVtwrWwPGQdhi7auejs1S20h9z8PcAZXrmsi89y/v WnXWpYr2ZlcDBLefA6wdmnvOE0F0oEw= X-MC-Unique: MNhZpVNTNTqf-lwUyf8uDg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 30/51] qemu/qemu_process: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:46 +0100 Message-Id: <53e8ce8b44c16f6e147c1469138f74f505d44a35.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.1 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: 1678464735342100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 116 +++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index deebd03717..8818eb4c8d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -220,7 +220,7 @@ qemuConnectAgent(virQEMUDriver *driver, virDomainObj *v= m) } =20 if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def)= < 0) { - VIR_ERROR(_("Failed to set security context for agent for %s"), + VIR_ERROR(_("Failed to set security context for agent for %1$s"), vm->def->name); goto cleanup; } @@ -238,7 +238,7 @@ qemuConnectAgent(virQEMUDriver *driver, virDomainObj *v= m) } =20 if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0= ) { - VIR_ERROR(_("Failed to clear security context for agent for %s"), + VIR_ERROR(_("Failed to clear security context for agent for %1$s"), vm->def->name); qemuAgentClose(agent); goto cleanup; @@ -395,7 +395,7 @@ qemuProcessFindDomainDiskByAliasOrQOM(virDomainObj *vm, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("no disk found with alias '%s' or id '%s'"), + _("no disk found with alias '%1$s' or id '%2$s'"), NULLSTR(alias), NULLSTR(qomid)); return NULL; } @@ -1864,7 +1864,7 @@ qemuConnectMonitor(virQEMUDriver *driver, qemuMonitor *mon =3D NULL; =20 if (qemuSecuritySetDaemonSocketLabel(driver->securityManager, vm->def)= < 0) { - VIR_ERROR(_("Failed to set security context for monitor for %s"), + VIR_ERROR(_("Failed to set security context for monitor for %1$s"), vm->def->name); return -1; } @@ -1888,7 +1888,7 @@ qemuConnectMonitor(virQEMUDriver *driver, priv->mon =3D mon; =20 if (qemuSecurityClearSocketLabel(driver->securityManager, vm->def) < 0= ) { - VIR_ERROR(_("Failed to clear security context for monitor for %s"), + VIR_ERROR(_("Failed to clear security context for monitor for %1$s= "), vm->def->name); return -1; } @@ -2026,7 +2026,7 @@ qemuProcessLookupPTYs(virDomainChrDef **devices, * pty path for this chardev, report an error */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("no assigned pty for device %s"), id); + _("no assigned pty for device %1$s"), i= d); return -1; } else { /* 'info chardev' had no pty path for this chardev, @@ -2155,7 +2155,7 @@ qemuProcessRefreshPRManagerState(virDomainObj *vm, =20 if (!(prManagerInfo =3D virHashLookup(info, managedAlias))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("missing info on pr-manager %s"), + _("missing info on pr-manager %1$s"), managedAlias); return -1; } @@ -2360,8 +2360,7 @@ qemuProcessDetectIOThreadPIDs(virDomainObj *vm, =20 if (niothreads !=3D vm->def->niothreadids) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("got wrong number of IOThread pids from QEMU moni= tor. " - "got %d, wanted %zu"), + _("got wrong number of IOThread pids from QEMU moni= tor. got %1$d, wanted %2$zu"), niothreads, vm->def->niothreadids); goto cleanup; } @@ -2378,7 +2377,7 @@ qemuProcessDetectIOThreadPIDs(virDomainObj *vm, if (!(iothrid =3D virDomainIOThreadIDFind(vm->def, iothreads[i]->iothread_id)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("iothread %d not found"), + _("iothread %1$d not found"), iothreads[i]->iothread_id); goto cleanup; } @@ -2518,7 +2517,7 @@ qemuProcessSetLinkStates(virDomainObj *vm, VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DO= WN); if (rv < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Couldn't set link state on interface: %s= "), + _("Couldn't set link state on interface: %1= $s"), def->nets[i]->info.alias); goto cleanup; } @@ -2839,7 +2838,7 @@ qemuProcessStartManagedPRDaemon(virDomainObj *vm) cfg =3D virQEMUDriverGetConfig(driver); =20 if (!virFileIsExecutable(cfg->prHelperName)) { - virReportSystemError(errno, _("'%s' is not a suitable pr helper"), + virReportSystemError(errno, _("'%1$s' is not a suitable pr helper"= ), cfg->prHelperName); goto cleanup; } @@ -2854,7 +2853,7 @@ qemuProcessStartManagedPRDaemon(virDomainObj *vm) if (unlink(socketPath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove stale socket path: %s"), + _("Unable to remove stale socket path: %1$s"), socketPath); goto cleanup; } @@ -2886,7 +2885,7 @@ qemuProcessStartManagedPRDaemon(virDomainObj *vm) =20 if (virPidFileReadPath(pidfile, &cpid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pr helper %s didn't show up"), + _("pr helper %1$s didn't show up"), cfg->prHelperName); goto cleanup; } @@ -2904,11 +2903,11 @@ qemuProcessStartManagedPRDaemon(virDomainObj *vm) =20 if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) { virReportSystemError(errno, - _("pr helper %s died unexpectedly"), + _("pr helper %1$s died unexpectedly"), cfg->prHelperName); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("pr helper died and reported: %s"), errbuf); + _("pr helper died and reported: %1$s"), errbuf); } goto cleanup; } @@ -4038,7 +4037,7 @@ qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriver = *driver, =20 if (g_mkdir_with_parents(path, 0700) < 0) { virReportSystemError(errno, - _("Unable to create %s"), + _("Unable to create %1$s"), path); return -1; } @@ -4118,7 +4117,7 @@ qemuProcessDestroyMemoryBackingPath(virQEMUDriver *dr= iver, =20 if (unlink(path) < 0 && errno !=3D ENOENT) { - virReportSystemError(errno, _("Unable to remove %s"), path); + virReportSystemError(errno, _("Unable to remove %1$s"), path); return -1; } =20 @@ -4279,7 +4278,7 @@ qemuProcessVerifyHypervFeatures(virDomainDef *def, continue; =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("host doesn't support hyperv stimer '%s' = feature"), + _("host doesn't support hyperv stimer '%1$s= ' feature"), "direct"); return -1; } @@ -4305,7 +4304,7 @@ qemuProcessVerifyHypervFeatures(virDomainDef *def, case VIR_DOMAIN_HYPERV_EVMCS: case VIR_DOMAIN_HYPERV_AVIC: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("host doesn't support hyperv '%s' feature"), + _("host doesn't support hyperv '%1$s' feature"), virDomainHypervTypeToString(i)); return -1; =20 @@ -4577,14 +4576,14 @@ qemuPrepareNVRAMHelper(int dstFD, =20 if ((r =3D saferead(data->srcFD, buf, sizeof(buf))) < 0) { virReportSystemError(errno, - _("Unable to read from file '%s'"), + _("Unable to read from file '%1$s'"), data->srcPath); return -2; } =20 if (safewrite(dstFD, buf, r) < 0) { virReportSystemError(errno, - _("Unable to write to file '%s'"), + _("Unable to write to file '%1$s'"), dstPath); return -1; } @@ -4622,15 +4621,15 @@ qemuPrepareNVRAM(virQEMUDriver *driver, =20 if (!loader->nvramTemplate) { virReportError(VIR_ERR_OPERATION_FAILED, - _("unable to find any master var store for " - "loader: %s"), loader->path); + _("unable to find any master var store for loader: = %1$s"), + loader->path); return -1; } =20 if ((srcFD =3D virFileOpenAs(loader->nvramTemplate, O_RDONLY, 0, -1, -1, 0)) < 0) { virReportSystemError(-srcFD, - _("Failed to open file '%s'"), + _("Failed to open file '%1$s'"), loader->nvramTemplate); return -1; } @@ -4924,7 +4923,7 @@ qemuProcessGetNetworkAddress(const char *netname, ipdef =3D virNetworkDefGetIPByIndex(netdef, AF_UNSPEC, 0); if (!ipdef) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have an IP address"), + _("network '%1$s' doesn't have an IP address"), netdef->name); return -1; } @@ -4948,7 +4947,7 @@ qemuProcessGetNetworkAddress(const char *netname, =20 if (!dev_name) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' has no associated interface or = bridge"), + _("network '%1$s' has no associated interface o= r bridge"), netdef->name); return -1; } @@ -5271,7 +5270,7 @@ qemuProcessMakeDir(virQEMUDriver *driver, const char *path) { if (g_mkdir_with_parents(path, 0750) < 0) { - virReportSystemError(errno, _("Cannot create directory '%s'"), pat= h); + virReportSystemError(errno, _("Cannot create directory '%1$s'"), p= ath); return -1; } =20 @@ -5375,7 +5374,7 @@ qemuProcessStartValidateShmem(virDomainObj *vm) =20 if (strchr(shmem->name, '/')) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem name '%s' must not contain '/'"), + _("shmem name '%1$s' must not contain '/'"), shmem->name); return -1; } @@ -5488,9 +5487,7 @@ qemuProcessStartValidateTSC(virQEMUDriver *driver, } =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Requested TSC frequency %llu Hz is outside tolerance= " - "range ([%llu, %llu] Hz) around host frequency %llu H= z " - "and TSC scaling is not supported by the host CPU"), + _("Requested TSC frequency %1$llu Hz is outside toleran= ce range ([%2$llu, %3$llu] Hz) around host frequency %4$llu Hz and TSC scal= ing is not supported by the host CPU"), freq, minFreq, maxFreq, tsc->frequency); return -1; } @@ -5562,8 +5559,7 @@ qemuProcessStartValidate(virQEMUDriver *driver, =20 str =3D g_strjoinv(", ", features); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Some features cannot be reliably used " - "with this QEMU: %s"), str); + _("Some features cannot be reliably used wi= th this QEMU: %1$s"), str); return -1; } } @@ -5596,7 +5592,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm) for (next =3D cfg->capabilityfilters; *next; next++) { if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid capability_filters capability '%= s'"), + _("invalid capability_filters capability '%= 1$s'"), *next); return -1; } @@ -5609,7 +5605,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm) for (next =3D nsdef->capsadd; next && *next; next++) { if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid qemu namespace capability '%s'"), + _("invalid qemu namespace capability '%1$s'= "), *next); return -1; } @@ -5620,7 +5616,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm) for (next =3D nsdef->capsdel; next && *next; next++) { if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid qemu namespace capability '%s'"), + _("invalid qemu namespace capability '%1$s'= "), *next); return -1; } @@ -5814,9 +5810,7 @@ qemuProcessNetworkPrepareDevices(virQEMUDriver *drive= r, =20 if (virDomainHostdevFind(def, hostdev, NULL) >=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("PCI device %04x:%02x:%02x.%x " - "allocated from network %s is already " - "in use by domain %s"), + _("PCI device %1$04x:%2$02x:%3$02x.%4$x all= ocated from network %5$s is already in use by domain %6$s"), pcisrc->addr.domain, pcisrc->addr.bus, pcisrc->addr.slot, pcisrc->addr.function, net->data.network.name, def->name); @@ -5850,14 +5844,14 @@ qemuProcessSetupVcpuSchedCoreHelper(pid_t ppid G_GN= UC_UNUSED, =20 if (virProcessSchedCoreShareFrom(data->dummypid) < 0) { virReportSystemError(errno, - _("unable to share scheduling cookie from %ll= d"), + _("unable to share scheduling cookie from %1$= lld"), (long long) data->dummypid); return -1; } =20 if (virProcessSchedCoreShareTo(data->vcpupid) < 0) { virReportSystemError(errno, - _("unable to share scheduling cookie to %lld"= ), + _("unable to share scheduling cookie to %1$ll= d"), (long long) data->vcpupid); return -1; } @@ -5974,7 +5968,7 @@ qemuProcessSetupAllVcpusSchedCoreHelper(pid_t ppid G_= GNUC_UNUSED, if (vcpupid > 0 && virProcessSchedCoreShareTo(vcpupid) < 0) { virReportSystemError(errno, - _("unable to share scheduling cookie to %= lld"), + _("unable to share scheduling cookie to %= 1$lld"), (long long) vcpupid); return -1; } @@ -6096,13 +6090,13 @@ qemuProcessValidateHotpluggableVcpus(virDomainDef *= def) if (vcpu->order !=3D 0) { if (virBitmapIsBitSet(ordermap, vcpu->order)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("duplicate vcpu order '%u'"), vcpu->order= ); + _("duplicate vcpu order '%1$u'"), vcpu->ord= er); return -1; } =20 if (virBitmapSetBit(ordermap, vcpu->order)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu order '%u' exceeds vcpu count"), + _("vcpu order '%1$u' exceeds vcpu count"), vcpu->order); return -1; } @@ -6114,8 +6108,8 @@ qemuProcessValidateHotpluggableVcpus(virDomainDef *de= f) subvcpu->online !=3D vcpu->online || subvcpu->order !=3D vcpu->order) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpus '%zu' and '%zu' are in the same ho= tplug " - "group but differ in configuration"), i, = j); + _("vcpus '%1$zu' and '%2$zu' are in the sam= e hotplug group but differ in configuration"), + i, j); return -1; } } @@ -6125,7 +6119,7 @@ qemuProcessValidateHotpluggableVcpus(virDomainDef *de= f) vcpupriv->thread_id =3D=3D -1 && vcpupriv->node_id =3D=3D= -1) || !vcpupriv->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu '%zu' is missing hotplug data"), i); + _("vcpu '%1$zu' is missing hotplug data"), = i); return -1; } } @@ -6275,8 +6269,7 @@ qemuProcessUpdateGuestCPU(virDomainDef *def, if (!virQEMUCapsIsCPUModeSupported(qemuCaps, hostarch, def->virtType, def->cpu->mode, def->os.machine)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU mode '%s' for %s %s domain on %s host is not= " - "supported by hypervisor"), + _("CPU mode '%1$s' for %2$s %3$s domain on %4$s hos= t is not supported by hypervisor"), virCPUModeTypeToString(def->cpu->mode), virArchToString(def->os.arch), virDomainVirtTypeToString(def->virtType), @@ -6815,7 +6808,7 @@ qemuProcessSEVCreateFile(virDomainObj *vm, return -1; =20 if (virFileRewriteStr(configFile, S_IRUSR | S_IWUSR, data) < 0) { - virReportSystemError(errno, _("failed to write data to config '%s'= "), + virReportSystemError(errno, _("failed to write data to config '%1$= s'"), configFile); return -1; } @@ -7089,7 +7082,7 @@ qemuProcessPrepareHostBackendChardevOne(virDomainDevi= ceDef *dev, case VIR_DOMAIN_CHR_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported chardev '%s'"), + _("unsupported chardev '%1$s'"), virDomainChrTypeToString(chardev->type)); return -1; } @@ -7247,7 +7240,7 @@ qemuProcessPrepareHost(virQEMUDriver *driver, =20 if (g_mkdir_with_parents(cfg->logDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create log directory %s"), + _("cannot create log directory %1$s"), cfg->logDir); return -1; } @@ -7262,7 +7255,7 @@ qemuProcessPrepareHost(virQEMUDriver *driver, if (unlink(priv->pidfile) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Cannot remove stale PID file %s"), + _("Cannot remove stale PID file %1$s"), priv->pidfile); return -1; } @@ -7766,7 +7759,7 @@ qemuProcessLaunch(virConnectPtr conn, if (rv =3D=3D 0) { if ((rv =3D virPidFileReadPath(priv->pidfile, &vm->pid)) < 0) { virReportSystemError(-rv, - _("Domain %s didn't show up"), + _("Domain %1$s didn't show up"), vm->def->name); goto cleanup; } @@ -7847,7 +7840,7 @@ qemuProcessLaunch(virConnectPtr conn, =20 if (fstat(incoming->fd, &stdin_sb) < 0) { virReportSystemError(errno, - _("cannot stat fd %d"), incoming->fd); + _("cannot stat fd %1$d"), incoming->fd); goto cleanup; } if (S_ISFIFO(stdin_sb.st_mode) && @@ -8988,7 +8981,7 @@ qemuProcessReconnect(void *opaque) =20 if (!priv->qemuCaps) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain '%s' has no capabilities recorded"), + _("domain '%1$s' has no capabilities recorded"), obj->def->name); goto error; } @@ -9352,7 +9345,7 @@ qemuProcessQEMULabelUniqPath(qemuProcessQMP *proc) /* We cannot use the security driver here, but we should not need to. = */ if (chown(proc->uniqDir, proc->runUid, -1) < 0) { virReportSystemError(errno, - _("Cannot chown uniq path: %s"), + _("Cannot chown uniq path: %1$s"), proc->uniqDir); return -1; } @@ -9372,8 +9365,7 @@ qemuProcessQMPInit(qemuProcessQMP *proc) =20 if (!(proc->uniqDir =3D g_mkdtemp(template))) { virReportSystemError(errno, - _("Failed to create unique directory with " - "template '%s' for probing QEMU"), + _("Failed to create unique directory with tem= plate '%1$s' for probing QEMU"), template); return -1; } @@ -9461,14 +9453,14 @@ qemuProcessQMPLaunch(qemuProcessQMP *proc) if (status !=3D 0) { VIR_DEBUG("QEMU %s exited with status %d", proc->binary, status); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to start QEMU binary %s for probing: %s"), + _("Failed to start QEMU binary %1$s for probing: %2= $s"), proc->binary, proc->stdErr ? proc->stdErr : _("unknown error")); return -1; } =20 if ((rc =3D virPidFileReadPath(proc->pidfile, &proc->pid)) < 0) { - virReportSystemError(-rc, _("Failed to read pidfile %s"), proc->pi= dfile); + virReportSystemError(-rc, _("Failed to read pidfile %1$s"), proc->= pidfile); return -1; } =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464732; cv=none; d=zohomail.com; s=zohoarc; b=aUwtsDAXpRL4Mem7TA2+fkwM4AWC2dbEbt4c72is5Jj0VjcZ7dFm/4okRwwAlZZnAIXVpS9BCrbuQUk64NWM5QLlM1zuvVcKEh+dZ/WsB1t7Uww//KSOSx/vIPSQp5c5hyv+PRgDMSt69qSOPSAM+WDDyeSFzuftWnwMquDfuqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464732; 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=hfGr5G/tOG8NiEBzIfeqzwLGylDsePsuxAivpo4GCwM=; b=VJCiCg/4YAEW7y67H+ZUCGi0ETnuxfA3d4DYJTU1noDFt0w0w0keO8amS4V5mpJxeVZf/Sxrby64X8PoLITI0i9zZd/gEgaoO1UV9b8MFmxdw4vfK2kHbC5scFspZUZzNIgHxGAb5nJ0aVKc1XafXmXCfK7Yw6Sn2nGhfNufAOY= 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 167846473255779.11661990926837; Fri, 10 Mar 2023 08:12:12 -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-573-FZmwzlRPMPWvjkylBYXa4Q-1; Fri, 10 Mar 2023 11:11:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E93FE280049C; Fri, 10 Mar 2023 16:10:54 +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 D00712166B2A; Fri, 10 Mar 2023 16:10:54 +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 C0D351946A4A; Fri, 10 Mar 2023 16:10:54 +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 840A61946A66 for ; Fri, 10 Mar 2023 16:10:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7AF0D492B01; Fri, 10 Mar 2023 16:10:53 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCAEA492C3E for ; Fri, 10 Mar 2023 16:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464731; 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=hfGr5G/tOG8NiEBzIfeqzwLGylDsePsuxAivpo4GCwM=; b=XrHNZYdZvm35l6BM9/IounUyhTP79iGd9502QXqUdBQcDUooXl8Aonx6TelGMk5/nitIxu 3cIYDsZ5TH3R328u+CQ3XpavFTy9rWtc5qgt8kLTrJCLDF3Hx3SqcyLR4tLdIvkApJaUml qmS7ytu/X31uMh6Vs9D7qxmhYjNj6fo= X-MC-Unique: FZmwzlRPMPWvjkylBYXa4Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 31/51] qemu/qemu_validate: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:47 +0100 Message-Id: <0e487d15746e79c251a2493bed200635cea5c482.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.6 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: 1678464733763100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/conf/domain_validate.c | 2 +- src/qemu/qemu_validate.c | 317 +++++++++++++++++-------------------- 2 files changed, 142 insertions(+), 177 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index d30bb31dda..c20d3fe1d7 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -230,7 +230,7 @@ virDomainVideoDefValidate(const virDomainVideoDef *vide= o, return -1; if (video->blob !=3D VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("video type '%s' does not support blob resour= ces"), + _("video type '%1$s' does not support blob reso= urces"), virDomainVideoTypeToString(video->type)); return -1; } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 0146220d8f..baebb6becf 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -45,8 +45,7 @@ qemuValidateDomainDefPSeriesFeature(const virDomainDef *d= ef, if (def->features[feature] !=3D VIR_TRISTATE_SWITCH_ABSENT && !qemuDomainIsPSeries(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' feature is not supported for " - "architecture '%s' or machine type '%s'"), + _("The '%1$s' feature is not supported for architec= ture '%2$s' or machine type '%3$s'"), virDomainFeatureTypeToString(feature), virArchToString(def->os.arch), def->os.machine); @@ -180,8 +179,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] !=3D VIR_DOMAIN_IOAPIC_NONE) { if (!ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' feature is not supported fo= r " - "architecture '%s' or machine type '%= s'"), + _("The '%1$s' feature is not supported = for architecture '%2$s' or machine type '%3$s'"), featureName, virArchToString(def->os.arch), def->os.machine); @@ -205,8 +203,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON && !qemuDomainIsARMVirt(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' feature is not supported for " - "architecture '%s' or machine type '%s'"), + _("The '%1$s' feature is not supported for = architecture '%2$s' or machine type '%3$s'"), featureName, virArchToString(def->os.arch), def->os.machine); @@ -241,9 +238,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, def->apic_eoi !=3D VIR_TRISTATE_SWITCH_ABSENT && !ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The 'eoi' attribute of the '%s' feature " - "is not supported for architecture '%s' o= r " - "machine type '%s'"), + _("The 'eoi' attribute of the '%1$s' featur= e is not supported for architecture '%2$s' or machine type '%3$s'"), featureName, virArchToString(def->os.arch), def->os.machine); @@ -255,8 +250,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && !ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' feature is not supported for " - "architecture '%s' or machine type '%s'"), + _("The '%1$s' feature is not supported for = architecture '%2$s' or machine type '%3$s'"), featureName, virArchToString(def->os.arch), def->os.machine); @@ -268,8 +262,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] !=3D VIR_DOMAIN_HYPERV_MODE_NONE && !ARCH_IS_X86(def->os.arch) && !qemuDomainIsARMVirt(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Hyperv features are not supported for " - "architecture '%s' or machine type '%s'"), + _("Hyperv features are not supported for ar= chitecture '%1$s' or machine type '%2$s'"), virArchToString(def->os.arch), def->os.machine); return -1; @@ -280,7 +273,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_OFF && ARCH_IS_PPC64(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PMU is always enabled for architecture '= %s'"), + _("PMU is always enabled for architecture '= %1$s'"), virArchToString(def->os.arch)); return -1; } @@ -290,7 +283,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def, if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) { if (def->virtType !=3D VIR_DOMAIN_VIRT_QEMU) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("TCG features are incompatible with d= omain type '%s'"), + _("TCG features are incompatible with d= omain type '%1$s'"), virDomainVirtTypeToString(def->virtType= )); return -1; } @@ -337,7 +330,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, =20 if (!ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU maximum physical address bits specificat= ion is not supported for '%s' architecture"), + _("CPU maximum physical address bits specificat= ion is not supported for '%1$s' architecture"), virArchToString(def->os.arch)); return -1; } @@ -346,7 +339,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, case VIR_CPU_MAX_PHYS_ADDR_MODE_PASSTHROUGH: if (addr->bits !=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU maximum physical address bits number= specification cannot be used with mode=3D'%s'"), + _("CPU maximum physical address bits number= specification cannot be used with mode=3D'%1$s'"), virCPUMaxPhysAddrModeTypeToString(VIR_CPU_M= AX_PHYS_ADDR_MODE_PASSTHROUGH)); return -1; } @@ -355,7 +348,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, case VIR_CPU_MAX_PHYS_ADDR_MODE_EMULATE: if (addr->bits =3D=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("if using CPU maximum physical address mo= de=3D'%s', bits=3D must be specified too"), + _("if using CPU maximum physical address mo= de=3D'%1$s', bits=3D must be specified too"), virCPUMaxPhysAddrModeTypeToString(VIR_CPU_M= AX_PHYS_ADDR_MODE_EMULATE)); return -1; } @@ -379,7 +372,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, =20 if (!ARCH_IS_X86(def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU cache specification is not supported for= '%s' architecture"), + _("CPU cache specification is not supported for= '%1$s' architecture"), virArchToString(def->os.arch)); return -1; } @@ -388,7 +381,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, case VIR_CPU_CACHE_MODE_EMULATE: if (cache->level !=3D 3) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU cache mode '%s' can only be used wit= h level=3D'3'"), + _("CPU cache mode '%1$s' can only be used w= ith level=3D'3'"), virCPUCacheModeTypeToString(cache->mode)); return -1; } @@ -398,7 +391,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, if (def->cpu->mode !=3D VIR_CPU_MODE_HOST_PASSTHROUGH && def->cpu->mode !=3D VIR_CPU_MODE_MAXIMUM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU cache mode '%s' can only be used wit= h '%s' / '%s' CPUs"), + _("CPU cache mode '%1$s' can only be used w= ith '%2$s' / '%3$s' CPUs"), virCPUCacheModeTypeToString(cache->mode), virCPUModeTypeToString(VIR_CPU_MODE_HOST_PA= SSTHROUGH), virCPUModeTypeToString(VIR_CPU_MODE_MAXIMUM= )); @@ -407,7 +400,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, =20 if (cache->level !=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported CPU cache level for mode '%s= '"), + _("unsupported CPU cache level for mode '%1= $s'"), virCPUCacheModeTypeToString(cache->mode)); return -1; } @@ -416,7 +409,7 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, case VIR_CPU_CACHE_MODE_DISABLE: if (cache->level !=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported CPU cache level for mode '%s= '"), + _("unsupported CPU cache level for mode '%1= $s'"), virCPUCacheModeTypeToString(cache->mode)); return -1; } @@ -511,7 +504,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, switch ((virDomainTimerNameType)timer->name) { case VIR_DOMAIN_TIMER_NAME_PLATFORM: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported timer type (name) '%s'"), + _("unsupported timer type (name) '%1$s'"), virDomainTimerNameTypeToString(timer->name)); return -1; =20 @@ -520,8 +513,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK: if (!ARCH_IS_X86(def->os.arch) && timer->present =3D=3D VIR_TR= ISTATE_BOOL_YES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Configuring the '%s' timer is not suppor= ted " - "for virtType=3D%s arch=3D%s machine=3D%s= guests"), + _("Configuring the '%1$s' timer is not supp= orted for virtType=3D%2$s arch=3D%3$s machine=3D%4$s guests"), virDomainTimerNameTypeToString(timer->name), virDomainVirtTypeToString(def->virtType), virArchToString(def->os.arch), @@ -542,7 +534,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, break; case VIR_DOMAIN_TIMER_TRACK_BOOT: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported rtc timer track '%s'"), + _("unsupported rtc timer track '%1$s'"), virDomainTimerTrackTypeToString(timer->trac= k)); return -1; case VIR_DOMAIN_TIMER_TRACK_LAST: @@ -561,7 +553,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE: case VIR_DOMAIN_TIMER_TICKPOLICY_DISCARD: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported rtc timer tickpolicy '%s'"), + _("unsupported rtc timer tickpolicy '%1$s'"= ), virDomainTimerTickpolicyTypeToString( timer->tickpolicy)); return -1; @@ -580,7 +572,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLIC= Y)) { /* can't catchup if we don't have kvm-pit */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported pit tickpolicy '%s'"), + _("unsupported pit tickpolicy '%1$s'"), virDomainTimerTickpolicyTypeToString( timer->tickpolicy)); return -1; @@ -589,7 +581,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE: /* no way to support this mode for pit in qemu */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported pit tickpolicy '%s'"), + _("unsupported pit tickpolicy '%1$s'"), virDomainTimerTickpolicyTypeToString( timer->tickpolicy)); return -1; @@ -613,8 +605,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, if (def->virtType !=3D VIR_DOMAIN_VIRT_KVM || !qemuDomainIsARMVirt(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Configuring the '%s' timer is not suppor= ted " - "for virtType=3D%s arch=3D%s machine=3D%s= guests"), + _("Configuring the '%1$s' timer is not supp= orted for virtType=3D%2$s arch=3D%3$s machine=3D%4$s guests"), virDomainTimerNameTypeToString(timer->name), virDomainVirtTypeToString(def->virtType), virArchToString(def->os.arch), @@ -623,14 +614,13 @@ qemuValidateDomainDefClockTimers(const virDomainDef *= def, } if (timer->present =3D=3D VIR_TRISTATE_BOOL_NO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' timer can't be disabled"), + _("The '%1$s' timer can't be disabled"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_KVM_NO_ADJVTIME)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Configuring the '%s' timer is not suppor= ted " - "with this QEMU binary"), + _("Configuring the '%1$s' timer is not supp= orted with this QEMU binary"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -643,7 +633,7 @@ qemuValidateDomainDefClockTimers(const virDomainDef *de= f, case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP: case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' timer does not support tickpoli= cy '%s'"), + _("The '%1$s' timer does not support tickpo= licy '%2$s'"), virDomainTimerNameTypeToString(timer->name), virDomainTimerTickpolicyTypeToString(timer-= >tickpolicy)); return -1; @@ -727,7 +717,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def, case VIR_STORAGE_TYPE_NVME: case VIR_STORAGE_TYPE_VHOST_USER: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported nvram disk type '%s'"), + _("unsupported nvram disk type '%1$s'"), virStorageTypeToString(src->type)); return -1; =20 @@ -847,8 +837,8 @@ qemuValidateDomainVCpuTopology(const virDomainDef *def,= virQEMUCaps *qemuCaps) =20 if (maxCpus > 0 && virDomainDefGetVcpusMax(def) > maxCpus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Maximum CPUs greater than specified machine " - "type limit %u"), maxCpus); + _("Maximum CPUs greater than specified machine type= limit %1$u"), + maxCpus); return -1; } =20 @@ -882,8 +872,7 @@ qemuValidateDomainVCpuTopology(const virDomainDef *def,= virQEMUCaps *qemuCaps) granularity =3D qemuValidateDefGetVcpuHotplugGranularity(def); if ((virDomainDefGetVcpus(def) % granularity) !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vCPUs count must be a multiple of the vCPU " - "hotplug granularity (%u)"), + _("vCPUs count must be a multiple of the vCPU h= otplug granularity (%1$u)"), granularity); return -1; } @@ -893,15 +882,13 @@ qemuValidateDomainVCpuTopology(const virDomainDef *de= f, virQEMUCaps *qemuCaps) virDomainDefGetVcpusMax(def) > QEMU_MAX_VCPUS_WITHOUT_EIM) { if (!qemuDomainIsQ35(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("more than %d vCPUs are only supported on " - "q35-based machine types"), + _("more than %1$d vCPUs are only supported on q= 35-based machine types"), QEMU_MAX_VCPUS_WITHOUT_EIM); return -1; } if (!def->iommu || def->iommu->eim !=3D VIR_TRISTATE_SWITCH_ON) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("more than %d vCPUs require extended interrup= t " - "mode enabled on the iommu device"), + _("more than %1$d vCPUs require extended interr= upt mode enabled on the iommu device"), QEMU_MAX_VCPUS_WITHOUT_EIM); return -1; } @@ -960,8 +947,7 @@ qemuValidateDomainDefMemory(const virDomainDef *def, mem->access !=3D VIR_DOMAIN_MEMORY_ACCESS_DEFAULT && mem->access !=3D VIR_DOMAIN_MEMORY_ACCESS_PRIVATE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("memory access mode '%s' not supported " - "without guest numa node"), + _("memory access mode '%1$s' not supported without = guest numa node"), virDomainMemoryAccessTypeToString(mem->access)); return -1; } @@ -1019,7 +1005,7 @@ qemuValidateDomainDefConsole(const virDomainDef *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported console target type %s"), + _("unsupported console target type %1$s"), NULLSTR(virDomainChrConsoleTargetTypeToString(c= onsole->targetType))); return -1; } @@ -1291,28 +1277,28 @@ qemuValidateDomainDef(const virDomainDef *def, =20 if (def->os.type !=3D VIR_DOMAIN_OSTYPE_HVM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support os type '%s'"), + _("Emulator '%1$s' does not support os type '%2$s'"= ), def->emulator, virDomainOSTypeToString(def->os.type= )); return -1; } =20 if (!virQEMUCapsIsArchSupported(qemuCaps, def->os.arch)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support arch '%s'"), + _("Emulator '%1$s' does not support arch '%2$s'"), def->emulator, virArchToString(def->os.arch)); return -1; } =20 if (!virQEMUCapsIsVirtTypeSupported(qemuCaps, def->virtType)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support virt type '%s'"), + _("Emulator '%1$s' does not support virt type '%2$s= '"), def->emulator, virDomainVirtTypeToString(def->virtT= ype)); return -1; } =20 if (!virQEMUCapsIsMachineSupported(qemuCaps, def->virtType, def->os.ma= chine)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support machine type '%s'= "), + _("Emulator '%1$s' does not support machine type '%= 2$s'"), def->emulator, def->os.machine); return -1; } @@ -1320,7 +1306,7 @@ qemuValidateDomainDef(const virDomainDef *def, if (virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.ma= chine) =3D=3D VIR_TRISTATE_BOOL_NO && def->features[VIR_DOMAIN_FEATURE_ACPI] =3D=3D VIR_TRISTATE_SWITCH_= ON) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("machine type '%s' does not support ACPI"), + _("machine type '%1$s' does not support ACPI"), def->os.machine); return -1; } @@ -1498,8 +1484,7 @@ qemuValidateDomainDeviceDefZPCIAddress(virDomainDevic= eInfo *info, (zpci->uid.value > VIR_DOMAIN_DEVICE_ZPCI_MAX_UID || zpci->uid.value =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid PCI address uid=3D'0x%.4x', " - "must be > 0x0000 and <=3D 0x%.4x"), + _("Invalid PCI address uid=3D'0x%1$.4x', must be > = 0x0000 and <=3D 0x%2$.4x"), zpci->uid.value, VIR_DOMAIN_DEVICE_ZPCI_MAX_UID); return -1; @@ -1641,8 +1626,7 @@ qemuValidateDomainDeviceDefAddress(const virDomainDev= iceDef *dev, =20 if (addr->has_reg && addr->reg > 0xffffffff) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("spapr-vio reg=3D'0x%llx' exceeds maximum " - "possible value (0xffffffff)"), + _("spapr-vio reg=3D'0x%1$llx' exceeds maximum p= ossible value (0xffffffff)"), addr->reg); return -1; } @@ -1658,7 +1642,7 @@ qemuValidateDomainDeviceDefAddress(const virDomainDev= iceDef *dev, case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW: if (!qemuDomainIsS390CCW(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot use CCW address type for device '%s' = using machine type '%s'"), + _("cannot use CCW address type for device '%1$s= ' using machine type '%2$s'"), NULLSTR(info->alias), def->os.machine); return -1; } @@ -1793,7 +1777,7 @@ qemuValidateDomainDefVhostUserRequireSharedMemory(con= st virDomainDef *def, if (numa_nodes =3D=3D 0 && !(defaultRAMId && def->mem.access =3D=3D VIR_DOMAIN_MEMORY_ACCESS_= SHARED)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' requires shared memory"), name); + _("'%1$s' requires shared memory"), name); return -1; } =20 @@ -1805,7 +1789,7 @@ qemuValidateDomainDefVhostUserRequireSharedMemory(con= st virDomainDef *def, case VIR_DOMAIN_MEMORY_ACCESS_DEFAULT: if (def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_SHARED) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' requires shared memory"), name); + _("'%1$s' requires shared memory"), name); return -1; } break; @@ -1813,7 +1797,7 @@ qemuValidateDomainDefVhostUserRequireSharedMemory(con= st virDomainDef *def, break; case VIR_DOMAIN_MEMORY_ACCESS_PRIVATE: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'%s' requires shared memory"), name); + _("'%1$s' requires shared memory"), name); return -1; =20 case VIR_DOMAIN_MEMORY_ACCESS_LAST: @@ -1886,7 +1870,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, =20 if (ip->prefix && ip->prefix !=3D 64) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported IPv6 address prefix=3D'%= u' - must be 64"), + _("unsupported IPv6 address prefix=3D'%= 1$u' - must be 64"), ip->prefix); return -1; } @@ -1907,7 +1891,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, =20 if (net->model !=3D VIR_DOMAIN_NET_MODEL_VIRTIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid model for interface of type '%s': '%= s'"), + _("invalid model for interface of type '%1$s': = '%2$s'"), virDomainNetTypeToString(net->type), virDomainNetModelTypeToString(net->model)); return -1; @@ -1955,7 +1939,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, if (net->mtu && !qemuDomainNetSupportsMTU(net->type, net->backend.type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("setting MTU on interface type %s is not supporte= d yet"), + _("setting MTU on interface type %1$s is not suppor= ted yet"), virDomainNetTypeToString(net->type)); return -1; } @@ -1964,7 +1948,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, if (net->teaming->type =3D=3D VIR_DOMAIN_NET_TEAMING_TYPE_PERSISTE= NT && !virDomainNetIsVirtioModel(net)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio-net teaming persistent interface must= be , not '%s'"), + _("virtio-net teaming persistent interface must= be , not '%1$s'"), virDomainNetGetModelString(net)); return -1; } @@ -1972,7 +1956,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, net->type !=3D VIR_DOMAIN_NET_TYPE_HOSTDEV && net->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio-net teaming transient interface must = be type=3D'hostdev', not '%s'"), + _("virtio-net teaming transient interface must = be type=3D'hostdev', not '%1$s'"), virDomainNetTypeToString(net->type)); return -1; } @@ -1980,7 +1964,7 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, =20 if (net->coalesce && !qemuValidateNetSupportsCoalesce(net->type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("coalesce settings on interface type %s are not s= upported"), + _("coalesce settings on interface type %1$s are not= supported"), virDomainNetTypeToString(net->type)); return -1; } @@ -2077,7 +2061,7 @@ qemuValidateDomainChrTargetDef(const virDomainChrDef = *chr) if (chr->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && chr->info.type !=3D expected) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target type '%s' requires address type '= %s'"), + _("Target type '%1$s' requires address type= '%2$s'"), virDomainChrSerialTargetTypeToString(chr->t= argetType), virDomainDeviceAddressTypeToString(expected= )); return -1; @@ -2088,8 +2072,7 @@ qemuValidateDomainChrTargetDef(const virDomainChrDef = *chr) case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP: if (chr->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target type '%s' cannot have an " - "associated address"), + _("Target type '%1$s' cannot have an associ= ated address"), virDomainChrSerialTargetTypeToString(chr->t= argetType)); return -1; } @@ -2116,7 +2099,7 @@ qemuValidateDomainChrTargetDef(const virDomainChrDef = *chr) =20 if (chr->targetType !=3D expected) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target model '%s' requires target type '= %s'"), + _("Target model '%1$s' requires target type= '%2$s'"), virDomainChrSerialTargetModelTypeToString(c= hr->targetModel), virDomainChrSerialTargetTypeToString(expect= ed)); return -1; @@ -2160,7 +2143,7 @@ qemuValidateDomainChrSourceDef(const virDomainChrSour= ceDef *def, case VIR_DOMAIN_CHR_TYPE_QEMU_VDAGENT: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_QEMU_VDAGENT)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("chardev '%s' not supported in this QEMU bina= ry"), + _("chardev '%1$s' not supported in this QEMU bi= nary"), virDomainChrTypeToString(def->type)); return -1; } @@ -2170,7 +2153,7 @@ qemuValidateDomainChrSourceDef(const virDomainChrSour= ceDef *def, case VIR_DOMAIN_CHR_TYPE_SPICEPORT: if (!virDomainDefHasSpiceGraphics(vmdef)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("chardev '%s' not supported without spice gra= phics"), + _("chardev '%1$s' not supported without spice g= raphics"), virDomainChrTypeToString(def->type)); return -1; } @@ -2241,9 +2224,7 @@ qemuValidateDomainChrDef(const virDomainChrDef *dev, =20 if (!isCompatible) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Serial device with target type '%s' and " - "target model '%s' not compatible with guest " - "architecture or machine type"), + _("Serial device with target type '%1$s' and ta= rget model '%2$s' not compatible with guest architecture or machine type"), virDomainChrSerialTargetTypeToString(dev->targe= tType), virDomainChrSerialTargetModelTypeToString(dev->= targetModel)); return -1; @@ -2357,7 +2338,7 @@ qemuValidateDomainRNGDef(const virDomainRNGDef *def, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(rngCaps.model, def->model)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("domain configuration does not support rng model = '%s'"), + _("domain configuration does not support rng model = '%1$s'"), virDomainRNGModelTypeToString(def->model)); return -1; } @@ -2376,7 +2357,7 @@ qemuValidateDomainRedirdevDef(const virDomainRedirdev= Def *dev, =20 if (dev->bus !=3D VIR_DOMAIN_REDIRDEV_BUS_USB) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Redirection bus %s is not supported by QEMU"), + _("Redirection bus %1$s is not supported by QEMU"), virDomainRedirdevBusTypeToString(dev->bus)); return -1; } @@ -2409,7 +2390,7 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdog= Def *dev, if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog can go only on PCI bus"= ), + _("%1$s model of watchdog can go only on PCI bu= s"), virDomainWatchdogModelTypeToString(dev->model)); return -1; } @@ -2418,7 +2399,7 @@ qemuValidateDomainWatchdogDef(const virDomainWatchdog= Def *dev, case VIR_DOMAIN_WATCHDOG_MODEL_IB700: if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog does not support config= uring the address"), + _("%1$s model of watchdog does not support conf= iguring the address"), virDomainWatchdogModelTypeToString(dev->model)); return -1; } @@ -2427,13 +2408,13 @@ qemuValidateDomainWatchdogDef(const virDomainWatchd= ogDef *dev, case VIR_DOMAIN_WATCHDOG_MODEL_DIAG288: if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog is virtual and cannot g= o on any bus."), + _("%1$s model of watchdog is virtual and cannot= go on any bus."), virDomainWatchdogModelTypeToString(dev->model)); return -1; } if (!(ARCH_IS_S390(def->os.arch))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog is allowed for s390 and= s390x only"), + _("%1$s model of watchdog is allowed for s390 a= nd s390x only"), virDomainWatchdogModelTypeToString(dev->model)); return -1; } @@ -2442,13 +2423,13 @@ qemuValidateDomainWatchdogDef(const virDomainWatchd= ogDef *dev, case VIR_DOMAIN_WATCHDOG_MODEL_ITCO: if (dev->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog is part of the machine = and cannot have any address set."), + _("%1$s model of watchdog is part of the machin= e and cannot have any address set."), virDomainWatchdogModelTypeToString(dev->model)); return -1; } if (!qemuDomainIsQ35(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s model of watchdog is only part of q35 mac= hine"), + _("%1$s model of watchdog is only part of q35 m= achine"), virDomainWatchdogModelTypeToString(dev->model)); return -1; } @@ -2605,8 +2586,7 @@ qemuValidateDomainDeviceDefHostdev(const virDomainHos= tdevDef *hostdev, /* forbid capabilities mode hostdev in this kind of hypervisor */ if (hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev mode 'capabilities' is not " - "supported in %s"), + _("hostdev mode 'capabilities' is not supported in = %1$s"), virDomainVirtTypeToString(def->virtType)); return -1; } @@ -2689,7 +2669,7 @@ qemuValidateDomainDeviceDefVideo(const virDomainVideo= Def *video, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(videoCaps.modelType, video->type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("domain configuration does not support video mode= l '%s'"), + _("domain configuration does not support video mode= l '%1$s'"), virDomainVideoTypeToString(video->type)); return -1; } @@ -2698,14 +2678,14 @@ qemuValidateDomainDeviceDefVideo(const virDomainVid= eoDef *video, video->type !=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO) { if (!video->primary) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("video type '%s' is only valid as primary vid= eo device"), + _("video type '%1$s' is only valid as primary v= ideo device"), virDomainVideoTypeToString(video->type)); return -1; } =20 if (video->heads !=3D 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("video type '%s' doesn't support multiple 'he= ads'"), + _("video type '%1$s' doesn't support multiple '= heads'"), virDomainVideoTypeToString(video->type)); return -1; } @@ -2720,13 +2700,13 @@ qemuValidateDomainDeviceDefVideo(const virDomainVid= eoDef *video, if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_QXL) { if (video->vram > (UINT_MAX / 1024)) { virReportError(VIR_ERR_OVERFLOW, - _("value for 'vram' must be less than '%u'"), + _("value for 'vram' must be less than '%1$u'"), UINT_MAX / 1024); return -1; } if (video->ram > (UINT_MAX / 1024)) { virReportError(VIR_ERR_OVERFLOW, - _("value for 'ram' must be less than '%u'"), + _("value for 'ram' must be less than '%1$u'"), UINT_MAX / 1024); return -1; } @@ -2821,7 +2801,7 @@ qemuValidateDomainDeviceDefDiskSerial(const char *val= ue) { if (strspn(value, QEMU_SERIAL_PARAM_ACCEPTED_CHARS) !=3D strlen(value)= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("driver serial '%s' contains unsafe characters"), + _("driver serial '%1$s' contains unsafe characters"= ), value); return -1; } @@ -2849,7 +2829,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDom= ainDef *def, case VIR_DOMAIN_DISK_BUS_NONE: case VIR_DOMAIN_DISK_BUS_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOThreads not available for bus %s target %s"), + _("IOThreads not available for bus %1$s target %2$s= "), virDomainDiskBusTypeToString(disk->bus), disk->dst); return false; } @@ -2857,7 +2837,7 @@ qemuValidateDomainDeviceDefDiskIOThreads(const virDom= ainDef *def, /* Can we find the disk iothread in the iothreadid list? */ if (!virDomainIOThreadIDFind(def, disk->iothread)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Disk iothread '%u' not defined in iothreadid"), + _("Disk iothread '%1$u' not defined in iothreadid"), disk->iothread); return false; } @@ -2877,7 +2857,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_USB || disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SD) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CHS geometry can not be set for '%s' bus"), + _("CHS geometry can not be set for '%1$s' bus"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -2885,7 +2865,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, if (disk->geometry.trans !=3D VIR_DOMAIN_DISK_TRANS_DEFAULT && disk->bus !=3D VIR_DOMAIN_DISK_BUS_IDE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CHS translation mode can only be set for 'id= e' bus not '%s'"), + _("CHS translation mode can only be set for 'id= e' bus not '%1$s'"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -2893,7 +2873,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, =20 if (disk->serial && disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Serial property not supported for drive bus '%s'= "), + _("Serial property not supported for drive bus '%1$= s'"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -2902,7 +2882,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_VIRTIO || disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk type of '%s' does not support ejectable med= ia"), + _("disk type of '%1$s' does not support ejectable m= edia"), disk->dst); return -1; } @@ -2910,7 +2890,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, if (disk->copy_on_read =3D=3D VIR_TRISTATE_SWITCH_ON) { if (disk->src->readonly) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("copy_on_read is not compatible with read-onl= y disk '%s'"), + _("copy_on_read is not compatible with read-onl= y disk '%1$s'"), disk->dst); return -1; } @@ -2918,7 +2898,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM || disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("copy_on_read is not supported with removable= disk '%s'"), + _("copy_on_read is not supported with removable= disk '%1$s'"), disk->dst); return -1; } @@ -2972,7 +2952,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, if (disk->bus !=3D VIR_DOMAIN_DISK_BUS_VIRTIO && disk->bus !=3D VIR_DOMAIN_DISK_BUS_SCSI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk device=3D'lun' is not supported for bus= =3D'%s'"), + _("disk device=3D'lun' is not supported for bus= =3D'%1$s'"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -2988,7 +2968,7 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDoma= inDiskDef *disk, =20 if (disk->copy_on_read =3D=3D VIR_TRISTATE_SWITCH_ON) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("copy_on_read is not compatible with 'lun' di= sk '%s'"), + _("copy_on_read is not compatible with 'lun' di= sk '%1$s'"), disk->dst); return -1; } @@ -3197,7 +3177,7 @@ qemuValidateDomainDeviceDefDiskBlkdeviotune(const vir= DomainDiskDef *disk, if (!virDomainBlockIoTuneInfoEqual(&d->blkdeviotune, &disk->blkdeviotune)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("different iotunes for disks %s and %s"), + _("different iotunes for disks %1$s and %2$= s"), disk->dst, d->dst); return -1; } @@ -3218,8 +3198,8 @@ qemuValidateDomainDeviceDefDiskBlkdeviotune(const vir= DomainDiskDef *disk, disk->blkdeviotune.write_iops_sec_max > QEMU_BLOCK_IOTUNE_MAX || disk->blkdeviotune.size_iops_sec > QEMU_BLOCK_IOTUNE_MAX) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("block I/O throttle limit must " - "be no more than %llu using QEMU"), QEMU_BLOCK_IOT= UNE_MAX); + _("block I/O throttle limit must be no more than %1$= llu using QEMU"), + QEMU_BLOCK_IOTUNE_MAX); return -1; } =20 @@ -3240,26 +3220,26 @@ qemuValidateDomainDeviceDefDiskTransient(const virD= omainDiskDef *disk, =20 if (virStorageSourceIsEmpty(disk->src)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("transient disk '%s' must not be empty"), disk->d= st); + _("transient disk '%1$s' must not be empty"), disk-= >dst); return -1; } =20 if (disk->src->readonly) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("transient disk '%s' must not be read-only"), dis= k->dst); + _("transient disk '%1$s' must not be read-only"), d= isk->dst); return -1; } =20 if (actualType !=3D VIR_STORAGE_TYPE_FILE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("transient disk supported only with 'file' type (= %s)"), + _("transient disk supported only with 'file' type (= %1$s)"), disk->dst); return -1; } =20 if (disk->device !=3D VIR_DOMAIN_DISK_DEVICE_DISK) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("transient disk supported only with 'disk' device= (%s)"), + _("transient disk supported only with 'disk' device= (%1$s)"), disk->dst); return -1; } @@ -3289,7 +3269,7 @@ qemuValidateDomainDeviceDefDiskTransient(const virDom= ainDiskDef *disk, case VIR_DOMAIN_DISK_BUS_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk bus '%s' doesn't support transiend disk= backing image sharing"), + _("disk bus '%1$s' doesn't support transiend di= sk backing image sharing"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -3321,27 +3301,27 @@ qemuValidateDomainDeviceDefDisk(const virDomainDisk= Def *disk, if (disk->src->shared && !disk->src->readonly && !qemuBlockStorageSourceSupportsConcurrentAccess(disk->src)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shared access for disk '%s' requires use of " - "supported storage format"), disk->dst); + _("shared access for disk '%1$s' requires use of su= pported storage format"), + disk->dst); return -1; } =20 if (driverName && STRNEQ(driverName, "qemu")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported driver name '%s' for disk '%s'"), + _("unsupported driver name '%1$s' for disk '%2$s'"), driverName, disk->dst); return -1; } =20 if (virDiskNameParse(disk->dst, &idx, &partition) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid disk target '%s'"), disk->dst); + _("invalid disk target '%1$s'"), disk->dst); return -1; } =20 if (partition !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid disk target '%s', partitions can't appea= r in disk targets"), + _("invalid disk target '%1$s', partitions can't app= ear in disk targets"), disk->dst); return -1; } @@ -3429,7 +3409,7 @@ qemuValidateCheckSCSIControllerModel(virQEMUCaps *qem= uCaps, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported controller model: %s"), + _("Unsupported controller model: %1$s"), virDomainControllerModelSCSITypeToString(model)); return false; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_NCR53C90: @@ -3456,7 +3436,7 @@ qemuValidateCheckSCSIControllerModel(virQEMUCaps *qem= uCaps, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected SCSI controller model %d"), + _("Unexpected SCSI controller model %1$d"), model); return false; } @@ -3539,7 +3519,7 @@ qemuValidateCheckSCSIControllerIOThreads(const virDom= ainControllerDef *controlle /* Can we find the controller iothread in the iothreadid list? */ if (!virDomainIOThreadIDFind(def, controller->iothread)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("controller iothread '%u' not defined in iothread= id"), + _("controller iothread '%1$u' not defined in iothre= adid"), controller->iothread); return false; } @@ -3676,18 +3656,15 @@ qemuValidateDomainDeviceDefControllerAttributes(con= st virDomainControllerDef *co =20 #define virReportControllerMissingOption(cont, model, modelName, option) \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("Required option '%s' is not set for PCI controller "= \ - "with index '%d', model '%s' and modelName '%s'"), \ + _("Required option '%1$s' is not set for PCI controller= with index '%2$d', model '%3$s' and modelName '%4$s'"), \ (option), (cont->idx), (model), (modelName)); #define virReportControllerInvalidOption(cont, model, modelName, option) \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("Option '%s' is not valid for PCI controller " \ - "with index '%d', model '%s' and modelName '%s'"), \ + _("Option '%1$s' is not valid for PCI controller with i= ndex '%2$d', model '%3$s' and modelName '%4$s'"), \ (option), (cont->idx), (model), (modelName)); #define virReportControllerInvalidValue(cont, model, modelName, option) \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("Option '%s' has invalid value for PCI controller " \ - "with index '%d', model '%s' and modelName '%s'"), \ + _("Option '%1$s' has invalid value for PCI controller w= ith index '%2$d', model '%3$s' and modelName '%4$s'"), \ (option), (cont->idx), (model), (modelName)); =20 =20 @@ -3851,7 +3828,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (cont->idx =3D=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Index for '%s' controllers must be > 0"), + _("Index for '%1$s' controllers must be > 0"), model); return -1; } @@ -3870,7 +3847,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, * the index must be zero */ if (cont->idx !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Index for '%s' controllers must be 0"), + _("Index for '%1$s' controllers must be 0"), model); return -1; } @@ -3930,8 +3907,8 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, if (pciopts->pcihole64 || pciopts->pcihole64size !=3D 0) { if (!qemuDomainIsI440FX(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Setting the 64-bit PCI hole size is not " - "supported for machine '%s'"), def->os.ma= chine); + _("Setting the 64-bit PCI hole size is not = supported for machine '%1$s'"), + def->os.machine); return -1; } } @@ -3941,8 +3918,8 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, if (pciopts->pcihole64 || pciopts->pcihole64size !=3D 0) { if (!qemuDomainIsQ35(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Setting the 64-bit PCI hole size is not " - "supported for machine '%s'"), def->os.ma= chine); + _("Setting the 64-bit PCI hole size is not = supported for machine '%1$s'"), + def->os.machine); return -1; } } @@ -4121,7 +4098,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HO= TPLUG)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("setting the '%s' property on a '%s' devi= ce is not supported by this QEMU binary"), + _("setting the '%1$s' property on a '%2$s' = device is not supported by this QEMU binary"), "hotplug", "pci-root"); return -1; } @@ -4130,7 +4107,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCIE_ROOT_PORT_HOTPLUG= )) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("setting the '%s' property on a '%s' devi= ce is not supported by this QEMU binary"), + _("setting the '%1$s' property on a '%2$s' = device is not supported by this QEMU binary"), "hotplug", modelName); return -1; } @@ -4156,13 +4133,13 @@ qemuValidateDomainDeviceDefControllerPCI(const virD= omainControllerDef *cont, /* QEMU device availability */ if (cap < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown QEMU device for '%s' controller"), + _("Unknown QEMU device for '%1$s' controller"), modelName); return -1; } if (cap > 0 && !virQEMUCapsGet(qemuCaps, cap)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The '%s' device is not supported by this QEMU bi= nary"), + _("The '%1$s' device is not supported by this QEMU = binary"), modelName); return -1; } @@ -4174,7 +4151,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, pciopts->numaNode !=3D -1 && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NOD= E)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Option '%s' is not supported by '%s' device with= this QEMU binary"), + _("Option '%1$s' is not supported by '%2$s' device = with this QEMU binary"), "numaNode", modelName); return -1; } @@ -4302,7 +4279,7 @@ qemuValidateDomainDeviceDefVNCGraphics(const virDomai= nGraphicsDef *graphics, if (graphics->data.vnc.auth.passwd && strlen(graphics->data.vnc.auth.passwd) > 8) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("VNC password is %zu characters long, only 8 perm= itted"), + _("VNC password is %1$zu characters long, only 8 pe= rmitted"), strlen(graphics->data.vnc.auth.passwd)); return -1; } @@ -4343,7 +4320,7 @@ qemuValidateDomainDeviceDefGraphics(const virDomainGr= aphicsDef *graphics, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(graphicsCaps.type, graphics->type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s graphics are not supported with this QEMU"), + _("%1$s graphics are not supported with this QEMU"), virDomainGraphicsTypeToString(graphics->type)); return -1; } @@ -4609,21 +4586,21 @@ qemuValidateDomainDeviceDefCrypto(virDomainCryptoDe= f *crypto, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(cryptoCaps.model, crypto->model)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("crypto model %s is not supported"), + _("crypto model %1$s is not supported"), virDomainCryptoModelTypeToString(crypto->model)); return -1; } =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(cryptoCaps.type, crypto->type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("crypto type %s is not supported"), + _("crypto type %1$s is not supported"), virDomainCryptoTypeTypeToString(crypto->type)); return -1; } =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(cryptoCaps.backendModel, crypto->back= end)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("crypto backend %s is not supported"), + _("crypto backend %1$s is not supported"), virDomainCryptoBackendTypeToString(crypto->backend)= ); return -1; } @@ -4681,7 +4658,7 @@ qemuValidateDomainDeviceDefSound(virDomainSoundDef *s= ound, case VIR_DOMAIN_SOUND_MODEL_ICH7: case VIR_DOMAIN_SOUND_MODEL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("sound card model '%s' is not supported by qemu"), + _("sound card model '%1$s' is not supported by qemu= "), virDomainSoundModelTypeToString(sound->model)); return -1; } @@ -4697,7 +4674,7 @@ qemuValidateDomainDeviceDefSound(virDomainSoundDef *s= ound, =20 if (flags =3D=3D -1 || !virQEMUCapsGet(qemuCaps, flags)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s not supported in this QEMU binary"), = stype); + _("%1$s not supported in this QEMU binary")= , stype); return -1; } } @@ -4735,7 +4712,7 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(tpmCaps.backendVersion, version))= { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("TPM version '%s' is not supported"), + _("TPM version '%1$s' is not supported"), virDomainTPMVersionTypeToString(version)); return -1; } @@ -4745,7 +4722,7 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, /* TPM 1.2 + CRB do not work */ if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_CRB) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported interface '%s' for TPM 1.2"), + _("Unsupported interface '%1$s' for TPM 1.2= "), virDomainTPMModelTypeToString(tpm->model)); return -1; } @@ -4771,8 +4748,7 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(tpmCaps.backendModel, tpm->type)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The QEMU executable %s does not support TPM " - "backend type %s"), + _("The QEMU executable %1$s does not support TPM ba= ckend type %2$s"), def->emulator, virDomainTPMBackendTypeToString(tpm->type)); return -1; @@ -4782,16 +4758,14 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY && tpm->type !=3D VIR_DOMAIN_TPM_TYPE_PASSTHROUGH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("TPM Proxy model %s requires " - "'Passthrough' backend"), + _("TPM Proxy model %1$s requires 'Passthrough' back= end"), virDomainTPMModelTypeToString(tpm->model)); return -1; } =20 if (!VIR_DOMAIN_CAPS_ENUM_IS_SET(tpmCaps.model, tpm->model)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The QEMU executable %s does not support TPM " - "model %s"), + _("The QEMU executable %1$s does not support TPM mo= del %2$s"), def->emulator, virDomainTPMModelTypeToString(tpm->model)); return -1; @@ -4813,7 +4787,7 @@ qemuValidateDomainDeviceDefInput(const virDomainInput= Def *input, if (input->bus =3D=3D VIR_DOMAIN_INPUT_BUS_PS2 && !ARCH_IS_X86(def->os= .arch) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_I8042)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s is not supported by this QEMU binary"), + _("%1$s is not supported by this QEMU binary"), virDomainInputBusTypeToString(input->bus)); return -1; } @@ -4835,8 +4809,7 @@ qemuValidateDomainDeviceDefInput(const virDomainInput= Def *input, case VIR_DOMAIN_INPUT_MODEL_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio (non-)transitional models are not " - "supported for input type=3D%s"), + _("virtio (non-)transitional models are not support= ed for input type=3D%1$s"), virDomainInputTypeToString(input->type)); return -1; case VIR_DOMAIN_INPUT_MODEL_VIRTIO: @@ -4886,7 +4859,7 @@ qemuValidateDomainDeviceDefInput(const virDomainInput= Def *input, (input->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW && !virQEMUCapsGet(qemuCaps, ccwCap))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s is not supported by this QEMU binary"), + _("%1$s is not supported by this QEMU binary"), baseName); return -1; } @@ -4908,7 +4881,7 @@ qemuValidateDomainDeviceDefMemballoon(const virDomain= MemballoonDef *memballoon, memballoon->model !=3D VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITI= ONAL && memballoon->model !=3D VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRAN= SITIONAL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Memory balloon device type '%s' is not supported= by this version of qemu"), + _("Memory balloon device type '%1$s' is not support= ed by this version of qemu"), virDomainMemballoonModelTypeToString(memballoon->mo= del)); return -1; } @@ -4940,15 +4913,13 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOM= MUDef *iommu, case VIR_DOMAIN_IOMMU_MODEL_INTEL: if (!qemuDomainIsQ35(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is only supported with " - "Q35 machines"), + _("IOMMU device: '%1$s' is only supported with = Q35 machines"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_INTEL_IOMMU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is not supported with " - "this QEMU binary"), + _("IOMMU device: '%1$s' is not supported with t= his QEMU binary"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } @@ -4957,15 +4928,13 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOM= MUDef *iommu, case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: if (!qemuDomainIsARMVirt(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is only supported with " - "ARM Virt machines"), + _("IOMMU device: '%1$s' is only supported with = ARM Virt machines"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_VIRT_IOMMU)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is not supported with " - "this QEMU binary"), + _("IOMMU device: '%1$s' is not supported with t= his QEMU binary"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } @@ -4975,29 +4944,27 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOM= MUDef *iommu, if (!qemuDomainIsARMVirt(def) && !qemuDomainIsQ35(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is only supported with " - "Q35 and ARM Virt machines"), + _("IOMMU device: '%1$s' is only supported with = Q35 and ARM Virt machines"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI) || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS))= { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' is not supported with " - "this QEMU binary"), + _("IOMMU device: '%1$s' is not supported with t= his QEMU binary"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } if (def->features[VIR_DOMAIN_FEATURE_ACPI] !=3D VIR_TRISTATE_SWITC= H_ON) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' requires ACPI"), + _("IOMMU device: '%1$s' requires ACPI"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } if (iommu->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && iommu->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("IOMMU device: '%s' needs a PCI address"), + _("IOMMU device: '%1$s' needs a PCI address"), virDomainIOMMUModelTypeToString(iommu->model)); return -1; } @@ -5093,7 +5060,7 @@ qemuValidateDomainDeviceDefHub(virDomainHubDef *hub, { if (hub->type !=3D VIR_DOMAIN_HUB_TYPE_USB) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hub type %s not supported"), + _("hub type %1$s not supported"), virDomainHubTypeToString(hub->type)); return -1; } @@ -5175,7 +5142,7 @@ qemuValidateDomainDeviceDefMemory(virDomainMemoryDef = *mem, while ((node =3D virBitmapNextSetBit(mem->sourceNodes, node)) = >=3D 0) { if (mem->size > sgxCaps->sgxSections[node].size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("sgx epc size %lld on host node %zd i= s less than requested size %lld"), + _("sgx epc size %1$lld on host node %2$= zd is less than requested size %3$lld"), sgxCaps->sgxSections[node].size, node, = mem->size); return -1; } @@ -5185,7 +5152,7 @@ qemuValidateDomainDeviceDefMemory(virDomainMemoryDef = *mem, * specify it. */ if (mem->size > sgxCaps->sgxSections[0].size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("sgx epc size %lld on host node %d is les= s than requested size %lld"), + _("sgx epc size %1$lld on host node %2$d is= less than requested size %3$lld"), sgxCaps->sgxSections[0].size, 0, mem->size); return -1; } @@ -5219,8 +5186,7 @@ qemuValidateDomainDeviceDefShmem(virDomainShmemDef *s= hmem, case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_PLAIN: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' is not supported " - "by this QEMU binary"), + _("shmem model '%1$s' is not supported by this = QEMU binary"), virDomainShmemModelTypeToString(shmem->model)); return -1; } @@ -5229,8 +5195,7 @@ qemuValidateDomainDeviceDefShmem(virDomainShmemDef *s= hmem, case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shmem model '%s' is not supported " - "by this QEMU binary"), + _("shmem model '%1$s' is not supported by this = QEMU binary"), virDomainShmemModelTypeToString(shmem->model)); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464699; cv=none; d=zohomail.com; s=zohoarc; b=TsEa6yMLNQOCCnXvXIhun7EvoO1orulytErVPO9UJRE6BtcKJELe9Ty5YSrlwjPx0PLsfT4/RzNMbnfqipJ8R5rd2EkO0X4dMIPYCFkOnXs1hnLxo/0nIeiIihPlSeNLgY2t5iCwEadRX9tysCm1J60rczqEGNsrN0vncDVchSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464699; 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=3NkrzALHbTkeVeENRAnWkej8vnQ+qrG7lVkmW3VOWzY=; b=kHyHSdLRvT0PgxRsnxAcVsBobF2pW9w4dzXwRWJcLHjYkHBAmeZRknvvH1w26CWQlH/g4PFCo2vNh1Qsv/BaarrXml0XLH4xMwabBQ5/hcemVIfSMmTUoCgA8hcEWEzVY4uqsbDen9m/1K9/djxKfuTtz7i3b8Uz/aBwOPpYTus= 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 1678464699513966.5875966816373; Fri, 10 Mar 2023 08:11:39 -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-118-UJh-kbASNqK21_fM6wE3_A-1; Fri, 10 Mar 2023 11:11:30 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59BFE8017C3; Fri, 10 Mar 2023 16:10:56 +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 3ED662026D4B; Fri, 10 Mar 2023 16:10:56 +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 19C2F1946A70; Fri, 10 Mar 2023 16:10:56 +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 0CFFF1946A73 for ; Fri, 10 Mar 2023 16:10:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E5CE9492B00; Fri, 10 Mar 2023 16:10:54 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37838492C3E for ; Fri, 10 Mar 2023 16:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464698; 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=3NkrzALHbTkeVeENRAnWkej8vnQ+qrG7lVkmW3VOWzY=; b=G3we6cbcEyCh1sC+CJ390iwmGJGYtdwhH7P+gt2hn+pNgiY3XDcPFSVkHuEoh5Qk3Nv8Mz 1IQ3gxm529Zq0C92RFX2GZyb9E+ptz7+kflfFNL/Icw9Dzf810jz7vvwjbmT2m2foAjQf2 gIVzL7UyUTVY4x0RikFJErQMMRVWJX8= X-MC-Unique: UJh-kbASNqK21_fM6wE3_A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 32/51] qemu: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:48 +0100 Message-Id: <6752eb8d87afe9df3da91ada27ed679eb404031d.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.4 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: 1678464701244100010 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/qemu/qemu_agent.c | 41 ++++++++--------- src/qemu/qemu_backup.c | 12 ++--- src/qemu/qemu_block.c | 39 ++++++++-------- src/qemu/qemu_blockjob.c | 2 +- src/qemu/qemu_capabilities.c | 50 ++++++++++---------- src/qemu/qemu_cgroup.c | 4 +- src/qemu/qemu_checkpoint.c | 19 ++++---- src/qemu/qemu_conf.c | 75 ++++++++++++++---------------- src/qemu/qemu_dbus.c | 12 ++--- src/qemu/qemu_domain_address.c | 26 ++++------- src/qemu/qemu_domainjob.c | 6 +-- src/qemu/qemu_extdevice.c | 2 +- src/qemu/qemu_fd.c | 2 +- src/qemu/qemu_firmware.c | 42 ++++++++--------- src/qemu/qemu_interface.c | 6 +-- src/qemu/qemu_interop_config.c | 4 +- src/qemu/qemu_migration_cookie.c | 34 +++++++------- src/qemu/qemu_migration_params.c | 18 ++++---- src/qemu/qemu_monitor.c | 30 ++++++------ src/qemu/qemu_monitor_text.c | 4 +- src/qemu/qemu_namespace.c | 46 +++++++++---------- src/qemu/qemu_passt.c | 2 +- src/qemu/qemu_qapi.c | 4 +- src/qemu/qemu_saveimage.c | 30 ++++++------ src/qemu/qemu_slirp.c | 6 +-- src/qemu/qemu_snapshot.c | 78 ++++++++++++++------------------ src/qemu/qemu_tpm.c | 29 ++++++------ src/qemu/qemu_vhost_user.c | 8 ++-- src/qemu/qemu_vhost_user_gpu.c | 2 +- src/qemu/qemu_virtiofs.c | 10 ++-- 30 files changed, 303 insertions(+), 340 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index b5aa518d55..eda1308097 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -169,7 +169,7 @@ qemuAgentOpenUnix(const char *socketpath) addr.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.sun_path, socketpath) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Socket path %s too big for destination"), socket= path); + _("Socket path %1$s too big for destination"), sock= etpath); goto error; } =20 @@ -226,7 +226,7 @@ qemuAgentIOProcessLine(qemuAgent *agent, =20 if (virJSONValueGetType(obj) !=3D VIR_JSON_TYPE_OBJECT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parsed JSON reply '%s' isn't an object"), line); + _("Parsed JSON reply '%1$s' isn't an object"), line= ); return -1; } =20 @@ -264,7 +264,7 @@ qemuAgentIOProcessLine(qemuAgent *agent, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown JSON reply '%s'"), line); + _("Unknown JSON reply '%1$s'"), line); return -1; } =20 @@ -375,7 +375,7 @@ qemuAgentIORead(qemuAgent *agent) if (avail < 1024) { if (agent->bufferLength >=3D QEMU_AGENT_MAX_RESPONSE) { virReportSystemError(ERANGE, - _("No complete agent response found in %d= bytes"), + _("No complete agent response found in %1= $d bytes"), QEMU_AGENT_MAX_RESPONSE); return -1; } @@ -616,7 +616,7 @@ qemuAgentOpen(virDomainObj *vm, =20 if (config->type !=3D VIR_DOMAIN_CHR_TYPE_UNIX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to handle agent type: %s"), + _("unable to handle agent type: %1$s"), virDomainChrTypeToString(config->type)); goto cleanup; } @@ -633,7 +633,7 @@ qemuAgentOpen(virDomainObj *vm, agent->socket =3D g_socket_new_from_fd(agent->fd, &gerr); if (!agent->socket) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create socket object: %s"), + _("Unable to create socket object: %1$s"), gerr->message); goto cleanup; } @@ -973,7 +973,7 @@ qemuAgentCheckError(virJSONValue *cmd, /* Only send the user the command name + friendly error */ if (!error) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU agent command '%s'"), + _("unable to execute QEMU agent command '%1$s'"= ), qemuAgentCommandName(cmd)); return -1; } @@ -987,7 +987,7 @@ qemuAgentCheckError(virJSONValue *cmd, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU agent command '%s': %s"), + _("unable to execute QEMU agent command '%1$s': %2$= s"), qemuAgentCommandName(cmd), qemuAgentStringifyError(error)); =20 @@ -1000,7 +1000,7 @@ qemuAgentCheckError(virJSONValue *cmd, VIR_DEBUG("Neither 'return' nor 'error' is set in the JSON reply %= s: %s", NULLSTR(cmdstr), NULLSTR(replystr)); virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to execute QEMU agent command '%s'"), + _("unable to execute QEMU agent command '%1$s'"), qemuAgentCommandName(cmd)); return -1; } @@ -1283,8 +1283,7 @@ qemuAgentArbitraryCommand(qemuAgent *agent, *result =3D NULL; if (timeout < VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN) { virReportError(VIR_ERR_INVALID_ARG, - _("guest agent timeout '%d' is " - "less than the minimum '%d'"), + _("guest agent timeout '%1$d' is less than the mini= mum '%2$d'"), timeout, VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN); return -1; } @@ -1654,7 +1653,7 @@ qemuAgentSetTime(qemuAgent *agent, * not ULLONG_MAX. */ if (seconds > LLONG_MAX / 1000000000LL) { virReportError(VIR_ERR_INVALID_ARG, - _("Time '%lld' is too big for guest agent"), + _("Time '%1$lld' is too big for guest agent"), seconds); return -1; } @@ -1739,7 +1738,7 @@ qemuAgentGetDiskAddress(virJSONValue *json) do { \ if (virJSONValueObjectGetNumberUint(jsonObject, name, var) < 0) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("'%s' missing"), name); \ + _("'%1$s' missing"), name); \ return NULL; \ } \ } while (0) @@ -1796,8 +1795,7 @@ qemuAgentGetFSInfoFillDisks(virJSONValue *jsondisks, =20 if (!jsondisk) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("array element '%zd' of '%zd' missing in " - "guest-get-fsinfo 'disk' data"), + _("array element '%1$zd' of '%2$zd' missing in = guest-get-fsinfo 'disk' data"), i, fsinfo->ndisks); return -1; } @@ -1859,8 +1857,7 @@ qemuAgentGetFSInfo(qemuAgent *agent, =20 if (!entry) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("array element '%zd' of '%zd' missing in " - "guest-get-fsinfo return data"), + _("array element '%1$zd' of '%2$zd' missing in = guest-get-fsinfo return data"), i, ndata); goto cleanup; } @@ -1951,14 +1948,14 @@ qemuAgentGetInterfaceOneAddress(virDomainIPAddressP= tr ip_addr, type =3D virJSONValueObjectGetString(ip_addr_obj, "ip-address-type"); if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu agent didn't provide 'ip-address-type'" - " field for interface '%s'"), name); + _("qemu agent didn't provide 'ip-address-type' fiel= d for interface '%1$s'"), + name); return -1; } =20 if (STRNEQ(type, "ipv4") && STRNEQ(type, "ipv6")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown ip address type '%s'"), + _("unknown ip address type '%1$s'"), type); return -1; } @@ -1966,8 +1963,8 @@ qemuAgentGetInterfaceOneAddress(virDomainIPAddressPtr= ip_addr, addr =3D virJSONValueObjectGetString(ip_addr_obj, "ip-address"); if (!addr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu agent didn't provide 'ip-address'" - " field for interface '%s'"), name); + _("qemu agent didn't provide 'ip-address' field for= interface '%1$s'"), + name); return -1; } =20 diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 6a5aacd9f6..3be33193f4 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -206,7 +206,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskDa= ta *dd, dd->backupdisk->incremental, blockNamedNodeData)) { virReportError(VIR_ERR_CHECKPOINT_INCONSISTENT, - _("missing or broken bitmap '%s' for disk '%s'"), + _("missing or broken bitmap '%1$s' for disk '%2$s'"= ), dd->backupdisk->incremental, dd->domdisk->dst); return -1; } @@ -256,7 +256,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm, =20 if (!(dd->domdisk =3D virDomainDiskByTarget(vm->def, dd->backupdisk->n= ame))) { virReportError(VIR_ERR_INVALID_ARG, - _("no disk named '%s'"), dd->backupdisk->name); + _("no disk named '%1$s'"), dd->backupdisk->name); return -1; } =20 @@ -268,7 +268,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm, } else if (dd->store->format !=3D VIR_STORAGE_FILE_QCOW2) { if (pull) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("pull mode backup for disk '%s' requires qcow= 2 driver"), + _("pull mode backup for disk '%1$s' requires qc= ow2 driver"), dd->backupdisk->name); return -1; } @@ -298,7 +298,7 @@ qemuBackupDiskPrepareDataOne(virDomainObj *vm, * has corresponding bitmap. */ if (!virDomainCheckpointFindByName(vm->checkpoints, dd->backupdisk= ->incremental)) { virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, - _("Checkpoint '%s' for incremental backup of di= sk '%s' not found"), + _("Checkpoint '%1$s' for incremental backup of = disk '%2$s' not found"), dd->backupdisk->incremental, dd->backupdisk->na= me); return -1; } @@ -428,7 +428,7 @@ qemuBackupDiskPrepareOneStorage(virDomainObj *vm, =20 if (virFileExists(dd->store->path)) { virReportError(VIR_ERR_INVALID_ARG, - _("store '%s' for backup of '%s' exists"), + _("store '%1$s' for backup of '%2$s' exists"), dd->store->path, dd->domdisk->dst); return -1; } @@ -440,7 +440,7 @@ qemuBackupDiskPrepareOneStorage(virDomainObj *vm, =20 if (virStorageSourceCreate(dd->store) < 0) { virReportSystemError(errno, - _("failed to create image file '%s'"), + _("failed to create image file '%1$s'"), NULLSTR(dd->store->path)); return -1; } diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 8fcebd8992..918b426103 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -44,7 +44,7 @@ qemuBlockNodeNameValidate(const char *nn) =20 if (strlen(nn) >=3D qemuBlockNodeNameBufSize) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("node-name '%s' too long for qemu"), nn); + _("node-name '%1$s' too long for qemu"), nn); return -1; } =20 @@ -80,7 +80,7 @@ qemuBlockStorageSourceGetURI(virStorageSource *src) =20 if (src->nhosts !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("protocol '%s' accepts only one host"), + _("protocol '%1$s' accepts only one host"), virStorageNetProtocolTypeToString(src->protocol)); return NULL; } @@ -153,7 +153,7 @@ qemuBlockStorageSourceBuildJSONSocketAddress(virStorage= NetHostDef *host) case VIR_STORAGE_NET_HOST_TRANS_RDMA: case VIR_STORAGE_NET_HOST_TRANS_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("transport protocol '%s' is not yet supported"), + _("transport protocol '%1$s' is not yet supported"), virStorageNetHostTransportTypeToString(host->transp= ort)); return NULL; } @@ -469,7 +469,7 @@ qemuBlockStorageSourceGetISCSIProps(virStorageSource *s= rc, *(lunStr++) =3D '\0'; if (virStrToLong_ui(lunStr, NULL, 10, &lun) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse target for lunStr '%s'"), + _("cannot parse target for lunStr '%1$s'"), target); return NULL; } @@ -866,7 +866,7 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource = *src, =20 case VIR_STORAGE_TYPE_VOLUME: virReportError(VIR_ERR_INTERNAL_ERROR, - _("storage source pool '%s' volume '%s' is not tran= slated"), + _("storage source pool '%1$s' volume '%2$s' is not = translated"), src->srcpool->pool, src->srcpool->volume); return NULL; =20 @@ -1212,7 +1212,7 @@ qemuBlockStorageSourceGetBlockdevFormatProps(virStora= geSource *src) case VIR_STORAGE_FILE_ISO: case VIR_STORAGE_FILE_DIR: virReportError(VIR_ERR_INTERNAL_ERROR, - _("mishandled storage format '%s'"), + _("mishandled storage format '%1$s'"), virStorageFileFormatTypeToString(src->format)); return NULL; =20 @@ -1271,7 +1271,7 @@ qemuBlockStorageSourceGetBlockdevProps(virStorageSour= ce *src, } else { if (virStorageSourceIsBacking(backingStore)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("storage format '%s' does not support bac= king store"), + _("storage format '%1$s' does not support b= acking store"), virStorageFileFormatTypeToString(src->forma= t)); return NULL; } @@ -2198,7 +2198,7 @@ qemuBlockStorageSourceCreateGetFormatProps(virStorage= Source *src, case VIR_STORAGE_FILE_AUTO: case VIR_STORAGE_FILE_NONE: virReportError(VIR_ERR_INTERNAL_ERROR, - _("mishandled storage format '%s'"), + _("mishandled storage format '%1$s'"), virStorageFileFormatTypeToString(src->format)); return -1; =20 @@ -2352,7 +2352,7 @@ qemuBlockStorageSourceCreateGeneric(virDomainObj *vm, _("blockdev-create job was cancelled")); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to format image: '%s'"), NULLSTR(job-= >errmsg)); + _("failed to format image: '%1$s'"), NULLSTR(jo= b->errmsg)); } goto cleanup; } @@ -2421,7 +2421,7 @@ qemuBlockStorageSourceCreateFormat(virDomainObj *vm, =20 if (!createformatprops) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("can't create storage format '%s'"), + _("can't create storage format '%1$s'"), virStorageFileFormatTypeToString(src->format)); return -1; } @@ -2552,7 +2552,7 @@ qemuBlockStorageSourceCreateDetectSize(GHashTable *bl= ockNamedNodeData, =20 if (!(entry =3D virHashLookup(blockNamedNodeData, templ->nodeformat)))= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to update capacity data for block node '%= s'"), + _("failed to update capacity data for block node '%= 1$s'"), templ->nodeformat); return -1; } @@ -3282,7 +3282,7 @@ qemuBlockCommit(virDomainObj *vm, =20 if (virStorageSourceIsEmpty(disk->src)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk %s has no source file to be committed"), + _("disk %1$s has no source file to be committed"), disk->dst); return NULL; } @@ -3297,20 +3297,20 @@ qemuBlockCommit(virDomainObj *vm, /* XXX Should we auto-pivot when COMMIT_ACTIVE is not specified? */ if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)) { virReportError(VIR_ERR_INVALID_ARG, - _("commit of '%s' active layer requires active = flag"), + _("commit of '%1$s' active layer requires activ= e flag"), disk->dst); return NULL; } } else if (flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE) { virReportError(VIR_ERR_INVALID_ARG, - _("active commit requested but '%s' is not active"), + _("active commit requested but '%1$s' is not active= "), topSource->path); return NULL; } =20 if (!virStorageSourceHasBacking(topSource)) { virReportError(VIR_ERR_INVALID_ARG, - _("top '%s' in chain for '%s' has no backing file"), + _("top '%1$s' in chain for '%2$s' has no backing fi= le"), topSource->path, disk->src->path); return NULL; } @@ -3318,8 +3318,7 @@ qemuBlockCommit(virDomainObj *vm, if ((flags & VIR_DOMAIN_BLOCK_COMMIT_SHALLOW) && baseSource !=3D topSource->backingStore) { virReportError(VIR_ERR_INVALID_ARG, - _("base '%s' is not immediately below '%s' in chain= " - "for '%s'"), + _("base '%1$s' is not immediately below '%2$s' in c= hain for '%3$s'"), baseSource->path, topSource->path, disk->src->path); return NULL; } @@ -3448,7 +3447,7 @@ qemuBlockPivot(virDomainObj *vm, =20 if (job->state !=3D QEMU_BLOCKJOB_STATE_READY) { virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, - _("block job '%s' not ready for pivot yet"), + _("block job '%1$s' not ready for pivot yet"), job->name); return -1; } @@ -3457,7 +3456,7 @@ qemuBlockPivot(virDomainObj *vm, case QEMU_BLOCKJOB_TYPE_NONE: case QEMU_BLOCKJOB_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid job type '%d'"), job->type); + _("invalid job type '%1$d'"), job->type); return -1; =20 case QEMU_BLOCKJOB_TYPE_PULL: @@ -3467,7 +3466,7 @@ qemuBlockPivot(virDomainObj *vm, case QEMU_BLOCKJOB_TYPE_CREATE: case QEMU_BLOCKJOB_TYPE_BROKEN: virReportError(VIR_ERR_OPERATION_INVALID, - _("job type '%s' does not support pivot"), + _("job type '%1$s' does not support pivot"), qemuBlockjobTypeToString(job->type)); return -1; =20 diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index a20cf1db62..ecd9007ef5 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -175,7 +175,7 @@ qemuBlockJobRegister(qemuBlockJobData *job, =20 if (disk && QEMU_DOMAIN_DISK_PRIVATE(disk)->blockjob) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("disk '%s' has a blockjob assigned"), disk->dst); + _("disk '%1$s' has a blockjob assigned"), disk->dst= ); return -1; } =20 diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 218e6c09a4..68e940b70d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1807,7 +1807,7 @@ int virQEMUCapsGetDefaultVersion(virCaps *caps, VIR_DOMAIN_OSTYPE_HVM, hostarch, VIR_DOMAIN_VIRT_NONE, NULL, NULL))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find suitable emulator for %s"), + _("Cannot find suitable emulator for %1$s"), virArchToString(hostarch)); return -1; } @@ -3665,8 +3665,7 @@ virQEMUCapsInitCPUModelS390(virQEMUCaps *qemuCaps, if (!modelInfo) { if (type =3D=3D VIR_DOMAIN_VIRT_KVM) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing host CPU model info from QEMU " - "capabilities for binary %s"), + _("missing host CPU model info from QEMU capabi= lities for binary %1$s"), qemuCaps->binary); return -1; } @@ -4034,8 +4033,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccel *cap= s, prop->value.string =3D virXMLPropString(ctxt->node, "value= "); if (!prop->value.string) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid string value for '%s' host C= PU " - "model property in QEMU capabilities = cache"), + _("invalid string value for '%1$s' host= CPU model property in QEMU capabilities cache"), prop->name); return -1; } @@ -4045,8 +4043,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccel *cap= s, if (virXPathLongLong("string(./@value)", ctxt, &prop->value.number) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid number value for '%s' host C= PU " - "model property in QEMU capabilities = cache"), + _("invalid number value for '%1$s' host= CPU model property in QEMU capabilities cache"), prop->name); return -1; } @@ -4105,7 +4102,7 @@ virQEMUCapsLoadCPUModels(virArch arch, if ((strUsable =3D virXMLPropString(nodes[i], "usable")) && (usable =3D virDomainCapsCPUUsableTypeFromString(strUsable)) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown value '%s' in attribute 'usable'"), + _("unknown value '%1$s' in attribute 'usable'"), strUsable); return -1; } @@ -4457,7 +4454,7 @@ virQEMUCapsParseHypervCapabilities(virQEMUCaps *qemuC= aps, =20 if ((val =3D virDomainHypervTypeFromString(name)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported HyperV Enlightenment feature: %s= "), + _("unsupported HyperV Enlightenment feature: %1= $s"), name); return -1; } @@ -4497,7 +4494,7 @@ virQEMUCapsParseFlags(virQEMUCaps *qemuCaps, xmlXPath= ContextPtr ctxt) flag =3D virQEMUCapsTypeFromString(str); if (flag < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown qemu capabilities flag %s"), str); + _("Unknown qemu capabilities flag %1$s"), str); return -1; } =20 @@ -4597,7 +4594,7 @@ virQEMUCapsValidateEmulator(virQEMUCaps *qemuCaps, xm= lXPathContextPtr ctxt) =20 if (STRNEQ(str, qemuCaps->binary)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expected caps for '%s' but saw '%s'"), + _("Expected caps for '%1$s' but saw '%2$s'"), qemuCaps->binary, str); return -1; } @@ -4618,7 +4615,7 @@ virQEMUCapsValidateArch(virQEMUCaps *qemuCaps, xmlXPa= thContextPtr ctxt) } if (!(qemuCaps->arch =3D virArchFromString(str))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown arch %s in QEMU capabilities cache"), st= r); + _("unknown arch %1$s in QEMU capabilities cache"), = str); return -1; } =20 @@ -5128,7 +5125,7 @@ virQEMUCapsSaveFile(void *data, =20 if (virFileWriteStr(filename, xml, 0600) < 0) { virReportSystemError(errno, - _("Failed to save '%s' for '%s'"), + _("Failed to save '%1$s' for '%2$s'"), filename, qemuCaps->binary); return -1; } @@ -5259,7 +5256,7 @@ virQEMUCapsKVMUsable(virQEMUCapsCachePriv *priv) if (stat(kvm_device, &sb) < 0) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("Failed to stat %s"), kvm_device); + _("Failed to stat %1$s"), kvm_device); } return false; } @@ -5456,7 +5453,7 @@ virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps, =20 if ((qemuCaps->arch =3D virQEMUCapsArchFromString(archstr)) =3D=3D VIR= _ARCH_NONE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown QEMU arch %s"), archstr); + _("Unknown QEMU arch %1$s"), archstr); return -1; } =20 @@ -5601,7 +5598,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCaps *qemuCaps, if (major < QEMU_MIN_MAJOR || (major =3D=3D QEMU_MIN_MAJOR && minor < QEMU_MIN_MINOR)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("QEMU version >=3D %d.%d.%d is required, but %d.%= d.%d found"), + _("QEMU version >=3D %1$d.%2$d.%3$d is required, bu= t %4$d.%5$d.%6$d found"), QEMU_MIN_MAJOR, QEMU_MIN_MINOR, QEMU_MIN_MICRO, major, minor, micro); return -1; @@ -5702,7 +5699,7 @@ virQEMUCapsLogProbeFailure(const char *binary) VIR_LOG_WARN, __FILE__, __LINE__, __func__, meta, - _("Failed to probe capabilities for %s: %s"), + _("Failed to probe capabilities for %1$s: %2$s"), binary, virGetLastErrorMessage()); } =20 @@ -5777,7 +5774,7 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch, /* We would also want to check faccessat if we cared about ACLs, * but we don't. */ if (stat(binary, &sb) < 0) { - virReportSystemError(errno, _("Cannot check QEMU binary %s"), + virReportSystemError(errno, _("Cannot check QEMU binary %1$s"), binary); return NULL; } @@ -5788,14 +5785,14 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch, * in a sub-process so it's hard to feed back a useful error. */ if (!virFileIsExecutable(binary)) { - virReportSystemError(errno, _("QEMU binary %s is not executable"), + virReportSystemError(errno, _("QEMU binary %1$s is not executable"= ), binary); return NULL; } =20 if (virFileExists(QEMU_MODDIR)) { if (stat(QEMU_MODDIR, &sb) < 0) { - virReportSystemError(errno, _("Cannot check QEMU module direct= ory %s"), + virReportSystemError(errno, _("Cannot check QEMU module direct= ory %1$s"), QEMU_MODDIR); return NULL; } @@ -6036,14 +6033,14 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, if (virttypeStr && (virttype =3D virDomainVirtTypeFromString(virttypeStr)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown virttype: %s"), virttypeStr); + _("unknown virttype: %1$s"), virttypeStr); return NULL; } =20 if (archStr && (arch =3D virArchFromString(archStr)) =3D=3D VIR_ARCH_NONE) { virReportError(VIR_ERR_INVALID_ARG, - _("unknown architecture: %s"), archStr); + _("unknown architecture: %1$s"), archStr); return NULL; } =20 @@ -6053,7 +6050,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, } if (!binary) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unable to find any emulator to serve '%s' archit= ecture"), + _("unable to find any emulator to serve '%1$s' arch= itecture"), archStr); return NULL; } @@ -6069,8 +6066,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, (ARCH_IS_ARM(arch) && ARCH_IS_ARM(arch_from_caps)) || (ARCH_IS_S390(arch) && ARCH_IS_S390(arch_from_caps)))) { virReportError(VIR_ERR_INVALID_ARG, - _("architecture from emulator '%s' doesn't " - "match given architecture '%s'"), + _("architecture from emulator '%1$s' doesn't match = given architecture '%2$s'"), virArchToString(arch_from_caps), virArchToString(arch)); return NULL; @@ -6083,7 +6079,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, =20 if (virQEMUCapsTypeIsAccelerated(virttype) && capsType =3D=3D VIR_DOMA= IN_VIRT_QEMU) { virReportError(VIR_ERR_INVALID_ARG, - _("the accel '%s' is not supported by '%s' on this = host"), + _("the accel '%1$s' is not supported by '%2$s' on t= his host"), virQEMUCapsAccelStr(virttype), binary); return NULL; } @@ -6094,7 +6090,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, =20 if (!virQEMUCapsIsMachineSupported(qemuCaps, virttype, machine)) { virReportError(VIR_ERR_INVALID_ARG, - _("the machine '%s' is not supported by emulato= r '%s'"), + _("the machine '%1$s' is not supported by emula= tor '%2$s'"), machine, binary); return NULL; } diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index b1178e0146..fe78a0251a 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -171,7 +171,7 @@ qemuSetupImagePathCgroup(virDomainObj *vm, if (virDevMapperGetTargets(path, &targetPaths) < 0 && errno !=3D ENOSYS) { virReportSystemError(errno, - _("Unable to get devmapper targets for %s"), + _("Unable to get devmapper targets for %1$s"), path); return -1; } @@ -865,7 +865,7 @@ qemuSetupCgroupAppid(virDomainObj *vm) =20 if (virFileWriteStr(path, appid, 0) < 0) { virReportSystemError(errno, - _("Unable to write '%s' to '%s'"), appid, pat= h); + _("Unable to write '%1$s' to '%2$s'"), appid,= path); return -1; } =20 diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 8580158d66..8449ed176a 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu/qemu_checkpoint.c @@ -87,7 +87,7 @@ qemuCheckpointObjFromName(virDomainObj *vm, chk =3D virDomainCheckpointFindByName(vm->checkpoints, name); if (!chk) virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, - _("no domain checkpoint with matching name '%s'"), + _("no domain checkpoint with matching name '%1$s'"), name); =20 return chk; @@ -121,7 +121,7 @@ qemuCheckpointWriteMetadata(virDomainObj *vm, =20 chkDir =3D g_strdup_printf("%s/%s", checkpointDir, vm->def->name); if (g_mkdir_with_parents(chkDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create checkpoint directory = '%s'"), + virReportSystemError(errno, _("cannot create checkpoint directory = '%1$s'"), chkDir); return -1; } @@ -164,7 +164,7 @@ qemuCheckpointDiscardDiskBitmaps(virStorageSource *src, =20 if (!found) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bitmap '%s' not found in backing chain of '%s'"), + _("bitmap '%1$s' not found in backing chain of '%2$= s'"), delbitmap, diskdst); return -1; } @@ -205,7 +205,7 @@ qemuCheckpointDiscardBitmaps(virDomainObj *vm, =20 if (!chkdisk->bitmap) { virReportError(VIR_ERR_INVALID_ARG, - _("missing bitmap name for disk '%s' of checkpo= int '%s'"), + _("missing bitmap name for disk '%1$s' of check= point '%2$s'"), chkdisk->name, chkdef->parent.name); return -1; } @@ -357,15 +357,14 @@ qemuCheckpointPrepare(virQEMUDriver *driver, =20 if (STRNEQ(disk->bitmap, def->parent.name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("bitmap for disk '%s' must match checkpoint n= ame '%s'"), + _("bitmap for disk '%1$s' must match checkpoint= name '%2$s'"), disk->name, def->parent.name); return -1; } =20 if (vm->def->disks[i]->src->format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("checkpoint for disk %s unsupported " - "for storage type %s"), + _("checkpoint for disk %1$s unsupported for sto= rage type %2$s"), disk->name, virStorageFileFormatTypeToString( vm->def->disks[i]->src->format)); @@ -431,7 +430,7 @@ qemuCheckpointRedefineValidateBitmaps(virDomainObj *vm, if (!qemuBlockBitmapChainIsValid(domdisk->src, chkdef->parent.name, blockNamedNodeData)) { virReportError(VIR_ERR_CHECKPOINT_INCONSISTENT, - _("missing or broken bitmap '%s' for disk '%s'"= ), + _("missing or broken bitmap '%1$s' for disk '%2= $s'"), chkdef->parent.name, domdisk->dst); return -1; } @@ -547,7 +546,7 @@ qemuCheckpointCreateFinalize(virQEMUDriver *driver, /* if writing of metadata fails, error out rather than trying * to silently carry on without completing the checkpoint */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to save metadata for checkpoint %s"), + _("unable to save metadata for checkpoint %1$s"), chk->def->name); qemuCheckpointRollbackMetadata(vm, chk); return -1; @@ -889,7 +888,7 @@ qemuCheckpointDelete(virDomainObj *vm, driver->xmlopt, cfg->checkpointDir) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to set checkpoint '%s' as cur= rent"), + _("failed to set checkpoint '%1$s' as c= urrent"), chk->def->name); virDomainCheckpointSetCurrent(vm->checkpoints, NULL); goto endjob; diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 680832742c..d9460d82e0 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -546,8 +546,7 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriver= Config *cfg, * to tell to vnc (usually subtract 5700, e.g. localhost:1 * for port 5701) */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_websocket_port_min: port must be grea= ter " - "than or equal to %d"), + _("%1$s: remote_websocket_port_min: port must be gr= eater than or equal to %2$d"), filename, QEMU_WEBSOCKET_PORT_MIN); return -1; } @@ -557,16 +556,15 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriv= erConfig *cfg, if (cfg->webSocketPortMax > QEMU_WEBSOCKET_PORT_MAX || cfg->webSocketPortMax < cfg->webSocketPortMin) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_websocket_port_max: port must be bet= ween " - "the minimal port and %d"), + _("%1$s: remote_websocket_port_max: port must be b= etween the minimal port and %2$d"), filename, QEMU_WEBSOCKET_PORT_MAX); return -1; } =20 if (cfg->webSocketPortMin > cfg->webSocketPortMax) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_websocket_port_min: min port must no= t be " - "greater than max port"), filename); + _("%1$s: remote_websocket_port_min: min port must = not be greater than max port"), + filename); return -1; } =20 @@ -577,8 +575,7 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriver= Config *cfg, * to tell to vnc (usually subtract 5900, e.g. localhost:1 * for port 5901) */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_display_port_min: port must be greate= r " - "than or equal to %d"), + _("%1$s: remote_display_port_min: port must be grea= ter than or equal to %2$d"), filename, QEMU_REMOTE_PORT_MIN); return -1; } @@ -588,16 +585,15 @@ virQEMUDriverConfigLoadRemoteDisplayEntry(virQEMUDriv= erConfig *cfg, if (cfg->remotePortMax > QEMU_REMOTE_PORT_MAX || cfg->remotePortMax < cfg->remotePortMin) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_display_port_max: port must be betwe= en " - "the minimal port and %d"), + _("%1$s: remote_display_port_max: port must be bet= ween the minimal port and %2$d"), filename, QEMU_REMOTE_PORT_MAX); return -1; } =20 if (cfg->remotePortMin > cfg->remotePortMax) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: remote_display_port_min: min port must not = be " - "greater than max port"), filename); + _("%1$s: remote_display_port_min: min port must no= t be greater than max port"), + filename); return -1; } =20 @@ -686,7 +682,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig= *cfg, cfg->maxCore =3D ULLONG_MAX; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown core size '%s'"), + _("Unknown core size '%1$s'"), corestr); return -1; } @@ -705,7 +701,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig= *cfg, cfg->stdioLogD =3D false; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown stdio handler %s"), + _("Unknown stdio handler %1$s"), stdioHandler); return -1; } @@ -718,7 +714,7 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig= *cfg, =20 if (val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unknown sched_core value %s"), + _("Unknown sched_core value %1$s"), schedCore); return -1; } @@ -794,7 +790,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig= *cfg, return -1; if (cfg->migrationPortMin <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: migration_port_min: port must be greater tha= n 0"), + _("%1$s: migration_port_min: port must be greater t= han 0"), filename); return -1; } @@ -804,8 +800,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig= *cfg, if (cfg->migrationPortMax > 65535 || cfg->migrationPortMax < cfg->migrationPortMin) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: migration_port_max: port must be between " - "the minimal port %d and 65535"), + _("%1$s: migration_port_max: port must be between = the minimal port %2$d and 65535"), filename, cfg->migrationPortMin); return -1; } @@ -817,8 +812,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig= *cfg, (STRPREFIX(cfg->migrateHost, "localhost") || virSocketAddrIsNumericLocalhost(cfg->migrateHost))) { virReportError(VIR_ERR_CONF_SYNTAX, - _("migration_host must not be the address of" - " the local machine: %s"), + _("migration_host must not be the address of the lo= cal machine: %1$s"), cfg->migrateHost); return -1; } @@ -830,8 +824,7 @@ virQEMUDriverConfigLoadNetworkEntry(virQEMUDriverConfig= *cfg, (STRPREFIX(cfg->migrationAddress, "localhost") || virSocketAddrIsNumericLocalhost(cfg->migrationAddress))) { virReportError(VIR_ERR_CONF_SYNTAX, - _("migration_address must not be the address of" - " the local machine: %s"), + _("migration_address must not be the address of the= local machine: %1$s"), cfg->migrationAddress); return -1; } @@ -923,7 +916,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfi= g *cfg, if (STREQ(cfg->securityDriverNames[i], cfg->securityDriverNames[j])) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Duplicate security driver %s"), + _("Duplicate security driver %1$s"), cfg->securityDriverNames[i]); return -1; } @@ -961,7 +954,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfi= g *cfg, int ctl; if ((ctl =3D virCgroupControllerTypeFromString(controllers[i])= ) < 0) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Unknown cgroup controller '%s'"), + _("Unknown cgroup controller '%1$s'"), controllers[i]); return -1; } @@ -987,7 +980,7 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfi= g *cfg, =20 if (ns < 0) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Unknown namespace: %s"), + _("Unknown namespace: %1$s"), namespaces[i]); return -1; } @@ -1000,14 +993,14 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverCo= nfig *cfg, =20 if (!qemuDomainNamespaceAvailable(ns)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s namespace is not available"), + _("%1$s namespace is not available"), namespaces[i]); return -1; } =20 if (virBitmapSetBit(cfg->namespaces, ns) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to enable namespace: %s"), + _("Unable to enable namespace: %1$s"), namespaces[i]); return -1; } @@ -1158,8 +1151,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->defaultTLSx509certdirPresent) { if (!virFileExists(cfg->defaultTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("default_tls_x509_cert_dir directory '%s' " - "does not exist"), + _("default_tls_x509_cert_dir directory '%1$s' d= oes not exist"), cfg->defaultTLSx509certdir); return -1; } @@ -1168,7 +1160,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->vncTLSx509certdir && !virFileExists(cfg->vncTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("vnc_tls_x509_cert_dir directory '%s' does not ex= ist"), + _("vnc_tls_x509_cert_dir directory '%1$s' does not = exist"), cfg->vncTLSx509certdir); return -1; } @@ -1176,7 +1168,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->spiceTLSx509certdir && !virFileExists(cfg->spiceTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("spice_tls_x509_cert_dir directory '%s' does not = exist"), + _("spice_tls_x509_cert_dir directory '%1$s' does no= t exist"), cfg->spiceTLSx509certdir); return -1; } @@ -1184,7 +1176,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->chardevTLSx509certdir && !virFileExists(cfg->chardevTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("chardev_tls_x509_cert_dir directory '%s' does no= t exist"), + _("chardev_tls_x509_cert_dir directory '%1$s' does = not exist"), cfg->chardevTLSx509certdir); return -1; } @@ -1192,7 +1184,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->migrateTLSx509certdir && !virFileExists(cfg->migrateTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("migrate_tls_x509_cert_dir directory '%s' does no= t exist"), + _("migrate_tls_x509_cert_dir directory '%1$s' does = not exist"), cfg->migrateTLSx509certdir); return -1; } @@ -1200,7 +1192,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->backupTLSx509certdir && !virFileExists(cfg->backupTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("backup_tls_x509_cert_dir directory '%s' does not= exist"), + _("backup_tls_x509_cert_dir directory '%1$s' does n= ot exist"), cfg->backupTLSx509certdir); return -1; } @@ -1208,7 +1200,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->vxhsTLSx509certdir && !virFileExists(cfg->vxhsTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("vxhs_tls_x509_cert_dir directory '%s' does not e= xist"), + _("vxhs_tls_x509_cert_dir directory '%1$s' does not= exist"), cfg->vxhsTLSx509certdir); return -1; } @@ -1216,7 +1208,7 @@ virQEMUDriverConfigValidate(virQEMUDriverConfig *cfg) if (cfg->nbdTLSx509certdir && !virFileExists(cfg->nbdTLSx509certdir)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("nbd_tls_x509_cert_dir directory '%s' does not ex= ist"), + _("nbd_tls_x509_cert_dir directory '%1$s' does not = exist"), cfg->nbdTLSx509certdir); return -1; } @@ -1457,21 +1449,21 @@ virQEMUDriverGetDomainCapabilities(virQEMUDriver *d= river, =20 if (!virQEMUCapsIsArchSupported(qemuCaps, arch)) { virReportError(VIR_ERR_INVALID_ARG, - _("Emulator '%s' does not support arch '%s'"), + _("Emulator '%1$s' does not support arch '%2$s'"), path, virArchToString(arch)); return NULL; } =20 if (!virQEMUCapsIsVirtTypeSupported(qemuCaps, virttype)) { virReportError(VIR_ERR_INVALID_ARG, - _("Emulator '%s' does not support virt type '%s'"), + _("Emulator '%1$s' does not support virt type '%2$s= '"), path, virDomainVirtTypeToString(virttype)); return NULL; } =20 if (!virQEMUCapsIsMachineSupported(qemuCaps, virttype, machine)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support machine type '%s'= "), + _("Emulator '%1$s' does not support machine type '%= 2$s'"), path, NULLSTR(machine)); return NULL; } @@ -1567,8 +1559,7 @@ qemuGetDomainHupageMemPath(virQEMUDriver *driver, =20 if (i =3D=3D cfg->nhugetlbfs) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find any usable hugetlbfs " - "mount for %llu KiB"), + _("Unable to find any usable hugetlbfs mount for %1= $llu KiB"), pagesize); return -1; } @@ -1652,7 +1643,7 @@ qemuHugepageMakeBasedir(virQEMUDriver *driver, =20 if (g_mkdir_with_parents(hugepagePath, 0777) < 0) { virReportSystemError(errno, - _("unable to create hugepage path %s"), + _("unable to create hugepage path %1$s"), hugepagePath); return -1; } diff --git a/src/qemu/qemu_dbus.c b/src/qemu/qemu_dbus.c index a6dc802637..1ffe1f147f 100644 --- a/src/qemu/qemu_dbus.c +++ b/src/qemu/qemu_dbus.c @@ -190,7 +190,7 @@ qemuDBusStart(virQEMUDriver *driver, =20 if (!virFileIsExecutable(cfg->dbusDaemonName)) { virReportSystemError(errno, - _("'%s' is not a suitable dbus-daemon"), + _("'%1$s' is not a suitable dbus-daemon"), cfg->dbusDaemonName); return -1; } @@ -203,7 +203,7 @@ qemuDBusStart(virQEMUDriver *driver, sockpath =3D qemuDBusCreateSocketPath(cfg, shortName); =20 if (qemuDBusWriteConfig(configfile, sockpath) < 0) { - virReportSystemError(errno, _("Failed to write '%s'"), configfile); + virReportSystemError(errno, _("Failed to write '%1$s'"), configfil= e); return -1; } =20 @@ -222,7 +222,7 @@ qemuDBusStart(virQEMUDriver *driver, =20 if (virPidFileReadPath(pidfile, &cpid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("dbus-daemon %s didn't show up"), + _("dbus-daemon %1$s didn't show up"), cfg->dbusDaemonName); goto cleanup; } @@ -240,11 +240,11 @@ qemuDBusStart(virQEMUDriver *driver, =20 if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) { virReportSystemError(errno, - _("dbus-daemon %s died unexpectedly"), + _("dbus-daemon %1$s died unexpectedly"), cfg->dbusDaemonName); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("dbus-daemon died and reported: %s"), errbuf); + _("dbus-daemon died and reported: %1$s"), errbu= f); } =20 goto cleanup; @@ -252,7 +252,7 @@ qemuDBusStart(virQEMUDriver *driver, =20 if (!virFileExists(sockpath)) { virReportError(VIR_ERR_OPERATION_TIMEOUT, - _("DBus daemon %s didn't show up"), + _("DBus daemon %1$s didn't show up"), cfg->dbusDaemonName); goto cleanup; } diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 2023f283d6..165f975e2a 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -68,7 +68,7 @@ qemuDomainGetSCSIControllerModel(const virDomainDef *def, return VIR_DOMAIN_CONTROLLER_MODEL_SCSI_NCR53C90; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to determine model for SCSI controller idx=3D= %d"), + _("Unable to determine model for SCSI controller idx=3D= %1$d"), cont->idx); return -1; } @@ -116,7 +116,7 @@ qemuDomainFindSCSIControllerModel(const virDomainDef *d= ef, =20 if (!(cont =3D virDomainDeviceFindSCSIController(def, &info->addr.driv= e))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find a SCSI controller for idx=3D%d"), + _("unable to find a SCSI controller for idx=3D%1$d"= ), info->addr.drive.controller); return -1; } @@ -207,7 +207,7 @@ qemuDomainAssignSpaprVIOAddress(virDomainDef *def, while (ret !=3D 0) { if (user_reg) { virReportError(VIR_ERR_XML_ERROR, - _("spapr-vio address %#llx already in use"), + _("spapr-vio address %1$#llx already in use"), info->addr.spaprvio.reg); return -EEXIST; } @@ -1710,8 +1710,8 @@ qemuDomainPCIAddressSetCreate(virDomainDef *def, =20 if (idx >=3D addrs->nbuses) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Inappropriate new pci controller index %zu " - "exceeds addrs array length"), idx); + _("Inappropriate new pci controller index %1$zu= exceeds addrs array length"), + idx); goto error; } =20 @@ -2306,7 +2306,7 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, =20 if (!virDeviceInfoPCIAddressIsWanted(&def->disks[i]->info)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtio disk cannot have an address of type '= %s'"), + _("virtio disk cannot have an address of type '= %1$s'"), virDomainDeviceAddressTypeToString(def->disks[i= ]->info.type)); return -1; } @@ -2807,8 +2807,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, if (contIndex < 0) { /* this should never happen - we just added it */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find auto-added %s controller " - "with index %zu"), + _("Could not find auto-added %1$s controlle= r with index %2$zu"), virDomainControllerModelPCITypeToString(bus= ->model), i); goto cleanup; @@ -2896,10 +2895,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, options->busNr =3D qemuDomainAddressFindNewBusNr(def); if (options->busNr =3D=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("No free busNr lower than current " - "lowest busNr is available to " - "auto-assign to bus %d. Must be " - "manually assigned"), + _("No free busNr lower than current low= est busNr is available to auto-assign to bus %1$d. Must be manually assigne= d"), addr->bus); goto cleanup; } @@ -2923,7 +2919,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, } if (options->targetIndex =3D=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("No usable target index found for %d"= ), + _("No usable target index found for %1$= d"), addr->bus); goto cleanup; } @@ -2943,9 +2939,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, if (cont->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE = && idx <=3D addr->bus) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PCI controller at index %d (0x%02x) has " - "bus=3D'0x%02x', but index must be " - "larger than bus"), + _("PCI controller at index %1$d (0x%2$02x) = has bus=3D'0x%3$02x', but index must be larger than bus"), idx, idx, addr->bus); goto cleanup; } diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c index 27beb5229f..6376f928d5 100644 --- a/src/qemu/qemu_domainjob.c +++ b/src/qemu/qemu_domainjob.c @@ -725,7 +725,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm, =20 if ((type =3D virDomainJobTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown job type %s"), tmp); + _("Unknown job type %1$s"), tmp); return -1; } VIR_FREE(tmp); @@ -738,7 +738,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm, =20 if ((async =3D virDomainAsyncJobTypeFromString(tmp)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown async job type %s"), tmp); + _("Unknown async job type %1$s"), tmp); return -1; } VIR_FREE(tmp); @@ -748,7 +748,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm, vm->job->phase =3D qemuDomainAsyncJobPhaseFromString(async, tm= p); if (vm->job->phase < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown job phase %s"), tmp); + _("Unknown job phase %1$s"), tmp); return -1; } VIR_FREE(tmp); diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 1c397972e4..bf59967eb7 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -49,7 +49,7 @@ qemuExtDeviceLogCommand(virQEMUDriver *driver, return -1; =20 return qemuDomainLogAppendMessage(driver, vm, - _("%s: Starting external device: %s\= n%s\n"), + _("%1$s: Starting external device: %= 2$s\n%3$s\n"), timestamp, info, cmds); } =20 diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c index feab907afd..e847056573 100644 --- a/src/qemu/qemu_fd.c +++ b/src/qemu/qemu_fd.c @@ -221,7 +221,7 @@ qemuFDPassTransferMonitor(qemuFDPass *fdpass, for (i =3D 0; i < fdsets->nfdsets; i++) { if (fdsets->fdsets[i].id =3D=3D fdpass->fdSetID) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("fdset '%u' is already in use by qemu"), + _("fdset '%1$u' is already in use by qemu"), fdpass->fdSetID); return -1; } diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 9de4166772..2830b99f1b 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -307,7 +307,7 @@ qemuFirmwareInterfaceParse(const char *path, =20 if (!(interfacesJSON =3D virJSONValueObjectGetArray(doc, "interface-ty= pes"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get interface-types from '%s'"), + _("failed to get interface-types from '%1$s'"), path); return -1; } @@ -323,7 +323,7 @@ qemuFirmwareInterfaceParse(const char *path, =20 if ((tmp =3D qemuFirmwareOSInterfaceTypeFromString(tmpStr)) <=3D 0= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown interface type: '%s'"), + _("unknown interface type: '%1$s'"), tmpStr); return -1; } @@ -351,7 +351,7 @@ qemuFirmwareFlashFileParse(const char *path, =20 if (!(filename =3D virJSONValueObjectGetString(doc, "filename"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'filename' in '%s'"), + _("missing 'filename' in '%1$s'"), path); return -1; } @@ -360,7 +360,7 @@ qemuFirmwareFlashFileParse(const char *path, =20 if (!(format =3D virJSONValueObjectGetString(doc, "format"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'format' in '%s'"), + _("missing 'format' in '%1$s'"), path); return -1; } @@ -394,7 +394,7 @@ qemuFirmwareMappingFlashParse(const char *path, modeval =3D qemuFirmwareFlashModeTypeFromString(modestr); if (modeval < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Firmware flash mode value '%s' unexpected"), + _("Firmware flash mode value '%1$s' unexpected"= ), modestr); return -1; } @@ -403,7 +403,7 @@ qemuFirmwareMappingFlashParse(const char *path, =20 if (!(executable =3D virJSONValueObjectGet(doc, "executable"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'executable' in '%s'"), + _("missing 'executable' in '%1$s'"), path); return -1; } @@ -414,7 +414,7 @@ qemuFirmwareMappingFlashParse(const char *path, if (flash->mode =3D=3D QEMU_FIRMWARE_FLASH_MODE_SPLIT) { if (!(nvram_template =3D virJSONValueObjectGet(doc, "nvram-templat= e"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'nvram-template' in '%s'"), + _("missing 'nvram-template' in '%1$s'"), path); return -1; } @@ -436,7 +436,7 @@ qemuFirmwareMappingKernelParse(const char *path, =20 if (!(filename =3D virJSONValueObjectGetString(doc, "filename"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'filename' in '%s'"), + _("missing 'filename' in '%1$s'"), path); } =20 @@ -455,7 +455,7 @@ qemuFirmwareMappingMemoryParse(const char *path, =20 if (!(filename =3D virJSONValueObjectGetString(doc, "filename"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'filename' in '%s'"), + _("missing 'filename' in '%1$s'"), path); } =20 @@ -476,21 +476,21 @@ qemuFirmwareMappingParse(const char *path, =20 if (!(mapping =3D virJSONValueObjectGet(doc, "mapping"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing mapping in '%s'"), + _("missing mapping in '%1$s'"), path); return -1; } =20 if (!(deviceStr =3D virJSONValueObjectGetString(mapping, "device"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing device type in '%s'"), + _("missing device type in '%1$s'"), path); return -1; } =20 if ((tmp =3D qemuFirmwareDeviceTypeFromString(deviceStr)) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown device type in '%s'"), + _("unknown device type in '%1$s'"), path); return -1; } @@ -533,7 +533,7 @@ qemuFirmwareTargetParse(const char *path, =20 if (!(targetsJSON =3D virJSONValueObjectGetArray(doc, "targets"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get targets from '%s'"), + _("failed to get targets from '%1$s'"), path); return -1; } @@ -554,21 +554,21 @@ qemuFirmwareTargetParse(const char *path, =20 if (!(architectureStr =3D virJSONValueObjectGetString(item, "archi= tecture"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'architecture' in '%s'"), + _("missing 'architecture' in '%1$s'"), path); goto cleanup; } =20 if ((t->architecture =3D virQEMUCapsArchFromString(architectureStr= )) =3D=3D VIR_ARCH_NONE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown architecture '%s'"), + _("unknown architecture '%1$s'"), architectureStr); goto cleanup; } =20 if (!(machines =3D virJSONValueObjectGetArray(item, "machines"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'machines' in '%s'"), + _("missing 'machines' in '%1$s'"), path); goto cleanup; } @@ -615,7 +615,7 @@ qemuFirmwareFeatureParse(const char *path, =20 if (!(featuresJSON =3D virJSONValueObjectGetArray(doc, "features"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get features from '%s'"), + _("failed to get features from '%1$s'"), path); return -1; } @@ -659,7 +659,7 @@ qemuFirmwareParse(const char *path) =20 if (!(doc =3D virJSONValueFromString(cont))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse json file '%s'"), + _("unable to parse json file '%1$s'"), path); return NULL; } @@ -1603,7 +1603,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, loader->format !=3D VIR_STORAGE_FILE_RAW && loader->format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported loader format '%s'"), + _("Unsupported loader format '%1$s'"), virStorageFileFormatTypeToString(loader->format)); return -1; } @@ -1611,7 +1611,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, nvram->format !=3D VIR_STORAGE_FILE_RAW && nvram->format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported nvram format '%s'"), + _("Unsupported nvram format '%1$s'"), virStorageFileFormatTypeToString(nvram->format)); return -1; } @@ -1669,7 +1669,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, return -1; } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to find any firmware to satisfy '%s'"= ), + _("Unable to find any firmware to satisfy '%1$s= '"), virDomainOsDefFirmwareTypeToString(def->os.firm= ware)); return -1; } diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index 076640cbde..faf7922f31 100644 --- a/src/qemu/qemu_interface.c +++ b/src/qemu/qemu_interface.c @@ -339,7 +339,7 @@ qemuCreateInBridgePortWithHelper(virQEMUDriverConfig *c= fg, } =20 if (!virFileIsExecutable(cfg->bridgeHelperName)) { - virReportSystemError(errno, _("'%s' is not a suitable bridge helpe= r"), + virReportSystemError(errno, _("'%1$s' is not a suitable bridge hel= per"), cfg->bridgeHelperName); return -1; } @@ -377,7 +377,7 @@ qemuCreateInBridgePortWithHelper(virQEMUDriverConfig *c= fg, errstr =3D g_strdup_printf("stderr=3D%s", errbuf); =20 virReportSystemError(errno, - _("%s: failed to communicate with bridge help= er: %s"), + _("%1$s: failed to communicate with bridge he= lper: %2$s"), cmdstr, NULLSTR_EMPTY(errstr)); VIR_FREE(errstr); @@ -650,7 +650,7 @@ qemuInterfaceVDPAConnect(virDomainNetDef *net) =20 if ((fd =3D open(net->data.vdpa.devicepath, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open '%s' for vdpa device"), + _("Unable to open '%1$s' for vdpa device"), net->data.vdpa.devicepath); return -1; } diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index cdc710804f..08fb68c901 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -58,7 +58,7 @@ qemuBuildFileList(GHashTable *files, const char *dir) path =3D g_strdup_printf("%s/%s", dir, filename); =20 if (stat(path, &sb) < 0) { - virReportSystemError(errno, _("Unable to access %s"), path); + virReportSystemError(errno, _("Unable to access %1$s"), path); return -1; } =20 @@ -141,7 +141,7 @@ qemuInteropFetchConfigs(const char *name, =20 if ((len =3D virFileLength(path, -1)) < 0) { virReportSystemError(errno, - _("unable to get size of '%s'"), + _("unable to get size of '%1$s'"), path); return -1; } diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 26d07d1ad4..7f0b7a3412 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -188,14 +188,14 @@ qemuDomainExtractTLSSubject(const char *certdir) =20 if (virFileReadAll(certfile, 8192, &pemdata) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to read server cert %s"), certfile); + _("unable to read server cert %1$s"), certfile); return NULL; } =20 rc =3D gnutls_x509_crt_init(&cert); if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot initialize cert object: %s"), + _("cannot initialize cert object: %1$s"), gnutls_strerror(rc)); return NULL; } @@ -206,7 +206,7 @@ qemuDomainExtractTLSSubject(const char *certdir) rc =3D gnutls_x509_crt_import(cert, &pemdatum, GNUTLS_X509_FMT_PEM); if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot load cert data from %s: %s"), + _("cannot load cert data from %1$s: %2$s"), certfile, gnutls_strerror(rc)); return NULL; } @@ -219,7 +219,7 @@ qemuDomainExtractTLSSubject(const char *certdir) } if (rc !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot get cert distinguished name: %s"), + _("cannot get cert distinguished name: %1$s"), gnutls_strerror(rc)); return NULL; } @@ -287,8 +287,8 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriver *driver G= _GNUC_UNUSED, if (virNetDevOpenvswitchGetMigrateData(&mig->net[i].portda= ta, netptr->ifname) != =3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to run command to get OVS= port data for " - "interface %s"), netptr->ifname); + _("Unable to run command to get OVS= port data for interface %1$s"), + netptr->ifname); return NULL; } break; @@ -910,7 +910,7 @@ qemuMigrationCookieGraphicsXMLParse(xmlXPathContextPtr = ctxt) } if ((grap->type =3D virDomainGraphicsTypeFromString(graphicstype)) < 0= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown graphics type %s"), graphicstype); + _("unknown graphics type %1$s"), graphicstype); return NULL; } if (virXPathInt("string(./graphics/@port)", ctxt, &grap->port) < 0) { @@ -987,7 +987,7 @@ qemuMigrationCookieNBDXMLParse(xmlXPathContextPtr ctxt) port =3D virXPathString("string(./nbd/@port)", ctxt); if (port && virStrToLong_i(port, NULL, 10, &ret->port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed nbd port '%s'"), + _("Malformed nbd port '%1$s'"), port); return NULL; } @@ -1015,7 +1015,7 @@ qemuMigrationCookieNBDXMLParse(xmlXPathContextPtr ctx= t) virStrToLong_ull(capacity, NULL, 10, &ret->disks[i].capacity) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed disk capacity: '%s'"), + _("Malformed disk capacity: '%1$s'"), NULLSTR(capacity)); return NULL; } @@ -1180,13 +1180,13 @@ qemuMigrationCookieXMLParseMandatoryFeatures(xmlXPa= thContextPtr ctxt, =20 if ((val =3D qemuMigrationCookieFlagTypeFromString(str)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown migration cookie feature %s"), str); + _("Unknown migration cookie feature %1$s"), str= ); return -1; } =20 if ((flags & (1 << val)) =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unsupported migration cookie feature %s"), s= tr); + _("Unsupported migration cookie feature %1$s"),= str); return -1; } } @@ -1279,7 +1279,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig, } if (STRNEQ(name, mig->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Incoming cookie data had unexpected name %s vs %= s"), + _("Incoming cookie data had unexpected name %1$s vs= %2$s"), name, mig->name); return -1; } @@ -1293,7 +1293,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig, virUUIDFormat(mig->uuid, localdomuuid); if (STRNEQ(uuid, localdomuuid)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Incoming cookie data had unexpected UUID %s vs %= s"), + _("Incoming cookie data had unexpected UUID %1$s vs= %2$s"), uuid, localdomuuid); return -1; } @@ -1321,7 +1321,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookie *mig, } if (memcmp(mig->remoteHostuuid, mig->localHostuuid, VIR_UUID_BUFLEN) = =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Attempt to migrate guest to the same host %s"), + _("Attempt to migrate guest to the same host %1$s"), hostuuid); return -1; } @@ -1527,14 +1527,14 @@ qemuMigrationCookieParse(virQEMUDriver *driver, if (!mig->lockDriver) { if (virLockManagerPluginUsesState(driver->lockManager)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing %s lock state for migration cook= ie"), + _("Missing %1$s lock state for migration co= okie"), virLockManagerPluginGetName(driver->lockMan= ager)); return NULL; } } else if (STRNEQ(mig->lockDriver, virLockManagerPluginGetName(driver->lockManager)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Source host lock driver %s different from ta= rget %s"), + _("Source host lock driver %1$s different from = target %2$s"), mig->lockDriver, virLockManagerPluginGetName(driver->lockManager= )); return NULL; @@ -1567,7 +1567,7 @@ qemuMigrationCookieBlockDirtyBitmapsMatchDisks(virDom= ainDef *def, =20 if (!(disk->disk =3D virDomainDiskByTarget(def, disk->target))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Can't find disk '%s' in domain definition"), + _("Can't find disk '%1$s' in domain definition"= ), disk->target); return -1; } diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index bd09dcfb23..fc3379dcd3 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -330,7 +330,7 @@ qemuMigrationParamsCheckType(qemuMigrationParam param, { if (qemuMigrationParamInfo[param].type !=3D type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Type mismatch for '%s' migration parameter"), + _("Type mismatch for '%1$s' migration parameter"), qemuMigrationParamTypeToString(param)); return -1; } @@ -363,7 +363,7 @@ qemuMigrationParamsGetTPInt(qemuMigrationParams *migPar= ams, unsigned int max =3D UINT_MAX / unit; if (migParams->params[param].value.i > max) { virReportError(VIR_ERR_OVERFLOW, - _("migration parameter '%s' must be less than %= u"), + _("migration parameter '%1$s' must be less than= %2$u"), name, max + 1); return -1; } @@ -424,7 +424,7 @@ qemuMigrationParamsGetTPULL(qemuMigrationParams *migPar= ams, unsigned long long max =3D ULLONG_MAX / unit; if (migParams->params[param].value.ull > max) { virReportError(VIR_ERR_OVERFLOW, - _("migration parameter '%s' must be less than %= llu"), + _("migration parameter '%1$s' must be less than= %2$llu"), name, max + 1); return -1; } @@ -523,14 +523,14 @@ qemuMigrationParamsSetCompression(virTypedParameterPt= r params, method =3D qemuMigrationCompressMethodTypeFromString(params[i].val= ue.s); if (method < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Unsupported compression method '%s'"), + _("Unsupported compression method '%1$s'"), params[i].value.s); return -1; } =20 if (migParams->compMethods & (1ULL << method)) { virReportError(VIR_ERR_INVALID_ARG, - _("Compression method '%s' is specified twice"), + _("Compression method '%1$s' is specified twice= "), params[i].value.s); return -1; } @@ -1229,7 +1229,7 @@ qemuMigrationParamsCheck(virDomainObj *vm, =20 if (state && !qemuMigrationCapsGet(vm, cap)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Migration option '%s' is not supported by QE= MU binary"), + _("Migration option '%1$s' is not supported by = QEMU binary"), qemuMigrationCapabilityTypeToString(cap)); return -1; } @@ -1398,14 +1398,14 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt, =20 if ((param =3D qemuMigrationParamTypeFromString(name)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown migration parameter '%s'"), name); + _("unknown migration parameter '%1$s'"), name); return -1; } pv =3D ¶ms->params[param]; =20 if (!(value =3D virXMLPropString(nodes[i], "value"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing value for migration parameter '%s'"), + _("missing value for migration parameter '%1$s'= "), name); return -1; } @@ -1431,7 +1431,7 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt, =20 if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid value '%s' for migration parameter '= %s'"), + _("invalid value '%1$s' for migration parameter= '%2$s'"), value, name); return -1; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 1fa35f03cc..71ebd356ad 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -241,7 +241,7 @@ qemuMonitorOpenUnix(const char *monitor) addr.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.sun_path, monitor) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Monitor path %s too big for destination"), monit= or); + _("Monitor path %1$s too big for destination"), mon= itor); return -1; } =20 @@ -401,7 +401,7 @@ qemuMonitorIORead(qemuMonitor *mon) if (avail < 1024) { if (mon->bufferLength >=3D QEMU_MONITOR_MAX_RESPONSE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("QEMU monitor reply exceeds buffer size (%d b= ytes)"), + _("QEMU monitor reply exceeds buffer size (%1$d= bytes)"), QEMU_MONITOR_MAX_RESPONSE); return -1; } @@ -506,7 +506,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED, if (!error && !mon->goteof && cond & G_IO_ERR) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid file descriptor while waiting for mo= nitor (vm=3D'%s')"), mon->domainName); + _("Invalid file descriptor while waiting for mo= nitor (vm=3D'%1$s')"), mon->domainName); mon->goteof =3D true; } } @@ -532,7 +532,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED, } else { if (virGetLastErrorCode() =3D=3D VIR_ERR_OK && !mon->goteof) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while processing monitor IO (vm=3D= '%s')"), mon->domainName); + _("Error while processing monitor IO (vm=3D= '%1$s')"), mon->domainName); virCopyLastError(&mon->lastError); virResetLastError(); } @@ -636,7 +636,7 @@ qemuMonitorOpenInternal(virDomainObj *vm, mon->socket =3D g_socket_new_from_fd(fd, &gerr); if (!mon->socket) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create socket object: %s"), + _("Unable to create socket object: %1$s"), gerr->message); goto cleanup; } @@ -684,7 +684,7 @@ qemuMonitorOpen(virDomainObj *vm, =20 if (config->type !=3D VIR_DOMAIN_CHR_TYPE_UNIX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to handle monitor type: %s"), + _("unable to handle monitor type: %1$s"), virDomainChrTypeToString(config->type)); return NULL; } @@ -851,7 +851,7 @@ qemuMonitorSend(qemuMonitor *mon, } if (mon->goteof) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("End of file from qemu monitor (vm=3D'%s')"), mon= ->domainName); + _("End of file from qemu monitor (vm=3D'%1$s')"), m= on->domainName); return -1; } =20 @@ -865,7 +865,7 @@ qemuMonitorSend(qemuMonitor *mon, while (!mon->msg->finished) { if (virCondWait(&mon->notify, &mon->parent.lock) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to wait on monitor condition (vm=3D'%= s')"), mon->domainName); + _("Unable to wait on monitor condition (vm=3D'%= 1$s')"), mon->domainName); goto cleanup; } } @@ -1010,8 +1010,8 @@ qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, if (rc < 0) { if (rc =3D=3D -2) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find QOM Object path for " - "device '%s'"), videoName); + _("Failed to find QOM Object path for device '%= 1$s'"), + videoName); return -1; } =20 @@ -1040,8 +1040,8 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon, if (rc < 0) { if (rc =3D=3D -2) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find QOM Object path for " - "device '%s'"), videoName); + _("Failed to find QOM Object path for device '%= 1$s'"), + videoName); return -1; } =20 @@ -1897,7 +1897,7 @@ qemuMonitorBlockIOStatusToError(const char *status) =20 if (st < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown block IO status: %s"), status); + _("unknown block IO status: %1$s"), status); return -1; } =20 @@ -2046,7 +2046,7 @@ qemuMonitorTypeToProtocol(int type) return "spice"; default: virReportError(VIR_ERR_INVALID_ARG, - _("unsupported protocol type %s"), + _("unsupported protocol type %1$s"), virDomainGraphicsTypeToString(type)); return NULL; } @@ -2683,7 +2683,7 @@ qemuMonitorAddObject(qemuMonitor *mon, =20 if (!id || !type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing alias or qom-type for qemu object '%s'"), + _("missing alias or qom-type for qemu object '%1$s'= "), NULLSTR(type)); return -1; } diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 8e70b8f78d..3482972600 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -49,7 +49,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitor *mon, strstr(reply, "Error: ") || (strstr(reply, "Error") && strstr(reply, "while writing VM"))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to take snapshot: %s"), reply); + _("Failed to take snapshot: %1$s"), reply); return -1; } else if (strstr(reply, "No block device can accept snapshots")) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", @@ -80,7 +80,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitor *mon, const= char *name) (strstr(reply, "Error") && strstr(reply, "while deleting snapshot"))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to delete snapshot: %s"), reply); + _("Failed to delete snapshot: %1$s"), reply); return -1; } =20 diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index 89d631ee5a..ba0e831178 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu_namespace.c @@ -283,7 +283,7 @@ qemuDomainSetupDisk(virStorageSource *src, if (virDevMapperGetTargets(next->path, &targetPaths) < 0 && errno !=3D ENOSYS) { virReportSystemError(errno, - _("Unable to get devmapper targets fo= r %s"), + _("Unable to get devmapper targets fo= r %1$s"), next->path); return -1; } @@ -778,7 +778,7 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg, =20 if (stat(devMountsPath[i], &sb) < 0) { virReportSystemError(errno, - _("Unable to stat: %s"), + _("Unable to stat: %1$s"), devMountsPath[i]); goto cleanup; } @@ -789,7 +789,7 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg, if ((S_ISDIR(sb.st_mode) && g_mkdir_with_parents(devMountsSavePath= [i], 0777) < 0) || (!S_ISDIR(sb.st_mode) && virFileTouch(devMountsSavePath[i], sb= .st_mode) < 0)) { virReportSystemError(errno, - _("Failed to create %s"), + _("Failed to create %1$s"), devMountsSavePath[i]); goto cleanup; } @@ -816,21 +816,21 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg, =20 if (stat(devMountsSavePath[i], &sb) < 0) { virReportSystemError(errno, - _("Unable to stat: %s"), + _("Unable to stat: %1$s"), devMountsSavePath[i]); goto cleanup; } =20 if (S_ISDIR(sb.st_mode)) { if (g_mkdir_with_parents(devMountsPath[i], 0777) < 0) { - virReportSystemError(errno, _("Cannot create %s"), + virReportSystemError(errno, _("Cannot create %1$s"), devMountsPath[i]); goto cleanup; } } else { if (virFileMakeParentPath(devMountsPath[i]) < 0 || virFileTouch(devMountsPath[i], sb.st_mode) < 0) { - virReportSystemError(errno, _("Cannot create %s"), + virReportSystemError(errno, _("Cannot create %1$s"), devMountsPath[i]); goto cleanup; } @@ -878,7 +878,7 @@ qemuDomainEnableNamespace(virDomainObj *vm, =20 if (virBitmapSetBit(priv->namespaces, ns) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to enable namespace: %s"), + _("Unable to enable namespace: %1$s"), qemuDomainNamespaceTypeToString(ns)); return -1; } @@ -1006,7 +1006,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) =20 if (virFileMakeParentPath(data->file) < 0) { virReportSystemError(errno, - _("Unable to create %s"), data->file); + _("Unable to create %1$s"), data->file); goto cleanup; } =20 @@ -1026,14 +1026,14 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) if (unlink(data->file) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove symlink %s"), + _("Unable to remove symlink %1$s"), data->file); goto cleanup; } =20 if (symlink(data->target, data->file) < 0) { virReportSystemError(errno, - _("Unable to create symlink %s (point= ing to %s)"), + _("Unable to create symlink %1$s (poi= nting to %2$s)"), data->file, data->target); goto cleanup; } else { @@ -1053,7 +1053,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) unlink(data->file); if (mknod(data->file, data->sb.st_mode, data->sb.st_rdev) < 0)= { virReportSystemError(errno, - _("Unable to create device %s"), + _("Unable to create device %1$s"), data->file); goto cleanup; } else { @@ -1068,7 +1068,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) if (umount(data->file) < 0 && errno !=3D ENOENT && errno !=3D EINVAL) { virReportSystemError(errno, - _("Unable to umount %s"), + _("Unable to umount %1$s"), data->file); goto cleanup; } @@ -1080,14 +1080,14 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) * proper owner and mode. Move the mount only after that. */ } else { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("unsupported device type %s 0%o"), + _("unsupported device type %1$s 0%2$o"), data->file, data->sb.st_mode); goto cleanup; } =20 if (lchown(data->file, data->sb.st_uid, data->sb.st_gid) < 0) { virReportSystemError(errno, - _("Failed to chown device %s"), + _("Failed to chown device %1$s"), data->file); goto cleanup; } @@ -1096,7 +1096,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) if (!isLink && chmod(data->file, data->sb.st_mode) < 0) { virReportSystemError(errno, - _("Failed to set permissions for device %s"), + _("Failed to set permissions for device %1$s"= ), data->file); goto cleanup; } @@ -1105,7 +1105,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) virFileSetACLs(data->file, data->acl) < 0 && errno !=3D ENOTSUP) { virReportSystemError(errno, - _("Unable to set ACLs on %s"), data->file); + _("Unable to set ACLs on %1$s"), data->file); goto cleanup; } =20 @@ -1116,7 +1116,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) if (errno !=3D EOPNOTSUPP && errno !=3D ENOTSUP) { VIR_WARNINGS_RESET virReportSystemError(errno, - _("Unable to set SELinux label on %s"), + _("Unable to set SELinux label on %1$s"), data->file); goto cleanup; } @@ -1196,7 +1196,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *it= em, return -2; =20 virReportSystemError(errno, - _("Unable to access %s"), file); + _("Unable to access %1$s"), file); return -1; } =20 @@ -1213,7 +1213,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *it= em, =20 if (!(target =3D g_file_read_link(file, &gerr))) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("failed to resolve symlink %s: %s"), file, ge= rr->message); + _("failed to resolve symlink %1$s: %2$s"), file= , gerr->message); return -1; } =20 @@ -1238,7 +1238,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *it= em, virFileGetACLs(file, &item->acl) < 0 && errno !=3D ENOTSUP) { virReportSystemError(errno, - _("Unable to get ACLs on %s"), file); + _("Unable to get ACLs on %1$s"), file); return -1; } =20 @@ -1246,7 +1246,7 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItem *it= em, if (lgetfilecon_raw(file, &item->tcon) < 0 && (errno !=3D ENOTSUP && errno !=3D ENODATA)) { virReportSystemError(errno, - _("Unable to get SELinux label from %s"), fil= e); + _("Unable to get SELinux label from %1$s"), f= ile); return -1; } # endif @@ -1307,7 +1307,7 @@ qemuNamespacePrepareOneItem(qemuNamespaceMknodData *d= ata, =20 if (ttl-- =3D=3D 0) { virReportSystemError(ELOOP, - _("Too many levels of symbolic links: %s"= ), + _("Too many levels of symbolic links: %1$= s"), next); return -1; } @@ -1413,7 +1413,7 @@ qemuNamespaceUnlinkHelper(pid_t pid G_GNUC_UNUSED, VIR_DEBUG("Unlinking %s", path); if (unlink(path) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove device %s"), path); + _("Unable to remove device %1$s"), path); return -1; } } diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index 0afa8bdb3a..e7dfc8ce61 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c @@ -229,7 +229,7 @@ qemuPasstStart(virDomainObj *vm, } else { /* validation guarantees this will never happen */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid portForward proto value %u"), pf->pr= oto); + _("Invalid portForward proto value %1$u"), pf->= proto); return -1; } =20 diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 500d3c50b3..184c0a965f 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -498,11 +498,11 @@ virQEMUQAPISchemaPathGet(const char *query, =20 if (rc =3D=3D -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed QAPI schema when querying '%s' of '%s'= "), + _("malformed QAPI schema when querying '%1$s' of '%= 2$s'"), NULLSTR(ctxt.prevquery), query); } else if (rc =3D=3D -3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("terminal QAPI query component '%s' of '%s' must = not have followers"), + _("terminal QAPI query component '%1$s' of '%2$s' m= ust not have followers"), NULLSTR(ctxt.prevquery), query); } =20 diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index ef62303728..41310d6a9a 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src/qemu/qemu_saveimage.c @@ -172,14 +172,14 @@ virQEMUSaveDataWrite(virQEMUSaveData *data, =20 if (safewrite(fd, header, sizeof(*header)) !=3D sizeof(*header)) { virReportSystemError(errno, - _("failed to write header to domain save file= '%s'"), + _("failed to write header to domain save file= '%1$s'"), path); return -1; } =20 if (safewrite(fd, data->xml, xml_len) !=3D xml_len) { virReportSystemError(errno, - _("failed to write domain xml to '%s'"), + _("failed to write domain xml to '%1$s'"), path); return -1; } @@ -187,14 +187,14 @@ virQEMUSaveDataWrite(virQEMUSaveData *data, if (data->cookie && safewrite(fd, data->cookie, cookie_len) !=3D cookie_len) { virReportSystemError(errno, - _("failed to write cookie to '%s'"), + _("failed to write cookie to '%1$s'"), path); return -1; } =20 if (safewrite(fd, zeros, zerosLen) !=3D zerosLen) { virReportSystemError(errno, - _("failed to write padding to '%s'"), + _("failed to write padding to '%1$s'"), path); return -1; } @@ -215,7 +215,7 @@ virQEMUSaveDataFinish(virQEMUSaveData *data, if (safewrite(*fd, header, sizeof(*header)) !=3D sizeof(*header) || VIR_CLOSE(*fd) < 0) { virReportSystemError(errno, - _("failed to write header to domain save file= '%s'"), + _("failed to write header to domain save file= '%1$s'"), path); return -1; } @@ -232,7 +232,7 @@ qemuSaveImageGetCompressionCommand(virQEMUSaveFormat co= mpression) =20 if (!prog) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Invalid compressed save format %d"), + _("Invalid compressed save format %1$d"), compression); return NULL; } @@ -304,7 +304,7 @@ qemuSaveImageCreate(virQEMUDriver *driver, * trigger a single page of file system cache pollution, but * that's acceptable. */ if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("unable to close %s"), path); + virReportSystemError(errno, _("unable to close %1$s"), path); goto cleanup; } =20 @@ -387,8 +387,7 @@ qemuSaveImageGetCompressionProgram(const char *imageFor= mat, styleFormat); else virReportError(VIR_ERR_OPERATION_FAILED, - _("Invalid %s image format specified " - "in configuration file"), + _("Invalid %1$s image format specified in confi= guration file"), styleFormat); } else { if (use_raw_on_fail) @@ -397,8 +396,7 @@ qemuSaveImageGetCompressionProgram(const char *imageFor= mat, styleFormat); else virReportError(VIR_ERR_OPERATION_FAILED, - _("Compression program for %s image format " - "in configuration file isn't available"), + _("Compression program for %1$s image format in= configuration file isn't available"), styleFormat); } =20 @@ -473,7 +471,7 @@ qemuSaveImageOpen(virQEMUDriver *driver, if (unlink_corrupt) { if (unlink(path) < 0) { virReportSystemError(errno, - _("cannot remove corrupt file: %s"), + _("cannot remove corrupt file: %1$s"), path); return -1; } else { @@ -491,7 +489,7 @@ qemuSaveImageOpen(virQEMUDriver *driver, if (unlink_corrupt) { if (unlink(path) < 0) { virReportSystemError(errno, - _("cannot remove corrupt file: %s= "), + _("cannot remove corrupt file: %1= $s"), path); return -1; } else { @@ -516,14 +514,14 @@ qemuSaveImageOpen(virQEMUDriver *driver, =20 if (header->version > QEMU_SAVE_VERSION) { virReportError(VIR_ERR_OPERATION_FAILED, - _("image version is not supported (%d > %d)"), + _("image version is not supported (%1$d > %2$d)"), header->version, QEMU_SAVE_VERSION); return -1; } =20 if (header->data_len <=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("invalid header data length: %d"), header->data_l= en); + _("invalid header data length: %1$d"), header->data= _len); return -1; } =20 @@ -654,7 +652,7 @@ qemuSaveImageStartVM(virConnectPtr conn, virErrorRestore(&orig_err); } if (VIR_CLOSE(*fd) < 0) { - virReportSystemError(errno, _("cannot close file: %s"), path); + virReportSystemError(errno, _("cannot close file: %1$s"), path); rc =3D -1; } =20 diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 9697542cd3..972d1f45c1 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@ -101,7 +101,7 @@ qemuSlirpNewForHelper(const char *helper) slirp =3D qemuSlirpNew(); if (!slirp) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to allocate slirp for '%s'"), helper); + _("Failed to allocate slirp for '%1$s'"), helper); return NULL; } =20 @@ -113,7 +113,7 @@ qemuSlirpNewForHelper(const char *helper) if (!(doc =3D virJSONValueFromString(output)) || !(featuresJSON =3D virJSONValueObjectGetArray(doc, "features"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse json capabilities '%s'"), + _("unable to parse json capabilities '%1$s'"), helper); return NULL; } @@ -331,7 +331,7 @@ qemuSlirpStart(virDomainObj *vm, rc =3D virPidFileReadPath(pidfile, &pid); if (rc < 0) { virReportSystemError(-rc, - _("Unable to read slirp pidfile '%s'"), + _("Unable to read slirp pidfile '%1$s'"), pidfile); goto error; } diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 7aa4195f04..1a013d792a 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -84,7 +84,7 @@ qemuSnapObjFromName(virDomainObj *vm, snap =3D virDomainSnapshotFindByName(vm->snapshots, name); if (!snap) virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("no domain snapshot with matching name '%s'"), + _("no domain snapshot with matching name '%1$s'"), name); =20 return snap; @@ -347,8 +347,8 @@ qemuSnapshotPrepareDiskShared(virDomainSnapshotDiskDef = *snapdisk, =20 if (!qemuBlockStorageSourceSupportsConcurrentAccess(snapdisk->src)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("shared access for disk '%s' requires use of " - "supported storage format"), domdisk->dst); + _("shared access for disk '%1$s' requires use of su= pported storage format"), + domdisk->dst); return -1; } =20 @@ -386,8 +386,7 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapsh= otDiskDef *snapdisk, case VIR_STORAGE_NET_PROTOCOL_NFS: case VIR_STORAGE_NET_PROTOCOL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("external inactive snapshots are not supporte= d on " - "'network' disks using '%s' protocol"), + _("external inactive snapshots are not supporte= d on 'network' disks using '%1$s' protocol"), virStorageNetProtocolTypeToString(domdisk->src-= >protocol)); return -1; } @@ -400,8 +399,8 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapsh= otDiskDef *snapdisk, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("external inactive snapshots are not supported on= " - "'%s' disks"), virStorageTypeToString(domDiskType= )); + _("external inactive snapshots are not supported on= '%1$s' disks"), + virStorageTypeToString(domDiskType)); return -1; } =20 @@ -418,8 +417,8 @@ qemuSnapshotPrepareDiskExternalInactive(virDomainSnapsh= otDiskDef *snapdisk, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("external inactive snapshots are not supported on= " - "'%s' disks"), virStorageTypeToString(snapDiskTyp= e)); + _("external inactive snapshots are not supported on= '%1$s' disks"), + virStorageTypeToString(snapDiskType)); return -1; } =20 @@ -462,8 +461,8 @@ qemuSnapshotPrepareDiskExternalActive(virDomainSnapshot= DiskDef *snapdisk, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("external active snapshots are not supported on " - "'%s' disks"), virStorageTypeToString(actualType)= ); + _("external active snapshots are not supported on '= %1$s' disks"), + virStorageTypeToString(actualType)); return -1; } =20 @@ -510,21 +509,21 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *dis= k, if (rc < 0) { if (err !=3D ENOENT) { virReportSystemError(err, - _("unable to stat for disk %s: %s"), + _("unable to stat for disk %1$s: %2$s= "), snapdisk->name, snapdisk->src->path); return -1; } =20 if (reuse) { virReportSystemError(err, - _("missing existing file for disk %s:= %s"), + _("missing existing file for disk %1$= s: %2$s"), snapdisk->name, snapdisk->src->path); return -1; } =20 if (snapdisk->src->type =3D=3D VIR_STORAGE_TYPE_BLOCK) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("block device snapshot target '%s' doesn'= t exist"), + _("block device snapshot target '%1$s' does= n't exist"), snapdisk->src->path); return -1; } @@ -533,7 +532,7 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk, if ((snapdisk->src->type =3D=3D VIR_STORAGE_TYPE_BLOCK && !S_I= SBLK(st.st_mode)) || (snapdisk->src->type =3D=3D VIR_STORAGE_TYPE_FILE && !S_IS= REG(st.st_mode))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("mismatch between configured type for sna= pshot disk '%s' and the type of existing file '%s'"), + _("mismatch between configured type for sna= pshot disk '%1$s' and the type of existing file '%2$s'"), snapdisk->name, snapdisk->src->path); return -1; } @@ -542,7 +541,7 @@ qemuSnapshotPrepareDiskExternal(virDomainDiskDef *disk, snapdisk->src->type =3D=3D VIR_STORAGE_TYPE_FILE && st.st_size > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("external snapshot file for disk %s alrea= dy exists and is not a block device: %s"), + _("external snapshot file for disk %1$s alr= eady exists and is not a block device: %2$s"), snapdisk->name, snapdisk->src->path); return -1; } @@ -591,8 +590,7 @@ qemuSnapshotPrepareDiskInternal(virDomainDiskDef *disk, case VIR_STORAGE_NET_PROTOCOL_NFS: case VIR_STORAGE_NET_PROTOCOL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("internal inactive snapshots are not supporte= d on " - "'network' disks using '%s' protocol"), + _("internal inactive snapshots are not supporte= d on 'network' disks using '%1$s' protocol"), virStorageNetProtocolTypeToString(disk->src->pr= otocol)); return -1; } @@ -605,8 +603,8 @@ qemuSnapshotPrepareDiskInternal(virDomainDiskDef *disk, case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("internal inactive snapshots are not supported on= " - "'%s' disks"), virStorageTypeToString(actualType)= ); + _("internal inactive snapshots are not supported on= '%1$s' disks"), + virStorageTypeToString(actualType)); return -1; } =20 @@ -641,8 +639,7 @@ qemuSnapshotPrepare(virDomainObj *vm, =20 if (def->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT && act= ive) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("active qemu domains require external dis= k " - "snapshots; disk %s requested internal"), + _("active qemu domains require external dis= k snapshots; disk %1$s requested internal"), disk->name); return -1; } @@ -654,8 +651,7 @@ qemuSnapshotPrepare(virDomainObj *vm, if (dom_disk->src->format > 0 && dom_disk->src->format !=3D VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("internal snapshot for disk %s unsupporte= d " - "for storage type %s"), + _("internal snapshot for disk %1$s unsuppor= ted for storage type %2$s"), disk->name, virStorageFileFormatTypeToString(dom_disk->= src->format)); return -1; @@ -668,8 +664,7 @@ qemuSnapshotPrepare(virDomainObj *vm, } else if (disk->src->format !=3D VIR_STORAGE_FILE_QCOW2 && disk->src->format !=3D VIR_STORAGE_FILE_QED) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("external snapshot format for disk %s " - "is unsupported: %s"), + _("external snapshot format for disk %1$s i= s unsupported: %2$s"), disk->name, virStorageFileFormatTypeToString(disk->src-= >format)); return -1; @@ -1030,7 +1025,7 @@ qemuSnapshotDiskPrepareOne(qemuSnapshotDiskContext *s= napctxt, /* pre-create the image file so that we can label it before ha= nding it to qemu */ if (dd->src->type !=3D VIR_STORAGE_TYPE_BLOCK) { if (virStorageSourceCreate(dd->src) < 0) { - virReportSystemError(errno, _("failed to create image = file '%s'"), + virReportSystemError(errno, _("failed to create image = file '%1$s'"), NULLSTR(dd->src->path)); return -1; } @@ -1112,7 +1107,7 @@ qemuSnapshotGetTransientDiskDef(virDomainDiskDef *dom= disk, =20 if (virFileExists(snapdisk->src->path)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Overlay file '%s' for transient disk '%s' alread= y exists"), + _("Overlay file '%1$s' for transient disk '%2$s' al= ready exists"), snapdisk->src->path, domdisk->dst); return NULL; } @@ -1461,16 +1456,14 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm, if (!(flags & VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA)) { if (strchr(def->parent.name, '/')) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid snapshot name '%s': " - "name can't contain '/'"), + _("invalid snapshot name '%1$s': name can't con= tain '/'"), def->parent.name); return -1; } =20 if (def->parent.name[0] =3D=3D '.') { virReportError(VIR_ERR_XML_DETAIL, - _("invalid snapshot name '%s': " - "name can't start with '.'"), + _("invalid snapshot name '%1$s': name can't sta= rt with '.'"), def->parent.name); return -1; } @@ -1499,7 +1492,7 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm, =20 case VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT: if (!redefine) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state= %1$s"), virDomainSnapshotStateTypeToString(state)); return -1; } @@ -1515,7 +1508,7 @@ qemuSnapshotCreateXMLValidateDef(virDomainObj *vm, case VIR_DOMAIN_SNAPSHOT_NOSTATE: case VIR_DOMAIN_SNAPSHOT_BLOCKED: /* invalid state, unused in qemu */ case VIR_DOMAIN_SNAPSHOT_LAST: - virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %s"= ), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid domain state %1$= s"), virDomainSnapshotStateTypeToString(state)); return -1; } @@ -1595,7 +1588,7 @@ qemuSnapshotCreateWriteMetadata(virDomainObj *vm, driver->xmlopt, cfg->snapshotDir) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to save metadata for snapshot %s"), + _("unable to save metadata for snapshot %1$s"), snap->def->name); return -1; } @@ -1821,7 +1814,7 @@ qemuSnapshotRevertValidate(virDomainObj *vm, =20 if (!snap->def->dom) { virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, - _("snapshot '%s' lacks domain '%s' rollback info"), + _("snapshot '%1$s' lacks domain '%2$s' rollback inf= o"), snap->def->name, vm->def->name); return -1; } @@ -2219,8 +2212,7 @@ qemuSnapshotRevert(virDomainObj *vm, case VIR_DOMAIN_SNAPSHOT_BLOCKED: case VIR_DOMAIN_SNAPSHOT_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid target domain state '%s'. Refusing " - "snapshot reversion"), + _("Invalid target domain state '%1$s'. Refusing sna= pshot reversion"), virDomainSnapshotStateTypeToString(snapdef->state)); goto endjob; } @@ -2319,7 +2311,7 @@ qemuSnapshotDeleteExternalPrepare(virDomainObj *vm, =20 if (snapDisk->snapshotDeleteInProgress) { virReportError(VIR_ERR_OPERATION_INVALID, - _("snapshot disk '%s' was target of not complet= ed snapshot delete"), + _("snapshot disk '%1$s' was target of not compl= eted snapshot delete"), snapDisk->name); return -1; } @@ -2335,7 +2327,7 @@ qemuSnapshotDeleteExternalPrepare(virDomainObj *vm, data->snapDisk->name); if (!data->parentDomDisk) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to find disk '%s' in snapshot VM XML"= ), + _("failed to find disk '%1$s' in snapshot VM XM= L"), snapDisk->name); return -1; } @@ -2727,7 +2719,7 @@ qemuSnapshotDiscardExternal(virDomainObj *vm, =20 if (data->job->state =3D=3D QEMU_BLOCKJOB_STATE_FAILED) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("block commit failed while deleting disk '%s'= snapshot: '%s'"), + _("block commit failed while deleting disk '%1$= s' snapshot: '%2$s'"), data->snapDisk->name, data->job->errmsg); goto error; } @@ -2749,7 +2741,7 @@ qemuSnapshotDiscardExternal(virDomainObj *vm, =20 if (data->job->state =3D=3D QEMU_BLOCKJOB_STATE_FAILED) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("finishing block job failed while deleting di= sk '%s' snapshot: '%s'"), + _("finishing block job failed while deleting di= sk '%1$s' snapshot: '%2$s'"), data->snapDisk->name, data->job->errmsg); goto error; } @@ -3079,7 +3071,7 @@ qemuSnapshotDeleteValidate(virDomainObj *vm, =20 if (!virStorageSourceIsSameLocation(vmdisk->src, disk->src)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("disk image '%s' for internal snapshot '%= s' is not the same as disk image currently used by VM"), + _("disk image '%1$s' for internal snapshot = '%2$s' is not the same as disk image currently used by VM"), snapDisk->name, snap->def->name); return -1; } diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index f4344de663..4d72c936dc 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -179,7 +179,7 @@ qemuTPMEmulatorCreateStorage(virDomainTPMDef *tpm, /* allow others to cd into this dir */ if (g_mkdir_with_parents(swtpmStorageDir, 0711) < 0) { virReportSystemError(errno, - _("Could not create TPM directory %s"), + _("Could not create TPM directory %1$s"), swtpmStorageDir); return -1; } @@ -192,7 +192,7 @@ qemuTPMEmulatorCreateStorage(virDomainTPMDef *tpm, if (virDirCreate(storagepath, 0700, swtpm_user, swtpm_group, VIR_DIR_CREATE_ALLOW_EXIST) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not create directory %s as %u:%d"), + _("Could not create directory %1$s as %2$u:%3$d"), storagepath, swtpm_user, swtpm_group); return -1; } @@ -294,8 +294,7 @@ qemuTPMCreateConfigFiles(const char *swtpm_setup) return -1; if (exitstatus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not run '%s' to create config files. " - "exitstatus: %d;\nError: %s"), + _("Could not run '%1$s' to create config files. exi= tstatus: %2$d;\nError: %3$s"), swtpm_setup, exitstatus, errbuf); return -1; } @@ -323,8 +322,8 @@ qemuTPMVirCommandAddEncryption(virCommand *cmd, =20 if (!virTPMSwtpmSetupCapsGet(VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_PWDFIL= E_FD)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("%s does not support passing a passphrase using a file " - "descriptor"), swtpm_setup); + _("%1$s does not support passing a passphrase using= a file descriptor"), + swtpm_setup); return -1; } =20 @@ -436,8 +435,7 @@ qemuTPMEmulatorRunSetup(const char *storagepath, =20 if (virCommandRun(cmd, &exitstatus) < 0 || exitstatus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not run '%s'. exitstatus: %d; " - "Check error log '%s' for details."), + _("Could not run '%1$s'. exitstatus: %2$d; Check er= ror log '%3$s' for details."), swtpm_setup, exitstatus, logfile); return -1; } @@ -523,8 +521,7 @@ qemuTPMEmulatorReconfigure(const char *storagepath, =20 if (virCommandRun(cmd, &exitstatus) < 0 || exitstatus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not run '%s --reconfigure'. exitstatus: %d= ; " - "Check error log '%s' for details."), + _("Could not run '%1$s --reconfigure'. exitstatus: = %2$d; Check error log '%3$s' for details."), swtpm_setup, exitstatus, logfile); return -1; } @@ -636,8 +633,8 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, if (tpm->data.emulator.hassecretuuid) { if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("%s does not support passing passphrase via file descr= iptor"), - swtpm); + _("%1$s does not support passing passphrase via= file descriptor"), + swtpm); goto error; } =20 @@ -674,8 +671,8 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, */ if (incomingMigration && on_shared_storage) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("%s (on destination side) does not support the --migrati= on option needed for migration with shared storage"), - swtpm); + _("%1$s (on destination side) does not support = the --migration option needed for migration with shared storage"), + swtpm); goto error; } } @@ -809,7 +806,7 @@ qemuTPMEmulatorPrepareHost(virDomainTPMDef *tpm, /* ... and make sure it can be accessed by swtpm_user */ if (chown(tpm->data.emulator.logfile, swtpm_user, swtpm_group) < 0) { virReportSystemError(errno, - _("Could not chown on swtpm logfile %s"), + _("Could not chown on swtpm logfile %1$s"), tpm->data.emulator.logfile); return -1; } @@ -988,7 +985,7 @@ qemuTPMEmulatorStart(virQEMUDriver *driver, _("swtpm died unexpectedly")); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("swtpm died and reported: %s"), errbuf); + _("swtpm died and reported: %1$s"), errbuf); } goto error; } diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c index 7539afd50a..0294daab80 100644 --- a/src/qemu/qemu_vhost_user.c +++ b/src/qemu/qemu_vhost_user.c @@ -150,7 +150,7 @@ qemuVhostUserTypeParse(const char *path, =20 if ((tmp =3D qemuVhostUserTypeTypeFromString(type)) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown vhost-user type: '%s'"), + _("unknown vhost-user type: '%1$s'"), type); return -1; } @@ -189,7 +189,7 @@ qemuVhostUserParse(const char *path) =20 if (!(doc =3D virJSONValueFromString(cont))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse json file '%s'"), + _("unable to parse json file '%1$s'"), path); return NULL; } @@ -285,7 +285,7 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu, =20 if (!(featuresJSON =3D virJSONValueObjectGetArray(doc, "features"))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get features from '%s'"), + _("failed to get features from '%1$s'"), vu->binary); return -1; } @@ -359,7 +359,7 @@ qemuVhostUserFillDomainGPU(virQEMUDriver *driver, =20 if (!(doc =3D virJSONValueFromString(output))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse json capabilities '%s'"), + _("unable to parse json capabilities '%1$s'"), vu->binary); continue; } diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c index 5b49ef4e28..dbac4a2153 100644 --- a/src/qemu/qemu_vhost_user_gpu.c +++ b/src/qemu/qemu_vhost_user_gpu.c @@ -158,7 +158,7 @@ int qemuExtVhostUserGPUStart(virQEMUDriver *driver, rc =3D virPidFileReadPath(pidfile, &pid); if (rc < 0) { virReportSystemError(-rc, - _("Unable to read vhost-user-gpu pidfile '%s'= "), + _("Unable to read vhost-user-gpu pidfile '%1$= s'"), pidfile); goto cleanup; } diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index cd947bebfd..230f85c291 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -190,14 +190,14 @@ qemuVirtioFSStart(virQEMUDriver *driver, =20 if (!virFileIsExecutable(fs->binary)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("virtiofsd binary '%s' is not executable"), + _("virtiofsd binary '%1$s' is not executable"), fs->binary); return -1; } =20 if (!virFileExists(fs->src->path)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("the virtiofs export directory '%s' does not exis= t"), + _("the virtiofs export directory '%1$s' does not ex= ist"), fs->src->path); return -1; } @@ -228,12 +228,12 @@ qemuVirtioFSStart(virQEMUDriver *driver, goto error; } else { if ((logfd =3D open(logpath, O_WRONLY | O_CREAT | O_APPEND, S_IRUS= R | S_IWUSR)) < 0) { - virReportSystemError(errno, _("failed to create logfile %s"), + virReportSystemError(errno, _("failed to create logfile %1$s"), logpath); goto error; } if (virSetCloseExec(logfd) < 0) { - virReportSystemError(errno, _("failed to set close-on-exec fla= g on %s"), + virReportSystemError(errno, _("failed to set close-on-exec fla= g on %1$s"), logpath); goto error; } @@ -276,7 +276,7 @@ qemuVirtioFSStart(virQEMUDriver *driver, rc =3D virPidFileReadPath(pidfile, &pid); if (rc < 0) { virReportSystemError(-rc, - _("Unable to read virtiofsd pidfile '%s'"), + _("Unable to read virtiofsd pidfile '%1$s'"), pidfile); goto error; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464847; cv=none; d=zohomail.com; s=zohoarc; b=WIZgEmPwdE1Vdy45a0oS1A45uTXiFEpMFczY0spksqsDFzV6/ZivtwyY2+s4tm+XahjIj6lUxlbgb+E+d/K6uKTfILDUpqh5PRTbqwgns70BdypipSDIu/uRDRybdXq8KLgi2NZASfsPYVJ9VkILNnBkZfbmc3FC5FVkh3m7paI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464847; 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=V/Wm9di+mvjX1Lw0cLCsgNGrtPDSCBo5mFzox2G98go=; b=RMaZLYCVb1yo1Y+o1ZYX1NRGe7p+2cQXU7r4/kAeRJLygOFYW+GTf4/YnxzOm+nYaqnRa6w47xpR6pXuwyREeuHT8nLS632Ovj+0/4jrKN8n4ZMQN3ijzp0cpROvu0PelKcKWfDQ6UElJpf3cPZyoiPZwJQ2UZbDS95khGLQt1U= 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 1678464847496781.9580755958698; Fri, 10 Mar 2023 08:14:07 -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-619-4TanlPraNxGB8cCuVg0Emw-1; Fri, 10 Mar 2023 11:11:37 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BEF6E3C20EE5; Fri, 10 Mar 2023 16:10:57 +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 A6EAA140EBF6; Fri, 10 Mar 2023 16:10:57 +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 962DC1946A69; Fri, 10 Mar 2023 16:10:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 48D5E1946587 for ; Fri, 10 Mar 2023 16:10:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3E65E1121318; Fri, 10 Mar 2023 16:10:56 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC0821121315 for ; Fri, 10 Mar 2023 16:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464846; 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=V/Wm9di+mvjX1Lw0cLCsgNGrtPDSCBo5mFzox2G98go=; b=bIIFjZlL7H4TwMcTVtYJCj3RLJy+P3ov3+to1LYjlENqrZGBi5TpBecPYATjl7VX4ulmai tr2fakP3Aj0QEUdW2lNnoF7zaypzca2kgSsLyOr7QJokEO2h5PQchK9/MZzKXpAQHrfzW5 qPBMlODzYpFQ+Fna9ODmukJUtgELu8E= X-MC-Unique: 4TanlPraNxGB8cCuVg0Emw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 33/51] remote: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:49 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.7 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: 1678464848309100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/remote/remote_daemon.c | 20 +++---- src/remote/remote_daemon_config.c | 4 +- src/remote/remote_daemon_dispatch.c | 75 ++++++++++++------------ src/remote/remote_daemon_stream.c | 4 +- src/remote/remote_driver.c | 88 ++++++++++++++--------------- src/remote/remote_sockets.c | 5 +- src/remote/remote_ssh_helper.c | 16 +++--- 7 files changed, 105 insertions(+), 107 deletions(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 4f14187bef..d880711c91 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -250,17 +250,17 @@ daemonSetupNetworking(virNetServer *srv, } =20 if (virStrToLong_i(config->unix_sock_ro_perms, NULL, 8, &unix_sock_ro_= mask) !=3D 0) { - VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_ro_per= ms); + VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_ro_p= erms); return -1; } =20 if (virStrToLong_i(config->unix_sock_admin_perms, NULL, 8, &unix_sock_= adm_mask) !=3D 0) { - VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_admin_= perms); + VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_admi= n_perms); return -1; } =20 if (virStrToLong_i(config->unix_sock_rw_perms, NULL, 8, &unix_sock_rw_= mask) !=3D 0) { - VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_rw_per= ms); + VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_rw_p= erms); return -1; } =20 @@ -682,18 +682,18 @@ daemonSetupHostUUID(const struct daemonConfig *config) return 0; } else if (STREQ(config->host_uuid_source, "machine-id")) { if (virFileReadBufQuiet(machine_id, buf, sizeof(buf)) < 0) { - VIR_ERROR(_("Can't read %s"), machine_id); + VIR_ERROR(_("Can't read %1$s"), machine_id); return -1; } =20 uuid =3D buf; } else { - VIR_ERROR(_("invalid UUID source: %s"), config->host_uuid_source); + VIR_ERROR(_("invalid UUID source: %1$s"), config->host_uuid_source= ); return -1; } =20 if (virSetHostUUIDStr(uuid)) { - VIR_ERROR(_("invalid host UUID: %s"), uuid); + VIR_ERROR(_("invalid host UUID: %1$s"), uuid); return -1; } =20 @@ -915,7 +915,7 @@ int main(int argc, char **argv) { /* Read the config file if it exists */ if (remote_config_file && daemonConfigLoadFile(config, remote_config_file, implicit_conf) < = 0) { - VIR_ERROR(_("Can't load config file: %s: %s"), + VIR_ERROR(_("Can't load config file: %1$s: %2$s"), virGetLastErrorMessage(), remote_config_file); exit(EXIT_FAILURE); } @@ -977,13 +977,13 @@ int main(int argc, char **argv) { =20 if (godaemon) { if (chdir("/") < 0) { - VIR_ERROR(_("cannot change to root directory: %s"), + VIR_ERROR(_("cannot change to root directory: %1$s"), g_strerror(errno)); goto cleanup; } =20 if ((statuswrite =3D virDaemonForkIntoBackground(argv[0])) < 0) { - VIR_ERROR(_("Failed to fork as daemon: %s"), + VIR_ERROR(_("Failed to fork as daemon: %1$s"), g_strerror(errno)); goto cleanup; } @@ -1007,7 +1007,7 @@ int main(int argc, char **argv) { old_umask =3D umask(077); VIR_DEBUG("Ensuring run dir '%s' exists", run_dir); if (g_mkdir_with_parents(run_dir, 0777) < 0) { - VIR_ERROR(_("unable to create rundir %s: %s"), run_dir, + VIR_ERROR(_("unable to create rundir %1$s: %2$s"), run_dir, g_strerror(errno)); ret =3D VIR_DAEMON_ERR_RUNDIR; goto cleanup; diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_c= onfig.c index 3567e337c4..2a41c27dfc 100644 --- a/src/remote/remote_daemon_config.c +++ b/src/remote/remote_daemon_config.c @@ -62,7 +62,7 @@ remoteConfigGetAuth(virConf *conf, *auth =3D VIR_NET_SERVER_SERVICE_AUTH_POLKIT; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s: %s: unsupported auth %s"), + _("%1$s: %2$s: unsupported auth %3$s"), filename, key, authstr); VIR_FREE(authstr); return -1; @@ -306,7 +306,7 @@ daemonConfigLoadOptions(struct daemonConfig *data, return -1; } else if (rc > 0 && data->tcp_min_ssf < SSF_WARNING_LEVEL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("minimum SSF levels lower than %d are not support= ed"), + _("minimum SSF levels lower than %1$d are not suppo= rted"), SSF_WARNING_LEVEL); return -1; } diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 0d843d63f6..b376dacdfe 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -55,7 +55,7 @@ VIR_LOG_INIT("daemon.remote"); do { \ if ((_from) !=3D (_type)(_from)) { \ virReportError(VIR_ERR_OVERFLOW, \ - _("conversion from hyper to %s overflowed"), \ + _("conversion from hyper to %1$s overflowed"), \ #_type); \ goto cleanup; \ } \ @@ -2150,7 +2150,7 @@ remoteDispatchConnectOpen(virNetServer *server G_GNUC= _UNUSED, priv->secretURI =3D "secret:///session"; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected driver type '%s' opened"), type); + _("Unexpected driver type '%1$s' opened"), type); goto cleanup; } #else /* !MODULE_NAME */ @@ -2937,7 +2937,7 @@ remoteDispatchDomainGetIOThreadInfo(virNetServer *ser= ver G_GNUC_UNUSED, =20 if (ninfo > REMOTE_IOTHREAD_INFO_MAX) { virReportError(VIR_ERR_RPC, - _("Too many IOThreads in info: %d for limit %d"), + _("Too many IOThreads in info: %1$d for limit %2$d"= ), ninfo, REMOTE_IOTHREAD_INFO_MAX); goto cleanup; } @@ -3704,7 +3704,7 @@ remoteSASLFinish(virNetServer *server, =20 VIR_DEBUG("negotiated an SSF of %d", ssf); if (ssf < 56) { /* 56 is good for Kerberos */ - VIR_ERROR(_("negotiated SSF %d was not strong enough"), ssf); + VIR_ERROR(_("negotiated SSF %1$d was not strong enough"), ssf); return -2; } } @@ -3773,7 +3773,7 @@ remoteDispatchAuthSaslStart(virNetServer *server, goto authfail; =20 if (serveroutlen > REMOTE_AUTH_SASL_DATA_MAX) { - VIR_ERROR(_("sasl start reply data too long %d"), (int)serveroutle= n); + VIR_ERROR(_("sasl start reply data too long %1$d"), (int)serverout= len); goto authfail; } =20 @@ -3863,7 +3863,7 @@ remoteDispatchAuthSaslStep(virNetServer *server, goto authfail; =20 if (serveroutlen > REMOTE_AUTH_SASL_DATA_MAX) { - VIR_ERROR(_("sasl step reply data too long %d"), + VIR_ERROR(_("sasl step reply data too long %1$d"), (int)serveroutlen); goto authfail; } @@ -4221,7 +4221,7 @@ remoteDispatchConnectDomainEventDeregister(virNetServ= er *server G_GNUC_UNUSED, =20 if (callbackID < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain event %d not registered"), + _("domain event %1$d not registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE); goto cleanup; } @@ -4371,7 +4371,7 @@ remoteDispatchConnectDomainEventRegisterAny(virNetSer= ver *server G_GNUC_UNUSED, * modern callback style of RPC. */ if (args->eventID > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED || args->eventID < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"= ), + virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$= d"), args->eventID); goto cleanup; } @@ -4443,7 +4443,7 @@ remoteDispatchConnectDomainEventCallbackRegisterAny(v= irNetServer *server G_GNUC_ goto cleanup; =20 if (args->eventID >=3D VIR_DOMAIN_EVENT_ID_LAST || args->eventID < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"= ), + virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$= d"), args->eventID); goto cleanup; } @@ -4512,7 +4512,7 @@ remoteDispatchConnectDomainEventDeregisterAny(virNetS= erver *server G_GNUC_UNUSED * modern callback style of RPC. */ if (args->eventID > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED || args->eventID < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"= ), + virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$= d"), args->eventID); goto cleanup; } @@ -4525,7 +4525,7 @@ remoteDispatchConnectDomainEventDeregisterAny(virNetS= erver *server G_GNUC_UNUSED } if (callbackID < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain event %d not registered"), args->eventID); + _("domain event %1$d not registered"), args->eventI= D); goto cleanup; } =20 @@ -4565,7 +4565,7 @@ remoteDispatchConnectDomainEventCallbackDeregisterAny= (virNetServer *server G_GNU } if (i =3D=3D priv->ndomainEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain event callback %d not registered"), + _("domain event callback %1$d not registered"), args->callbackID); goto cleanup; } @@ -5488,7 +5488,7 @@ remoteDispatchDomainMigrateBegin3Params(virNetServer = *server G_GNUC_UNUSED, =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5541,7 +5541,7 @@ remoteDispatchDomainMigratePrepare3Params(virNetServe= r *server G_GNUC_UNUSED, =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5597,7 +5597,7 @@ remoteDispatchDomainMigratePrepareTunnel3Params(virNe= tServer *server G_GNUC_UNUS =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5664,7 +5664,7 @@ remoteDispatchDomainMigratePerform3Params(virNetServe= r *server G_GNUC_UNUSED, =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5721,7 +5721,7 @@ remoteDispatchDomainMigrateFinish3Params(virNetServer= *server G_GNUC_UNUSED, =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5775,7 +5775,7 @@ remoteDispatchDomainMigrateConfirm3Params(virNetServe= r *server G_GNUC_UNUSED, =20 if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many migration parameters '%d' for limit '%d= '"), + _("Too many migration parameters '%1$d' for limit '= %2$d'"), args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARA= M_LIST_MAX); goto cleanup; } @@ -5828,7 +5828,7 @@ remoteDispatchConnectGetCPUModelNames(virNetServer *s= erver G_GNUC_UNUSED, =20 if (len > REMOTE_CONNECT_CPU_MODELS_MAX) { virReportError(VIR_ERR_RPC, - _("Too many CPU models '%d' for limit '%d'"), + _("Too many CPU models '%1$d' for limit '%2$d'"), len, REMOTE_CONNECT_CPU_MODELS_MAX); goto cleanup; } @@ -5971,7 +5971,7 @@ remoteDispatchConnectNetworkEventRegisterAny(virNetSe= rver *server G_GNUC_UNUSED, =20 if (args->eventID >=3D VIR_NETWORK_EVENT_ID_LAST || args->eventID < 0)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported network event ID %d"), args->eventID= ); + _("unsupported network event ID %1$d"), args->event= ID); goto cleanup; } =20 @@ -6039,7 +6039,7 @@ remoteDispatchConnectNetworkEventDeregisterAny(virNet= Server *server G_GNUC_UNUSE } if (i =3D=3D priv->nnetworkEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network event callback %d not registered"), + _("network event callback %1$d not registered"), args->callbackID); goto cleanup; } @@ -6084,7 +6084,7 @@ remoteDispatchConnectStoragePoolEventRegisterAny(virN= etServer *server G_GNUC_UNU =20 if (args->eventID >=3D VIR_STORAGE_POOL_EVENT_ID_LAST || args->eventID= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported storage pool event ID %d"), args->ev= entID); + _("unsupported storage pool event ID %1$d"), args->= eventID); goto cleanup; } =20 @@ -6152,7 +6152,7 @@ remoteDispatchConnectStoragePoolEventDeregisterAny(vi= rNetServer *server G_GNUC_U } if (i =3D=3D priv->nstorageEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("storage pool event callback %d not registered"), + _("storage pool event callback %1$d not registered"= ), args->callbackID); goto cleanup; } @@ -6197,7 +6197,7 @@ remoteDispatchConnectNodeDeviceEventRegisterAny(virNe= tServer *server G_GNUC_UNUS =20 if (args->eventID >=3D VIR_NODE_DEVICE_EVENT_ID_LAST || args->eventID = < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported node device event ID %d"), args->eve= ntID); + _("unsupported node device event ID %1$d"), args->e= ventID); goto cleanup; } =20 @@ -6264,7 +6264,7 @@ remoteDispatchConnectNodeDeviceEventDeregisterAny(vir= NetServer *server G_GNUC_UN } if (i =3D=3D priv->nnodeDeviceEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("node device event callback %d not registered"), + _("node device event callback %1$d not registered"), args->callbackID); goto cleanup; } @@ -6309,7 +6309,7 @@ remoteDispatchConnectSecretEventRegisterAny(virNetSer= ver *server G_GNUC_UNUSED, =20 if (args->eventID >=3D VIR_SECRET_EVENT_ID_LAST || args->eventID < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported secret event ID %d"), args->eventID); + _("unsupported secret event ID %1$d"), args->eventI= D); goto cleanup; } =20 @@ -6376,7 +6376,7 @@ remoteDispatchConnectSecretEventDeregisterAny(virNetS= erver *server G_GNUC_UNUSED } if (i =3D=3D priv->nsecretEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("node device event callback %d not registered"), + _("node device event callback %1$d not registered"), args->callbackID); goto cleanup; } @@ -6485,7 +6485,7 @@ qemuDispatchConnectDomainMonitorEventDeregister(virNe= tServer *server G_GNUC_UNUS } if (i =3D=3D priv->nqemuEventCallbacks) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("qemu monitor event callback %d not registered"), + _("qemu monitor event callback %1$d not registered"= ), args->callbackID); goto cleanup; } @@ -6645,7 +6645,7 @@ remoteDispatchNetworkGetDHCPLeases(virNetServer *serv= er G_GNUC_UNUSED, =20 if (nleases > REMOTE_NETWORK_DHCP_LEASES_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of leases is %d, which exceeds max limit:= %d"), + _("Number of leases is %1$d, which exceeds max limi= t: %2$d"), nleases, REMOTE_NETWORK_DHCP_LEASES_MAX); goto cleanup; } @@ -6722,8 +6722,7 @@ remoteDispatchConnectGetAllDomainStats(virNetServer *= server G_GNUC_UNUSED, if (nrecords) { if (nrecords > REMOTE_DOMAIN_LIST_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of domain stats records is %d, " - "which exceeds max limit: %d"), + _("Number of domain stats records is %1$d, whic= h exceeds max limit: %2$d"), nrecords, REMOTE_DOMAIN_LIST_MAX); goto cleanup; } @@ -6827,7 +6826,7 @@ remoteDispatchDomainGetFSInfo(virNetServer *server G_= GNUC_UNUSED, =20 if (ninfo > REMOTE_DOMAIN_FSINFO_MAX) { virReportError(VIR_ERR_RPC, - _("Too many mountpoints in fsinfo: %d for limit %d"= ), + _("Too many mountpoints in fsinfo: %1$d for limit %= 2$d"), ninfo, REMOTE_DOMAIN_FSINFO_MAX); goto cleanup; } @@ -6847,7 +6846,7 @@ remoteDispatchDomainGetFSInfo(virNetServer *server G_= GNUC_UNUSED, ndisk =3D info[i]->ndevAlias; if (ndisk > REMOTE_DOMAIN_FSINFO_DISKS_MAX) { virReportError(VIR_ERR_RPC, - _("Too many disks in fsinfo: %zd for limit = %d"), + _("Too many disks in fsinfo: %1$zd for limi= t %2$d"), ndisk, REMOTE_DOMAIN_FSINFO_DISKS_MAX); goto cleanup; } @@ -6910,7 +6909,7 @@ remoteSerializeDomainInterface(virDomainInterfacePtr = *ifaces, =20 if (ifaces_count > REMOTE_DOMAIN_INTERFACE_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of interfaces, %d exceeds the max limit: = %d"), + _("Number of interfaces, %1$d exceeds the max limit= : %2$d"), ifaces_count, REMOTE_DOMAIN_INTERFACE_MAX); return -1; } @@ -6931,7 +6930,7 @@ remoteSerializeDomainInterface(virDomainInterfacePtr = *ifaces, =20 if (iface->naddrs > REMOTE_DOMAIN_IP_ADDR_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of interfaces, %d exceeds the max lim= it: %d"), + _("Number of interfaces, %1$d exceeds the max l= imit: %2$d"), iface->naddrs, REMOTE_DOMAIN_IP_ADDR_MAX); goto cleanup; } @@ -7332,7 +7331,7 @@ remoteDispatchDomainAuthorizedSshKeysGet(virNetServer= *server G_GNUC_UNUSED, =20 if (nkeys > REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of keys %d, which exceeds max liit: %d"), + _("Number of keys %1$d, which exceeds max liit: %2$= d"), nkeys, REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX); goto cleanup; } @@ -7369,7 +7368,7 @@ remoteDispatchDomainAuthorizedSshKeysSet(virNetServer= *server G_GNUC_UNUSED, =20 if (args->keys.keys_len > REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of keys %d, which exceeds max liit: %d"), + _("Number of keys %1$d, which exceeds max liit: %2$= d"), args->keys.keys_len, REMOTE_DOMAIN_AUTHORIZED_SSH_K= EYS_MAX); goto cleanup; } @@ -7411,7 +7410,7 @@ remoteDispatchDomainGetMessages(virNetServer *server = G_GNUC_UNUSED, =20 if (nmsgs > REMOTE_DOMAIN_MESSAGES_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of msgs %d, which exceeds max limit: %d"), + _("Number of msgs %1$d, which exceeds max limit: %2= $d"), nmsgs, REMOTE_DOMAIN_MESSAGES_MAX); goto cleanup; } diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_s= tream.c index 75164f289e..3b7519d2cb 100644 --- a/src/remote/remote_daemon_stream.c +++ b/src/remote/remote_daemon_stream.c @@ -657,7 +657,7 @@ daemonStreamHandleAbort(virNetServerClient *client, raise_error =3D (ret < 0); } else { virReportError(VIR_ERR_RPC, - _("stream aborted with unexpected status %d"), + _("stream aborted with unexpected status %1$d"), msg->header.status); raise_error =3D true; } @@ -768,7 +768,7 @@ daemonStreamHandleWrite(virNetServerClient *client, } } else { virReportError(VIR_ERR_RPC, - _("Unexpected message type: %d"), + _("Unexpected message type: %1$d"), msg->header.type); ret =3D -1; } diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index a4c60be3d7..65ec239fb7 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -59,7 +59,7 @@ VIR_LOG_INIT("remote.remote_driver"); do { \ if ((_from) !=3D (_type)(_from)) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("conversion from hyper to %s overflowed"), #_= type); \ + _("conversion from hyper to %1$s overflowed"), = #_type); \ goto done; \ } \ (_to) =3D (_from); \ @@ -738,7 +738,7 @@ remoteConnectFormatURI(virURI *uri, int tmp; \ if (virStrToLong_i(var->value, NULL, 10, &tmp) < 0) { \ virReportError(VIR_ERR_INVALID_ARG, \ - _("Failed to parse value of URI component %s"),= \ + _("Failed to parse value of URI component %1$s"= ), \ var->name); \ goto error; \ } \ @@ -884,7 +884,7 @@ doRemoteOpen(virConnectPtr conn, if (mode_str) { if ((mode =3D remoteDriverModeTypeFromString(mode_str)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Unknown remote mode '%s'"), mode_str); + _("Unknown remote mode '%1$s'"), mode_str); goto error; } } else { @@ -902,7 +902,7 @@ doRemoteOpen(virConnectPtr conn, if (proxy_str) { if ((proxy =3D virNetClientProxyTypeFromString(proxy_str)) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Unnkown proxy type '%s'"), proxy_str); + _("Unnkown proxy type '%1$s'"), proxy_str); goto error; } } else { @@ -1498,7 +1498,7 @@ remoteNodeGetCPUStats(virConnectPtr conn, for (i =3D 0; i < *nparams; ++i) { if (virStrcpyStatic(params[i].field, ret.params.params_val[i].fiel= d) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Stats %s too big for destination"), + _("Stats %1$s too big for destination"), ret.params.params_val[i].field); goto cleanup; } @@ -1558,7 +1558,7 @@ remoteNodeGetMemoryStats(virConnectPtr conn, for (i =3D 0; i < *nparams; ++i) { if (virStrcpyStatic(params[i].field, ret.params.params_val[i].fiel= d) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Stats %s too big for destination"), + _("Stats %1$s too big for destination"), ret.params.params_val[i].field); goto cleanup; } @@ -1586,7 +1586,7 @@ remoteNodeGetCellsFreeMemory(virConnectPtr conn, =20 if (maxCells > REMOTE_NODE_MAX_CELLS) { virReportError(VIR_ERR_RPC, - _("too many NUMA cells: %d > %d"), + _("too many NUMA cells: %1$d > %2$d"), maxCells, REMOTE_NODE_MAX_CELLS); return -1; } @@ -1619,7 +1619,7 @@ remoteConnectListDomains(virConnectPtr conn, int *ids= , int maxids) =20 if (maxids > REMOTE_DOMAIN_LIST_MAX) { virReportError(VIR_ERR_RPC, - _("Too many domains '%d' for limit '%d'"), + _("Too many domains '%1$d' for limit '%2$d'"), maxids, REMOTE_DOMAIN_LIST_MAX); return -1; } @@ -1632,7 +1632,7 @@ remoteConnectListDomains(virConnectPtr conn, int *ids= , int maxids) =20 if (ret.ids.ids_len > maxids) { virReportError(VIR_ERR_RPC, - _("Too many domains '%d' for limit '%d'"), + _("Too many domains '%1$d' for limit '%2$d'"), ret.ids.ids_len, maxids); goto cleanup; } @@ -1954,7 +1954,7 @@ remoteDomainGetVcpuPinInfo(virDomainPtr domain, =20 if (ncpumaps > REMOTE_VCPUINFO_MAX) { virReportError(VIR_ERR_RPC, - _("vCPU count exceeds maximum: %d > %d"), + _("vCPU count exceeds maximum: %1$d > %2$d"), ncpumaps, REMOTE_VCPUINFO_MAX); return -1; } @@ -1962,7 +1962,7 @@ remoteDomainGetVcpuPinInfo(virDomainPtr domain, if (VIR_INT_MULTIPLY_OVERFLOW(ncpumaps, maplen) || ncpumaps * maplen > REMOTE_CPUMAPS_MAX) { virReportError(VIR_ERR_RPC, - _("vCPU map buffer length exceeds maximum: %d > %d"= ), + _("vCPU map buffer length exceeds maximum: %1$d > %= 2$d"), ncpumaps * maplen, REMOTE_CPUMAPS_MAX); return -1; } @@ -1981,14 +1981,14 @@ remoteDomainGetVcpuPinInfo(virDomainPtr domain, =20 if (ret.num > ncpumaps) { virReportError(VIR_ERR_RPC, - _("host reports too many vCPUs: %d > %d"), + _("host reports too many vCPUs: %1$d > %2$d"), ret.num, ncpumaps); goto cleanup; } =20 if (ret.cpumaps.cpumaps_len > ncpumaps * maplen) { virReportError(VIR_ERR_RPC, - _("host reports map buffer length exceeds maximum: = %d > %d"), + _("host reports map buffer length exceeds maximum: = %1$d > %2$d"), ret.cpumaps.cpumaps_len, ncpumaps * maplen); goto cleanup; } @@ -2017,7 +2017,7 @@ remoteDomainPinEmulator(virDomainPtr dom, =20 if (cpumaplen > REMOTE_CPUMAP_MAX) { virReportError(VIR_ERR_RPC, - _("%s length greater than maximum: %d > %d"), + _("%1$s length greater than maximum: %2$d > %3$d"), "cpumap", cpumaplen, REMOTE_CPUMAP_MAX); return -1; } @@ -2053,7 +2053,7 @@ remoteDomainGetEmulatorPinInfo(virDomainPtr domain, /* There is only one cpumap for all emulator threads */ if (maplen > REMOTE_CPUMAPS_MAX) { virReportError(VIR_ERR_RPC, - _("vCPU map buffer length exceeds maximum: %d > %d"= ), + _("vCPU map buffer length exceeds maximum: %1$d > %= 2$d"), maplen, REMOTE_CPUMAPS_MAX); return -1; } @@ -2071,7 +2071,7 @@ remoteDomainGetEmulatorPinInfo(virDomainPtr domain, =20 if (ret.cpumaps.cpumaps_len > maplen) { virReportError(VIR_ERR_RPC, - _("host reports map buffer length exceeds maximum: = %d > %d"), + _("host reports map buffer length exceeds maximum: = %1$d > %2$d"), ret.cpumaps.cpumaps_len, maplen); goto cleanup; } @@ -2105,14 +2105,14 @@ remoteDomainGetVcpus(virDomainPtr domain, =20 if (maxinfo > REMOTE_VCPUINFO_MAX) { virReportError(VIR_ERR_RPC, - _("vCPU count exceeds maximum: %d > %d"), + _("vCPU count exceeds maximum: %1$d > %2$d"), maxinfo, REMOTE_VCPUINFO_MAX); return -1; } if (VIR_INT_MULTIPLY_OVERFLOW(maxinfo, maplen) || maxinfo * maplen > REMOTE_CPUMAPS_MAX) { virReportError(VIR_ERR_RPC, - _("vCPU map buffer length exceeds maximum: %d > %d"= ), + _("vCPU map buffer length exceeds maximum: %1$d > %= 2$d"), maxinfo * maplen, REMOTE_CPUMAPS_MAX); return -1; } @@ -2128,13 +2128,13 @@ remoteDomainGetVcpus(virDomainPtr domain, =20 if (ret.info.info_len > maxinfo) { virReportError(VIR_ERR_RPC, - _("host reports too many vCPUs: %d > %d"), + _("host reports too many vCPUs: %1$d > %2$d"), ret.info.info_len, maxinfo); goto cleanup; } if (ret.cpumaps.cpumaps_len > maxinfo * maplen) { virReportError(VIR_ERR_RPC, - _("host reports map buffer length exceeds maximum: = %d > %d"), + _("host reports map buffer length exceeds maximum: = %1$d > %2$d"), ret.cpumaps.cpumaps_len, maxinfo * maplen); goto cleanup; } @@ -2185,7 +2185,7 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom, =20 if (ret.info.info_len > REMOTE_IOTHREAD_INFO_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many IOThreads in info: %d for limit %d"), + _("Too many IOThreads in info: %1$d for limit %2$d"= ), ret.info.info_len, REMOTE_IOTHREAD_INFO_MAX); goto cleanup; } @@ -2242,7 +2242,7 @@ remoteDomainGetSecurityLabel(virDomainPtr domain, vir= SecurityLabelPtr seclabel) =20 if (ret.label.label_val !=3D NULL) { if (virStrcpyStatic(seclabel->label, ret.label.label_val) < 0) { - virReportError(VIR_ERR_RPC, _("security label exceeds maximum:= %zu"), + virReportError(VIR_ERR_RPC, _("security label exceeds maximum:= %1$zu"), sizeof(seclabel->label) - 1); goto cleanup; } @@ -2279,7 +2279,7 @@ remoteDomainGetSecurityLabelList(virDomainPtr domain,= virSecurityLabelPtr* secla remote_domain_get_security_label_ret *cur =3D &ret.labels.labels_v= al[i]; if (cur->label.label_val !=3D NULL) { if (virStrcpyStatic((*seclabels)[i].label, cur->label.label_va= l) < 0) { - virReportError(VIR_ERR_RPC, _("security label exceeds maxi= mum: %zd"), + virReportError(VIR_ERR_RPC, _("security label exceeds maxi= mum: %1$zd"), sizeof((*seclabels)->label) - 1); VIR_FREE(*seclabels); goto cleanup; @@ -2337,7 +2337,7 @@ remoteNodeGetSecurityModel(virConnectPtr conn, virSec= urityModelPtr secmodel) =20 if (ret.model.model_val !=3D NULL) { if (virStrcpyStatic(secmodel->model, ret.model.model_val) < 0) { - virReportError(VIR_ERR_RPC, _("security model exceeds maximum:= %zu"), + virReportError(VIR_ERR_RPC, _("security model exceeds maximum:= %1$zu"), sizeof(secmodel->model) - 1); goto cleanup; } @@ -2345,7 +2345,7 @@ remoteNodeGetSecurityModel(virConnectPtr conn, virSec= urityModelPtr secmodel) =20 if (ret.doi.doi_val !=3D NULL) { if (virStrcpyStatic(secmodel->doi, ret.doi.doi_val) < 0) { - virReportError(VIR_ERR_RPC, _("security doi exceeds maximum: %= zu"), + virReportError(VIR_ERR_RPC, _("security doi exceeds maximum: %= 1$zu"), sizeof(secmodel->doi) - 1); goto cleanup; } @@ -2516,7 +2516,7 @@ remoteDomainMemoryStats(virDomainPtr domain, make_nonnull_domain(&args.dom, domain); if (nr_stats > REMOTE_DOMAIN_MEMORY_STATS_MAX) { virReportError(VIR_ERR_RPC, - _("too many memory stats requested: %d > %d"), nr_s= tats, + _("too many memory stats requested: %1$d > %2$d"), = nr_stats, REMOTE_DOMAIN_MEMORY_STATS_MAX); return -1; } @@ -2556,7 +2556,7 @@ remoteDomainBlockPeek(virDomainPtr domain, =20 if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) { virReportError(VIR_ERR_RPC, - _("block peek request too large for remote protocol= , %zi > %d"), + _("block peek request too large for remote protocol= , %1$zi > %2$d"), size, REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX); return -1; } @@ -2603,7 +2603,7 @@ remoteDomainMemoryPeek(virDomainPtr domain, =20 if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) { virReportError(VIR_ERR_RPC, - _("memory peek request too large for remote protoco= l, %zi > %d"), + _("memory peek request too large for remote protoco= l, %1$zi > %2$d"), size, REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX); return -1; } @@ -2732,13 +2732,13 @@ static int remoteDomainGetCPUStats(virDomainPtr dom= ain, =20 if (nparams > REMOTE_NODE_CPU_STATS_MAX) { virReportError(VIR_ERR_RPC, - _("nparams count exceeds maximum: %u > %u"), + _("nparams count exceeds maximum: %1$u > %2$u"), nparams, REMOTE_NODE_CPU_STATS_MAX); return -1; } if (ncpus > REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX) { virReportError(VIR_ERR_RPC, - _("ncpus count exceeds maximum: %u > %u"), + _("ncpus count exceeds maximum: %1$u > %2$u"), ncpus, REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX); return -1; } @@ -3361,7 +3361,7 @@ remoteAuthenticate(virConnectPtr conn, struct private= _data *priv, want =3D REMOTE_AUTH_POLKIT; } else { virReportError(VIR_ERR_AUTH_FAILED, - _("unknown authentication type %s"), authtype); + _("unknown authentication type %1$s"), authtype= ); return -1; } for (i =3D 0; i < ret.types.types_len; i++) { @@ -3370,7 +3370,7 @@ remoteAuthenticate(virConnectPtr conn, struct private= _data *priv, } if (type =3D=3D REMOTE_AUTH_NONE) { virReportError(VIR_ERR_AUTH_FAILED, - _("requested authentication type %s rejected"), + _("requested authentication type %1$s rejected"= ), authtype); return -1; } @@ -3407,7 +3407,7 @@ remoteAuthenticate(virConnectPtr conn, struct private= _data *priv, =20 default: virReportError(VIR_ERR_AUTH_FAILED, - _("unsupported authentication type %d"), + _("unsupported authentication type %1$d"), ret.types.types_val[0]); VIR_FREE(ret.types.types_val); return -1; @@ -3800,7 +3800,7 @@ remoteAuthSASL(virConnectPtr conn, struct private_dat= a *priv, if (wantmech) { if (strstr(mechlist, wantmech) =3D=3D NULL) { virReportError(VIR_ERR_AUTH_FAILED, - _("SASL mechanism %s not supported by server"), + _("SASL mechanism %1$s not supported by server"= ), wantmech); VIR_FREE(iret.mechlist); goto cleanup; @@ -3830,7 +3830,7 @@ remoteAuthSASL(virConnectPtr conn, struct private_dat= a *priv, =20 if (clientoutlen > REMOTE_AUTH_SASL_DATA_MAX) { virReportError(VIR_ERR_AUTH_FAILED, - _("SASL negotiation data too long: %zu bytes"), + _("SASL negotiation data too long: %1$zu bytes"), clientoutlen); goto cleanup; } @@ -3929,7 +3929,7 @@ remoteAuthSASL(virConnectPtr conn, struct private_dat= a *priv, VIR_DEBUG("SASL SSF value %d", ssf); if (ssf < 56) { /* 56 =3D=3D DES level, good for Kerberos */ virReportError(VIR_ERR_AUTH_FAILED, - _("negotiation SSF %d was not strong enough"), = ssf); + _("negotiation SSF %1$d was not strong enough")= , ssf); goto cleanup; } if (ssf < SSF_WARNING_LEVEL) { @@ -6018,7 +6018,7 @@ remoteConnectGetCPUModelNames(virConnectPtr conn, /* Check the length of the returned list carefully. */ if (ret.models.models_len > REMOTE_CONNECT_CPU_MODELS_MAX) { virReportError(VIR_ERR_RPC, - _("Too many model names '%d' for limit '%d'"), + _("Too many model names '%1$d' for limit '%2$d'"), ret.models.models_len, REMOTE_CONNECT_CPU_MODELS_MAX); goto cleanup; @@ -6961,7 +6961,7 @@ remoteNodeGetFreePages(virConnectPtr conn, =20 if (npages * cellCount > REMOTE_NODE_MAX_CELLS) { virReportError(VIR_ERR_RPC, - _("too many NUMA cells: %d > %d"), + _("too many NUMA cells: %1$d > %2$d"), npages * cellCount, REMOTE_NODE_MAX_CELLS); return -1; } @@ -7051,7 +7051,7 @@ remoteNetworkGetDHCPLeases(virNetworkPtr net, =20 if (ret.leases.leases_len > REMOTE_NETWORK_DHCP_LEASES_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of leases is %d, which exceeds max limit:= %d"), + _("Number of leases is %1$d, which exceeds max limi= t: %2$d"), ret.leases.leases_len, REMOTE_NETWORK_DHCP_LEASES_M= AX); goto cleanup; } @@ -7121,7 +7121,7 @@ remoteConnectGetAllDomainStats(virConnectPtr conn, =20 if (ret.retStats.retStats_len > REMOTE_DOMAIN_LIST_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of stats entries is %d, which exceeds max= limit: %d"), + _("Number of stats entries is %1$d, which exceeds m= ax limit: %2$d"), ret.retStats.retStats_len, REMOTE_DOMAIN_LIST_MAX); goto cleanup; } @@ -7181,7 +7181,7 @@ remoteNodeAllocPages(virConnectPtr conn, =20 if (npages > REMOTE_NODE_MAX_CELLS) { virReportError(VIR_ERR_RPC, - _("too many NUMA cells: %d > %d"), + _("too many NUMA cells: %1$d > %2$d"), npages, REMOTE_NODE_MAX_CELLS); return -1; } @@ -7227,7 +7227,7 @@ remoteDomainGetFSInfo(virDomainPtr dom, =20 if (ret.info.info_len > REMOTE_DOMAIN_FSINFO_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many mountpoints in fsinfo: %d for limit %d"= ), + _("Too many mountpoints in fsinfo: %1$d for limit %= 2$d"), ret.info.info_len, REMOTE_DOMAIN_FSINFO_MAX); goto cleanup; } @@ -7303,7 +7303,7 @@ remoteDomainInterfaceAddresses(virDomainPtr dom, =20 if (ret.ifaces.ifaces_len > REMOTE_DOMAIN_INTERFACE_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of interfaces, %d exceeds the max limit: = %d"), + _("Number of interfaces, %1$d exceeds the max limit= : %2$d"), ret.ifaces.ifaces_len, REMOTE_DOMAIN_INTERFACE_MAX); goto cleanup; } @@ -7326,7 +7326,7 @@ remoteDomainInterfaceAddresses(virDomainPtr dom, =20 if (iface_ret->addrs.addrs_len > REMOTE_DOMAIN_IP_ADDR_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Number of interfaces, %d exceeds the max lim= it: %d"), + _("Number of interfaces, %1$d exceeds the max l= imit: %2$d"), iface_ret->addrs.addrs_len, REMOTE_DOMAIN_IP_AD= DR_MAX); goto cleanup; } diff --git a/src/remote/remote_sockets.c b/src/remote/remote_sockets.c index 69e6c1e5b8..9c1944209f 100644 --- a/src/remote/remote_sockets.c +++ b/src/remote/remote_sockets.c @@ -104,8 +104,7 @@ remoteSplitURIScheme(virURI *uri, if (val =3D=3D REMOTE_DRIVER_TRANSPORT_UNIX && uri->server) { virReportError(VIR_ERR_INVALID_ARG, - _("using unix socket and remote " - "server '%s' is not supported."), + _("using unix socket and remote server '%1$s' i= s not supported."), uri->server); return -1; } @@ -393,7 +392,7 @@ remoteGetUNIXSocket(remoteDriverTransport transport, case REMOTE_DRIVER_MODE_DIRECT: if (transport !=3D REMOTE_DRIVER_TRANSPORT_UNIX) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Cannot use direct socket mode for %s transpo= rt"), + _("Cannot use direct socket mode for %1$s trans= port"), remoteDriverTransportTypeToString(transport)); return NULL; } diff --git a/src/remote/remote_ssh_helper.c b/src/remote/remote_ssh_helper.c index 29f5889533..2d332a39b6 100644 --- a/src/remote/remote_ssh_helper.c +++ b/src/remote/remote_ssh_helper.c @@ -377,7 +377,7 @@ int main(int argc, char **argv) "clients. Not intended to be called direc= tly by the user."); g_option_context_add_main_entries(context, entries, PACKAGE); if (!g_option_context_parse(context, &argc, &argv, &error)) { - g_printerr(_("option parsing failed: %s\n"), error->message); + g_printerr(_("option parsing failed: %1$s\n"), error->message); exit(EXIT_FAILURE); } =20 @@ -397,7 +397,7 @@ int main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - g_printerr(_("%s: initialization failed\n"), argv[0]); + g_printerr(_("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 @@ -417,13 +417,13 @@ int main(int argc, char **argv) } =20 if (remoteSplitURIScheme(uri, &driver, &transport) < 0) { - g_printerr(_("%s: cannot parse URI transport '%s': %s\n"), + g_printerr(_("%1$s: cannot parse URI transport '%2$s': %3$s\n"), argv[0], uri_str, virGetLastErrorMessage()); exit(EXIT_FAILURE); } =20 if (transport !=3D REMOTE_DRIVER_TRANSPORT_UNIX) { - g_printerr(_("%s: unexpected URI transport '%s'\n"), + g_printerr(_("%1$s: unexpected URI transport '%2$s'\n"), argv[0], uri_str); exit(EXIT_FAILURE); } @@ -446,25 +446,25 @@ int main(int argc, char **argv) =20 if (mode_str && (mode =3D remoteDriverModeTypeFromString(mode_str)) < 0) { - g_printerr(_("%s: unknown remote mode '%s'"), argv[0], mode_str); + g_printerr(_("%1$s: unknown remote mode '%2$s'"), argv[0], mode_st= r); exit(EXIT_FAILURE); } =20 if (!sock_path && !(sock_path =3D remoteGetUNIXSocket(transport, mode, driver, flags, &daemon_path))) { - g_printerr(_("%s: failed to generate UNIX socket path"), argv[0]); + g_printerr(_("%1$s: failed to generate UNIX socket path"), argv[0]= ); exit(EXIT_FAILURE); } =20 if (virNetSocketNewConnectUNIX(sock_path, daemon_path, &sock) < 0) { - g_printerr(_("%s: cannot connect to '%s': %s\n"), + g_printerr(_("%1$s: cannot connect to '%2$s': %3$s\n"), argv[0], sock_path, virGetLastErrorMessage()); exit(EXIT_FAILURE); } =20 if (virRemoteSSHHelperRun(sock) < 0) { - g_printerr(_("%s: could not proxy traffic: %s\n"), + g_printerr(_("%1$s: could not proxy traffic: %2$s\n"), argv[0], virGetLastErrorMessage()); exit(EXIT_FAILURE); } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464703; cv=none; d=zohomail.com; s=zohoarc; b=DyTY5tWygsN8ZW4j73jx0pWVfTEkpo8ZNmFd8p54nZaulfFIr/J2EiT9ZXOFdpwqAqyo/dkqzuroMmuc/vHuII9zVdzCn065vi/gSNPhtXyTC1vYgr12Pm99zTPo0MqQngLCwST/YDiCFEU6akl2cqtLX8blx+M+DItJaNsioec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464703; 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=NmpmCPpZp+Wz2JeqJGqgYq079Io2+K/+qRMcH3w1E/I=; b=nlBDDPdOShiXPqG0hYgcpEh0jMmsQvaejPjE1X2jSdcSRYTgmdQrZVed4HAHwY9V1NEMi+SqXGAmFTn8dyB9k+iPpSFmc24BOum5tu107snE2wLYfWkuurqpDDsC/kNgiKRx0VWvf1M8Z13NmLu+5Ds5td6LP/LGlOa13uOv23E= 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 1678464703315717.7980727227049; Fri, 10 Mar 2023 08:11:43 -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-353-GUTNtJVtNzim-2SxNuwm_A-1; Fri, 10 Mar 2023 11:11:37 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27BCF29A9D51; Fri, 10 Mar 2023 16:10:59 +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 0AFFC40C1106; Fri, 10 Mar 2023 16:10:59 +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 ECCF11946A54; Fri, 10 Mar 2023 16:10:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9709C1946A6F for ; Fri, 10 Mar 2023 16:10:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8C7B51121315; Fri, 10 Mar 2023 16:10:57 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE77D1121318 for ; Fri, 10 Mar 2023 16:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464702; 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=NmpmCPpZp+Wz2JeqJGqgYq079Io2+K/+qRMcH3w1E/I=; b=B9/ttISzL+WuVbyjRvm9DZeVOOxV45VkZ2JigfTlU/IJuZzmu2WGFg+9P2QrnwtKMfCoDP YFJEESjqaiDlOsAK1XmMKM8OUkumNTowOGniahvtAvNW33yi5nt0KQO0rTCVg3MLuZOBlS 66bw+AJQ9HG36Gx4srrZd0IuX78x4Ls= X-MC-Unique: GUTNtJVtNzim-2SxNuwm_A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 34/51] rpc: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:50 +0100 Message-Id: <8a10c3baea307c788714f035546fd48316e9fbcb.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.2 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: 1678464705181100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/rpc/gendispatch.pl | 10 ++--- src/rpc/virkeepalive.c | 2 +- src/rpc/virnetclient.c | 4 +- src/rpc/virnetclientprogram.c | 26 ++++++------ src/rpc/virnetclientstream.c | 6 +-- src/rpc/virnetdaemon.c | 6 +-- src/rpc/virnetlibsshsession.c | 57 ++++++++++++------------- src/rpc/virnetmessage.c | 21 +++++----- src/rpc/virnetsaslcontext.c | 38 ++++++++--------- src/rpc/virnetserver.c | 2 +- src/rpc/virnetserverclient.c | 4 +- src/rpc/virnetserverprogram.c | 12 +++--- src/rpc/virnetsocket.c | 42 +++++++++---------- src/rpc/virnetsshsession.c | 59 ++++++++++++-------------- src/rpc/virnettlscontext.c | 78 +++++++++++++++++------------------ 15 files changed, 178 insertions(+), 189 deletions(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index b186849606..e791d2c75c 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -1178,7 +1178,7 @@ elsif ($mode eq "server") { if ($modern_ret_as_list) { print " if (nresults > $single_ret_list_max_define) {\n"; print " virReportError(VIR_ERR_INTERNAL_ERROR,\n"; - print " _(\"Too many ${single_ret_list_e= rror_msg_type}s '%d' for limit '%d'\"),\n"; + print " _(\"Too many ${single_ret_list_e= rror_msg_type}s '%1\$d' for limit '%2\$d'\"),\n"; print " nresults, $single_ret_list_max_d= efine);\n"; print " goto cleanup;\n"; print " }\n"; @@ -1845,7 +1845,7 @@ elsif ($mode eq "client") { print "\n"; print " if ($args_check->{arg} > $args_check->{limit}) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"%s length greater than maxim= um: %d > %d\"),\n"; + print " _(\"%1\$s length greater than ma= ximum: %2\$d > %3\$d\"),\n"; print " $args_check->{name}, (int)$args_= check->{arg}, $args_check->{limit});\n"; print " goto done;\n"; print " }\n"; @@ -1855,7 +1855,7 @@ elsif ($mode eq "client") { print "\n"; print " if ($single_ret_list_max_var > $single_ret_list_max= _define) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %d > %d,\"\n"; + print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %1\$d > %2\$d,\"\n"; print " \"in parameter '$single_ret_li= st_name' for 'vir$call->{ProcName}'\"),\n"; print " $single_ret_list_max_var, $singl= e_ret_list_max_define);\n"; print " goto done;\n"; @@ -1917,7 +1917,7 @@ elsif ($mode eq "client") { $modern_ret_as_list) { print " if (ret.$single_ret_list_name.${single_ret_list_nam= e}_len > $single_ret_list_max_var) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %d > %d,\"\n"; + print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %1\$d > %2\$d,\"\n"; print " \"in parameter '$single_ret_li= st_name' for 'vir$call->{ProcName}'\"),\n"; print " ret.$single_ret_list_name.${sing= le_ret_list_name}_len, $single_ret_list_max_var);\n"; print " goto cleanup;\n"; @@ -2219,7 +2219,7 @@ elsif ($mode eq "client") { if ($action eq "Ensure") { print " if (rv =3D=3D 0)\n"; print " virReportError(VIR_ERR_ACCESS_D= ENIED,\n"; - print" _(\"'%s' denied = access\"), conn->driver->name);\n"; + print" _(\"'%1\$s' deni= ed access\"), conn->driver->name);\n"; print " return $fail;\n"; } else { print " virResetLastError();\n"; diff --git a/src/rpc/virkeepalive.c b/src/rpc/virkeepalive.c index 434cc2c7c9..d96bd347ad 100644 --- a/src/rpc/virkeepalive.c +++ b/src/rpc/virkeepalive.c @@ -249,7 +249,7 @@ virKeepAliveStart(virKeepAlive *ka, /* Guard against overflow */ if (interval > INT_MAX / 1000) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("keepalive interval %d too large"), interval); + _("keepalive interval %1$d too large"), interva= l); goto cleanup; } ka->interval =3D interval; diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 1202b0f30c..df2958935b 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1138,7 +1138,7 @@ virNetClientCallDispatchReply(virNetClient *client) =20 if (!thecall) { virReportError(VIR_ERR_RPC, - _("no call waiting for reply with prog %d vers %d s= erial %d"), + _("no call waiting for reply with prog %1$d vers %2= $d serial %3$d"), client->msg.header.prog, client->msg.header.vers, c= lient->msg.header.serial); return -1; } @@ -1327,7 +1327,7 @@ virNetClientCallDispatch(virNetClient *client) case VIR_NET_CALL_WITH_FDS: default: virReportError(VIR_ERR_RPC, - _("got unexpected RPC call prog %d vers %d proc %d = type %d"), + _("got unexpected RPC call prog %1$d vers %2$d proc= %3$d type %4$d"), client->msg.header.prog, client->msg.header.vers, client->msg.header.proc, client->msg.header.type); return -1; diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c index b93c495347..abc8e6798a 100644 --- a/src/rpc/virnetclientprogram.c +++ b/src/rpc/virnetclientprogram.c @@ -216,25 +216,25 @@ int virNetClientProgramDispatch(virNetClientProgram *= prog, =20 /* Check version, etc. */ if (msg->header.prog !=3D prog->program) { - VIR_ERROR(_("program mismatch in event (actual 0x%x, expected 0x%x= )"), + VIR_ERROR(_("program mismatch in event (actual 0x%1$x, expected 0x= %2$x)"), msg->header.prog, prog->program); return -1; } =20 if (msg->header.vers !=3D prog->version) { - VIR_ERROR(_("version mismatch in event (actual 0x%x, expected 0x%x= )"), + VIR_ERROR(_("version mismatch in event (actual 0x%1$x, expected 0x= %2$x)"), msg->header.vers, prog->version); return -1; } =20 if (msg->header.status !=3D VIR_NET_OK) { - VIR_ERROR(_("status mismatch in event (actual 0x%x, expected 0x%x)= "), + VIR_ERROR(_("status mismatch in event (actual 0x%1$x, expected 0x%= 2$x)"), msg->header.status, VIR_NET_OK); return -1; } =20 if (msg->header.type !=3D VIR_NET_MESSAGE) { - VIR_ERROR(_("type mismatch in event (actual 0x%x, expected 0x%x)"), + VIR_ERROR(_("type mismatch in event (actual 0x%1$x, expected 0x%2$= x)"), msg->header.type, VIR_NET_MESSAGE); return -1; } @@ -242,7 +242,7 @@ int virNetClientProgramDispatch(virNetClientProgram *pr= og, event =3D virNetClientProgramGetEvent(prog, msg->header.proc); =20 if (!event) { - VIR_ERROR(_("No event expected with procedure 0x%x"), + VIR_ERROR(_("No event expected with procedure 0x%1$x"), msg->header.proc); return -1; } @@ -295,13 +295,13 @@ int virNetClientProgramCall(virNetClientProgram *prog, for (i =3D 0; i < msg->nfds; i++) { if ((msg->fds[i] =3D dup(outfds[i])) < 0) { virReportSystemError(errno, - _("Cannot duplicate FD %d"), + _("Cannot duplicate FD %1$d"), outfds[i]); goto error; } if (virSetInherit(msg->fds[i], false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), msg->fds[i]); goto error; } @@ -327,18 +327,18 @@ int virNetClientProgramCall(virNetClientProgram *prog, if (msg->header.type !=3D VIR_NET_REPLY && msg->header.type !=3D VIR_NET_REPLY_WITH_FDS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message type %d"), msg->header.type); + _("Unexpected message type %1$d"), msg->header.type= ); goto error; } if (msg->header.proc !=3D proc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message proc %d !=3D %d"), + _("Unexpected message proc %1$d !=3D %2$d"), msg->header.proc, proc); goto error; } if (msg->header.serial !=3D serial) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message serial %d !=3D %d"), + _("Unexpected message serial %1$d !=3D %2$d"), msg->header.serial, serial); goto error; } @@ -354,13 +354,13 @@ int virNetClientProgramCall(virNetClientProgram *prog, for (i =3D 0; i < *ninfds; i++) { if (((*infds)[i] =3D dup(msg->fds[i])) < 0) { virReportSystemError(errno, - _("Cannot duplicate FD %d"), + _("Cannot duplicate FD %1$d"), msg->fds[i]); goto error; } if (virSetInherit((*infds)[i], false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"= ), (*infds)[i]); goto error; } @@ -378,7 +378,7 @@ int virNetClientProgramCall(virNetClientProgram *prog, case VIR_NET_CONTINUE: default: virReportError(VIR_ERR_RPC, - _("Unexpected message status %d"), msg->header.stat= us); + _("Unexpected message status %1$d"), msg->header.st= atus); goto error; } =20 diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c index e0e3178111..21e9332134 100644 --- a/src/rpc/virnetclientstream.c +++ b/src/rpc/virnetclientstream.c @@ -417,7 +417,7 @@ virNetClientStreamSetHole(virNetClientStream *st, /* Shouldn't happen, But it's better to safe than sorry. */ if (st->holeLength) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unprocessed hole of size %lld already in the que= ue"), + _("unprocessed hole of size %1$lld already in the q= ueue"), st->holeLength); return -1; } @@ -462,7 +462,7 @@ virNetClientStreamHandleHole(virNetClient *client, =20 if (msg->header.type !=3D VIR_NET_STREAM_HOLE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid message prog=3D%d type=3D%d serial=3D%u = proc=3D%d"), + _("Invalid message prog=3D%1$d type=3D%2$d serial= =3D%3$u proc=3D%4$d"), msg->header.prog, msg->header.type, msg->header.serial, @@ -851,7 +851,7 @@ int virNetClientStreamInData(virNetClientStream *st, st->holeLength =3D 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid message prog=3D%d type=3D%d serial=3D%u = proc=3D%d"), + _("Invalid message prog=3D%1$d type=3D%2$d serial= =3D%3$u proc=3D%4$d"), msg->header.prog, msg->header.type, msg->header.serial, diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index c4f5bbdce5..1292faa078 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -194,7 +194,7 @@ virNetDaemonGetServer(virNetDaemon *dmn, =20 if (!srv) { virReportError(VIR_ERR_NO_SERVER, - _("No server named '%s'"), serverName); + _("No server named '%1$s'"), serverName); } =20 return srv; @@ -324,7 +324,7 @@ virNetDaemonNewPostExecRestart(virJSONValue *object, size_t n =3D virJSONValueArraySize(servers); if (n > nDefServerNames) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Server count %zd greater than default name c= ount %zu"), + _("Server count %1$zd greater than default name= count %2$zu"), n, nDefServerNames); goto error; } @@ -646,7 +646,7 @@ virNetDaemonSignalEvent(int watch, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected signal received: %d"), siginfo.si_signo); + _("Unexpected signal received: %1$d"), siginfo.si_signo= ); =20 cleanup: virObjectUnlock(dmn); diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index bba37210df..e71a79d0fb 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -261,10 +261,8 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) =20 /* host key verification failed */ virReportError(VIR_ERR_AUTH_FAILED, - _("!!! SSH HOST KEY VERIFICATION FAILED !!!: " - "Identity of host '%s:%d' differs from stored ide= ntity. " - "Please verify the new host key '%s' to avoid pos= sible " - "man in the middle attack. The key is stored in '= %s'."), + _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identi= ty of host '%1$s:%2$d' differs from stored identity. " + "Please verify the new host key '%3$s' to avoid p= ossible man in the middle attack. The key is stored in '%4$s'."), sess->hostname, sess->port, keyhashstr, sess->knownHostsFile); =20 @@ -290,7 +288,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (!keyhashstr) return -1; =20 - prompt =3D g_strdup_printf(_("Accept SSH host key with hash '%= s' for " "host '%s:%d' (%s/%s)?"), + prompt =3D g_strdup_printf(_("Accept SSH host key with hash '%= 1$s' for host '%2$s:%3$d' (%4$s/%5$s)?"), keyhashstr, sess->hostname, sess->por= t, "y", "n"); =20 if (!(cred =3D virAuthAskCredential(sess->cred, prompt, true))= ) { @@ -301,7 +299,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (!cred->result || STRCASENEQ(cred->result, "y")) { virReportError(VIR_ERR_LIBSSH, - _("SSH host key for '%s' (%s) was not accep= ted"), + _("SSH host key for '%1$s' (%2$s) was not a= ccepted"), sess->hostname, keyhashstr); ssh_string_free_char(keyhashstr); return -1; @@ -314,7 +312,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (ssh_session_update_known_hosts(sess->session) < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to write known_host file '%s': %s= "), + _("failed to write known_host file '%1$s': = %2$s"), sess->knownHostsFile, errmsg); return -1; @@ -326,7 +324,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) case SSH_SERVER_ERROR: errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to validate SSH host key: %s"), + _("failed to validate SSH host key: %1$s"), errmsg); return -1; =20 @@ -395,14 +393,13 @@ virNetLibsshImportPrivkey(virNetLibsshSession *sess, sess, &key); if (ret =3D=3D SSH_EOF) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while reading private key '%s'"), + _("error while reading private key '%1$s'"), priv->filename); return SSH_AUTH_ERROR; } else if (ret =3D=3D SSH_ERROR) { if (virGetLastErrorCode() =3D=3D VIR_ERR_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while opening private key '%s', wrong " - "passphrase?"), + _("error while opening private key '%1$s', wron= g passphrase?"), priv->filename); } return SSH_AUTH_ERROR; @@ -435,7 +432,7 @@ virNetLibsshAuthenticatePrivkey(virNetLibsshSession *se= ss, ret =3D ssh_pki_import_pubkey_file(tmp, &public_key); if (ret =3D=3D SSH_ERROR) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while reading public key '%s'"), + _("error while reading public key '%1$s'"), tmp); err =3D SSH_AUTH_ERROR; goto error; @@ -449,8 +446,7 @@ virNetLibsshAuthenticatePrivkey(virNetLibsshSession *se= ss, ret =3D ssh_pki_export_privkey_to_pubkey(private_key, &public_key); if (ret =3D=3D SSH_ERROR) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot export the public key from the " - "private key '%s'"), + _("cannot export the public key from the privat= e key '%1$s'"), priv->filename); err =3D SSH_AUTH_ERROR; goto error; @@ -535,7 +531,7 @@ virNetLibsshAuthenticatePassword(virNetLibsshSession *s= ess) g_autoptr(virConnectCredential) cred =3D NULL; g_autofree char *prompt =3D NULL; =20 - prompt =3D g_strdup_printf(_("Enter %s's password for %s"), + prompt =3D g_strdup_printf(_("Enter %1$s's password for %2$s"), sess->username, sess->hostname); =20 if (!(cred =3D virAuthAskCredential(sess->cred, prompt, false))) @@ -552,7 +548,7 @@ virNetLibsshAuthenticatePassword(virNetLibsshSession *s= ess) error: errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); return rc; } =20 @@ -632,7 +628,7 @@ virNetLibsshAuthenticateKeyboardInteractive(virNetLibss= hSession *sess, cred->result) < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); return SSH_AUTH_ERROR; } =20 @@ -649,7 +645,7 @@ virNetLibsshAuthenticateKeyboardInteractive(virNetLibss= hSession *sess, /* error path */ errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); } =20 return ret; @@ -679,7 +675,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (ret =3D=3D SSH_AUTH_ERROR) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("Failed to authenticate as 'none': %s"), + _("Failed to authenticate as 'none': %1$s"), errmsg); return -1; } @@ -708,7 +704,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (ret =3D=3D SSH_AUTH_ERROR) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to authenticate using agent: %s"), + _("failed to authenticate using agent: %1$s= "), errmsg); } break; @@ -736,7 +732,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (sess->nauths =3D=3D 1) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to authenticate: %s"), + _("failed to authenticate: %1$s"), errmsg); } else if (no_method && !auth_failed) { virReportError(VIR_ERR_AUTH_FAILED, "%s", @@ -761,7 +757,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (!sess->channel) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to create libssh channel: %s"), + _("failed to create libssh channel: %1$s"), errmsg); return -1; } @@ -769,7 +765,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (ssh_channel_open_session(sess->channel) !=3D SSH_OK) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to open ssh channel: %s"), + _("failed to open ssh channel: %1$s"), errmsg); return -1; } @@ -777,7 +773,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (ssh_channel_request_exec(sess->channel, sess->channelCommand) !=3D= SSH_OK) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to execute command '%s': %s"), + _("failed to execute command '%1$s': %2$s"), sess->channelCommand, errmsg); return -1; @@ -1058,7 +1054,7 @@ virNetLibsshSessionConnect(virNetLibsshSession *sess, if (ret < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_NO_CONNECT, - _("SSH session handshake failed: %s"), + _("SSH session handshake failed: %1$s"), errmsg); goto error; } @@ -1103,8 +1099,7 @@ virNetLibsshChannelRead(virNetLibsshSession *sess, if (sess->state !=3D VIR_NET_LIBSSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated " - "with non-zero code: %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_LIBSSH, "%s", @@ -1189,7 +1184,7 @@ virNetLibsshChannelRead(virNetLibsshSession *sess, eof: if (ssh_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_LIBSSH, - _("Remote command terminated with non-zero code= : %d"), + _("Remote command terminated with non-zero code= : %1$d"), ssh_channel_get_exit_status(sess->channel)); sess->channelCommandReturnValue =3D ssh_channel_get_exit_statu= s(sess->channel); sess->state =3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE; @@ -1224,7 +1219,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, if (sess->state !=3D VIR_NET_LIBSSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_LIBSSH, "%s", @@ -1236,7 +1231,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, if (ssh_channel_is_eof(sess->channel)) { if (ssh_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), ssh_channel_get_exit_status(sess->channel)); sess->state =3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE; sess->channelCommandReturnValue =3D ssh_channel_get_exit_statu= s(sess->channel); @@ -1261,7 +1256,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, sess->state =3D VIR_NET_LIBSSH_STATE_ERROR; msg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("write failed: %s"), msg); + _("write failed: %1$s"), msg); } =20 cleanup: diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c index c9698fb263..50cc335fd6 100644 --- a/src/rpc/virnetmessage.c +++ b/src/rpc/virnetmessage.c @@ -141,7 +141,7 @@ int virNetMessageDecodeLength(virNetMessage *msg) =20 if (len < VIR_NET_MESSAGE_LEN_MAX) { virReportError(VIR_ERR_RPC, - _("packet %d bytes received from server too small, = want %d"), + _("packet %1$d bytes received from server too small= , want %2$d"), len, VIR_NET_MESSAGE_LEN_MAX); goto cleanup; } @@ -151,7 +151,7 @@ int virNetMessageDecodeLength(virNetMessage *msg) =20 if (len > VIR_NET_MESSAGE_MAX) { virReportError(VIR_ERR_RPC, - _("packet %d bytes received from server too large, = want %d"), + _("packet %1$d bytes received from server too large= , want %2$d"), len, VIR_NET_MESSAGE_MAX); goto cleanup; } @@ -287,7 +287,7 @@ int virNetMessageEncodeNumFDs(virNetMessage *msg) =20 if (numFDs > VIR_NET_MESSAGE_NUM_FDS_MAX) { virReportError(VIR_ERR_RPC, - _("Too many FDs to send %d, expected %d maximum"), + _("Too many FDs to send %1$d, expected %2$d maximum= "), numFDs, VIR_NET_MESSAGE_NUM_FDS_MAX); goto cleanup; } @@ -325,7 +325,7 @@ int virNetMessageDecodeNumFDs(virNetMessage *msg) =20 if (numFDs > VIR_NET_MESSAGE_NUM_FDS_MAX) { virReportError(VIR_ERR_RPC, - _("Received too many FDs %d, expected %d maximum"), + _("Received too many FDs %1$d, expected %2$d maximu= m"), numFDs, VIR_NET_MESSAGE_NUM_FDS_MAX); goto cleanup; } @@ -457,8 +457,7 @@ int virNetMessageEncodePayloadRaw(virNetMessage *msg, if ((msg->bufferOffset + len) > (VIR_NET_MESSAGE_MAX + VIR_NET_MESSAGE_LEN_MAX)) { virReportError(VIR_ERR_RPC, - _("Stream data too long to send " - "(%zu bytes needed, %zu bytes available)"= ), + _("Stream data too long to send (%1$zu byte= s needed, %2$zu bytes available)"), len, VIR_NET_MESSAGE_MAX + VIR_NET_MESSAGE_LEN_MAX - @@ -549,20 +548,20 @@ int virNetMessageDupFD(virNetMessage *msg, =20 if (slot >=3D msg->nfds) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No FD available at slot %zu"), slot); + _("No FD available at slot %1$zu"), slot); return -1; } =20 if ((fd =3D dup(msg->fds[slot])) < 0) { virReportSystemError(errno, - _("Unable to duplicate FD %d"), + _("Unable to duplicate FD %1$d"), msg->fds[slot]); return -1; } if (virSetInherit(fd, false) < 0) { VIR_FORCE_CLOSE(fd); virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), fd); return -1; } @@ -576,14 +575,14 @@ int virNetMessageAddFD(virNetMessage *msg, =20 if ((newfd =3D dup(fd)) < 0) { virReportSystemError(errno, - _("Unable to duplicate FD %d"), + _("Unable to duplicate FD %1$d"), fd); goto error; } =20 if (virSetInherit(newfd, false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), newfd); goto error; } diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index dbf777cfa3..7151225cc3 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -78,7 +78,7 @@ static int virNetSASLContextClientOnceInit(void) int err =3D sasl_client_init(NULL); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("failed to initialize SASL library: %d (%s)"), + _("failed to initialize SASL library: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -94,7 +94,7 @@ static int virNetSASLContextServerOnceInit(void) int err =3D sasl_server_init(NULL, "libvirt"); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("failed to initialize SASL library: %d (%s)"), + _("failed to initialize SASL library: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -162,7 +162,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContext *c= txt, } =20 /* Denied */ - VIR_ERROR(_("SASL client identity '%s' not allowed by ACL"), identity); + VIR_ERROR(_("SASL client identity '%1$s' not allowed by ACL"), identit= y); =20 /* This is the most common error: make it informative. */ virReportError(VIR_ERR_SYSTEM_ERROR, "%s", @@ -206,7 +206,7 @@ virNetSASLSession *virNetSASLSessionNewClient(virNetSAS= LContext *ctxt G_GNUC_UNU &sasl->conn); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to create SASL client context: %d (%s)"), + _("Failed to create SASL client context: %1$d (%2$s= )"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -243,7 +243,7 @@ virNetSASLSession *virNetSASLSessionNewServer(virNetSAS= LContext *ctxt G_GNUC_UNU &sasl->conn); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to create SASL client context: %d (%s)"), + _("Failed to create SASL client context: %1$d (%2$s= )"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -265,7 +265,7 @@ int virNetSASLSessionExtKeySize(virNetSASLSession *sasl, err =3D sasl_setprop(sasl->conn, SASL_SSF_EXTERNAL, &ssf); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot set external SSF %d (%s)"), + _("cannot set external SSF %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -286,7 +286,7 @@ const char *virNetSASLSessionGetIdentity(virNetSASLSess= ion *sasl) err =3D sasl_getprop(sasl->conn, SASL_USERNAME, &val); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot query SASL username on connection %d (%s)= "), + _("cannot query SASL username on connection %1$d (%= 2$s)"), err, sasl_errstring(err, NULL, NULL)); val =3D NULL; goto cleanup; @@ -314,7 +314,7 @@ int virNetSASLSessionGetKeySize(virNetSASLSession *sasl) err =3D sasl_getprop(sasl->conn, SASL_SSF, &val); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot query SASL ssf on connection %d (%s)"), + _("cannot query SASL ssf on connection %1$d (%2$s)"= ), err, sasl_errstring(err, NULL, NULL)); ssf =3D -1; goto cleanup; @@ -350,7 +350,7 @@ int virNetSASLSessionSecProps(virNetSASLSession *sasl, err =3D sasl_setprop(sasl->conn, SASL_SEC_PROPS, &secprops); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot set security props %d (%s)"), + _("cannot set security props %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -374,7 +374,7 @@ static int virNetSASLSessionUpdateBufSize(virNetSASLSes= sion *sasl) err =3D sasl_getprop(sasl->conn, SASL_MAXOUTBUF, &u.ptr); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot get security props %d (%s)"), + _("cannot get security props %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -402,7 +402,7 @@ char *virNetSASLSessionListMechanisms(virNetSASLSession= *sasl) NULL); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot list SASL mechanisms %d (%s)"), + _("cannot list SASL mechanisms %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); goto cleanup; } @@ -458,7 +458,7 @@ int virNetSASLSessionClientStart(virNetSASLSession *sas= l, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -507,7 +507,7 @@ int virNetSASLSessionClientStep(virNetSASLSession *sasl, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to step SASL negotiation: %d (%s)"), + _("Failed to step SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -553,7 +553,7 @@ int virNetSASLSessionServerStart(virNetSASLSession *sas= l, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -598,7 +598,7 @@ int virNetSASLSessionServerStep(virNetSASLSession *sasl, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -631,7 +631,7 @@ ssize_t virNetSASLSessionEncode(virNetSASLSession *sasl, virObjectLock(sasl); if (inputLen > sasl->maxbufsize) { virReportSystemError(EINVAL, - _("SASL data length %zu too long, max %zu"), + _("SASL data length %1$zu too long, max %2$zu= "), inputLen, sasl->maxbufsize); goto cleanup; } @@ -645,7 +645,7 @@ ssize_t virNetSASLSessionEncode(virNetSASLSession *sasl, =20 if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to encode SASL data: %d (%s)"), + _("failed to encode SASL data: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -670,7 +670,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSession *sasl, virObjectLock(sasl); if (inputLen > sasl->maxbufsize) { virReportSystemError(EINVAL, - _("SASL data length %zu too long, max %zu"), + _("SASL data length %1$zu too long, max %2$zu= "), inputLen, sasl->maxbufsize); goto cleanup; } @@ -683,7 +683,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSession *sasl, *outputlen =3D outlen; if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to decode SASL data: %d (%s)"), + _("failed to decode SASL data: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index e97dfe8136..7233629f22 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -1110,7 +1110,7 @@ virNetServerGetClient(virNetServer *srv, return virObjectRef(client); } =20 - virReportError(VIR_ERR_NO_CLIENT, _("No client with matching ID '%llu'= "), id); + virReportError(VIR_ERR_NO_CLIENT, _("No client with matching ID '%1$ll= u'"), id); return NULL; } =20 diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index bdb3552c5d..c0c018b6be 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -1116,7 +1116,7 @@ static ssize_t virNetServerClientRead(virNetServerCli= ent *client) =20 if (client->rx->bufferLength <=3D client->rx->bufferOffset) { virReportError(VIR_ERR_RPC, - _("unexpected zero/negative length request %lld"), + _("unexpected zero/negative length request %1$lld"), (long long int)(client->rx->bufferLength - client->= rx->bufferOffset)); client->wantClose =3D true; return -1; @@ -1289,7 +1289,7 @@ static ssize_t virNetServerClientWrite(virNetServerCl= ient *client) =20 if (client->tx->bufferLength < client->tx->bufferOffset) { virReportError(VIR_ERR_RPC, - _("unexpected zero/negative length request %lld"), + _("unexpected zero/negative length request %1$lld"), (long long int)(client->tx->bufferLength - client->= tx->bufferOffset)); client->wantClose =3D true; return -1; diff --git a/src/rpc/virnetserverprogram.c b/src/rpc/virnetserverprogram.c index 58b6a278ca..2cce188a09 100644 --- a/src/rpc/virnetserverprogram.c +++ b/src/rpc/virnetserverprogram.c @@ -232,7 +232,7 @@ int virNetServerProgramUnknownError(virNetServerClient = *client, virNetMessageError rerr; =20 virReportError(VIR_ERR_RPC, - _("Cannot find program %d version %d"), req->prog, req-= >vers); + _("Cannot find program %1$d version %2$d"), req->prog, = req->vers); =20 memset(&rerr, 0, sizeof(rerr)); return virNetServerProgramSendError(req->prog, @@ -284,14 +284,14 @@ int virNetServerProgramDispatch(virNetServerProgram *= prog, /* Check version, etc. */ if (msg->header.prog !=3D prog->program) { virReportError(VIR_ERR_RPC, - _("program mismatch (actual %x, expected %x)"), + _("program mismatch (actual %1$x, expected %2$x)"), msg->header.prog, prog->program); goto error; } =20 if (msg->header.vers !=3D prog->version) { virReportError(VIR_ERR_RPC, - _("version mismatch (actual %x, expected %x)"), + _("version mismatch (actual %1$x, expected %2$x)"), msg->header.vers, prog->version); goto error; } @@ -323,7 +323,7 @@ int virNetServerProgramDispatch(virNetServerProgram *pr= og, case VIR_NET_STREAM_HOLE: default: virReportError(VIR_ERR_RPC, - _("Unexpected message type %u"), + _("Unexpected message type %1$u"), msg->header.type); goto error; } @@ -377,7 +377,7 @@ virNetServerProgramDispatchCall(virNetServerProgram *pr= og, =20 if (msg->header.status !=3D VIR_NET_OK) { virReportError(VIR_ERR_RPC, - _("Unexpected message status %u"), + _("Unexpected message status %1$u"), msg->header.status); goto error; } @@ -386,7 +386,7 @@ virNetServerProgramDispatchCall(virNetServerProgram *pr= og, =20 if (!dispatcher) { virReportError(VIR_ERR_RPC, - _("unknown procedure: %d"), + _("unknown procedure: %1$d"), msg->header.proc); goto error; } diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index b248ce24dc..910fb8dd67 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -162,7 +162,7 @@ virNetSocketCheckProtocolByLookup(const char *address, gaierr =3D=3D EAI_NONAME) { } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot resolve %s address: %s"), + _("Cannot resolve %1$s address: %2$s"), address, gai_strerror(gaierr)); return -1; @@ -346,7 +346,7 @@ int virNetSocketNewListenTCP(const char *nodename, e =3D getaddrinfo(nodename, service, &hints, &ai); if (e !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to resolve address '%s' service '%s': %s"= ), + _("Unable to resolve address '%1$s' service '%2$s':= %3$s"), nodename, service, gai_strerror(e)); return -1; } @@ -495,7 +495,7 @@ int virNetSocketNewListenUNIX(const char *path, addr.data.un.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.data.un.sun_path, path) < 0) { virReportSystemError(ENAMETOOLONG, - _("Path %s too long for unix socket"), path); + _("Path %1$s too long for unix socket"), path= ); goto error; } if (addr.data.un.sun_path[0] =3D=3D '@') @@ -508,7 +508,7 @@ int virNetSocketNewListenUNIX(const char *path, if (bind(fd, &addr.data.sa, addr.len) < 0) { umask(oldmask); virReportSystemError(errno, - _("Failed to bind socket to '%s'"), + _("Failed to bind socket to '%1$s'"), path); goto error; } @@ -519,7 +519,7 @@ int virNetSocketNewListenUNIX(const char *path, */ if (grp !=3D 0 && chown(path, user, grp)) { virReportSystemError(errno, - _("Failed to change ownership of '%s' to %d:%= d"), + _("Failed to change ownership of '%1$s' to %2= $d:%3$d"), path, (int)user, (int)grp); goto error; } @@ -598,7 +598,7 @@ int virNetSocketNewConnectTCP(const char *nodename, e =3D getaddrinfo(nodename, service, &hints, &ai); if (e !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to resolve address '%s' service '%s': %s"= ), + _("Unable to resolve address '%1$s' service '%2$s':= %3$s"), nodename, service, gai_strerror(e)); return -1; } @@ -625,7 +625,7 @@ int virNetSocketNewConnectTCP(const char *nodename, =20 if (fd =3D=3D -1) { virReportSystemError(savedErrno, - _("unable to connect to server at '%s:%s'"), + _("unable to connect to server at '%1$s:%2$s'= "), nodename, service); goto error; } @@ -685,7 +685,7 @@ int virNetSocketNewConnectUNIX(const char *path, =20 if (g_mkdir_with_parents(rundir, 0700) < 0) { virReportSystemError(errno, - _("Cannot create user runtime directory '= %s'"), + _("Cannot create user runtime directory '= %1$s'"), rundir); goto cleanup; } @@ -694,12 +694,12 @@ int virNetSocketNewConnectUNIX(const char *path, =20 if ((lockfd =3D open(lockpath, O_RDWR | O_CREAT, 0600)) < 0 || virSetCloseExec(lockfd) < 0) { - virReportSystemError(errno, _("Unable to create lock '%s'"), l= ockpath); + virReportSystemError(errno, _("Unable to create lock '%1$s'"),= lockpath); goto cleanup; } =20 if (virFileLock(lockfd, false, 0, 1, true) < 0) { - virReportSystemError(errno, _("Unable to lock '%s'"), lockpath= ); + virReportSystemError(errno, _("Unable to lock '%1$s'"), lockpa= th); goto cleanup; } } @@ -711,7 +711,7 @@ int virNetSocketNewConnectUNIX(const char *path, =20 remoteAddr.data.un.sun_family =3D AF_UNIX; if (virStrcpyStatic(remoteAddr.data.un.sun_path, path) < 0) { - virReportSystemError(ENOMEM, _("Path %s too long for unix socket")= , path); + virReportSystemError(ENOMEM, _("Path %1$s too long for unix socket= "), path); goto cleanup; } if (remoteAddr.data.un.sun_path[0] =3D=3D '@') @@ -728,7 +728,7 @@ int virNetSocketNewConnectUNIX(const char *path, if (!spawnDaemonPath || retries =3D=3D 0 || (errno !=3D ENOENT && errno !=3D ECONNREFUSED)) { - virReportSystemError(errno, _("Failed to connect socket to '%s= '"), + virReportSystemError(errno, _("Failed to connect socket to '%1= $s'"), path); goto cleanup; } @@ -924,7 +924,7 @@ virNetSocketNewConnectLibSSH2(const char *host, verify =3D VIR_NET_SSH_HOSTKEY_VERIFY_NORMAL; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid host key verification method: '%s'"), + _("Invalid host key verification method: '%1$s'"), knownHostsVerify); goto error; } @@ -955,7 +955,7 @@ virNetSocketNewConnectLibSSH2(const char *host, ret =3D virNetSSHSessionAuthAddAgentAuth(sess); } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid authentication method: '%s'"), + _("Invalid authentication method: '%1$s'"), authMethod); ret =3D -1; goto error; @@ -1050,7 +1050,7 @@ virNetSocketNewConnectLibssh(const char *host, verify =3D VIR_NET_LIBSSH_HOSTKEY_VERIFY_NORMAL; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid host key verification method: '%s'"), + _("Invalid host key verification method: '%1$s'"), knownHostsVerify); goto error; } @@ -1080,7 +1080,7 @@ virNetSocketNewConnectLibssh(const char *host, ret =3D virNetLibsshSessionAuthAddAgentAuth(sess); } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid authentication method: '%s'"), + _("Invalid authentication method: '%1$s'"), authMethod); ret =3D -1; goto error; @@ -1259,14 +1259,14 @@ virJSONValue *virNetSocketPreExecRestart(virNetSock= et *sock) =20 if (virSetInherit(sock->fd, true) < 0) { virReportSystemError(errno, - _("Cannot disable close-on-exec flag on socke= t %d"), + _("Cannot disable close-on-exec flag on socke= t %1$d"), sock->fd); goto error; } if (sock->errfd !=3D -1 && virSetInherit(sock->errfd, true) < 0) { virReportSystemError(errno, - _("Cannot disable close-on-exec flag on pipe = %d"), + _("Cannot disable close-on-exec flag on pipe = %1$d"), sock->errfd); goto error; } @@ -1764,7 +1764,7 @@ static ssize_t virNetSocketReadWire(virNetSocket *soc= k, char *buf, size_t len) if (ret < 0) { if (errout) virReportSystemError(errno, - _("Cannot recv data: %s"), errout); + _("Cannot recv data: %1$s"), errout); else virReportSystemError(errno, "%s", _("Cannot recv data")); @@ -1778,7 +1778,7 @@ static ssize_t virNetSocketReadWire(virNetSocket *soc= k, char *buf, size_t len) } else { if (errout) virReportSystemError(EIO, - _("End of file while reading data: %s= "), + _("End of file while reading data: %1= $s"), errout); else virReportSystemError(EIO, "%s", @@ -1985,7 +1985,7 @@ int virNetSocketSendFD(virNetSocket *sock, int fd) ret =3D 0; else virReportSystemError(errno, - _("Failed to send file descriptor %d"), + _("Failed to send file descriptor %1$d"), fd); goto cleanup; } diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index a3dd60f5a3..7bf27c161a 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -286,7 +286,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) if (!key) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("Failed to retrieve ssh host key: %s"), + _("Failed to retrieve ssh host key: %1$s"), errmsg); return -1; } @@ -346,7 +346,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) keyhashstr =3D virBufferContentAndReset(&buff); =20 askKey.type =3D VIR_CRED_ECHOPROMPT; - askKey.prompt =3D g_strdup_printf(_("Accept SSH host key with = hash '%s' for " "host '%s:%d' (%s/%s)?"), + askKey.prompt =3D g_strdup_printf(_("Accept SSH host key with = hash '%1$s' for host '%2$s:%3$d' (%4$s/%5$s)?"), keyhashstr, sess->hostname, se= ss->port, "y", "n"); =20 if (sess->cred->cb(&askKey, 1, sess->cred->cbdata)) { @@ -365,7 +365,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) if (!askKey.result || STRCASENEQ(askKey.result, "y")) { virReportError(VIR_ERR_SSH, - _("SSH host key for '%s' (%s) was not accep= ted"), + _("SSH host key for '%1$s' (%2$s) was not a= ccepted"), sess->hostname, keyhashstr); VIR_FREE(keyhashstr); VIR_FREE(askKey.result); @@ -427,7 +427,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) NULL) < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("unable to add SSH host key for host '%s': %s= "), + _("unable to add SSH host key for host '%1$s': = %2$s"), hostnameStr, errmsg); VIR_FREE(hostnameStr); return -1; @@ -442,7 +442,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) LIBSSH2_KNOWNHOST_FILE_OPENSSH) <= 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0= ); virReportError(VIR_ERR_SSH, - _("failed to write known_host file '%s': %s= "), + _("failed to write known_host file '%1$s': = %2$s"), sess->knownHostsFile, errmsg); return -1; @@ -458,10 +458,8 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) case LIBSSH2_KNOWNHOST_CHECK_MISMATCH: /* host key verification failed */ virReportError(VIR_ERR_AUTH_FAILED, - _("!!! SSH HOST KEY VERIFICATION FAILED !!!: " - "Identity of host '%s:%d' differs from stored ide= ntity. " - "Please verify the new host key '%s' to avoid pos= sible " - "man in the middle attack. The key is stored in '= %s'."), + _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identi= ty of host '%1$s:%2$d' differs from stored identity. " + "Please verify the new host key '%3$s' to avoid p= ossible man in the middle attack. The key is stored in '%4$s'."), sess->hostname, sess->port, knownHostEntry->key, sess->knownHostsFile); return -1; @@ -469,7 +467,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) case LIBSSH2_KNOWNHOST_CHECK_FAILURE: libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to validate SSH host key: %s"), + _("failed to validate SSH host key: %1$s"), errmsg); return -1; =20 @@ -525,7 +523,7 @@ virNetSSHAuthenticateAgent(virNetSSHSession *sess) VIR_WARNINGS_RESET libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("failed to authenticate using SSH agent: %s"), + _("failed to authenticate using SSH agent: %1$s= "), errmsg); return -1; } @@ -549,7 +547,7 @@ virNetSSHAuthenticateAgent(virNetSSHSession *sess) =20 libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("failed to authenticate using SSH agent: %s"), + _("failed to authenticate using SSH agent: %1$s"), errmsg); return -1; } @@ -586,8 +584,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, VIR_WARNINGS_RESET libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication with private key '%s' " - "has failed: %s"), + _("authentication with private key '%1$s' has faile= d: %2$s"), priv->filename, errmsg); return 1; /* auth failed */ } @@ -617,7 +614,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, return -1; } =20 - retr_passphrase.prompt =3D g_strdup_printf(_("Passphrase for key '%s'"= ), + retr_passphrase.prompt =3D g_strdup_printf(_("Passphrase for key '%1$s= '"), priv->filename); =20 if (sess->cred->cb(&retr_passphrase, 1, sess->cred->cbdata)) { @@ -643,8 +640,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication with private key '%s' " - "has failed: %s"), + _("authentication with private key '%1$s' has faile= d: %2$s"), priv->filename, errmsg); =20 VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR @@ -709,7 +705,7 @@ virNetSSHAuthenticatePassword(virNetSSHSession *sess) /* error path */ libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); =20 /* determine exist status */ if (rc =3D=3D LIBSSH2_ERROR_AUTHENTICATION_FAILED) @@ -781,14 +777,14 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSes= sion *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("keyboard interactive authentication failed: = %s"), + _("keyboard interactive authentication failed: = %1$s"), errmsg); return -1; } } libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("keyboard interactive authentication failed: %s"), + _("keyboard interactive authentication failed: %1$s"), errmsg); return 1; } @@ -824,7 +820,7 @@ virNetSSHAuthenticate(virNetSSHSession *sess) =20 libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("couldn't retrieve authentication methods list: %= s"), + _("couldn't retrieve authentication methods list: %= 1$s"), errmsg); return -1; } @@ -895,7 +891,7 @@ virNetSSHOpenChannel(virNetSSHSession *sess) if (!sess->channel) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to open ssh channel: %s"), + _("failed to open ssh channel: %1$s"), errmsg); return -1; } @@ -903,7 +899,7 @@ virNetSSHOpenChannel(virNetSSHSession *sess) if (libssh2_channel_exec(sess->channel, sess->channelCommand) !=3D 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to execute command '%s': %s"), + _("failed to execute command '%1$s': %2$s"), sess->channelCommand, errmsg); return -1; @@ -1080,13 +1076,13 @@ virNetSSHSessionSetHostKeyVerification(virNetSSHSes= sion *sess, LIBSSH2_KNOWNHOST_FILE_OPENSSH)= < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0= ); virReportError(VIR_ERR_SSH, - _("unable to load knownhosts file '%s': %s"= ), + _("unable to load knownhosts file '%1$s': %= 2$s"), hostsfile, errmsg); goto error; } } else if (!(flags & VIR_NET_SSH_HOSTKEY_FILE_CREATE)) { virReportError(VIR_ERR_SSH, - _("known hosts file '%s' does not exist"), + _("known hosts file '%1$s' does not exist"), hostsfile); goto error; } @@ -1186,7 +1182,7 @@ virNetSSHSessionConnect(virNetSSHSession *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_NO_CONNECT, - _("SSH session handshake failed: %s"), + _("SSH session handshake failed: %1$s"), errmsg); goto error; } @@ -1231,8 +1227,7 @@ virNetSSHChannelRead(virNetSSHSession *sess, if (sess->state !=3D VIR_NET_SSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_SSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_SSH, - _("Remote program terminated " - "with non-zero code: %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_SSH, "%s", @@ -1307,7 +1302,7 @@ virNetSSHChannelRead(virNetSSHSession *sess, if (libssh2_channel_eof(sess->channel)) { if (libssh2_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_SSH, - _("Remote command terminated with non-zero code= : %d"), + _("Remote command terminated with non-zero code= : %1$d"), libssh2_channel_get_exit_status(sess->channel)); sess->channelCommandReturnValue =3D libssh2_channel_get_exit_s= tatus(sess->channel); sess->state =3D VIR_NET_SSH_STATE_ERROR_REMOTE; @@ -1342,7 +1337,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, if (sess->state !=3D VIR_NET_SSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_SSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_SSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_SSH, "%s", @@ -1354,7 +1349,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, if (libssh2_channel_eof(sess->channel)) { if (libssh2_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_SSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), libssh2_channel_get_exit_status(sess->channel)); sess->state =3D VIR_NET_SSH_STATE_ERROR_REMOTE; sess->channelCommandReturnValue =3D libssh2_channel_get_exit_s= tatus(sess->channel); @@ -1379,7 +1374,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, sess->state =3D VIR_NET_SSH_STATE_ERROR; libssh2_session_last_error(sess->session, &msg, NULL, 0); virReportError(VIR_ERR_SSH, - _("write failed: %s"), msg); + _("write failed: %1$s"), msg); } =20 cleanup: diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index cfd26f0701..f72597ee80 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -103,7 +103,7 @@ virNetTLSContextCheckCertFile(const char *type, const c= har *file, bool allowMiss return 1; =20 virReportSystemError(errno, - _("Cannot read %s '%s'"), + _("Cannot read %1$s '%2$s'"), type, file); return -1; } @@ -134,10 +134,10 @@ static int virNetTLSContextCheckCertTimes(gnutls_x509= _crt_t cert, if (gnutls_x509_crt_get_expiration_time(cert) < now) { virReportError(VIR_ERR_SYSTEM_ERROR, (isCA ? - _("The CA certificate %s has expired") : + _("The CA certificate %1$s has expired") : (isServer ? - _("The server certificate %s has expired") : - _("The client certificate %s has expired"))), + _("The server certificate %1$s has expired") : + _("The client certificate %1$s has expired"))), certFile); return -1; } @@ -145,10 +145,10 @@ static int virNetTLSContextCheckCertTimes(gnutls_x509= _crt_t cert, if (gnutls_x509_crt_get_activation_time(cert) > now) { virReportError(VIR_ERR_SYSTEM_ERROR, (isCA ? - _("The CA certificate %s is not yet active") : + _("The CA certificate %1$s is not yet active") : (isServer ? - _("The server certificate %s is not yet active") : - _("The client certificate %s is not yet active"))= ), + _("The server certificate %1$s is not yet active"= ) : + _("The client certificate %1$s is not yet active"= ))), certFile); return -1; } @@ -170,28 +170,28 @@ static int virNetTLSContextCheckCertBasicConstraints(= gnutls_x509_crt_t cert, if (status > 0) { /* It is a CA cert */ if (!isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("The certificate %s basic constraints show a = CA, but we need one for a server") : - _("The certificate %s basic constraints show a = CA, but we need one for a client"), + _("The certificate %1$s basic constraints show = a CA, but we need one for a server") : + _("The certificate %1$s basic constraints show = a CA, but we need one for a client"), certFile); return -1; } } else if (status =3D=3D 0) { /* It is not a CA cert */ if (isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("The certificate %s basic constraints do not = show a CA"), + _("The certificate %1$s basic constraints do no= t show a CA"), certFile); return -1; } } else if (status =3D=3D GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { /* M= issing basicConstraints */ if (isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("The certificate %s is missing basic constrai= nts for a CA"), + _("The certificate %1$s is missing basic constr= aints for a CA"), certFile); return -1; } } else { /* General error */ virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s basic constraints= %s"), + _("Unable to query certificate %1$s basic constrain= ts %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -217,7 +217,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, GNUTLS_KEY_DIGITAL_SIGNATURE|GNUTLS_KEY_KEY_ENCIPHERMENT; } else { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key usage %s"= ), + _("Unable to query certificate %1$s key usage %= 2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -227,7 +227,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_KEY_CERT_SIGN)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit cer= tificate signing"), + _("Certificate %1$s usage does not permit c= ertificate signing"), certFile); return -1; } else { @@ -239,7 +239,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_DIGITAL_SIGNATURE)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit dig= ital signature"), + _("Certificate %1$s usage does not permit d= igital signature"), certFile); return -1; } else { @@ -250,7 +250,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_KEY_ENCIPHERMENT)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit key= encipherment"), + _("Certificate %1$s usage does not permit k= ey encipherment"), certFile); return -1; } else { @@ -291,7 +291,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, } if (status !=3D GNUTLS_E_SHORT_MEMORY_BUFFER) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key purpose %= s"), + _("Unable to query certificate %1$s key purpose= %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -301,7 +301,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (status < 0) { VIR_FREE(buffer); virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key purpose %= s"), + _("Unable to query certificate %1$s key purpose= %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -324,7 +324,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (!allowServer) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s purpose does not allow us= e for with a TLS server"), + _("Certificate %1$s purpose does not allow = use for with a TLS server"), certFile); return -1; } else { @@ -336,7 +336,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (!allowClient) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s purpose does not allow us= e for with a TLS client"), + _("Certificate %1$s purpose does not allow = use for with a TLS client"), certFile); return -1; } else { @@ -389,7 +389,7 @@ virNetTLSContextCheckCertDN(gnutls_x509_crt_t cert, if (hostname && !gnutls_x509_crt_check_hostname(cert, hostname)) { virReportError(VIR_ERR_RPC, - _("Certificate %s owner does not match the hostname= %s"), + _("Certificate %1$s owner does not match the hostna= me %2$s"), certFile, hostname); return -1; } @@ -438,8 +438,8 @@ static int virNetTLSContextCheckCertPair(gnutls_x509_cr= t_t cert, NULL, 0, 0, &status) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("Unable to verify server certificate %s against C= A certificate %s") : - _("Unable to verify client certificate %s against C= A certificate %s"), + _("Unable to verify server certificate %1$s against= CA certificate %2$s") : + _("Unable to verify client certificate %1$s against= CA certificate %2$s"), certFile, cacertFile); return -1; } @@ -460,7 +460,7 @@ static int virNetTLSContextCheckCertPair(gnutls_x509_cr= t_t cert, reason =3D _("The certificate uses an insecure algorithm"); =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Our own certificate %s failed validation against= %s: %s"), + _("Our own certificate %1$s failed validation again= st %2$s: %3$s"), certFile, cacertFile, reason); return -1; } @@ -494,8 +494,8 @@ static gnutls_x509_crt_t virNetTLSContextLoadCertFromFi= le(const char *certFile, =20 if (gnutls_x509_crt_import(cert, &data, GNUTLS_X509_FMT_PEM) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("Unable to import server certificate %s") : - _("Unable to import client certificate %s"), + _("Unable to import server certificate %1$s") : + _("Unable to import client certificate %1$s"), certFile); goto cleanup; } @@ -529,7 +529,7 @@ static int virNetTLSContextLoadCACertListFromFile(const= char *certFile, =20 if (gnutls_x509_crt_list_import(certs, &certMax, &data, GNUTLS_X509_FM= T_PEM, 0) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to import CA certificate list %s"), + _("Unable to import CA certificate list %1$s"), certFile); return -1; } @@ -602,7 +602,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 CA certificate: %s: %s"), + _("Unable to set x509 CA certificate: %1$s: %2$= s"), cacert, gnutls_strerror(err)); return -1; } @@ -620,7 +620,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM= ); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 certificate revocatio= n list: %s: %s"), + _("Unable to set x509 certificate revocatio= n list: %1$s: %2$s"), cacrl, gnutls_strerror(err)); return -1; } @@ -645,7 +645,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 key and certificate: = %s, %s: %s"), + _("Unable to set x509 key and certificate: = %1$s, %2$s: %3$s"), key, cert, gnutls_strerror(err)); return -1; } @@ -690,7 +690,7 @@ static virNetTLSContext *virNetTLSContextNew(const char= *cacert, ctxt->x509cred =3D NULL; =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to allocate x509 credentials: %s"), + _("Unable to allocate x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -896,7 +896,7 @@ int virNetTLSContextReloadForServer(virNetTLSContext *c= txt, err =3D gnutls_certificate_allocate_credentials(&ctxt->x509cred); if (err) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to allocate x509 credentials: %s"), + _("Unable to allocate x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -946,7 +946,7 @@ static int virNetTLSContextValidCertificate(virNetTLSCo= ntext *ctxt, =20 if ((ret =3D gnutls_certificate_verify_peers2(sess->session, &status))= < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to verify TLS peer: %s"), + _("Unable to verify TLS peer: %1$s"), gnutls_strerror(ret)); goto authdeny; } @@ -967,7 +967,7 @@ static int virNetTLSContextValidCertificate(virNetTLSCo= ntext *ctxt, reason =3D _("The certificate uses an insecure algorithm"); =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate failed validation: %s"), + _("Certificate failed validation: %1$s"), reason); goto authdeny; } @@ -1016,7 +1016,7 @@ static int virNetTLSContextValidCertificate(virNetTLS= Context *ctxt, } if (ret !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to get certificate %s distinguish= ed name: %s"), + _("Failed to get certificate %1$s distingui= shed name: %2$s"), "[session]", gnutls_strerror(ret)); goto authfail; } @@ -1160,7 +1160,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, if ((err =3D gnutls_init(&sess->session, ctxt->isServer ? GNUTLS_SERVER : GNUTLS_CLIENT)= ) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to initialize TLS session: %s"), + _("Failed to initialize TLS session: %1$s"), gnutls_strerror(err)); goto error; } @@ -1174,7 +1174,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, priority, NULL)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to set TLS session priority to %s: %s"), + _("Failed to set TLS session priority to %1$s: %2$s= "), priority, gnutls_strerror(err)); goto error; } @@ -1183,7 +1183,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, GNUTLS_CRD_CERTIFICATE, ctxt->x509cred)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed set TLS x509 credentials: %s"), + _("Failed set TLS x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -1313,7 +1313,7 @@ int virNetTLSSessionHandshake(virNetTLSSession *sess) #endif =20 virReportError(VIR_ERR_AUTH_FAILED, - _("TLS handshake failed %s"), + _("TLS handshake failed %1$s"), gnutls_strerror(ret)); ret =3D -1; =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464802; cv=none; d=zohomail.com; s=zohoarc; b=DhgErxJM0xa1GW4vVyqg7368E0lv2DowPZduEaiF8n62Sl0aEFM+L2GcCre1WnjmO9vlBzjOhQbL9FpEaVBR4i7g93vjCzsRrZOS607pY/IF2svc/iVXf/9FawbcB9hKeBSSsBrVqR4wjCHx+GAXzg33nZ0Mj8ueOuswxhanjqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464802; 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=D78I0Ws7hOo8nDJsmmzDNBdHgqXw5I2zLnv69GVpCSQ=; b=ZpiUOF+fDIHw0H7R/XZXvy4nFWI9Lw0jkC/ywKJakcq7Fs6oZgyuW+vSj4Ldph6bma3AS46znPID4zwVnJYRG2fI2UX5gQ8VEmEyqJbthIWK8CVGvbCPviNIOzPD0pladJHc6GeHd1RzRPzmcfoNHBHGg3Gk1hY+9xiPPNwQsYM= 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 1678464802052581.0768161800322; Fri, 10 Mar 2023 08:13:22 -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-153-fcZLQUv_ME6_HdEyD34StA-1; Fri, 10 Mar 2023 11:11:38 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70BC8183B3D9; Fri, 10 Mar 2023 16:11:00 +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 58AD7140EBF4; Fri, 10 Mar 2023 16:11:00 +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 3D65C1946A6F; Fri, 10 Mar 2023 16:11:00 +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 C08FE1946587 for ; Fri, 10 Mar 2023 16:10:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B6E3740C83B6; Fri, 10 Mar 2023 16:10:58 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41206403570E for ; Fri, 10 Mar 2023 16:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464800; 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=D78I0Ws7hOo8nDJsmmzDNBdHgqXw5I2zLnv69GVpCSQ=; b=V9+W9qtIMY4Ery2T2kJmRW74kppg/wuJk8ch2bEnmmFxxEV1nbziPuuxr9mnF3IZHWPAAW 5AqOlf88dNbk3oDrxEUbcVOUKcN584V1ZZOzh05Oq2XQV49XGPT7YKBFZsF+yA2Ir9PLjK cdIt8xtCIhKUpdDlwuclxLXHrbtB7GQ= X-MC-Unique: fcZLQUv_ME6_HdEyD34StA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 35/51] security: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:51 +0100 Message-Id: <6f7c38b4749524556fab39c658bb68077c6121af.1678463799.git.jdenemar@redhat.com> 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.7 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: 1678464803784100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/security/security_apparmor.c | 37 +++++----- src/security/security_dac.c | 28 ++++---- src/security/security_driver.c | 4 +- src/security/security_manager.c | 6 +- src/security/security_selinux.c | 114 ++++++++++++++----------------- src/security/security_util.c | 16 ++--- src/security/virt-aa-helper.c | 10 +-- 7 files changed, 97 insertions(+), 118 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_appar= mor.c index b63b248975..e619919604 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -85,8 +85,8 @@ profile_status(const char *str, const int check_enforcing) =20 if (virFileReadAll(APPARMOR_PROFILES_PATH, MAX_FILE_LEN, &content) < 0= ) { virReportSystemError(errno, - _("Failed to read AppArmor profiles list " - "\'%s\'"), APPARMOR_PROFILES_PATH); + _("Failed to read AppArmor profiles list \'%1= $s\'"), + APPARMOR_PROFILES_PATH); return -2; } =20 @@ -128,7 +128,7 @@ profile_status_file(const char *str) =20 if ((len =3D virFileReadAll(profile, MAX_FILE_LEN, &content)) < 0) { virReportSystemError(errno, - _("Failed to read \'%s\'"), profile); + _("Failed to read \'%1$s\'"), profile); goto failed; } =20 @@ -265,8 +265,7 @@ reload_profile(virSecurityManager *mgr, if (profile_loaded(secdef->imagelabel) >=3D 0) { if (load_profile(mgr, secdef->imagelabel, def, fn, append) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot update AppArmor profile " - "\'%s\'"), + _("cannot update AppArmor profile \'%1$s\'"), secdef->imagelabel); return -1; } @@ -327,12 +326,12 @@ AppArmorSecurityManagerProbe(const char *virtDriver G= _GNUC_UNUSED) =20 if (!virFileExists(template_qemu)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("template \'%s\' does not exist"), template_qemu); + _("template \'%1$s\' does not exist"), template_qem= u); return SECURITY_DRIVER_DISABLE; } if (!virFileExists(template_lxc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("template \'%s\' does not exist"), template_lxc); + _("template \'%1$s\' does not exist"), template_lxc= ); return SECURITY_DRIVER_DISABLE; } =20 @@ -414,8 +413,8 @@ AppArmorGenSecurityLabel(virSecurityManager *mgr G_GNUC= _UNUSED, /* Now that we have a label, load the profile into the kernel. */ if (load_profile(mgr, secdef->label, def, NULL, false) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot load AppArmor profile " - "\'%s\'"), secdef->label); + _("cannot load AppArmor profile \'%1$s\'"), + secdef->label); goto err; } =20 @@ -518,7 +517,7 @@ AppArmorRestoreSecurityAllLabel(virSecurityManager *mgr= G_GNUC_UNUSED, if (secdef->type =3D=3D VIR_DOMAIN_SECLABEL_DYNAMIC) { if ((rc =3D remove_profile(secdef->label)) !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not remove profile for \'%s\'"), + _("could not remove profile for \'%1$s\'"), secdef->label); } } @@ -544,9 +543,7 @@ AppArmorSetSecurityProcessLabel(virSecurityManager *mgr= G_GNUC_UNUSED, =20 if (STRNEQ(SECURITY_APPARMOR_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "\'%s\' model configured for domain, but " - "hypervisor driver is \'%s\'."), + _("security label driver mismatch: \'%1$s\' model c= onfigured for domain, but hypervisor driver is \'%2$s\'."), secdef->model, SECURITY_APPARMOR_NAME); if (use_apparmor() > 0) return -1; @@ -582,9 +579,7 @@ AppArmorSetSecurityChildProcessLabel(virSecurityManager= *mgr G_GNUC_UNUSED, =20 if (STRNEQ(SECURITY_APPARMOR_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "\'%s\' model configured for domain, but " - "hypervisor driver is \'%s\'."), + _("security label driver mismatch: \'%1$s\' model c= onfigured for domain, but hypervisor driver is \'%2$s\'."), secdef->model, SECURITY_APPARMOR_NAME); if (use_apparmor() > 0) return -1; @@ -647,7 +642,7 @@ AppArmorSetMemoryLabel(virSecurityManager *mgr, case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM: if (!virFileExists(mem->nvdimmPath)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: \'%s\' does not exist"), + _("%1$s: \'%2$s\' does not exist"), __func__, mem->nvdimmPath); return -1; } @@ -686,13 +681,13 @@ AppArmorSetInputLabel(virSecurityManager *mgr, case VIR_DOMAIN_INPUT_TYPE_EVDEV: if (input->source.evdev =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: passthrough input device has no source"), + _("%1$s: passthrough input device has no source= "), __func__); return -1; } if (!virFileExists(input->source.evdev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: \'%s\' does not exist"), + _("%1$s: \'%2$s\' does not exist"), __func__, input->source.evdev); return -1; } @@ -744,7 +739,7 @@ AppArmorSetSecurityImageLabelInternal(virSecurityManage= r *mgr, /* if the device doesn't exist, error out */ if (!virFileExists(path)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("\'%s\' does not exist"), + _("\'%1$s\' does not exist"), path); return -1; } @@ -789,7 +784,7 @@ AppArmorSecurityVerify(virSecurityManager *mgr G_GNUC_U= NUSED, if (secdef->type =3D=3D VIR_DOMAIN_SECLABEL_STATIC) { if (use_apparmor() < 0 || profile_status(secdef->label, 0) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid security label \'%s\'"), + _("Invalid security label \'%1$s\'"), secdef->label); return -1; } diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 9be8f458d1..1c1d6f0cff 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -689,7 +689,7 @@ virSecurityDACSetOwnershipInternal(const virSecurityDAC= Data *priv, return 0; =20 if (stat(path, &sb) < 0) { - virReportSystemError(errno, _("unable to stat: %s"), path); + virReportSystemError(errno, _("unable to stat: %1$s"), path); return -1; } =20 @@ -721,8 +721,7 @@ virSecurityDACSetOwnershipInternal(const virSecurityDAC= Data *priv, (long)uid, (long)gid, NULLSTR(path)); } else { virReportSystemError(errno, - _("unable to set user and group to '%ld:%= ld' " - "on '%s'"), + _("unable to set user and group to '%1$ld= :%2$ld' on '%3$s'"), (long)uid, (long)gid, NULLSTR(path)); return -1; } @@ -760,7 +759,7 @@ virSecurityDACSetOwnership(virSecurityManager *mgr, =20 if (remember && path) { if (stat(path, &sb) < 0) { - virReportSystemError(errno, _("unable to stat: %s"), path); + virReportSystemError(errno, _("unable to stat: %1$s"), path); return -1; } =20 @@ -778,8 +777,8 @@ virSecurityDACSetOwnership(virSecurityManager *mgr, * XATTRs so decrease it. */ if (sb.st_uid !=3D uid || sb.st_gid !=3D gid) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Setting different DAC user or group on %= s " - "which is already in use"), path); + _("Setting different DAC user or group on %= 1$s which is already in use"), + path); goto error; } } @@ -2323,8 +2322,7 @@ virSecurityDACGenLabel(virSecurityManager *mgr, if (seclabel->model && STRNEQ(seclabel->model, SECURITY_DAC_NAME)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label model %s is not supported " - "with selinux"), + _("security label model %1$s is not supported with = selinux"), seclabel->model); return rc; } @@ -2333,8 +2331,8 @@ virSecurityDACGenLabel(virSecurityManager *mgr, case VIR_DOMAIN_SECLABEL_STATIC: if (seclabel->label =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing label for static security " - "driver in domain %s"), def->name); + _("missing label for static security driver in = domain %1$s"), + def->name); return rc; } break; @@ -2343,8 +2341,8 @@ virSecurityDACGenLabel(virSecurityManager *mgr, (unsigned int)priv->group); if (seclabel->label =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot generate dac user and group id " - "for domain %s"), def->name); + _("cannot generate dac user and group id for do= main %1$s"), + def->name); return rc; } break; @@ -2354,7 +2352,7 @@ virSecurityDACGenLabel(virSecurityManager *mgr, case VIR_DOMAIN_SECLABEL_DEFAULT: case VIR_DOMAIN_SECLABEL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected security label type '%s'"), + _("unexpected security label type '%1$s'"), virDomainSeclabelTypeToString(seclabel->type)); return rc; } @@ -2394,7 +2392,7 @@ virSecurityDACGetProcessLabelInternal(pid_t pid, =20 if (g_lstat(path, &sb) < 0) { virReportSystemError(errno, - _("unable to get uid and gid for PID %d via p= rocfs"), + _("unable to get uid and gid for PID %1$d via= procfs"), pid); return -1; } @@ -2419,7 +2417,7 @@ virSecurityDACGetProcessLabelInternal(pid_t pid, =20 if (sysctl(mib, 4, &p, &len, NULL, 0) < 0) { virReportSystemError(errno, - _("unable to get PID %d uid and gid via sysct= l"), + _("unable to get PID %1$d uid and gid via sys= ctl"), pid); return -1; } diff --git a/src/security/security_driver.c b/src/security/security_driver.c index b663b53244..ae11f595eb 100644 --- a/src/security/security_driver.c +++ b/src/security/security_driver.c @@ -70,7 +70,7 @@ virSecurityDriver *virSecurityDriverLookup(const char *na= me, VIR_DEBUG("Not enabled name=3D%s", tmp->name); if (name && STREQ(tmp->name, name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Security driver %s not enabled"), + _("Security driver %1$s not enabled"), name); return NULL; } @@ -84,7 +84,7 @@ virSecurityDriver *virSecurityDriverLookup(const char *na= me, =20 if (!drv) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Security driver %s not found"), + _("Security driver %1$s not found"), NULLSTR(name)); return NULL; } diff --git a/src/security/security_manager.c b/src/security/security_manage= r.c index 2f8e89cb04..5846d499d9 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -728,7 +728,7 @@ static int virSecurityManagerCheckModel(virSecurityMana= ger *mgr, } =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Security driver model '%s' is not available"), + _("Security driver model '%1$s' is not available"), secmodel); cleanup: VIR_FREE(sec_managers); @@ -1354,7 +1354,7 @@ virSecurityManagerMetadataLock(virSecurityManager *mg= r G_GNUC_UNUSED, } =20 virReportSystemError(errno, - _("unable to open %s"), + _("unable to open %1$s"), p); goto cleanup; } @@ -1369,7 +1369,7 @@ virSecurityManagerMetadataLock(virSecurityManager *mg= r G_GNUC_UNUSED, continue; } else { virReportSystemError(errno, - _("unable to lock %s for metadata= change"), + _("unable to lock %1$s for metada= ta change"), p); VIR_FORCE_CLOSE(fd); goto cleanup; diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index e43962435f..19d30c1039 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -361,7 +361,7 @@ virSecuritySELinuxMCSFind(virSecurityManager *mgr, =20 if (catRange < 8) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Category range c%d-c%d too small"), + _("Category range c%1$d-c%2$d too small"), catMin, catMax); return NULL; } @@ -438,7 +438,7 @@ virSecuritySELinuxMCSGetProcessRange(char **sens, } if (!(ourContext =3D context_new(ourSecContext))) { virReportSystemError(errno, - _("Unable to parse current SELinux context '%= s'"), + _("Unable to parse current SELinux context '%= 1$s'"), ourSecContext); goto cleanup; } @@ -470,14 +470,14 @@ virSecuritySELinuxMCSGetProcessRange(char **sens, tmp =3D cat; if (tmp[0] !=3D 'c') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse category in %s"), + _("Cannot parse category in %1$s"), cat); goto cleanup; } tmp++; if (virStrToLong_i(tmp, &tmp, 10, catMin) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse category in %s"), + _("Cannot parse category in %1$s"), cat); goto cleanup; } @@ -493,21 +493,21 @@ virSecuritySELinuxMCSGetProcessRange(char **sens, /* Find & extract category max (if any) */ if (tmp[0] !=3D '.') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse category in %s"), + _("Cannot parse category in %1$s"), cat); goto cleanup; } tmp++; if (tmp[0] !=3D 'c') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse category in %s"), + _("Cannot parse category in %1$s"), cat); goto cleanup; } tmp++; if (virStrToLong_i(tmp, &tmp, 10, catMax) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse category in %s"), + _("Cannot parse category in %1$s"), cat); goto cleanup; } @@ -542,7 +542,7 @@ virSecuritySELinuxContextAddRange(char *src, =20 if (context_range_set(dstcon, context_range_get(srccon)) =3D=3D -1) { virReportSystemError(errno, - _("unable to set security context range '%s'"= ), dst); + _("unable to set security context range '%1$s= '"), dst); goto cleanup; } =20 @@ -581,7 +581,7 @@ virSecuritySELinuxGenNewContext(const char *basecontext, } if (!(ourContext =3D context_new(ourSecContext))) { virReportSystemError(errno, - _("Unable to parse current SELinux context '%= s'"), + _("Unable to parse current SELinux context '%= 1$s'"), ourSecContext); goto cleanup; } @@ -589,7 +589,7 @@ virSecuritySELinuxGenNewContext(const char *basecontext, =20 if (!(context =3D context_new(basecontext))) { virReportSystemError(errno, - _("Unable to parse base SELinux context '%s'"= ), + _("Unable to parse base SELinux context '%1$s= '"), basecontext); goto cleanup; } @@ -597,7 +597,7 @@ virSecuritySELinuxGenNewContext(const char *basecontext, if (context_user_set(context, context_user_get(ourContext)) !=3D 0) { virReportSystemError(errno, - _("Unable to set SELinux context user '%s'"), + _("Unable to set SELinux context user '%1$s'"= ), context_user_get(ourContext)); goto cleanup; } @@ -606,14 +606,14 @@ virSecuritySELinuxGenNewContext(const char *baseconte= xt, context_role_set(context, context_role_get(ourContext)) !=3D 0) { virReportSystemError(errno, - _("Unable to set SELinux context role '%s'"), + _("Unable to set SELinux context role '%1$s'"= ), context_role_get(ourContext)); goto cleanup; } =20 if (context_range_set(context, mcs) !=3D 0) { virReportSystemError(errno, - _("Unable to set SELinux context MCS '%s'"), + _("Unable to set SELinux context MCS '%1$s'"), mcs); goto cleanup; } @@ -655,7 +655,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManager *mgr) =20 if (!data->domain_context) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'process' value in selinux lxc contexts = file '%s'"), + _("missing 'process' value in selinux lxc contexts = file '%1$s'"), selinux_lxc_contexts_path()); goto error; } @@ -665,7 +665,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManager *mgr) =20 if (!data->file_context) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'file' value in selinux lxc contexts fil= e '%s'"), + _("missing 'file' value in selinux lxc contexts fil= e '%1$s'"), selinux_lxc_contexts_path()); goto error; } @@ -675,7 +675,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManager *mgr) =20 if (!data->content_context) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing 'content' value in selinux lxc contexts = file '%s'"), + _("missing 'content' value in selinux lxc contexts = file '%1$s'"), selinux_lxc_contexts_path()); goto error; } @@ -711,7 +711,7 @@ virSecuritySELinuxQEMUInitialize(virSecurityManager *mg= r) =20 if (virFileReadAll(selinux_virtual_domain_context_path(), MAX_CONTEXT,= &(data->domain_context)) < 0) { virReportSystemError(errno, - _("cannot read SELinux virtual domain context= file '%s'"), + _("cannot read SELinux virtual domain context= file '%1$s'"), selinux_virtual_domain_context_path()); goto error; } @@ -733,7 +733,7 @@ virSecuritySELinuxQEMUInitialize(virSecurityManager *mg= r) =20 if (virFileReadAll(selinux_virtual_image_context_path(), 2*MAX_CONTEXT= , &(data->file_context)) < 0) { virReportSystemError(errno, - _("cannot read SELinux virtual image context = file %s"), + _("cannot read SELinux virtual image context = file %1$s"), selinux_virtual_image_context_path()); goto error; } @@ -822,7 +822,7 @@ virSecuritySELinuxGenLabel(virSecurityManager *mgr, if (seclabel->model && STRNEQ(seclabel->model, SECURITY_SELINUX_NAME)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label model %s is not supported with se= linux"), + _("security label model %1$s is not supported with = selinux"), seclabel->model); return rc; } @@ -833,7 +833,7 @@ virSecuritySELinuxGenLabel(virSecurityManager *mgr, case VIR_DOMAIN_SECLABEL_STATIC: if (!(ctx =3D context_new(seclabel->label))) { virReportSystemError(errno, - _("unable to allocate socket security con= text '%s'"), + _("unable to allocate socket security con= text '%1$s'"), seclabel->label); return rc; } @@ -899,7 +899,7 @@ virSecuritySELinuxGenLabel(virSecurityManager *mgr, case VIR_DOMAIN_SECLABEL_LAST: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected security label type '%s'"), + _("unexpected security label type '%1$s'"), virDomainSeclabelTypeToString(seclabel->type)); goto cleanup; } @@ -959,7 +959,7 @@ virSecuritySELinuxReserveLabel(virSecurityManager *mgr, =20 if (getpidcon_raw(pid, &pctx) =3D=3D -1) { virReportSystemError(errno, - _("unable to get PID %d security context"), p= id); + _("unable to get PID %1$d security context"),= pid); return -1; } =20 @@ -976,7 +976,7 @@ virSecuritySELinuxReserveLabel(virSecurityManager *mgr, =20 if (rv =3D=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("MCS level for existing domain label %s already r= eserved"), + _("MCS level for existing domain label %1$s already= reserved"), (char*)pctx); goto error; } @@ -1197,15 +1197,14 @@ virSecuritySELinuxGetProcessLabel(virSecurityManage= r *mgr G_GNUC_UNUSED, =20 if (getpidcon_raw(pid, &ctx) =3D=3D -1) { virReportSystemError(errno, - _("unable to get PID %d security context"), + _("unable to get PID %1$d security context"), pid); return -1; } =20 if (virStrcpy(sec->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); return -1; @@ -1267,8 +1266,7 @@ virSecuritySELinuxSetFileconImpl(const char *path, const char *msg; if (virFileIsSharedFSType(path, VIR_FILE_SHFS_NFS) =3D=3D 1 && security_get_boolean_active("virt_use_nfs") !=3D 1) { - msg =3D _("Setting security context '%s' on '%s' not suppo= rted. " - "Consider setting virt_use_nfs"); + msg =3D _("Setting security context '%1$s' on '%2$s' not s= upported. Consider setting virt_use_nfs"); if (security_getenforce() =3D=3D 1) VIR_WARN(msg, tcon, path); else @@ -1286,7 +1284,7 @@ virSecuritySELinuxSetFileconImpl(const char *path, (security_getenforce() =3D=3D 1 && (setfilecon_errno !=3D EPERM || privileged))) { virReportSystemError(setfilecon_errno, - _("unable to set security context '%s= ' on '%s'"), + _("unable to set security context '%1= $s' on '%2$s'"), tcon, path); return -1; } @@ -1323,7 +1321,7 @@ virSecuritySELinuxSetFilecon(virSecurityManager *mgr, if (getfilecon_raw(path, &econ) < 0 && errno !=3D ENOTSUP && errno !=3D ENODATA) { virReportSystemError(errno, - _("unable to get SELinux context of %s"), + _("unable to get SELinux context of %1$s"= ), path); goto cleanup; } @@ -1345,8 +1343,8 @@ virSecuritySELinuxSetFilecon(virSecurityManager *mgr, * incremented in XATTRs so decrease it. */ if (STRNEQ(econ, tcon)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Setting different SELinux label on %= s " - "which is already in use"), path); + _("Setting different SELinux label on %= 1$s which is already in use"), + path); goto cleanup; } } @@ -1402,7 +1400,7 @@ virSecuritySELinuxFSetFilecon(int fd, char *tcon) */ if (fsetfilecon_errno !=3D EOPNOTSUPP) { virReportSystemError(fsetfilecon_errno, - _("unable to set security context '%s' on= fd %d"), + _("unable to set security context '%1$s' = on fd %2$d"), tcon, fd); if (security_getenforce() =3D=3D 1) return -1; @@ -2933,9 +2931,7 @@ virSecuritySELinuxVerify(virSecurityManager *mgr G_GN= UC_UNUSED, =20 if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); return -1; } @@ -2943,7 +2939,7 @@ virSecuritySELinuxVerify(virSecurityManager *mgr G_GN= UC_UNUSED, if (secdef->type =3D=3D VIR_DOMAIN_SECLABEL_STATIC) { if (security_check_context(secdef->label) !=3D 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid security label %s"), secdef->label); + _("Invalid security label %1$s"), secdef->label= ); return -1; } } @@ -2964,9 +2960,7 @@ virSecuritySELinuxSetProcessLabel(virSecurityManager = *mgr G_GNUC_UNUSED, VIR_DEBUG("label=3D%s", secdef->label); if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); if (security_getenforce() =3D=3D 1) return -1; @@ -2974,7 +2968,7 @@ virSecuritySELinuxSetProcessLabel(virSecurityManager = *mgr G_GNUC_UNUSED, =20 if (setexeccon_raw(secdef->label) =3D=3D -1) { virReportSystemError(errno, - _("unable to set security context '%s'"), + _("unable to set security context '%1$s'"), secdef->label); if (security_getenforce() =3D=3D 1) return -1; @@ -2998,9 +2992,7 @@ virSecuritySELinuxSetChildProcessLabel(virSecurityMan= ager *mgr G_GNUC_UNUSED, VIR_DEBUG("label=3D%s", secdef->label); if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); if (security_getenforce() =3D=3D 1) return -1; @@ -3027,16 +3019,14 @@ virSecuritySELinuxSetDaemonSocketLabel(virSecurityM= anager *mgr G_GNUC_UNUSED, =20 if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); goto done; } =20 if (getcon_raw(&scon) =3D=3D -1) { virReportSystemError(errno, - _("unable to get current process context '%s'= "), + _("unable to get current process context '%1$= s'"), secdef->label); goto done; } @@ -3047,7 +3037,7 @@ virSecuritySELinuxSetDaemonSocketLabel(virSecurityMan= ager *mgr G_GNUC_UNUSED, VIR_DEBUG("Setting VM %s socket context %s", def->name, str); if (setsockcreatecon_raw(str) =3D=3D -1) { virReportSystemError(errno, - _("unable to set socket security context '%s'= "), str); + _("unable to set socket security context '%1$= s'"), str); goto done; } =20 @@ -3074,9 +3064,7 @@ virSecuritySELinuxSetSocketLabel(virSecurityManager *= mgr G_GNUC_UNUSED, =20 if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); goto done; } @@ -3085,7 +3073,7 @@ virSecuritySELinuxSetSocketLabel(virSecurityManager *= mgr G_GNUC_UNUSED, vm->name, secdef->label); if (setsockcreatecon_raw(secdef->label) =3D=3D -1) { virReportSystemError(errno, - _("unable to set socket security context '%s'= "), + _("unable to set socket security context '%1$= s'"), secdef->label); goto done; } @@ -3112,9 +3100,7 @@ virSecuritySELinuxClearSocketLabel(virSecurityManager= *mgr G_GNUC_UNUSED, =20 if (STRNEQ(SECURITY_SELINUX_NAME, secdef->model)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label driver mismatch: " - "'%s' model configured for domain, but " - "hypervisor driver is '%s'."), + _("security label driver mismatch: '%1$s' model con= figured for domain, but hypervisor driver is '%2$s'."), secdef->model, SECURITY_SELINUX_NAME); if (security_getenforce() =3D=3D 1) return -1; @@ -3122,7 +3108,7 @@ virSecuritySELinuxClearSocketLabel(virSecurityManager= *mgr G_GNUC_UNUSED, =20 if (setsockcreatecon_raw(NULL) =3D=3D -1) { virReportSystemError(errno, - _("unable to clear socket security context '%= s'"), + _("unable to clear socket security context '%= 1$s'"), secdef->label); if (security_getenforce() =3D=3D 1) return -1; @@ -3334,13 +3320,13 @@ virSecuritySELinuxSetTapFDLabel(virSecurityManager = *mgr, return 0; =20 if (fstat(fd, &buf) < 0) { - virReportSystemError(errno, _("cannot stat tap fd %d"), fd); + virReportSystemError(errno, _("cannot stat tap fd %1$d"), fd); goto cleanup; } =20 if ((buf.st_mode & S_IFMT) !=3D S_IFCHR) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("tap fd %d is not character device"), fd); + _("tap fd %1$d is not character device"), fd); goto cleanup; } =20 @@ -3349,7 +3335,7 @@ virSecuritySELinuxSetTapFDLabel(virSecurityManager *m= gr, =20 if (virFileResolveLink(proc, &fd_path) < 0) { virReportSystemError(errno, - _("Unable to resolve link: %s"), proc); + _("Unable to resolve link: %1$s"), proc); goto cleanup; } =20 @@ -3362,7 +3348,7 @@ virSecuritySELinuxSetTapFDLabel(virSecurityManager *m= gr, =20 if (getContext(mgr, fd_path, buf.st_mode, &fcon) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot lookup default selinux label for tap fd %= d"), fd); + _("cannot lookup default selinux label for tap fd %= 1$d"), fd); goto cleanup; } =20 @@ -3398,7 +3384,7 @@ virSecuritySELinuxGenImageLabel(virSecurityManager *m= gr, if (secdef->label) { ctx =3D context_new(secdef->label); if (!ctx) { - virReportSystemError(errno, _("unable to create selinux contex= t for: %s"), + virReportSystemError(errno, _("unable to create selinux contex= t for: %1$s"), secdef->label); goto cleanup; } @@ -3528,7 +3514,7 @@ virSecuritySELinuxSetFileLabels(virSecurityManager *m= gr, break; } if (ret < 0) - virReportSystemError(errno, _("Unable to label files under %s"), + virReportSystemError(errno, _("Unable to label files under %1$s"), path); =20 return ret; @@ -3571,7 +3557,7 @@ virSecuritySELinuxRestoreFileLabels(virSecurityManage= r *mgr, break; } if (ret < 0) - virReportSystemError(errno, _("Unable to restore file labels under= %s"), + virReportSystemError(errno, _("Unable to restore file labels under= %1$s"), path); =20 return ret; diff --git a/src/security/security_util.c b/src/security/security_util.c index 83eb2edcae..a4e6687561 100644 --- a/src/security/security_util.c +++ b/src/security/security_util.c @@ -183,7 +183,7 @@ virSecurityValidateTimestamp(const char *name, return -2; } else if (errno !=3D ENODATA) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), timestamp_name, path); return -1; @@ -290,7 +290,7 @@ virSecurityGetRememberedLabel(const char *name, return -2; =20 virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), ref_name, path); return -1; @@ -312,7 +312,7 @@ virSecurityGetRememberedLabel(const char *name, =20 if (virStrToLong_ui(value, NULL, 10, &refcount) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed refcount %s on %s"), + _("malformed refcount %1$s on %2$s"), value, path); return -1; } @@ -388,7 +388,7 @@ virSecuritySetRememberedLabel(const char *name, return -2; } else if (errno !=3D ENODATA) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), ref_name, path); return -1; @@ -412,7 +412,7 @@ virSecuritySetRememberedLabel(const char *name, if (value && virStrToLong_ui(value, NULL, 10, &refcount) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed refcount %s on %s"), + _("malformed refcount %1$s on %2$s"), value, path); return -1; } @@ -479,7 +479,7 @@ virSecurityMoveRememberedLabel(const char *name, return -2; } else if (errno !=3D ENODATA) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), ref_name, src); return -1; } @@ -490,7 +490,7 @@ virSecurityMoveRememberedLabel(const char *name, return -2; } else if (errno !=3D ENODATA) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), attr_name, src); return -1; } @@ -501,7 +501,7 @@ virSecurityMoveRememberedLabel(const char *name, return -2; } else if (errno !=3D ENODATA) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), attr_name, src); return -1; } diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d65d459850..3ee59b32bb 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -96,7 +96,7 @@ vahDeinit(vahControl * ctl) static void vah_usage(void) { - printf(_("\n%s mode [options] [extra file] [< def.xml]\n\n" + printf(_("\n%1$s mode [options] [extra file] [< def.xml]\n\n" " Modes:\n" " -a | --add load profile\n" " -c | --create create profile from templa= te\n" @@ -120,7 +120,7 @@ vah_usage(void) static void vah_error(vahControl * ctl, int doexit, const char *str) { - fprintf(stderr, _("%s: error: %s%c"), progname, str, '\n'); + fprintf(stderr, _("%1$s: error: %2$s%3$c"), progname, str, '\n'); =20 if (doexit) { if (ctl !=3D NULL) @@ -132,13 +132,13 @@ vah_error(vahControl * ctl, int doexit, const char *s= tr) static void vah_warning(const char *str) { - fprintf(stderr, _("%s: warning: %s%c"), progname, str, '\n'); + fprintf(stderr, _("%1$s: warning: %2$s%3$c"), progname, str, '\n'); } =20 static void vah_info(const char *str) { - fprintf(stderr, _("%s:\n%s%c"), progname, str, '\n'); + fprintf(stderr, _("%1$s:\n%2$s%3$c"), progname, str, '\n'); } =20 /* @@ -1442,7 +1442,7 @@ main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464746; cv=none; d=zohomail.com; s=zohoarc; b=drziUw725OspO2HwGAh980R3wmE+mN8zz7UnWhKdJl/9NjE6zjyUWUiRiMH2+TTay5BwRhIsjMzZe6IDKq4fPu+NEYMRH0c66jgDS5c/4IhpFBConT+/bva9+LBFkwio5S8D6FlAZGo607zoFCKZHb6RWpCAhSEcL7f/UPck2Og= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464746; 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=b8Ea23kxx+fEDzD4lpopSpwtF0yisDRrhWiVU0oGAsI=; b=gUzkfmbiDMvE+pmvvM9iUlwRxmc7o6ELS9gAEo0RGF48sG1fkcuV3yQ/r/eQXlAjh15bgZln6fXNtxD4uUNfXJKjk3sN86m1KEl4zf6u1HhM70wGW8G+ZekxkMmWKn9VqXGR+yP4UuwteSKyFgC+M8qxR1ojmJzioZad0xl7+b4= 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 1678464746738219.00826720441353; Fri, 10 Mar 2023 08:12:26 -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-178-04RIKMtzMmShN2_-CAAtNA-1; Fri, 10 Mar 2023 11:11:32 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FE6D1C29D51; Fri, 10 Mar 2023 16:11:01 +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 6D5A740CE2A7; Fri, 10 Mar 2023 16:11:01 +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 5A3E61946A69; Fri, 10 Mar 2023 16:11:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B3AAC1946A66 for ; Fri, 10 Mar 2023 16:10:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A8F2D40C1106; Fri, 10 Mar 2023 16:10:59 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B7D9404CD84 for ; Fri, 10 Mar 2023 16:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464739; 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=b8Ea23kxx+fEDzD4lpopSpwtF0yisDRrhWiVU0oGAsI=; b=QGOXM8NClHhDcTpGDza4JKUKg4gz2S+YYD+1XUN4aQAeBKp3wI6ZJDohnSICqErTGg//Dt h8fTl0c4NEO7MZt0pob8cVkRpLiq0d5Y9Bay/Qq/5LVCYBN5NObU2xu0SA5Z/W9nRRRdmD zy60gS7sqB/HgVBb5MyJj+A15AkUYfo= X-MC-Unique: 04RIKMtzMmShN2_-CAAtNA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 36/51] secret: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:52 +0100 Message-Id: <3efc4b3b6a6800d177b1e0bff830afdb7fb95a10.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.1 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: 1678464747330100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/secret/secret_driver.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 43d2a0c05a..c7bd65b4e9 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -83,7 +83,7 @@ secretObjFromSecret(virSecretPtr secret) virUUIDFormat(secret->uuid, uuidstr); if (!(obj =3D virSecretObjListFindByUUID(driver->secrets, uuidstr))) { virReportError(VIR_ERR_NO_SECRET, - _("no secret with matching uuid '%s'"), uuidstr); + _("no secret with matching uuid '%1$s'"), uuidstr); return NULL; } return obj; @@ -164,7 +164,7 @@ secretLookupByUUID(virConnectPtr conn, virUUIDFormat(uuid, uuidstr); if (!(obj =3D virSecretObjListFindByUUID(driver->secrets, uuidstr))) { virReportError(VIR_ERR_NO_SECRET, - _("no secret with matching uuid '%s'"), uuidstr); + _("no secret with matching uuid '%1$s'"), uuidstr); goto cleanup; } =20 @@ -195,7 +195,7 @@ secretLookupByUsage(virConnectPtr conn, if (!(obj =3D virSecretObjListFindByUsage(driver->secrets, usageType, usageID))) { virReportError(VIR_ERR_NO_SECRET, - _("no secret with matching usage '%s'"), usageID); + _("no secret with matching usage '%1$s'"), usageID); goto cleanup; } =20 @@ -524,13 +524,13 @@ secretStateInitialize(bool privileged, } =20 if (g_mkdir_with_parents(driver->configDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create config directory '%s'= "), + virReportSystemError(errno, _("cannot create config directory '%1$= s'"), driver->configDir); goto error; } =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; } @@ -594,8 +594,7 @@ secretConnectOpen(virConnectPtr conn, =20 if (STRNEQ(root, driver->embeddedRoot)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot open embedded driver at path '%s', " - "already open with path '%s'"), + _("Cannot open embedded driver at path '%1$s', = already open with path '%2$s'"), root, driver->embeddedRoot); return VIR_DRV_OPEN_ERROR; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464737; cv=none; d=zohomail.com; s=zohoarc; b=fY9EnEPOhRP0SpaQEpTdl05tH1Y+OiKsej0IayAMKyd/opeMRxDGoaSZnOAlvh+/k36SGLwgk5ueBpXPcjkN0pfIW/Y41Lvv7gr7BWT0bQisL681o3HWOzrV3mka7tO6rE1Nu8KZ9AuiIUygpGyOdctM6V9OoNOm6H7ds491Ov4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464737; 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=ZC80qEFu50myMh99QjJenwSzVPJxgQ9KB69lYL68vmI=; b=br1rjmowaG+dw165BEGjVFEW+c1uxkwDOAPQOjmXvj/JZ7Q8JsuMMwDkm00R+uQ1UfqDDCisbGOdbd4Nr61mFN7Jwr9cPdvjYT0zZD0DHl3qo5KJFArsgm96Ob47l/y5ZW4LXWFRRWFYHrktr6qYI4Edpbp7CIl5Iv16HASKMXQ= 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 1678464737658913.2307089572167; Fri, 10 Mar 2023 08:12:17 -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-416-x5ylEqn0O-iG1_-akidi2A-1; Fri, 10 Mar 2023 11:11:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8EA2104D9A6; Fri, 10 Mar 2023 16:11:02 +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 9C52A140EBF6; Fri, 10 Mar 2023 16:11:02 +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 8C5A41946A4A; Fri, 10 Mar 2023 16:11:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0966A1946A4A for ; Fri, 10 Mar 2023 16:11:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id F3373492B05; Fri, 10 Mar 2023 16:11:00 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 610C1492B04 for ; Fri, 10 Mar 2023 16:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464736; 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=ZC80qEFu50myMh99QjJenwSzVPJxgQ9KB69lYL68vmI=; b=NlVr61i0FVZ9DfLeYA6qZ/PyxYLWeHF+MF8rmj9+I7B3Q4BHDGxfbWD1jQc2vkb6HFKCh0 AgCtseD2tHw4zfJeglxoSSzt8CwdFZhYuWvO0wgAYOB1LfqPow+JKBrTAbkqwlmPNT6/me nDLPy+z5gMJSzaTwkWWQqgAiUqXtXTE= X-MC-Unique: x5ylEqn0O-iG1_-akidi2A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 37/51] storage: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.7 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: 1678464739417100011 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/storage/parthelper.c | 6 +- src/storage/storage_backend.c | 4 +- src/storage/storage_backend_disk.c | 20 +-- src/storage/storage_backend_fs.c | 15 +- src/storage/storage_backend_gluster.c | 31 ++-- src/storage/storage_backend_iscsi.c | 6 +- src/storage/storage_backend_iscsi_direct.c | 44 +++--- src/storage/storage_backend_logical.c | 19 ++- src/storage/storage_backend_mpath.c | 2 +- src/storage/storage_backend_rbd.c | 87 +++++----- src/storage/storage_backend_scsi.c | 17 +- src/storage/storage_backend_vstorage.c | 2 +- src/storage/storage_driver.c | 126 +++++++-------- src/storage/storage_util.c | 176 ++++++++++----------- 14 files changed, 270 insertions(+), 285 deletions(-) diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c index da67455335..ee07ba41bb 100644 --- a/src/storage/parthelper.c +++ b/src/storage/parthelper.c @@ -75,7 +75,7 @@ int main(int argc, char **argv) } else if (argc =3D=3D 3 && STREQ(argv[2], "-p")) { devmap_partsep =3D true; } else if (argc !=3D 2) { - fprintf(stderr, _("syntax: %s DEVICE [-g]|[-p]\n"), argv[0]); + fprintf(stderr, _("syntax: %1$s DEVICE [-g]|[-p]\n"), argv[0]); return 1; } =20 @@ -101,7 +101,7 @@ int main(int argc, char **argv) } =20 if ((dev =3D ped_device_get(path)) =3D=3D NULL) { - fprintf(stderr, _("unable to access device %s\n"), path); + fprintf(stderr, _("unable to access device %1$s\n"), path); return 2; } =20 @@ -115,7 +115,7 @@ int main(int argc, char **argv) } =20 if ((disk =3D ped_disk_new(dev)) =3D=3D NULL) { - fprintf(stderr, _("unable to access disk %s\n"), argv[1]); + fprintf(stderr, _("unable to access disk %1$s\n"), argv[1]); return 2; } =20 diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index d6e02a47a8..ecc30ae710 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -149,7 +149,7 @@ virStorageBackendRegister(virStorageBackend *backend) =20 if (virStorageBackendsCount >=3D VIR_STORAGE_BACKENDS_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many drivers, cannot register storage backen= d '%s'"), + _("Too many drivers, cannot register storage backen= d '%1$s'"), virStoragePoolTypeToString(backend->type)); return -1; } @@ -169,7 +169,7 @@ virStorageBackendForType(int type) return virStorageBackends[i]; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing backend for pool type %d (%s)"), + _("missing backend for pool type %1$d (%2$s)"), type, NULLSTR(virStoragePoolTypeToString(type))); return NULL; } diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backe= nd_disk.c index bf867491d0..7466f0e234 100644 --- a/src/storage/storage_backend_disk.c +++ b/src/storage/storage_backend_disk.c @@ -100,7 +100,7 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObj *poo= l, */ if (STRNEQ(vol->name, partname)) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid partition name '%s', expected '%s'"), + _("invalid partition name '%1$s', expected '%2$s'"), vol->name, partname); =20 /* Let's see if by chance parthelper created a name that won't be @@ -436,7 +436,7 @@ virStorageBackendDiskRefreshPool(virStoragePoolObj *poo= l) =20 if (!virFileExists(def->source.devices[0].path)) { virReportError(VIR_ERR_INVALID_ARG, - _("device path '%s' doesn't exist"), + _("device path '%1$s' doesn't exist"), def->source.devices[0].path); return -1; } @@ -462,7 +462,7 @@ virStorageBackendDiskStartPool(virStoragePoolObj *pool) =20 if (!virFileExists(path)) { virReportError(VIR_ERR_INVALID_ARG, - _("device path '%s' doesn't exist"), path); + _("device path '%1$s' doesn't exist"), path); return -1; } =20 @@ -814,7 +814,7 @@ virStorageBackendDiskDeleteVol(virStoragePoolObj *pool, =20 if (!vol->target.path) { virReportError(VIR_ERR_INVALID_ARG, - _("volume target path empty for source path '%s'"), + _("volume target path empty for source path '%1$s'"= ), src_path); return -1; } @@ -829,7 +829,7 @@ virStorageBackendDiskDeleteVol(virStoragePoolObj *pool, } else { if (virFileResolveLink(vol->target.path, &devpath) < 0) { virReportSystemError(errno, - _("Couldn't read volume target path '%s'"= ), + _("Couldn't read volume target path '%1$s= '"), vol->target.path); return -1; } @@ -840,8 +840,8 @@ virStorageBackendDiskDeleteVol(virStoragePoolObj *pool, =20 if (!STRPREFIX(dev_name, srcname)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Volume path '%s' did not start with parent " - "pool source device name."), dev_name); + _("Volume path '%1$s' did not start with parent poo= l source device name."), + dev_name); return -1; } =20 @@ -854,8 +854,8 @@ virStorageBackendDiskDeleteVol(virStoragePoolObj *pool, =20 if (*part_num =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse partition number from target " - "'%s'"), dev_name); + _("cannot parse partition number from target '%1$s'= "), + dev_name); return -1; } =20 @@ -986,7 +986,7 @@ virStorageBackendDiskVolWipe(virStoragePoolObj *pool, =20 /* Wiping an extended partition is not support */ virReportError(VIR_ERR_NO_SUPPORT, - _("cannot wipe extended partition '%s'"), + _("cannot wipe extended partition '%1$s'"), vol->target.path); return -1; } diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend= _fs.c index ea5bf7ef83..a80d228201 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -62,13 +62,13 @@ virStorageBackendFileSystemNetFindPoolSourcesFunc(char = **const groups, =20 if (!(name =3D strrchr(path, '/'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid netfs path (no /): %s"), path); + _("invalid netfs path (no /): %1$s"), path); return -1; } name +=3D 1; if (*name =3D=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid netfs path (ends in /): %s"), path); + _("invalid netfs path (ends in /): %1$s"), path); return -1; } =20 @@ -168,7 +168,7 @@ virStorageBackendFileSystemNetFindPoolSources(const cha= r *srcSpec, /* If both fail, then we won't return an empty list - return an error = */ if (retNFS < 0 && retGluster =3D=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("no storage pools were found on host '%s'"), + _("no storage pools were found on host '%1$s'"), state.host); goto cleanup; } @@ -247,7 +247,7 @@ virStorageBackendFileSystemIsMounted(virStoragePoolObj = *pool) =20 if ((mtab =3D fopen(_PATH_MOUNTED, "r")) =3D=3D NULL) { virReportSystemError(errno, - _("cannot read mount list '%s'"), + _("cannot read mount list '%1$s'"), _PATH_MOUNTED); goto cleanup; } @@ -409,8 +409,7 @@ virStorageBackendExecuteMKFS(const char *device, =20 if (!mkfs) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("mkfs is not available on this platform: " - "Failed to make filesystem of type '%s' on device= '%s'"), + _("mkfs is not available on this platform: Failed t= o make filesystem of type '%1$s' on device '%2$s'"), format, device); return -1; } @@ -448,7 +447,7 @@ virStorageBackendMakeFileSystem(virStoragePoolObj *pool, =20 if (def->source.devices =3D=3D NULL) { virReportError(VIR_ERR_OPERATION_INVALID, - _("No source device specified when formatting pool = '%s'"), + _("No source device specified when formatting pool = '%1$s'"), def->name); return -1; } @@ -460,7 +459,7 @@ virStorageBackendMakeFileSystem(virStoragePoolObj *pool, virObjectUnlock(pool); if (!virFileExists(device)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Source device does not exist when formatting poo= l '%s'"), + _("Source device does not exist when formatting poo= l '%1$s'"), def->name); goto error; } diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_ba= ckend_gluster.c index bdf91e8bd5..c3b41df685 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -82,14 +82,14 @@ virStorageBackendGlusterOpen(virStoragePoolObj *pool) * subdirectory within the volume name. */ if (strchr(name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("gluster pool name '%s' must not contain /"), + _("gluster pool name '%1$s' must not contain /"), name); return NULL; } if (dir) { if (*dir !=3D '/') { virReportError(VIR_ERR_XML_ERROR, - _("gluster pool path '%s' must start with /"), + _("gluster pool path '%1$s' must start with /"), dir); return NULL; } @@ -113,7 +113,7 @@ virStorageBackendGlusterOpen(virStoragePoolObj *pool) /* Actually connect to glfs */ if (!(ret->vol =3D glfs_new(ret->volname))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to create glfs object for '%s'"), ret->vo= lname); + _("failed to create glfs object for '%1$s'"), ret->= volname); goto error; } =20 @@ -122,13 +122,13 @@ virStorageBackendGlusterOpen(virStoragePoolObj *pool) glfs_init(ret->vol) < 0) { g_autofree char *uri =3D NULL; uri =3D virURIFormat(ret->uri); - virReportSystemError(errno, _("failed to connect to %s"), NULLSTR(= uri)); + virReportSystemError(errno, _("failed to connect to %1$s"), NULLST= R(uri)); goto error; } =20 if (glfs_chdir(ret->vol, ret->dir) < 0) { virReportSystemError(errno, - _("failed to change to directory '%s' in '%s'= "), + _("failed to change to directory '%1$s' in '%= 2$s'"), ret->dir, ret->volname); goto error; } @@ -159,7 +159,7 @@ virStorageBackendGlusterRead(glfs_fd_t *fd, continue; if (r < 0) { VIR_FREE(*buf); - virReportSystemError(errno, _("unable to read '%s'"), name); + virReportSystemError(errno, _("unable to read '%1$s'"), name); return r; } if (r =3D=3D 0) @@ -234,7 +234,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlu= sterState *state, VIR_WARN("ignoring dangling symlink '%s'", name); ret =3D 0; } else { - virReportSystemError(errno, _("cannot stat '%s'"), name); + virReportSystemError(errno, _("cannot stat '%1$s'"), name); } return ret; } @@ -259,7 +259,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlu= sterState *state, * of fifos, so there's nothing it would protect us from. */ if (!(fd =3D glfs_open(state->vol, name, O_RDONLY | O_NOCTTY))) { /* A dangling symlink now implies a TOCTTOU race; report it. */ - virReportSystemError(errno, _("cannot open volume '%s'"), name); + virReportSystemError(errno, _("cannot open volume '%1$s'"), name); goto cleanup; } =20 @@ -334,7 +334,7 @@ virStorageBackendGlusterRefreshPool(virStoragePoolObj *= pool) */ =20 if (!(dir =3D glfs_opendir(state->vol, state->dir))) { - virReportSystemError(errno, _("cannot open path '%s' in '%s'"), + virReportSystemError(errno, _("cannot open path '%1$s' in '%2$s'"), state->dir, state->volname); goto cleanup; } @@ -350,13 +350,13 @@ virStorageBackendGlusterRefreshPool(virStoragePoolObj= *pool) goto cleanup; } if (errno) { - virReportSystemError(errno, _("failed to read directory '%s' in '%= s'"), + virReportSystemError(errno, _("failed to read directory '%1$s' in = '%2$s'"), state->dir, state->volname); goto cleanup; } =20 if (glfs_statvfs(state->vol, state->dir, &sb) < 0) { - virReportSystemError(errno, _("cannot statvfs path '%s' in '%s'"), + virReportSystemError(errno, _("cannot statvfs path '%1$s' in '%2$s= '"), state->dir, state->volname); goto cleanup; } @@ -393,8 +393,7 @@ virStorageBackendGlusterVolDelete(virStoragePoolObj *po= ol, case VIR_STORAGE_VOL_PLOOP: case VIR_STORAGE_VOL_LAST: virReportError(VIR_ERR_NO_SUPPORT, - _("removing of '%s' volumes is not supported " - "by the gluster backend: %s"), + _("removing of '%1$s' volumes is not supported by t= he gluster backend: %2$s"), virStorageVolTypeToString(vol->type), vol->target.path); goto cleanup; @@ -407,7 +406,7 @@ virStorageBackendGlusterVolDelete(virStoragePoolObj *po= ol, if (glfs_unlink(state->vol, vol->name) < 0) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("cannot remove gluster volume file = '%s'"), + _("cannot remove gluster volume file = '%1$s'"), vol->target.path); goto cleanup; } @@ -421,7 +420,7 @@ virStorageBackendGlusterVolDelete(virStoragePoolObj *po= ol, if (glfs_rmdir(state->vol, vol->target.path) < 0) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("cannot remove gluster volume dir '= %s'"), + _("cannot remove gluster volume dir '= %1$s'"), vol->target.path); goto cleanup; } @@ -475,7 +474,7 @@ virStorageBackendGlusterFindPoolSources(const char *src= Spec, =20 if (rc =3D=3D 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("no storage pools were found on host '%s'"), + _("no storage pools were found on host '%1$s'"), source->hosts[0].name); goto cleanup; } diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_back= end_iscsi.c index 01900f6809..3f49bc8979 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -105,7 +105,7 @@ virStorageBackendISCSIGetHostNumber(const char *sysfs_p= ath, return 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse target '%s'"), dirent->d= _name); + _("Failed to parse target '%1$s'"), dirent-= >d_name); return -1; } } @@ -113,8 +113,8 @@ virStorageBackendISCSIGetHostNumber(const char *sysfs_p= ath, =20 if (direrr =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get host number for iSCSI session " - "with path '%s'"), sysfs_path); + _("Failed to get host number for iSCSI session with= path '%1$s'"), + sysfs_path); return -1; } =20 diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/stora= ge_backend_iscsi_direct.c index ca906357c3..658a684e83 100644 --- a/src/storage/storage_backend_iscsi_direct.c +++ b/src/storage/storage_backend_iscsi_direct.c @@ -52,7 +52,7 @@ virISCSIDirectCreateContext(const char* initiator_iqn) iscsi =3D iscsi_create_context(initiator_iqn); if (!iscsi) virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to create iscsi context for %s"), + _("Failed to create iscsi context for %1$s"), initiator_iqn); return iscsi; } @@ -124,7 +124,7 @@ virStorageBackendISCSIDirectSetAuth(struct iscsi_contex= t *iscsi, authdef->username, secret_str) < = 0) { virSecureErase(secret_str, secret_size); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set credential: %s"), + _("Failed to set credential: %1$s"), iscsi_get_error(iscsi)); return -1; } @@ -140,21 +140,21 @@ virISCSIDirectSetContext(struct iscsi_context *iscsi, { if (iscsi_init_transport(iscsi, TCP_TRANSPORT) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to init transport: %s"), + _("Failed to init transport: %1$s"), iscsi_get_error(iscsi)); return -1; } if (session =3D=3D ISCSI_SESSION_NORMAL) { if (iscsi_set_targetname(iscsi, target_name) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set target name: %s"), + _("Failed to set target name: %1$s"), iscsi_get_error(iscsi)); return -1; } } if (iscsi_set_session_type(iscsi, session) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to set session type: %s"), + _("Failed to set session type: %1$s"), iscsi_get_error(iscsi)); return -1; } @@ -167,13 +167,13 @@ virISCSIDirectConnect(struct iscsi_context *iscsi, { if (iscsi_connect_sync(iscsi, portal) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to connect: %s"), + _("Failed to connect: %1$s"), iscsi_get_error(iscsi)); return -1; } if (iscsi_login_sync(iscsi) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to login: %s"), + _("Failed to login: %1$s"), iscsi_get_error(iscsi)); return -1; } @@ -195,7 +195,7 @@ virISCSIDirectTestUnitReady(struct iscsi_context *iscsi, do { if (!(task =3D iscsi_testunitready_sync(iscsi, lun))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed testunitready: %s"), + _("Failed testunitready: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -210,7 +210,7 @@ virISCSIDirectTestUnitReady(struct iscsi_context *iscsi, =20 if (task->status !=3D SCSI_STATUS_GOOD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed testunitready: %s"), + _("Failed testunitready: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -250,14 +250,14 @@ virISCSIDirectGetVolumeCapacity(struct iscsi_context = *iscsi, if (!(task =3D iscsi_inquiry_sync(iscsi, lun, 0, 0, 64)) || task->status !=3D SCSI_STATUS_GOOD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to send inquiry command: %s"), + _("Failed to send inquiry command: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } =20 if (!(inq =3D scsi_datain_unmarshall(task))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to unmarshall reply: %s"), + _("Failed to unmarshall reply: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -270,14 +270,14 @@ virISCSIDirectGetVolumeCapacity(struct iscsi_context = *iscsi, if (!(task =3D iscsi_readcapacity16_sync(iscsi, lun)) || task->status !=3D SCSI_STATUS_GOOD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get capacity of lun: %s"), + _("Failed to get capacity of lun: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } =20 if (!(rc16 =3D scsi_datain_unmarshall(task))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to unmarshall reply: %s"), + _("Failed to unmarshall reply: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -343,7 +343,7 @@ virISCSIDirectReportLuns(virStoragePoolObj *pool, =20 if (!(task =3D iscsi_reportluns_sync(iscsi, 0, 16))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reportluns: %s"), + _("Failed to reportluns: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -354,7 +354,7 @@ virISCSIDirectReportLuns(virStoragePoolObj *pool, scsi_free_scsi_task(task); if (!(task =3D iscsi_reportluns_sync(iscsi, 0, full_size))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reportluns: %s"), + _("Failed to reportluns: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -362,7 +362,7 @@ virISCSIDirectReportLuns(virStoragePoolObj *pool, =20 if (!(list =3D scsi_datain_unmarshall(task))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to unmarshall reportluns: %s"), + _("Failed to unmarshall reportluns: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -390,13 +390,13 @@ virISCSIDirectDisconnect(struct iscsi_context *iscsi) =20 if (iscsi_logout_sync(iscsi) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to logout: %s"), + _("Failed to logout: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } if (iscsi_disconnect(iscsi) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to disconnect: %s"), + _("Failed to disconnect: %1$s"), iscsi_get_error(iscsi)); goto cleanup; } @@ -420,7 +420,7 @@ virISCSIDirectUpdateTargets(struct iscsi_context *iscsi, =20 if (!(addr =3D iscsi_discovery_sync(iscsi))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to discover session: %s"), + _("Failed to discover session: %1$s"), iscsi_get_error(iscsi)); return -1; } @@ -588,7 +588,7 @@ virStorageBackendISCSIDirectGetLun(virStorageVolDef *vo= l, if (!(name =3D STRSKIP(vol->name, VOL_NAME_PREFIX)) || virStrToLong_i(name, NULL, 10, lun) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid volume name %s"), vol->name); + _("Invalid volume name %1$s"), vol->name); return -1; } =20 @@ -625,7 +625,7 @@ virStorageBackendISCSIDirectVolWipeZero(virStorageVolDe= f *vol, if (!task || task->status !=3D SCSI_STATUS_GOOD) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to write to LUN %d: %s"), + _("failed to write to LUN %1$d: %2$s"), lun, iscsi_get_error(iscsi)); scsi_free_scsi_task(task); return -1; @@ -671,7 +671,7 @@ virStorageBackenISCSIDirectWipeVol(virStoragePoolObj *p= ool, case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33: case VIR_STORAGE_VOL_WIPE_ALG_RANDOM: case VIR_STORAGE_VOL_WIPE_ALG_LAST: - virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %d"), + virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %1$d"= ), algorithm); goto cleanup; } diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_ba= ckend_logical.c index 3f27e63aeb..60dc68cf4b 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -171,7 +171,7 @@ virStorageBackendLogicalParseVolExtents(virStorageVolDe= f *vol, re =3D g_regex_new(regex, 0, 0, &err); if (!re) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 @@ -570,7 +570,7 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolO= bj *pool) =20 if (i =3D=3D sourceList.nsources) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot find logical volume group name '%s'"), + _("cannot find logical volume group name '%1$s'"), def->source.name); goto cleanup; } @@ -600,8 +600,8 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolO= bj *pool) */ if (matchcount =3D=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("cannot find any matching source devices for logi= cal " - "volume group '%s'"), def->source.name); + _("cannot find any matching source devices for logi= cal volume group '%1$s'"), + def->source.name); goto cleanup; } =20 @@ -894,7 +894,7 @@ virStorageBackendLogicalCreateVol(virStoragePoolObj *po= ol, if (geteuid() =3D=3D 0) { if (fchown(fd, vol->target.perms->uid, vol->target.perms->gid) < 0= ) { virReportSystemError(errno, - _("cannot set file owner '%s'"), + _("cannot set file owner '%1$s'"), vol->target.path); goto error; } @@ -903,14 +903,14 @@ virStorageBackendLogicalCreateVol(virStoragePoolObj *= pool, VIR_STORAGE_DEFAULT_VOL_PERM_MODE : vol->target.perms->mode)) < 0) { virReportSystemError(errno, - _("cannot set file mode '%s'"), + _("cannot set file mode '%1$s'"), vol->target.path); goto error; } =20 if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("cannot close file '%s'"), + _("cannot close file '%1$s'"), vol->target.path); goto error; } @@ -918,7 +918,7 @@ virStorageBackendLogicalCreateVol(virStoragePoolObj *po= ol, /* Fill in data about this new vol */ if (virStorageBackendLogicalFindLVs(pool, vol) < 0) { virReportSystemError(errno, - _("cannot find newly created volume '%s'"), + _("cannot find newly created volume '%1$s'"), vol->target.path); goto error; } @@ -969,8 +969,7 @@ virStorageBackendLogicalVolWipe(virStoragePoolObj *pool, * unsupported. */ virReportError(VIR_ERR_NO_SUPPORT, - _("logical volume '%s' is sparse, volume wipe " - "not supported"), + _("logical volume '%1$s' is sparse, volume wipe not sup= ported"), vol->target.path); return -1; } diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_back= end_mpath.c index b33fe3846d..9fc3983c52 100644 --- a/src/storage/storage_backend_mpath.c +++ b/src/storage/storage_backend_mpath.c @@ -165,7 +165,7 @@ virStorageBackendCreateVols(virStoragePoolObj *pool, =20 if (virStorageBackendGetMinorNumber(names->name, &minor) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get %s minor number"), + _("Failed to get %1$s minor number"), names->name); return -1; } diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index 05b2c43f79..832f48df16 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -113,13 +113,13 @@ virStoragePoolDefRBDNamespaceParse(xmlXPathContextPtr= ctxt, if (!(cmdopts->values[cmdopts->noptions] =3D virXMLPropString(nodes[i], "value"))) { virReportError(VIR_ERR_XML_ERROR, - _("no rbd option value specified for name '%s'"= ), + _("no rbd option value specified for name '%1$s= '"), cmdopts->names[cmdopts->noptions]); goto cleanup; } if (*cmdopts->values[cmdopts->noptions] =3D=3D '\0') { virReportError(VIR_ERR_XML_ERROR, - _("empty rbd option value specified for name '%= s'"), + _("empty rbd option value specified for name '%= 1$s'"), cmdopts->names[cmdopts->noptions]); goto cleanup; } @@ -167,7 +167,7 @@ virStorageBackendRBDRADOSConfSetQuiet(rados_t cluster, { if (rados_conf_set(cluster, option, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to set RADOS option: %s"), + _("failed to set RADOS option: %1$s"), option); return -1; } @@ -337,7 +337,7 @@ virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDS= tate *ptr, =20 ptr->starttime =3D time(0); if (rados_connect(ptr->cluster) < 0) { - virReportSystemError(errno, _("failed to connect to the RADOS moni= tor on: %s"), + virReportSystemError(errno, _("failed to connect to the RADOS moni= tor on: %1$s"), mon_buff); goto cleanup; } @@ -356,7 +356,7 @@ virStorageBackendRBDOpenIoCTX(virStorageBackendRBDState= *ptr, virStoragePoolDef *def =3D virStoragePoolObjGetDef(pool); int rc =3D rados_ioctx_create(ptr->cluster, def->source.name, &ptr->io= ctx); if (rc < 0) { - virReportSystemError(errno, _("failed to create the RBD IoCTX. Doe= s the pool '%s' exist?"), + virReportSystemError(errno, _("failed to create the RBD IoCTX. Doe= s the pool '%1$s' exist?"), def->source.name); } return rc; @@ -422,8 +422,9 @@ volStorageBackendRBDGetFeatures(rbd_image_t image, int rc; =20 if ((rc =3D rbd_get_features(image, features)) < 0) { - virReportSystemError(errno, _("failed to get the features of RBD i= mage " - "%s"), volname); + virReportSystemError(errno, + _("failed to get the features of RBD image %1= $s"), + volname); return rc; } =20 @@ -440,7 +441,7 @@ volStorageBackendRBDGetFlags(rbd_image_t image, =20 if ((rc =3D rbd_get_flags(image, flags)) < 0) { virReportSystemError(errno, - _("failed to get the flags of RBD image %s"), + _("failed to get the flags of RBD image %1$s"= ), volname); return rc; } @@ -479,7 +480,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDef *vol, if ((rc =3D rbd_diff_iterate2(image, NULL, 0, info->size, 0, 1, &virStorageBackendRBDRefreshVolInfoCb, &allocation)) < 0) { - virReportSystemError(errno, _("failed to iterate RBD image '%s'"), + virReportSystemError(errno, _("failed to iterate RBD image '%1$s'"= ), vol->name); return rc; } @@ -531,13 +532,13 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDef *= vol, uint64_t flags; =20 if ((ret =3D rbd_open_read_only(ptr->ioctx, vol->name, &image, NULL)) = < 0) { - virReportSystemError(errno, _("failed to open the RBD image '%s'"), + virReportSystemError(errno, _("failed to open the RBD image '%1$s'= "), vol->name); goto cleanup; } =20 if ((ret =3D rbd_stat(image, &info, sizeof(info))) < 0) { - virReportSystemError(errno, _("failed to stat the RBD image '%s'"), + virReportSystemError(errno, _("failed to stat the RBD image '%1$s'= "), vol->name); goto cleanup; } @@ -680,7 +681,7 @@ virStorageBackendRBDRefreshPool(virStoragePoolObj *pool) } =20 if (rados_ioctx_pool_stat(ptr->ioctx, &poolstat) < 0) { - virReportSystemError(errno, _("failed to stat the RADOS pool '%s'"= ), + virReportSystemError(errno, _("failed to stat the RADOS pool '%1$s= '"), def->source.name); goto cleanup; } @@ -750,7 +751,7 @@ virStorageBackendRBDCleanupSnapshots(rados_ioctx_t ioct= x, g_autofree rbd_snap_info_t *snaps =3D NULL; =20 if (rbd_open(ioctx, vol->name, &image, NULL) < 0) { - virReportSystemError(errno, _("failed to open the RBD image '%s'"), + virReportSystemError(errno, _("failed to open the RBD image '%1$s'"= ), vol->name); goto cleanup; } @@ -769,7 +770,7 @@ virStorageBackendRBDCleanupSnapshots(rados_ioctx_t ioct= x, =20 for (i =3D 0; i < snap_count; i++) { if (rbd_snap_is_protected(image, snaps[i].name, &protected) < 0) { - virReportSystemError(errno, _("failed to verify if snapshot '%= s/%s@%s' is protected"), + virReportSystemError(errno, _("failed to verify if snapshot '%= 1$s/%2$s@%3$s' is protected"), source->name, vol->name, snaps[i].name); goto cleanup; @@ -781,7 +782,7 @@ virStorageBackendRBDCleanupSnapshots(rados_ioctx_t ioct= x, snaps[i].name); =20 if (rbd_snap_unprotect(image, snaps[i].name) < 0) { - virReportSystemError(errno, _("failed to unprotect snapsho= t '%s/%s@%s'"), + virReportSystemError(errno, _("failed to unprotect snapsho= t '%1$s/%2$s@%3$s'"), source->name, vol->name, snaps[i].name); goto cleanup; @@ -792,7 +793,7 @@ virStorageBackendRBDCleanupSnapshots(rados_ioctx_t ioct= x, vol->name, snaps[i].name); =20 if (rbd_snap_remove(image, snaps[i].name) < 0) { - virReportSystemError(errno, _("failed to remove snapshot '%s/%= s@%s'"), + virReportSystemError(errno, _("failed to remove snapshot '%1$s= /%2$s@%3$s'"), source->name, vol->name, snaps[i].name); goto cleanup; @@ -841,7 +842,7 @@ virStorageBackendRBDDeleteVol(virStoragePoolObj *pool, =20 rc =3D rbd_remove(ptr->ioctx, vol->name); if (rc < 0 && (-rc) !=3D ENOENT) { - virReportSystemError(errno, _("failed to remove volume '%s/%s'"), + virReportSystemError(errno, _("failed to remove volume '%1$s/%2$s'= "), def->source.name, vol->name); goto cleanup; } @@ -921,7 +922,7 @@ virStorageBackendRBDBuildVol(virStoragePoolObj *pool, =20 if (virStorageBackendRBDCreateImage(ptr->ioctx, vol->name, vol->target.capacity) < 0) { - virReportSystemError(errno, _("failed to create volume '%s/%s'"), + virReportSystemError(errno, _("failed to create volume '%1$s/%2$s'= "), def->source.name, vol->name); goto cleanup; } @@ -943,15 +944,14 @@ virStorageBackendRBDImageInfo(rbd_image_t image, uint8_t oldformat; =20 if (rbd_get_old_format(image, &oldformat) < 0) { - virReportSystemError(errno, _("failed to get the format of RBD ima= ge %s"), + virReportSystemError(errno, _("failed to get the format of RBD ima= ge %1$s"), volname); return -1; } =20 if (oldformat !=3D 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("RBD image %s is old format. Does not support " - "extended features and striping"), + _("RBD image %1$s is old format. Does not support e= xtended features and striping"), volname); return -1; } @@ -960,13 +960,13 @@ virStorageBackendRBDImageInfo(rbd_image_t image, return -1; =20 if (rbd_get_stripe_unit(image, stripe_unit) < 0) { - virReportSystemError(errno, _("failed to get the stripe unit of RB= D image %s"), + virReportSystemError(errno, _("failed to get the stripe unit of RB= D image %1$s"), volname); return -1; } =20 if (rbd_get_stripe_count(image, stripe_count) < 0) { - virReportSystemError(errno, _("failed to get the stripe count of R= BD image %s"), + virReportSystemError(errno, _("failed to get the stripe count of R= BD image %1$s"), volname); return -1; } @@ -1007,7 +1007,7 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t im= age, g_autofree rbd_snap_info_t *snaps =3D NULL; =20 if (rbd_stat(image, &info, sizeof(info)) < 0) { - virReportSystemError(errno, _("failed to stat the RBD image %s"), + virReportSystemError(errno, _("failed to stat the RBD image %1$s"), imgname); goto cleanup; } @@ -1050,7 +1050,7 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t im= age, if (rbd_diff_iterate(image, snaps[i].name, 0, info.size, virStorageBackendRBDIterateCb, (void *)&diff) = < 0) { #endif - virReportSystemError(errno, _("failed to iterate RBD snapshot = %s@%s"), + virReportSystemError(errno, _("failed to iterate RBD snapshot = %1$s@%2$s"), imgname, snaps[i].name); goto cleanup; } @@ -1085,7 +1085,7 @@ virStorageBackendRBDSnapshotCreate(rbd_image_t image, VIR_DEBUG("Creating RBD snapshot %s@%s", imgname, snapname); =20 if (rbd_snap_create(image, snapname) < 0) { - virReportSystemError(errno, _("failed to create RBD snapshot %s@%s= "), + virReportSystemError(errno, _("failed to create RBD snapshot %1$s@= %2$s"), imgname, snapname); return -1; } @@ -1103,8 +1103,9 @@ virStorageBackendRBDSnapshotProtect(rbd_image_t image, VIR_DEBUG("Querying if RBD snapshot %s@%s is protected", imgname, snap= name); =20 if (rbd_snap_is_protected(image, snapname, &protected) < 0) { - virReportSystemError(errno, _("failed to verify if RBD snapshot %s= @%s " - "is protected"), imgname, snapname); + virReportSystemError(errno, + _("failed to verify if RBD snapshot %1$s@%2$s= is protected"), + imgname, snapname); return -1; } =20 @@ -1113,7 +1114,7 @@ virStorageBackendRBDSnapshotProtect(rbd_image_t image, imgname, snapname); =20 if (rbd_snap_protect(image, snapname) < 0) { - virReportSystemError(errno, _("failed to protect RBD snapshot = %s@%s"), + virReportSystemError(errno, _("failed to protect RBD snapshot = %1$s@%2$s"), imgname, snapname); return -1; } @@ -1139,7 +1140,7 @@ virStorageBackendRBDCloneImage(rados_ioctx_t io, g_autofree char *snapname_buff =3D NULL; =20 if (rbd_open(io, origvol, &image, NULL) < 0) { - virReportSystemError(errno, _("failed to open the RBD image %s"), + virReportSystemError(errno, _("failed to open the RBD image %1$s"), origvol); goto cleanup; } @@ -1193,7 +1194,7 @@ virStorageBackendRBDCloneImage(rados_ioctx_t io, =20 if (rbd_clone2(io, origvol, snapname_buff, io, newvol, features, &order, stripe_unit, stripe_count) < 0) { - virReportSystemError(errno, _("failed to clone RBD volume %s to %s= "), + virReportSystemError(errno, _("failed to clone RBD volume %1$s to = %2$s"), origvol, newvol); goto cleanup; } @@ -1274,13 +1275,13 @@ virStorageBackendRBDResizeVol(virStoragePoolObj *po= ol, goto cleanup; =20 if (rbd_open(ptr->ioctx, vol->name, &image, NULL) < 0) { - virReportSystemError(errno, _("failed to open the RBD image '%s'"), + virReportSystemError(errno, _("failed to open the RBD image '%1$s'"= ), vol->name); goto cleanup; } =20 if (rbd_resize(image, capacity) < 0) { - virReportSystemError(errno, _("failed to resize the RBD image '%s'= "), + virReportSystemError(errno, _("failed to resize the RBD image '%1$= s'"), vol->name); goto cleanup; } @@ -1310,9 +1311,8 @@ virStorageBackendRBDVolWipeZero(rbd_image_t image, length =3D MIN((info->size - offset), (info->obj_size * stripe_cou= nt)); =20 if (rbd_write(image, offset, length, writebuf) < 0) { - virReportSystemError(errno, _("writing %llu bytes failed on " - "RBD image %s at offset %llu"), - length, imgname, offset); + virReportSystemError(errno, _("writing %1$llu bytes failed on = RBD image %2$s at offset %3$llu"), + length, imgname, offset); return -1; } =20 @@ -1340,9 +1340,8 @@ virStorageBackendRBDVolWipeDiscard(rbd_image_t image, length =3D MIN((info->size - offset), (info->obj_size * stripe_cou= nt)); =20 if (rbd_discard(image, offset, length) < 0) { - virReportSystemError(errno, _("discarding %llu bytes failed on= " - "RBD image %s at offset %llu"), - length, imgname, offset); + virReportSystemError(errno, _("discarding %1$llu bytes failed = on RBD image %2$s at offset %3$llu"), + length, imgname, offset); return -1; } =20 @@ -1381,19 +1380,19 @@ virStorageBackendRBDVolWipe(virStoragePoolObj *pool, goto cleanup; =20 if (rbd_open(ptr->ioctx, vol->name, &image, NULL) < 0) { - virReportSystemError(errno, _("failed to open the RBD image %s"), + virReportSystemError(errno, _("failed to open the RBD image %1$s"), vol->name); goto cleanup; } =20 if (rbd_stat(image, &info, sizeof(info)) < 0) { - virReportSystemError(errno, _("failed to stat the RBD image %s"), + virReportSystemError(errno, _("failed to stat the RBD image %1$s"), vol->name); goto cleanup; } =20 if (rbd_get_stripe_count(image, &stripe_count) < 0) { - virReportSystemError(errno, _("failed to get stripe count of RBD i= mage %s"), + virReportSystemError(errno, _("failed to get stripe count of RBD i= mage %1$s"), vol->name); goto cleanup; } @@ -1419,13 +1418,13 @@ virStorageBackendRBDVolWipe(virStoragePoolObj *pool, case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33: case VIR_STORAGE_VOL_WIPE_ALG_RANDOM: case VIR_STORAGE_VOL_WIPE_ALG_LAST: - virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %d"), + virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %1$d"= ), algorithm); goto cleanup; } =20 if (rc < 0) { - virReportSystemError(errno, _("failed to wipe RBD image %s"), + virReportSystemError(errno, _("failed to wipe RBD image %1$s"), vol->name); goto cleanup; } diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backe= nd_scsi.c index afc98960a8..3b53476bcd 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -63,7 +63,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host) =20 if (fd < 0) { virReportSystemError(errno, - _("Could not open '%s' to trigger host scan"), + _("Could not open '%1$s' to trigger host scan= "), path); return -1; } @@ -72,7 +72,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host) LINUX_SYSFS_SCSI_HOST_SCAN_STRING, sizeof(LINUX_SYSFS_SCSI_HOST_SCAN_STRING)) < 0) { virReportSystemError(errno, - _("Write to '%s' to trigger host scan failed"= ), + _("Write to '%1$s' to trigger host scan faile= d"), path); return -1; } @@ -184,8 +184,8 @@ getAdapterName(virStorageAdapter *adapter) =20 if (!(name =3D virVHBAGetHostByWWN(NULL, fchost->wwnn, fchost->wwp= n))) { virReportError(VIR_ERR_XML_ERROR, - _("Failed to find SCSI host with wwnn=3D'%s', " - "wwpn=3D'%s'"), fchost->wwnn, fchost->wwpn); + _("Failed to find SCSI host with wwnn=3D'%1$s',= wwpn=3D'%2$s'"), + fchost->wwnn, fchost->wwpn); } } =20 @@ -215,7 +215,7 @@ checkName(const char *name) return true; =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("the wwnn/wwpn for '%s' are assigned to an HBA"), nam= e); + _("the wwnn/wwpn for '%1$s' are assigned to an HBA"), n= ame); return false; } =20 @@ -242,14 +242,14 @@ checkParent(const char *name, =20 if (virSCSIHostGetNumber(parent_name, &host_num) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("parent '%s' is not properly formatted"), + _("parent '%1$s' is not properly formatted"), parent_name); goto cleanup; } =20 if (!virVHBAPathExists(NULL, host_num)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("parent '%s' is not an fc_host for the wwnn/wwpn"= ), + _("parent '%1$s' is not an fc_host for the wwnn/wwp= n"), parent_name); goto cleanup; } @@ -261,8 +261,7 @@ checkParent(const char *name, =20 if (STRNEQ(parent_name, vhba_parent)) { virReportError(VIR_ERR_XML_ERROR, - _("Parent attribute '%s' does not match parent '%s'= " - "determined for the '%s' wwnn/wwpn lookup."), + _("Parent attribute '%1$s' does not match parent '%= 2$s' determined for the '%3$s' wwnn/wwpn lookup."), parent_name, vhba_parent, name); goto cleanup; } diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_b= ackend_vstorage.c index 21e538f2a2..ced4823382 100644 --- a/src/storage/storage_backend_vstorage.c +++ b/src/storage/storage_backend_vstorage.c @@ -94,7 +94,7 @@ virStorageBackendVzIsMounted(virStoragePoolObj *pool) =20 if ((mtab =3D fopen(_PATH_MOUNTED, "r")) =3D=3D NULL) { virReportSystemError(errno, - _("cannot read mount list '%s'"), + _("cannot read mount list '%1$s'"), _PATH_MOUNTED); goto cleanup; } diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 308704f1c8..c19abdd2f3 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -126,7 +126,7 @@ storagePoolUpdateStateCallback(virStoragePoolObj *obj, =20 if ((backend =3D virStorageBackendForType(def->type)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing backend %d"), def->type); + _("Missing backend %1$d"), def->type); return; } =20 @@ -138,7 +138,7 @@ storagePoolUpdateStateCallback(virStoragePoolObj *obj, if (backend->checkPool && backend->checkPool(obj, &active) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to initialize storage pool '%s': %s"), + _("Failed to initialize storage pool '%1$s': %2$s"), def->name, virGetLastErrorMessage()); unlink(stateFile); active =3D false; @@ -153,7 +153,7 @@ storagePoolUpdateStateCallback(virStoragePoolObj *obj, if (active && storagePoolRefreshImpl(backend, obj, stateFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to restart storage pool '%s': %s"), + _("Failed to restart storage pool '%1$s': %2$s"), def->name, virGetLastErrorMessage()); active =3D false; } @@ -200,7 +200,7 @@ storageDriverAutostartCallback(virStoragePoolObj *obj, if (backend->startPool && backend->startPool(obj) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart storage pool '%s': %s"), + _("Failed to autostart storage pool '%1$s': %2$s"), def->name, virGetLastErrorMessage()); goto cleanup; } @@ -211,7 +211,7 @@ storageDriverAutostartCallback(virStoragePoolObj *obj, virStoragePoolSaveState(stateFile, def) < 0 || storagePoolRefreshImpl(backend, obj, stateFile) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to autostart storage pool '%s': %s"), + _("Failed to autostart storage pool '%1$s': %2$s"), def->name, virGetLastErrorMessage()); } else { virStoragePoolObjSetActive(obj, true); @@ -283,7 +283,7 @@ storageStateInitialize(bool privileged, =20 if (g_mkdir_with_parents(driver->stateDir, 0777) < 0) { virReportError(errno, - _("cannot create directory %s"), + _("cannot create directory %1$s"), driver->stateDir); goto error; } @@ -440,11 +440,11 @@ storagePoolObjFindByUUID(const unsigned char *uuid, virUUIDFormat(uuid, uuidstr); if (name) virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching uuid '%s' (%s)= "), + _("no storage pool with matching uuid '%1$s' (%= 2$s)"), uuidstr, name); else virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching uuid '%s'"), + _("no storage pool with matching uuid '%1$s'"), uuidstr); } =20 @@ -466,7 +466,7 @@ storagePoolObjFindByName(const char *name) =20 if (!(obj =3D virStoragePoolObjFindByName(driver->pools, name))) virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching name '%s'"), name); + _("no storage pool with matching name '%1$s'"), nam= e); return obj; } =20 @@ -614,7 +614,7 @@ storageConnectFindStoragePoolSources(virConnectPtr conn, backend_type =3D virStoragePoolTypeFromString(type); if (backend_type < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage pool type %s"), type); + _("unknown storage pool type %1$s"), type); return NULL; } =20 @@ -624,8 +624,8 @@ storageConnectFindStoragePoolSources(virConnectPtr conn, =20 if (!backend->findPoolSources) { virReportError(VIR_ERR_NO_SUPPORT, - _("pool type '%s' does not support source " - "discovery"), type); + _("pool type '%1$s' does not support source discove= ry"), + type); return NULL; } =20 @@ -855,21 +855,21 @@ storagePoolUndefine(virStoragePoolPtr pool) =20 if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is still active"), + _("storage pool '%1$s' is still active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } =20 if (virStoragePoolObjGetAsyncjobs(obj) > 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pool '%s' has asynchronous jobs running."), + _("pool '%1$s' has asynchronous jobs running."), def->name); goto cleanup; } @@ -880,7 +880,7 @@ storagePoolUndefine(virStoragePoolPtr pool) =20 if (autostartLink && unlink(autostartLink) < 0 && errno !=3D ENOENT && errno !=3D ENOTDIR) { - VIR_ERROR(_("Failed to delete autostart link '%s': %s"), + VIR_ERROR(_("Failed to delete autostart link '%1$s': %2$s"), autostartLink, g_strerror(errno)); } =20 @@ -931,14 +931,14 @@ storagePoolCreate(virStoragePoolPtr pool, =20 if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is already active"), + _("storage pool '%1$s' is already active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } @@ -1015,14 +1015,14 @@ storagePoolBuild(virStoragePoolPtr pool, =20 if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is already active"), + _("storage pool '%1$s' is already active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } @@ -1077,20 +1077,20 @@ storagePoolDestroy(virStoragePoolPtr pool) =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } =20 if (virStoragePoolObjGetAsyncjobs(obj) > 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pool '%s' has asynchronous jobs running."), + _("pool '%1$s' has asynchronous jobs running."), def->name); goto cleanup; } @@ -1148,21 +1148,21 @@ storagePoolDelete(virStoragePoolPtr pool, =20 if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is still active"), + _("storage pool '%1$s' is still active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } =20 if (virStoragePoolObjGetAsyncjobs(obj) > 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pool '%s' has asynchronous jobs running."), + _("pool '%1$s' has asynchronous jobs running."), def->name); goto cleanup; } @@ -1219,20 +1219,20 @@ storagePoolRefresh(virStoragePoolPtr pool, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 if (virStoragePoolObjIsStarting(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is starting up"), + _("storage pool '%1$s' is starting up"), def->name); goto cleanup; } =20 if (virStoragePoolObjGetAsyncjobs(obj) > 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pool '%s' has asynchronous jobs running."), + _("pool '%1$s' has asynchronous jobs running."), def->name); goto cleanup; } @@ -1381,14 +1381,14 @@ storagePoolSetAutostart(virStoragePoolPtr pool, if (new_autostart) { if (g_mkdir_with_parents(driver->autostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = %s"), + _("cannot create autostart directory = %1$s"), driver->autostartDir); goto cleanup; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s' to '= %s'"), + _("Failed to create symlink '%1$s' to= '%2$s'"), autostartLink, configFile); goto cleanup; } @@ -1396,7 +1396,7 @@ storagePoolSetAutostart(virStoragePoolPtr pool, if (autostartLink && unlink(autostartLink) < 0 && errno !=3D ENOENT && errno !=3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto cleanup; } @@ -1428,7 +1428,7 @@ storagePoolNumOfVolumes(virStoragePoolPtr pool) =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1459,7 +1459,7 @@ storagePoolListVolumes(virStoragePoolPtr pool, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1492,7 +1492,7 @@ storagePoolListAllVolumes(virStoragePoolPtr pool, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1521,7 +1521,7 @@ storageVolLookupByName(virStoragePoolPtr pool, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1529,7 +1529,7 @@ storageVolLookupByName(virStoragePoolPtr pool, =20 if (!voldef) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching name '%s'"), + _("no storage vol with matching name '%1$s'"), name); goto cleanup; } @@ -1590,7 +1590,7 @@ storageVolLookupByKey(virConnectPtr conn, =20 if (!vol) virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching key %s"), key); + _("no storage vol with matching key %1$s"), key); =20 return vol; } @@ -1675,10 +1675,10 @@ storageVolLookupByPath(virConnectPtr conn, if (!vol) { if (STREQ(path, data.cleanpath)) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching path '%s'"), pa= th); + _("no storage vol with matching path '%1$s'"), = path); } else { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching path '%s' (%s)"= ), + _("no storage vol with matching path '%1$s' (%2= $s)"), path, data.cleanpath); } } @@ -1732,11 +1732,11 @@ storagePoolLookupByTargetPath(virConnectPtr conn, if (!pool) { if (STREQ(path, cleanpath)) { virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching target path '%= s'"), + _("no storage pool with matching target path '%= 1$s'"), path); } else { virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching target path '%= s' (%s)"), + _("no storage pool with matching target path '%= 1$s' (%2$s)"), path, cleanpath); } } @@ -1799,14 +1799,14 @@ virStorageVolDefFromVol(virStorageVolPtr vol, =20 if (!virStoragePoolObjIsActive(*obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), + _("storage pool '%1$s' is not active"), def->name); goto error; } =20 if (!(voldef =3D virStorageVolDefFindByName(*obj, vol->name))) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching name '%s'"), + _("no storage vol with matching name '%1$s'"), vol->name); goto error; } @@ -1843,14 +1843,14 @@ storageVolDelete(virStorageVolPtr vol, =20 if (voldef->in_use) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still in use."), + _("volume '%1$s' is still in use."), voldef->name); goto cleanup; } =20 if (voldef->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldef->name); goto cleanup; } @@ -1890,7 +1890,7 @@ storageVolCreateXML(virStoragePoolPtr pool, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1913,7 +1913,7 @@ storageVolCreateXML(virStoragePoolPtr pool, =20 if (virStorageVolDefFindByName(obj, voldef->name)) { virReportError(VIR_ERR_STORAGE_VOL_EXIST, - _("'%s'"), voldef->name); + _("'%1$s'"), voldef->name); goto cleanup; } =20 @@ -2036,7 +2036,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(pool->uuid, uuidstr); virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching uuid '%s' (%s)"), + _("no storage pool with matching uuid '%1$s' (%2$s)= "), uuidstr, pool->name); goto cleanup; } @@ -2044,21 +2044,21 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool, =20 if (STRNEQ(pool->name, volsrc->pool) && !objsrc) { virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching name '%s'"), + _("no storage pool with matching name '%1$s'"), volsrc->pool); goto cleanup; } =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), def->name); + _("storage pool '%1$s' is not active"), def->name); goto cleanup; } =20 if (objsrc && !virStoragePoolObjIsActive(objsrc)) { virStoragePoolDef *objsrcdef =3D virStoragePoolObjGetDef(objsrc); virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), + _("storage pool '%1$s' is not active"), objsrcdef->name); goto cleanup; } @@ -2070,7 +2070,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool, objsrc : obj, volsrc->name); if (!voldefsrc) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching name '%s'"), + _("no storage vol with matching name '%1$s'"), volsrc->name); goto cleanup; } @@ -2084,7 +2084,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool, =20 if (virStorageVolDefFindByName(obj, voldef->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("storage volume name '%s' already in use."), + _("storage volume name '%1$s' already in use."), voldef->name); goto cleanup; } @@ -2110,7 +2110,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool, =20 if (voldefsrc->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldefsrc->name); goto cleanup; } @@ -2221,7 +2221,7 @@ storageVolDownload(virStorageVolPtr vol, =20 if (voldef->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldef->name); goto cleanup; } @@ -2390,14 +2390,14 @@ storageVolUpload(virStorageVolPtr vol, =20 if (voldef->in_use) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still in use."), + _("volume '%1$s' is still in use."), voldef->name); goto cleanup; } =20 if (voldef->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldef->name); goto cleanup; } @@ -2473,14 +2473,14 @@ storageVolResize(virStorageVolPtr vol, =20 if (voldef->in_use) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still in use."), + _("volume '%1$s' is still in use."), voldef->name); goto cleanup; } =20 if (voldef->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldef->name); goto cleanup; } @@ -2564,7 +2564,7 @@ storageVolWipePattern(virStorageVolPtr vol, =20 if (algorithm >=3D VIR_STORAGE_VOL_WIPE_ALG_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("wiping algorithm %d not supported"), + _("wiping algorithm %1$d not supported"), algorithm); return -1; } @@ -2579,14 +2579,14 @@ storageVolWipePattern(virStorageVolPtr vol, =20 if (voldef->in_use) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still in use."), + _("volume '%1$s' is still in use."), voldef->name); goto cleanup; } =20 if (voldef->building) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume '%s' is still being allocated."), + _("volume '%1$s' is still being allocated."), voldef->name); goto cleanup; } diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index b57128eb2e..d39aa92eae 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -132,7 +132,7 @@ virStorageBackendCopyToFD(virStorageVolDef *vol, =20 if ((inputfd =3D open(inputvol->target.path, O_RDONLY)) < 0) { virReportSystemError(errno, - _("could not open input path '%s'"), + _("could not open input path '%1$s'"), inputvol->target.path); return -1; } @@ -153,7 +153,7 @@ virStorageBackendCopyToFD(virStorageVolDef *vol, if (reflink_copy) { if (reflinkCloneFile(fd, inputfd) < 0) { virReportSystemError(errno, - _("failed to clone files from '%s'"), + _("failed to clone files from '%1$s'"), inputvol->target.path); return -1; } else { @@ -170,7 +170,7 @@ virStorageBackendCopyToFD(virStorageVolDef *vol, =20 if ((amtread =3D saferead(inputfd, buf, rbytes)) < 0) { virReportSystemError(errno, - _("failed reading from file '%s'"), + _("failed reading from file '%1$s'"), inputvol->target.path); return -1; } @@ -186,13 +186,13 @@ virStorageBackendCopyToFD(virStorageVolDef *vol, if (want_sparse && memcmp(buf+offset, zerobuf, interval) =3D= =3D 0) { if (lseek(fd, interval, SEEK_CUR) < 0) { virReportSystemError(errno, - _("cannot extend file '%s'"), + _("cannot extend file '%1$s'"), vol->target.path); return -1; } } else if (safewrite(fd, buf+offset, interval) < 0) { virReportSystemError(errno, - _("failed writing to file '%s'"), + _("failed writing to file '%1$s'"), vol->target.path); return -1; =20 @@ -201,14 +201,14 @@ virStorageBackendCopyToFD(virStorageVolDef *vol, } =20 if (virFileDataSync(fd) < 0) { - virReportSystemError(errno, _("cannot sync data to file '%s'"), + virReportSystemError(errno, _("cannot sync data to file '%1$s'"), vol->target.path); return -1; } =20 if (VIR_CLOSE(inputfd) < 0) { virReportSystemError(errno, - _("cannot close file '%s'"), + _("cannot close file '%1$s'"), inputvol->target.path); return -1; } @@ -246,7 +246,7 @@ storageBackendCreateBlockFrom(virStoragePoolObj *pool G= _GNUC_UNUSED, =20 if ((fd =3D open(vol->target.path, O_RDWR)) < 0) { virReportSystemError(errno, - _("cannot create path '%s'"), + _("cannot create path '%1$s'"), vol->target.path); return -1; } @@ -260,7 +260,7 @@ storageBackendCreateBlockFrom(virStoragePoolObj *pool G= _GNUC_UNUSED, } =20 if (fstat(fd, &st) =3D=3D -1) { - virReportSystemError(errno, _("stat of '%s' failed"), + virReportSystemError(errno, _("stat of '%1$s' failed"), vol->target.path); return -1; } @@ -271,7 +271,7 @@ storageBackendCreateBlockFrom(virStoragePoolObj *pool G= _GNUC_UNUSED, if (((uid !=3D (uid_t)-1) || (gid !=3D (gid_t)-1)) && (fchown(fd, uid, gid) < 0)) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), vol->target.path, (unsigned int)uid, (unsigned int)gid); return -1; @@ -281,13 +281,13 @@ storageBackendCreateBlockFrom(virStoragePoolObj *pool= G_GNUC_UNUSED, VIR_STORAGE_DEFAULT_VOL_PERM_MODE : vol->target.perms->mode); if (fchmod(fd, mode) < 0) { virReportSystemError(errno, - _("cannot set mode of '%s' to %04o"), + _("cannot set mode of '%1$s' to %2$04o"), vol->target.path, mode); return -1; } if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("cannot close file '%s'"), + _("cannot close file '%1$s'"), vol->target.path); return -1; } @@ -313,7 +313,7 @@ createRawFile(int fd, virStorageVolDef *vol, * for progress reporting */ if (ftruncate(fd, vol->target.capacity) < 0) { virReportSystemError(errno, - _("cannot extend file '%s'"), + _("cannot extend file '%1$s'"), vol->target.path); return -1; } @@ -332,7 +332,7 @@ createRawFile(int fd, virStorageVolDef *vol, need_alloc =3D false; } else if (errno !=3D ENOSYS && errno !=3D EOPNOTSUPP) { virReportSystemError(errno, - _("cannot allocate %llu bytes in file '%s= '"), + _("cannot allocate %1$llu bytes in file '= %2$s'"), vol->target.allocation, vol->target.path); return -1; } @@ -356,14 +356,14 @@ createRawFile(int fd, virStorageVolDef *vol, =20 if (need_alloc && (vol->target.allocation - pos > 0)) { if (safezero(fd, pos, vol->target.allocation - pos) < 0) { - virReportSystemError(errno, _("cannot fill file '%s'"), + virReportSystemError(errno, _("cannot fill file '%1$s'"), vol->target.path); return -1; } } =20 if (g_fsync(fd) < 0) { - virReportSystemError(errno, _("cannot sync data to file '%s'"), + virReportSystemError(errno, _("cannot sync data to file '%1$s'"), vol->target.path); return -1; } @@ -424,7 +424,7 @@ storageBackendCreateRaw(virStoragePoolObj *pool, vol->target.perms->gid, operation_flags)) < 0) { virReportSystemError(-fd, - _("Failed to create file '%s'"), + _("Failed to create file '%1$s'"), vol->target.path); return -1; } @@ -512,7 +512,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObj *p= ool, goto cleanup; if (stat(vol->target.path, &st) < 0) { virReportSystemError(errno, - _("failed to create %s"), vol->target.pat= h); + _("failed to create %1$s"), vol->target.p= ath); goto cleanup; } filecreated =3D true; @@ -525,7 +525,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObj *p= ool, if (((uid !=3D (uid_t)-1) || (gid !=3D (gid_t)-1)) && (chown(vol->target.path, uid, gid) < 0)) { virReportSystemError(errno, - _("cannot chown %s to (%u, %u)"), + _("cannot chown %1$s to (%2$u, %3$u)"), vol->target.path, (unsigned int)uid, (unsigned int)gid); goto cleanup; @@ -534,7 +534,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObj *p= ool, if (mode !=3D (st.st_mode & S_IRWXUGO) && chmod(vol->target.path, mode) < 0) { virReportSystemError(errno, - _("cannot set mode of '%s' to %04o"), + _("cannot set mode of '%1$s' to %2$04o"), vol->target.path, mode); goto cleanup; } @@ -564,7 +564,7 @@ storageBackendCreatePloop(virStoragePoolObj *pool G_GNU= C_UNUSED, =20 if (inputvol && inputvol->target.format !=3D VIR_STORAGE_FILE_PLOOP) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported input storage vol type %d"), + _("unsupported input storage vol type %1$d"), inputvol->target.format); return -1; } @@ -778,8 +778,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInf= oDef *encinfo, VIR_STORAGE_FILE_FEATURE_LAZY_REFCOUNTS)) { if (STREQ_NULLABLE(info->compat, "0.10")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("lazy_refcounts not supported with compat" - " level %s"), + _("lazy_refcounts not supported with compat= level %1$s"), info->compat); return -1; } @@ -790,7 +789,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInf= oDef *encinfo, VIR_STORAGE_FILE_FEATURE_EXTENDED_L2)) { if (STREQ_NULLABLE(info->compat, "0.10")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("'extended_l2' not supported with compat = level %s"), + _("'extended_l2' not supported with compat = level %1$s"), info->compat); return -1; } @@ -825,7 +824,7 @@ storageBackendCreateQemuImgCheckEncryption(int format, format =3D=3D VIR_STORAGE_FILE_QCOW2) { if (enc->format !=3D VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported volume encryption format %d"), + _("unsupported volume encryption format %1$d"), vol->target.encryption->format); return -1; } @@ -841,7 +840,7 @@ storageBackendCreateQemuImgCheckEncryption(int format, } } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("volume encryption unsupported with format %s"), = type); + _("volume encryption unsupported with format %1$s")= , type); return -1; } =20 @@ -870,7 +869,7 @@ storageBackendCreateQemuImgSetInput(virStorageVolDef *i= nputvol, if (!(info->inputFormatStr =3D virStorageFileFormatTypeToString(info->inputFormat))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage vol type %d"), + _("unknown storage vol type %1$d"), info->inputFormat); return -1; } @@ -919,7 +918,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolObj= *pool, =20 if (!virStorageFileFormatTypeToString(info->backingFormat)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage vol backing store type %d"), + _("unknown storage vol backing store type %1$d"), info->backingFormat); return -1; } @@ -933,7 +932,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolObj= *pool, info->backingPath, R_OK); if (accessRetCode !=3D 0) { virReportSystemError(errno, - _("inaccessible backing store volume %s"), + _("inaccessible backing store volume %1$s"), info->backingPath); return -1; } @@ -1036,7 +1035,7 @@ virStorageBackendCreateQemuImgSetInfo(virStoragePoolO= bj *pool, =20 if (!(info->type =3D virStorageFileFormatTypeToString(info->format))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage vol type %d"), + _("unknown storage vol type %1$d"), info->format); return -1; } @@ -1045,7 +1044,7 @@ virStorageBackendCreateQemuImgSetInfo(virStoragePoolO= bj *pool, !(info->inputType =3D virStorageFileFormatTypeToString(inputvol->target.format))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown inputvol storage vol type %d"), + _("unknown inputvol storage vol type %1$d"), inputvol->target.format); return -1; } @@ -1542,7 +1541,7 @@ virStorageBackendDetectBlockVolFormatFD(virStorageSou= rce *target, start =3D lseek(fd, 0, SEEK_SET); if (start < 0) { virReportSystemError(errno, - _("cannot seek to beginning of file '%s'"), + _("cannot seek to beginning of file '%1$s'"), target->path); return -1; } @@ -1554,7 +1553,7 @@ virStorageBackendDetectBlockVolFormatFD(virStorageSou= rce *target, return -2; } else { virReportSystemError(errno, - _("cannot read beginning of file '%s'"), + _("cannot read beginning of file '%1$s'"), target->path); return -1; } @@ -1600,12 +1599,12 @@ virStorageBackendVolOpen(const char *path, struct s= tat *sb, return -2; } virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching path '%s'"), + _("no storage vol with matching path '%1$s'"), path); return -1; } virReportSystemError(errno, - _("cannot stat file '%s'"), + _("cannot stat file '%1$s'"), path); return -1; } @@ -1616,7 +1615,7 @@ virStorageBackendVolOpen(const char *path, struct sta= t *sb, return -2; } virReportError(VIR_ERR_INTERNAL_ERROR, - _("Volume path '%s' is a FIFO"), path); + _("Volume path '%1$s' is a FIFO"), path); return -1; } else if (S_ISSOCK(sb->st_mode)) { if (noerror) { @@ -1624,7 +1623,7 @@ virStorageBackendVolOpen(const char *path, struct sta= t *sb, return -2; } virReportError(VIR_ERR_INTERNAL_ERROR, - _("Volume path '%s' is a socket"), path); + _("Volume path '%1$s' is a socket"), path); return -1; } =20 @@ -1662,12 +1661,12 @@ virStorageBackendVolOpen(const char *path, struct s= tat *sb, return -2; } =20 - virReportSystemError(errno, _("cannot open volume '%s'"), path); + virReportSystemError(errno, _("cannot open volume '%1$s'"), path); return -1; } =20 if (fstat(fd, sb) < 0) { - virReportSystemError(errno, _("cannot stat file '%s'"), path); + virReportSystemError(errno, _("cannot stat file '%1$s'"), path); VIR_FORCE_CLOSE(fd); return -1; } @@ -1689,7 +1688,7 @@ virStorageBackendVolOpen(const char *path, struct sta= t *sb, return -2; } virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot use volume path '%s'"), path); + _("Cannot use volume path '%1$s'"), path); return -1; } } else { @@ -1699,13 +1698,13 @@ virStorageBackendVolOpen(const char *path, struct s= tat *sb, return -2; } virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected type for file '%s'"), path); + _("unexpected type for file '%1$s'"), path); return -1; } =20 if (virSetBlocking(fd, true) < 0) { VIR_FORCE_CLOSE(fd); - virReportSystemError(errno, _("unable to set blocking mode for '%s= '"), + virReportSystemError(errno, _("unable to set blocking mode for '%1= $s'"), path); return -1; } @@ -1718,7 +1717,7 @@ virStorageBackendVolOpen(const char *path, struct sta= t *sb, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected storage mode for '%s'"), path); + _("unexpected storage mode for '%1$s'"), path); return -1; } =20 @@ -1810,7 +1809,7 @@ storageBackendUpdateVolTargetInfo(virStorageVolType v= oltype, } =20 if (lseek(fd, 0, SEEK_SET) =3D=3D (off_t)-1) { - virReportSystemError(errno, _("cannot seek to start of '%s'"),= target->path); + virReportSystemError(errno, _("cannot seek to start of '%1$s'"= ), target->path); return -1; } =20 @@ -1821,7 +1820,7 @@ storageBackendUpdateVolTargetInfo(virStorageVolType v= oltype, return -2; } else { virReportSystemError(errno, - _("cannot read header '%s'"), + _("cannot read header '%1$s'"), target->path); return -1; } @@ -1929,7 +1928,7 @@ virStorageBackendUpdateVolTargetInfoFD(virStorageSour= ce *target, if (fgetfilecon_raw(fd, &filecon) =3D=3D -1) { if (errno !=3D ENODATA && errno !=3D ENOTSUP) { virReportSystemError(errno, - _("cannot get file context of '%s'"), + _("cannot get file context of '%1$s'"= ), target->path); return -1; } @@ -2001,7 +2000,7 @@ virStorageBackendStablePath(virStoragePoolObj *pool, goto reopen; } virReportSystemError(errno, - _("cannot read dir '%s'"), + _("cannot read dir '%1$s'"), def->target.path); return NULL; } @@ -2108,7 +2107,7 @@ virStorageBackendVolCreateLocal(virStoragePoolObj *po= ol, * allow escape to ../ or a subdir */ if (strchr(vol->name, '/')) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume name '%s' cannot contain '/'"), vol->name= ); + _("volume name '%1$s' cannot contain '/'"), vol->na= me); return -1; } =20 @@ -2117,7 +2116,7 @@ virStorageBackendVolCreateLocal(virStoragePoolObj *po= ol, =20 if (virFileExists(vol->target.path)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("volume target path '%s' already exists"), + _("volume target path '%1$s' already exists"), vol->target.path); return -1; } @@ -2203,11 +2202,11 @@ virStorageBackendVolDeleteLocal(virStoragePoolObj *= pool G_GNUC_UNUSED, if (errno !=3D ENOENT) { if (vol->type =3D=3D VIR_STORAGE_VOL_FILE) virReportSystemError(errno, - _("cannot unlink file '%s'"), + _("cannot unlink file '%1$s'"), vol->target.path); else virReportSystemError(errno, - _("cannot remove directory '%s'"), + _("cannot remove directory '%1$s'= "), vol->target.path); return -1; } @@ -2222,7 +2221,7 @@ virStorageBackendVolDeleteLocal(virStoragePoolObj *po= ol G_GNUC_UNUSED, case VIR_STORAGE_VOL_NETDIR: case VIR_STORAGE_VOL_LAST: virReportError(VIR_ERR_NO_SUPPORT, - _("removing block or network volumes is not support= ed: %s"), + _("removing block or network volumes is not support= ed: %1$s"), vol->target.path); return -1; } @@ -2547,16 +2546,14 @@ storageBackendVolZeroSparseFileLocal(const char *pa= th, { if (ftruncate(fd, 0) < 0) { virReportSystemError(errno, - _("Failed to truncate volume with " - "path '%s' to 0 bytes"), + _("Failed to truncate volume with path '%1$s'= to 0 bytes"), path); return -1; } =20 if (ftruncate(fd, size) < 0) { virReportSystemError(errno, - _("Failed to truncate volume with " - "path '%s' to %ju bytes"), + _("Failed to truncate volume with path '%1$s'= to %2$ju bytes"), path, (uintmax_t)size); return -1; } @@ -2581,16 +2578,14 @@ storageBackendWipeLocal(const char *path, if (!zero_end) { if ((size =3D lseek(fd, 0, SEEK_SET)) < 0) { virReportSystemError(errno, - _("Failed to seek to the start in volume " - "with path '%s'"), + _("Failed to seek to the start in volume = with path '%1$s'"), path); return -1; } } else { if ((size =3D lseek(fd, -wipe_len, SEEK_END)) < 0) { virReportSystemError(errno, - _("Failed to seek to %llu bytes to the en= d " - "in volume with path '%s'"), + _("Failed to seek to %1$llu bytes to the = end in volume with path '%2$s'"), wipe_len, path); return -1; } @@ -2605,8 +2600,7 @@ storageBackendWipeLocal(const char *path, =20 if (written < 0) { virReportSystemError(errno, - _("Failed to write %zu bytes to " - "storage volume with path '%s'"), + _("Failed to write %1$zu bytes to storage= volume with path '%2$s'"), write_size, path); =20 return -1; @@ -2617,7 +2611,7 @@ storageBackendWipeLocal(const char *path, =20 if (virFileDataSync(fd) < 0) { virReportSystemError(errno, - _("cannot sync data to volume with path '%s'"= ), + _("cannot sync data to volume with path '%1$s= '"), path); return -1; } @@ -2642,14 +2636,14 @@ storageBackendVolWipeLocalFile(const char *path, fd =3D open(path, O_RDWR); if (fd =3D=3D -1) { virReportSystemError(errno, - _("Failed to open storage volume with path '%= s'"), + _("Failed to open storage volume with path '%= 1$s'"), path); return -1; } =20 if (fstat(fd, &st) =3D=3D -1) { virReportSystemError(errno, - _("Failed to stat storage volume with path '%= s'"), + _("Failed to stat storage volume with path '%= 1$s'"), path); return -1; } @@ -2688,7 +2682,7 @@ storageBackendVolWipeLocalFile(const char *path, return -1; case VIR_STORAGE_VOL_WIPE_ALG_LAST: virReportError(VIR_ERR_INVALID_ARG, - _("unsupported algorithm %d"), + _("unsupported algorithm %1$d"), algorithm); return -1; } @@ -2735,12 +2729,12 @@ storageBackendVolWipePloop(virStorageVolDef *vol, return -1; =20 if (virFileRemove(disk_desc, 0, 0) < 0) { - virReportError(errno, _("Failed to delete DiskDescriptor.xml of vo= lume '%s'"), + virReportError(errno, _("Failed to delete DiskDescriptor.xml of vo= lume '%1$s'"), vol->target.path); return -1; } if (virFileRemove(target_path, 0, 0) < 0) { - virReportError(errno, _("failed to delete root.hds of volume '%s'"= ), + virReportError(errno, _("failed to delete root.hds of volume '%1$s= '"), vol->target.path); return -1; } @@ -2801,7 +2795,7 @@ virStorageBackendBuildLocal(virStoragePoolObj *pool) parent =3D g_strdup(def->target.path); if (!(p =3D strrchr(parent, '/'))) { virReportError(VIR_ERR_INVALID_ARG, - _("path '%s' is not absolute"), + _("path '%1$s' is not absolute"), def->target.path); return -1; } @@ -2811,7 +2805,7 @@ virStorageBackendBuildLocal(virStoragePoolObj *pool) * exist, with default uid/gid/mode. */ *p =3D '\0'; if (g_mkdir_with_parents(parent, 0777) < 0) { - virReportSystemError(errno, _("cannot create path '%s'"), + virReportSystemError(errno, _("cannot create path '%1$s'"), parent); return -1; } @@ -2866,7 +2860,7 @@ virStorageBackendDeleteLocal(virStoragePoolObj *pool, =20 if (rmdir(def->target.path) < 0) { virReportSystemError(errno, - _("failed to remove pool '%s'"), + _("failed to remove pool '%1$s'"), def->target.path); return -1; } @@ -3109,7 +3103,7 @@ virStorageBackendBLKIDFindEmpty(const char *device, =20 if (!(probe =3D blkid_new_probe_from_filename(device))) { virReportError(VIR_ERR_STORAGE_PROBE_FAILED, - _("Failed to create filesystem probe for device %s"= ), + _("Failed to create filesystem probe for device %1$= s"), device); return -1; } @@ -3131,13 +3125,13 @@ virStorageBackendBLKIDFindEmpty(const char *device, ret =3D 0; else virReportError(VIR_ERR_STORAGE_PROBE_FAILED, - _("Device '%s' is unrecognized, requires build"= ), + _("Device '%1$s' is unrecognized, requires buil= d"), device); break; =20 case VIR_STORAGE_BLKID_PROBE_ERROR: virReportError(VIR_ERR_STORAGE_PROBE_FAILED, - _("Failed to probe for format type '%s'"), format); + _("Failed to probe for format type '%1$s'"), format= ); break; =20 case VIR_STORAGE_BLKID_PROBE_UNKNOWN: @@ -3147,7 +3141,7 @@ virStorageBackendBLKIDFindEmpty(const char *device, case VIR_STORAGE_BLKID_PROBE_MATCH: if (writelabel) virReportError(VIR_ERR_STORAGE_POOL_BUILT, - _("Device '%s' already formatted using '%s'"), + _("Device '%1$s' already formatted using '%2$s'= "), device, format); else ret =3D 0; @@ -3156,14 +3150,11 @@ virStorageBackendBLKIDFindEmpty(const char *device, case VIR_STORAGE_BLKID_PROBE_DIFFERENT: if (writelabel) virReportError(VIR_ERR_STORAGE_POOL_BUILT, - _("Format of device '%s' does not match the " - "expected format '%s', forced overwrite is " - "necessary"), + _("Format of device '%1$s' does not match the e= xpected format '%2$s', forced overwrite is necessary"), device, format); else virReportError(VIR_ERR_OPERATION_INVALID, - _("Format of device '%s' does not match the " - "expected format '%s'"), + _("Format of device '%1$s' does not match the e= xpected format '%2$s'"), device, format); break; } @@ -3303,7 +3294,7 @@ virStorageBackendPARTEDValidLabel(const char *device, case VIR_STORAGE_PARTED_MATCH: if (writelabel) virReportError(VIR_ERR_OPERATION_INVALID, - _("Disk label already formatted using '%s'"), + _("Disk label already formatted using '%1$s'"), format); else ret =3D 0; @@ -3381,8 +3372,7 @@ virStorageBackendDeviceIsEmpty(const char *devpath, =20 if (ret =3D=3D -2) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Unable to probe '%s' for existing data, " - "forced overwrite is necessary"), + _("Unable to probe '%1$s' for existing data, forced= overwrite is necessary"), devpath); } =20 @@ -3450,7 +3440,7 @@ storageBackendProbeTarget(virStorageSource *target, * even maintenance. */ target->backingStore->format =3D VIR_STORAGE_FILE_RAW; virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot probe backing volume format: %s"), + _("cannot probe backing volume format: %1$s= "), target->backingStore->path); } else { target->backingStore->format =3D rc; @@ -3603,14 +3593,14 @@ virStorageBackendRefreshLocal(virStoragePoolObj *po= ol) =20 if ((fd =3D open(def->target.path, O_RDONLY)) < 0) { virReportSystemError(errno, - _("cannot open path '%s'"), + _("cannot open path '%1$s'"), def->target.path); return -1; } =20 if (fstat(fd, &statbuf) < 0) { virReportSystemError(errno, - _("cannot stat path '%s'"), + _("cannot stat path '%1$s'"), def->target.path); return -1; } @@ -3621,7 +3611,7 @@ virStorageBackendRefreshLocal(virStoragePoolObj *pool) /* VolTargetInfoFD doesn't update capacity correctly for the pool case= */ if (statvfs(def->target.path, &sb) < 0) { virReportSystemError(errno, - _("cannot statvfs path '%s'"), + _("cannot statvfs path '%1$s'"), def->target.path); return -1; } @@ -3698,7 +3688,7 @@ virStorageBackendSCSINewLun(virStoragePoolObj *pool, !(STREQ(def->target.path, "/dev") || STREQ(def->target.path, "/dev/"))) { virReportError(VIR_ERR_INVALID_ARG, - _("unable to use target path '%s' for dev '%s'"), + _("unable to use target path '%1$s' for dev '%2$s'"= ), NULLSTR(def->target.path), dev); return -1; } @@ -3804,7 +3794,7 @@ getOldStyleBlockDevice(const char *lun_path G_GNUC_UN= USED, if (!(blockp =3D strrchr(block_name, ':'))) { /* Hm, wasn't what we were expecting; have to give up */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse block name %s"), + _("Failed to parse block name %1$s"), block_name); return -1; } else { @@ -3895,7 +3885,7 @@ getDeviceType(uint32_t host, typefile =3D fopen(type_path, "r"); if (typefile =3D=3D NULL) { virReportSystemError(errno, - _("Could not find typefile '%s'"), + _("Could not find typefile '%1$s'"), type_path); /* there was no type file; that doesn't seem right */ return -1; @@ -3906,7 +3896,7 @@ getDeviceType(uint32_t host, =20 if (gottype =3D=3D NULL) { virReportSystemError(errno, - _("Could not read typefile '%s'"), + _("Could not read typefile '%1$s'"), type_path); /* we couldn't read the type file; have to give up */ return -1; @@ -3917,7 +3907,7 @@ getDeviceType(uint32_t host, */ if (virStrToLong_i(typestr, &p, 10, type) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device type '%s' is not an integer"), + _("Device type '%1$s' is not an integer"), typestr); /* Hm, type wasn't an integer; seems strange */ return -1; @@ -3954,7 +3944,7 @@ processLU(virStoragePoolObj *pool, =20 if (getDeviceType(host, bus, target, lun, &device_type) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to determine if %u:%u:%u:%u is a Direct-A= ccess LUN"), + _("Failed to determine if %1$u:%2$u:%3$u:%4$u is a = Direct-Access LUN"), host, bus, target, lun); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464700; cv=none; d=zohomail.com; s=zohoarc; b=fjAKk43u1UHaxfxCXtBA0rHR4W12bwY4YSfDFc/lF4FzDT189QwQ2jDTtMsVsf7SNAcKUhlaivUcyw2yZtxJFrintLkfL1DnzMfvfSytcOQQ+J2ujHmAuxTFK1d4c1UUus7vPahYqwQ7FQr/nwhLlFzoyADxpm/CwLp/5vqK87k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464700; 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=vo630pTRa1407kGlg1AGBH5EgajDWO0jxIFG0oJCCAY=; b=T/Odyhn6YNsg45sgn65G6I8YHVXUx02Gc+r/xmDPoEgeDEXFc3hEpLTliCEZEKzIOAo/iGHrAyhXz6aJYcBNhk4SncF+4OTIuLqgUDUYJHCLiflorUl5Nsu5VuMVqd7dfK8nQ6DxNNhj3HK1LA5WKippUduTBk9Q61q1JLVyDxc= 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 1678464700077186.214463027006; Fri, 10 Mar 2023 08:11:40 -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-462-XjSOfHtEPB2loYKg2_K7cA-1; Fri, 10 Mar 2023 11:11:32 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2876D804197; Fri, 10 Mar 2023 16:11:04 +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 13C7D492B04; Fri, 10 Mar 2023 16:11:04 +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 D67D81946A66; Fri, 10 Mar 2023 16:11:03 +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 532111946587 for ; Fri, 10 Mar 2023 16:11:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 49562492B00; Fri, 10 Mar 2023 16:11:02 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7852492B0F for ; Fri, 10 Mar 2023 16:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464698; 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=vo630pTRa1407kGlg1AGBH5EgajDWO0jxIFG0oJCCAY=; b=JCOqPkCzMHYqR+bgprHa/tRSN7MPMI7NGTWa4JCd5EKXgwgCzpziie3KJ/se770v0P7KHN RO3qUG/cbfqjRuxmgCIkC5WGc4zRf9pUWoD+TJPEfIhY9bDEm2SzUh3L/oQCkWB0ktTNs8 nTQaNRow4szj6H3ENumFzyhjV+qrBUM= X-MC-Unique: XjSOfHtEPB2loYKg2_K7cA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 38/51] storage_file: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:54 +0100 Message-Id: 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.9 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: 1678464701123100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/storage_file/storage_file_backend.c | 8 ++-- src/storage_file/storage_file_backend_fs.c | 6 +-- .../storage_file_backend_gluster.c | 16 +++---- src/storage_file/storage_file_probe.c | 13 +++-- src/storage_file/storage_source.c | 36 +++++++------- .../storage_source_backingstore.c | 47 +++++++++---------- 6 files changed, 59 insertions(+), 67 deletions(-) diff --git a/src/storage_file/storage_file_backend.c b/src/storage_file/sto= rage_file_backend.c index 94944ea356..03583803de 100644 --- a/src/storage_file/storage_file_backend.c +++ b/src/storage_file/storage_file_backend.c @@ -90,8 +90,7 @@ virStorageFileBackendRegister(virStorageFileBackend *back= end) =20 if (virStorageFileBackendsCount >=3D VIR_STORAGE_BACKENDS_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Too many drivers, cannot register storage file " - "backend '%s'"), + _("Too many drivers, cannot register storage file b= ackend '%1$s'"), virStorageTypeToString(backend->type)); return -1; } @@ -130,12 +129,11 @@ virStorageFileBackendForType(int type, =20 if (type =3D=3D VIR_STORAGE_TYPE_NETWORK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing storage backend for network files " - "using %s protocol"), + _("missing storage backend for network files using = %1$s protocol"), virStorageNetProtocolTypeToString(protocol)); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing storage backend for '%s' storage"), + _("missing storage backend for '%1$s' storage"), virStorageTypeToString(type)); } =20 diff --git a/src/storage_file/storage_file_backend_fs.c b/src/storage_file/= storage_file_backend_fs.c index c657cb0277..1de822200d 100644 --- a/src/storage_file/storage_file_backend_fs.c +++ b/src/storage_file/storage_file_backend_fs.c @@ -102,20 +102,20 @@ virStorageFileBackendFileRead(virStorageSource *src, =20 if ((fd =3D virFileOpenAs(src->path, O_RDONLY, 0, drv->uid, drv->gid, 0)) < 0) { - virReportSystemError(-fd, _("Failed to open file '%s'"), + virReportSystemError(-fd, _("Failed to open file '%1$s'"), src->path); return -1; } =20 if (offset > 0) { if (lseek(fd, offset, SEEK_SET) =3D=3D (off_t) -1) { - virReportSystemError(errno, _("cannot seek into '%s'"), src->p= ath); + virReportSystemError(errno, _("cannot seek into '%1$s'"), src-= >path); return -1; } } =20 if ((ret =3D virFileReadHeaderFD(fd, len, buf)) < 0) { - virReportSystemError(errno, _("cannot read header '%s'"), src->pat= h); + virReportSystemError(errno, _("cannot read header '%1$s'"), src->p= ath); return -1; } =20 diff --git a/src/storage_file/storage_file_backend_gluster.c b/src/storage_= file/storage_file_backend_gluster.c index 72341cf2c5..d018d5422e 100644 --- a/src/storage_file/storage_file_backend_gluster.c +++ b/src/storage_file/storage_file_backend_gluster.c @@ -83,7 +83,7 @@ virStorageFileBackendGlusterInitServer(virStorageFileBack= endGlusterPriv *priv, =20 if (glfs_set_volfile_server(priv->vol, transport, hoststr, port) < 0) { virReportSystemError(errno, - _("failed to set gluster volfile server '%s'"= ), + _("failed to set gluster volfile server '%1$s= '"), hoststr); return -1; } @@ -101,7 +101,7 @@ virStorageFileBackendGlusterInit(virStorageSource *src) =20 if (!src->volume) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing gluster volume name for path '%s'"), + _("missing gluster volume name for path '%1$s'"), src->path); return -1; } @@ -115,7 +115,7 @@ virStorageFileBackendGlusterInit(virStorageSource *src) =20 if (!(priv->vol =3D glfs_new(src->volume))) { virReportError(VIR_ERR_OPERATION_FAILED, - _("failed to create glfs object for '%s'"), src->vo= lume); + _("failed to create glfs object for '%1$s'"), src->= volume); goto error; } =20 @@ -126,8 +126,8 @@ virStorageFileBackendGlusterInit(virStorageSource *src) =20 if (glfs_init(priv->vol) < 0) { virReportSystemError(errno, - _("failed to initialize gluster connection " - "(src=3D%p priv=3D%p)"), src, priv); + _("failed to initialize gluster connection (s= rc=3D%1$p priv=3D%2$p)"), + src, priv); goto error; } =20 @@ -197,14 +197,14 @@ virStorageFileBackendGlusterRead(virStorageSource *sr= c, *buf =3D NULL; =20 if (!(fd =3D glfs_open(priv->vol, src->path, O_RDONLY))) { - virReportSystemError(errno, _("Failed to open file '%s'"), + virReportSystemError(errno, _("Failed to open file '%1$s'"), src->path); return -1; } =20 if (offset > 0) { if (glfs_lseek(fd, offset, SEEK_SET) =3D=3D (off_t) -1) { - virReportSystemError(errno, _("cannot seek into '%s'"), src->p= ath); + virReportSystemError(errno, _("cannot seek into '%1$s'"), src-= >path); goto cleanup; } } @@ -219,7 +219,7 @@ virStorageFileBackendGlusterRead(virStorageSource *src, continue; if (r < 0) { VIR_FREE(*buf); - virReportSystemError(errno, _("unable to read '%s'"), src->pat= h); + virReportSystemError(errno, _("unable to read '%1$s'"), src->p= ath); return r; } if (r =3D=3D 0) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/stora= ge_file_probe.c index 9465af5d96..a96d01ecc7 100644 --- a/src/storage_file/storage_file_probe.c +++ b/src/storage_file/storage_file_probe.c @@ -900,7 +900,7 @@ virStorageFileProbeGetMetadata(virStorageSource *meta, =20 if (meta->format <=3D VIR_STORAGE_FILE_NONE || meta->format >=3D VIR_STORAGE_FILE_LAST) { - virReportSystemError(EINVAL, _("unknown storage file meta->format = %d"), + virReportSystemError(EINVAL, _("unknown storage file meta->format = %1$d"), meta->format); return -1; } @@ -916,8 +916,7 @@ virStorageFileProbeGetMetadata(virStorageSource *meta, } else { if (meta->encryption->format !=3D expt_fmt) { virReportError(VIR_ERR_XML_ERROR, - _("encryption format %d doesn't mat= ch " - "expected format %d"), + _("encryption format %1$d doesn't m= atch expected format %2$d"), meta->encryption->format, expt_fmt); return -1; } @@ -1004,12 +1003,12 @@ virStorageFileProbeFormat(const char *path, uid_t u= id, gid_t gid) g_autofree char *header =3D NULL; =20 if ((fd =3D virFileOpenAs(path, O_RDONLY, 0, uid, gid, 0)) < 0) { - virReportSystemError(-fd, _("Failed to open file '%s'"), path); + virReportSystemError(-fd, _("Failed to open file '%1$s'"), path); return -1; } =20 if (fstat(fd, &sb) < 0) { - virReportSystemError(errno, _("cannot stat file '%s'"), path); + virReportSystemError(errno, _("cannot stat file '%1$s'"), path); return -1; } =20 @@ -1018,12 +1017,12 @@ virStorageFileProbeFormat(const char *path, uid_t u= id, gid_t gid) return VIR_STORAGE_FILE_DIR; =20 if (lseek(fd, 0, SEEK_SET) =3D=3D (off_t)-1) { - virReportSystemError(errno, _("cannot set to start of '%s'"), path= ); + virReportSystemError(errno, _("cannot set to start of '%1$s'"), pa= th); return -1; } =20 if ((len =3D virFileReadHeaderFD(fd, len, &header)) < 0) { - virReportSystemError(errno, _("cannot read header '%s'"), path); + virReportSystemError(errno, _("cannot read header '%1$s'"), path); return -1; } =20 diff --git a/src/storage_file/storage_source.c b/src/storage_file/storage_s= ource.c index 0846c400c8..47fc1edbd2 100644 --- a/src/storage_file/storage_source.c +++ b/src/storage_file/storage_source.c @@ -159,7 +159,7 @@ virStorageSourceGetMetadataFromFD(const char *path, =20 if (fstat(fd, &sb) < 0) { virReportSystemError(errno, - _("cannot stat file '%s'"), path); + _("cannot stat file '%1$s'"), path); return NULL; } =20 @@ -175,12 +175,12 @@ virStorageSourceGetMetadataFromFD(const char *path, } =20 if (lseek(fd, 0, SEEK_SET) =3D=3D (off_t)-1) { - virReportSystemError(errno, _("cannot seek to start of '%s'"), met= a->path); + virReportSystemError(errno, _("cannot seek to start of '%1$s'"), m= eta->path); return NULL; } =20 if ((len =3D virFileReadHeaderFD(fd, len, &buf)) < 0) { - virReportSystemError(errno, _("cannot read header '%s'"), meta->pa= th); + virReportSystemError(errno, _("cannot read header '%1$s'"), meta->= path); return NULL; } =20 @@ -243,7 +243,7 @@ virStorageSourceChainLookup(virStorageSource *chain, idx !=3D 0 && STRNEQ(diskTarget, target)) { virReportError(VIR_ERR_INVALID_ARG, - _("requested target '%s' does not match target = '%s'"), + _("requested target '%1$s' does not match targe= t '%2$s'"), target, diskTarget); return NULL; } @@ -301,20 +301,20 @@ virStorageSourceChainLookup(virStorageSource *chain, error: if (idx) { virReportError(VIR_ERR_INVALID_ARG, - _("could not find backing store index '%u' in chain= for '%s'"), + _("could not find backing store index '%1$u' in cha= in for '%2$s'"), idx, NULLSTR(start)); } else if (name) { if (startFrom) virReportError(VIR_ERR_INVALID_ARG, - _("could not find image '%s' beneath '%s' in ch= ain for '%s'"), + _("could not find image '%1$s' beneath '%2$s' i= n chain for '%3$s'"), name, NULLSTR(startFrom->path), NULLSTR(start)); else virReportError(VIR_ERR_INVALID_ARG, - _("could not find image '%s' in chain for '%s'"= ), + _("could not find image '%1$s' in chain for '%2= $s'"), name, NULLSTR(start)); } else { virReportError(VIR_ERR_INVALID_ARG, - _("could not find base image in chain for '%s'"), + _("could not find base image in chain for '%1$s'"), NULLSTR(start)); } *parent =3D NULL; @@ -645,7 +645,7 @@ virStorageSourceUpdateBackingSizes(virStorageSource *sr= c, */ if ((end =3D lseek(fd, 0, SEEK_END)) =3D=3D (off_t)-1) { virReportSystemError(errno, - _("failed to seek to end of %s"), src->pa= th); + _("failed to seek to end of %1$s"), src->= path); return -1; } src->physical =3D end; @@ -679,7 +679,7 @@ virStorageSourceUpdateCapacity(virStorageSource *src, * physical size. */ if (format =3D=3D VIR_STORAGE_FILE_NONE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("no disk format for %s was specified"), + _("no disk format for %1$s was specified"), src->path); return -1; } @@ -1269,24 +1269,21 @@ virStorageSourceReportBrokenChain(int errcode, =20 if (src =3D=3D parent) { virReportSystemError(errcode, - _("Cannot access storage file '%s' " - "(as uid:%u, gid:%u)"), + _("Cannot access storage file '%1$s' (as = uid:%2$u, gid:%3$u)"), src->path, access_user, access_group); } else { virReportSystemError(errcode, - _("Cannot access backing file '%s' " - "of storage file '%s' (as uid:%u, gid:%= u)"), + _("Cannot access backing file '%1$s' of s= torage file '%2$s' (as uid:%3$u, gid:%4$u)"), src->path, parent->path, access_user, acc= ess_group); } } else { if (src =3D=3D parent) { virReportSystemError(errcode, - _("Cannot access storage file '%s'"), + _("Cannot access storage file '%1$s'"), src->path); } else { virReportSystemError(errcode, - _("Cannot access backing file '%s' " - "of storage file '%s'"), + _("Cannot access backing file '%1$s' of s= torage file '%2$s'"), src->path, parent->path); } } @@ -1360,7 +1357,7 @@ virStorageSourceGetMetadataRecurse(virStorageSource *= src, =20 if (depth > max_depth) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("backing store for %s is self-referential or too = deeply nested"), + _("backing store for %1$s is self-referential or to= o deeply nested"), NULLSTR(src->path)); return -1; } @@ -1411,8 +1408,7 @@ virStorageSourceGetMetadataRecurse(virStorageSource *= src, =20 if (rv =3D=3D -2) { virReportError(VIR_ERR_OPERATION_INVALID, - _("format of backing image '%s' of image '%= s' was not specified in the image metadata " - "(See https://libvirt.org/kbase/backing_c= hains.html for troubleshooting)"), + _("format of backing image '%1$s' of image = '%2$s' was not specified in the image metadata (See https://libvirt.org/kba= se/backing_chains.html for troubleshooting)"), src->backingStoreRaw, NULLSTR(src->path)); } =20 diff --git a/src/storage_file/storage_source_backingstore.c b/src/storage_f= ile/storage_source_backingstore.c index e48ae725ab..a4ee2a5d78 100644 --- a/src/storage_file/storage_source_backingstore.c +++ b/src/storage_file/storage_source_backingstore.c @@ -46,7 +46,7 @@ virStorageSourceParseBackingURI(virStorageSource *src, =20 if (!(uri =3D virURIParse(uristr))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse backing file location '%s'"), + _("failed to parse backing file location '%1$s'"), uristr); return -1; } @@ -60,7 +60,7 @@ virStorageSourceParseBackingURI(virStorageSource *src, if (!scheme[0] || (src->protocol =3D virStorageNetProtocolTypeFromString(scheme[0]))= < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid backing protocol '%s'"), + _("invalid backing protocol '%1$s'"), NULLSTR(scheme[0])); return -1; } @@ -68,7 +68,7 @@ virStorageSourceParseBackingURI(virStorageSource *src, if (scheme[1] && (src->hosts->transport =3D virStorageNetHostTransportTypeFromStrin= g(scheme[1])) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid protocol transport type '%s'"), + _("invalid protocol transport type '%1$s'"), scheme[1]); return -1; } @@ -114,8 +114,8 @@ virStorageSourceParseBackingURI(virStorageSource *src, if (!(tmp =3D strchr(src->path, '/')) || tmp =3D=3D src->path) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("missing volume name or file name in " - "gluster source path '%s'"), src->path); + _("missing volume name or file name in gluster = source path '%1$s'"), + src->path); return -1; } =20 @@ -238,7 +238,7 @@ virStorageSourceParseRBDColonString(const char *rbdstr, /* formulate authdef for src->auth */ if (src->auth) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("duplicate 'id' found in '%s'"), src->pat= h); + _("duplicate 'id' found in '%1$s'"), src->p= ath); return -1; } =20 @@ -357,7 +357,7 @@ virStorageSourceParseNBDColonString(const char *nbdstr, =20 malformed: virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed nbd string '%s'"), nbdstr); + _("malformed nbd string '%1$s'"), nbdstr); return -1; } =20 @@ -371,7 +371,7 @@ virStorageSourceParseBackingColon(virStorageSource *src, =20 if (!(p =3D strchr(path, ':'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid backing protocol string '%s'"), + _("invalid backing protocol string '%1$s'"), path); return -1; } @@ -380,7 +380,7 @@ virStorageSourceParseBackingColon(virStorageSource *src, =20 if ((src->protocol =3D virStorageNetProtocolTypeFromString(protocol)) = < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid backing protocol '%s'"), + _("invalid backing protocol '%1$s'"), protocol); return -1; } @@ -400,7 +400,7 @@ virStorageSourceParseBackingColon(virStorageSource *src, case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_INTERNAL_ERROR, - _("backing store parser is not implemented for prot= ocol %s"), + _("backing store parser is not implemented for prot= ocol %1$s"), protocol); return -1; =20 @@ -415,7 +415,7 @@ virStorageSourceParseBackingColon(virStorageSource *src, case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_NFS: virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed backing store path for protocol %s"), + _("malformed backing store path for protocol %1$s"), protocol); return -1; } @@ -465,8 +465,7 @@ virStorageSourceParseBackingJSONUriStr(virStorageSource= *src, =20 if (src->protocol !=3D protocol) { virReportError(VIR_ERR_INVALID_ARG, - _("expected protocol '%s' but got '%s' in URI JSON = volume " - "definition"), + _("expected protocol '%1$s' but got '%2$s' in URI J= SON volume definition"), virStorageNetProtocolTypeToString(protocol), virStorageNetProtocolTypeToString(src->protocol)); return -1; @@ -490,7 +489,7 @@ virStorageSourceParseBackingJSONUriCookies(virStorageSo= urce *src, =20 if (!(cookiestr =3D virJSONValueObjectGetString(json, "cookie"))) { virReportError(VIR_ERR_INVALID_ARG, - _("wrong format of 'cookie' field in backing store = definition '%s'"), + _("wrong format of 'cookie' field in backing store = definition '%1$s'"), jsonstr); return -1; } @@ -509,7 +508,7 @@ virStorageSourceParseBackingJSONUriCookies(virStorageSo= urce *src, =20 if (!(cookievalue =3D strchr(cookiename, '=3D'))) { virReportError(VIR_ERR_INVALID_ARG, - _("malformed http cookie '%s' in backing store = definition '%s'"), + _("malformed http cookie '%1$s' in backing stor= e definition '%2$s'"), cookies[i], jsonstr); return -1; } @@ -553,7 +552,7 @@ virStorageSourceParseBackingJSONUri(virStorageSource *s= rc, } else { if (virJSONValueObjectGetBoolean(json, "sslverify", &tmp) = < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("malformed 'sslverify' field in backi= ng store definition '%s'"), + _("malformed 'sslverify' field in backi= ng store definition '%1$s'"), jsonstr); return -1; } @@ -572,7 +571,7 @@ virStorageSourceParseBackingJSONUri(virStorageSource *s= rc, if (virJSONValueObjectHasKey(json, "readahead") && virJSONValueObjectGetNumberUlong(json, "readahead", &src->readahea= d) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("malformed 'readahead' field in backing store def= inition '%s'"), + _("malformed 'readahead' field in backing store def= inition '%1$s'"), jsonstr); return -1; } @@ -580,7 +579,7 @@ virStorageSourceParseBackingJSONUri(virStorageSource *s= rc, if (virJSONValueObjectHasKey(json, "timeout") && virJSONValueObjectGetNumberUlong(json, "timeout", &src->timeout) <= 0) { virReportError(VIR_ERR_INVALID_ARG, - _("malformed 'timeout' field in backing store defin= ition '%s'"), + _("malformed 'timeout' field in backing store defin= ition '%1$s'"), jsonstr); return -1; } @@ -666,7 +665,7 @@ virStorageSourceParseBackingJSONSocketAddress(virStorag= eNetHostDef *host, host->socket =3D g_strdup(socket); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("backing store protocol '%s' is not yet supported= "), + _("backing store protocol '%1$s' is not yet support= ed"), type); return -1; } @@ -1015,7 +1014,7 @@ virStorageSourceParseBackingJSONRaw(virStorageSource = *src, /* 'raw' is a format driver so it can have protocol driver children */ if (!(file =3D virJSONValueObjectGetObject(json, "file"))) { virReportError(VIR_ERR_INVALID_ARG, - _("JSON backing volume definition '%s' lacks 'file'= object"), + _("JSON backing volume definition '%1$s' lacks 'fil= e' object"), jsonstr); return -1; } @@ -1181,7 +1180,7 @@ virStorageSourceParseBackingJSONInternal(virStorageSo= urce *src, =20 if (!(drvname =3D virJSONValueObjectGetString(json, "driver"))) { virReportError(VIR_ERR_INVALID_ARG, - _("JSON backing volume definition '%s' lacks driver= name"), + _("JSON backing volume definition '%1$s' lacks driv= er name"), jsonstr); return -1; } @@ -1192,7 +1191,7 @@ virStorageSourceParseBackingJSONInternal(virStorageSo= urce *src, =20 if (jsonParsers[i].formatdriver && !allowformat) { virReportError(VIR_ERR_INVALID_ARG, - _("JSON backing volume definition '%s' must not= have nested format drivers"), + _("JSON backing volume definition '%1$s' must n= ot have nested format drivers"), jsonstr); return -1; } @@ -1201,8 +1200,8 @@ virStorageSourceParseBackingJSONInternal(virStorageSo= urce *src, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing parser implementation for JSON backing volum= e " - "driver '%s'"), drvname); + _("missing parser implementation for JSON backing volum= e driver '%1$s'"), + drvname); return -1; } =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464735; cv=none; d=zohomail.com; s=zohoarc; b=kHzAgRoz67Y6xasNo5Yciz8dRNUBMZtFyEGGAYlrcPb8FsTQrEQGMH5kKcYDO3RZJgLhnYglHUBSeZSGJPhMNEsFUmDpFeY0ct41opudiDctfCR4Og6Lj/HW/PQXRFwFBkFXGM/+QWKQmY1ZFIAjQR1BZcrNdYN2gLI3B+Svc4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464735; 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=nF2v0b8eKpfSxepHsoOBmE6HdJaZ42cONaQvkdrQla4=; b=nlQvt4UKHE3CBfX9PWY876xUtR2YAdx0NOCjZswfIdzMQwy7Tapr8pJHpBEYaDJX1Q9S89WQt9ufV9I1/L64Ef4lFcULoxIR1mgqBVhF1ePOUbQuHQSf9YHiPKPws5SERAExUv2r5GsacS6i8IVVYZqWQuweybFJ99MmoMbgS8o= 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 1678464735433235.6823322078783; Fri, 10 Mar 2023 08:12:15 -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-513-_9tt6Rx_Ov6EPoo8BluN0Q-1; Fri, 10 Mar 2023 11:11:39 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 81C30104F0AC; Fri, 10 Mar 2023 16:11:04 +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 6DF6440C945A; Fri, 10 Mar 2023 16:11:04 +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 280B91946A66; Fri, 10 Mar 2023 16:11:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9F5A01946587 for ; Fri, 10 Mar 2023 16:11:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 85163440D8; Fri, 10 Mar 2023 16:11:03 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EA8747CEA for ; Fri, 10 Mar 2023 16:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464734; 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=nF2v0b8eKpfSxepHsoOBmE6HdJaZ42cONaQvkdrQla4=; b=VKUQjqQoda3Ju0HiCKLXQu3VuuVsp6fJrIODJCr7JEQvhIHAusAcHo3ZbcYKn/ndiEjBtK NkqwcbomX3hxDSk8ZRGY/OU6DGaUamZroB+wJIz2AX0gkOs88/Gaa9kM0WWSW6hFifwyu5 kydbBQOGnwLugmxdLtlBxG9hBmuk5KM= X-MC-Unique: _9tt6Rx_Ov6EPoo8BluN0Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 39/51] test: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:55 +0100 Message-Id: <069d64b485ac540938109730d312401a3d67a934.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.2 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: 1678464737371100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/test/test_driver.c | 161 ++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 81 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index bd6f063a00..822639e0f3 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -254,7 +254,7 @@ testDomainDefNamespaceParse(xmlXPathContextPtr ctxt, if (tmp =3D=3D 0) { if (tmpuint >=3D VIR_DOMAIN_LAST) { virReportError(VIR_ERR_XML_ERROR, - _("runstate '%d' out of range'"), tmpuint); + _("runstate '%1$d' out of range'"), tmpuint); goto error; } nsdata->runstate =3D tmpuint; @@ -644,7 +644,7 @@ testDomObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); } =20 @@ -670,7 +670,7 @@ testDomainGenerateIfname(virDomainDef *domdef) } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Exceeded max iface limit %d"), maxif); + _("Exceeded max iface limit %1$d"), maxif); return NULL; } =20 @@ -927,7 +927,7 @@ testParseNodeInfo(virNodeInfoPtr nodeInfo, xmlXPathCont= extPtr ctxt) if (str !=3D NULL) { if (virStrcpyStatic(nodeInfo->model, str) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Model %s too big for destination"), str); + _("Model %1$s too big for destination"), str); return -1; } } @@ -985,8 +985,8 @@ testParseDomainSnapshots(testDriver *privconn, =20 if (virDomainSnapshotUpdateRelations(domobj->snapshots) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Snapshots have inconsistent relations for " - "domain %s"), domobj->def->name); + _("Snapshots have inconsistent relations for domain= %1$s"), + domobj->def->name); return -1; } =20 @@ -1879,7 +1879,7 @@ static int testDomainResume(virDomainPtr domain) return -1; =20 if (virDomainObjGetState(privdom, NULL) !=3D VIR_DOMAIN_PAUSED) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("domain '%s' not paused"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("domain '%1$s' not paused= "), domain->name); goto cleanup; } @@ -1910,7 +1910,7 @@ static int testDomainSuspend(virDomainPtr domain) =20 state =3D virDomainObjGetState(privdom, NULL); if (state =3D=3D VIR_DOMAIN_SHUTOFF || state =3D=3D VIR_DOMAIN_PAUSED)= { - virReportError(VIR_ERR_INTERNAL_ERROR, _("domain '%s' not running"= ), + virReportError(VIR_ERR_INTERNAL_ERROR, _("domain '%1$s' not runnin= g"), domain->name); goto cleanup; } @@ -1977,7 +1977,7 @@ static int testDomainShutdownFlags(virDomainPtr domai= n, =20 if (virDomainObjGetState(privdom, NULL) =3D=3D VIR_DOMAIN_SHUTOFF) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("domain '%s' not running"), domain->name); + _("domain '%1$s' not running"), domain->name); goto cleanup; } =20 @@ -2277,21 +2277,21 @@ testDomainSaveImageWrite(testDriver *driver, =20 if (xml =3D=3D NULL) { virReportSystemError(errno, - _("saving domain '%s' failed to allocate spac= e for metadata"), + _("saving domain '%1$s' failed to allocate sp= ace for metadata"), def->name); goto error; } =20 if ((fd =3D open(path, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR)) < 0= ) { virReportSystemError(errno, - _("saving domain '%s' to '%s': open failed"), + _("saving domain '%1$s' to '%2$s': open faile= d"), def->name, path); goto error; } =20 if (safewrite(fd, TEST_SAVE_MAGIC, sizeof(TEST_SAVE_MAGIC)) < 0) { virReportSystemError(errno, - _("saving domain '%s' to '%s': write failed"), + _("saving domain '%1$s' to '%2$s': write fail= ed"), def->name, path); goto error; } @@ -2299,21 +2299,21 @@ testDomainSaveImageWrite(testDriver *driver, len =3D strlen(xml); if (safewrite(fd, (char*)&len, sizeof(len)) < 0) { virReportSystemError(errno, - _("saving domain '%s' to '%s': write failed"), + _("saving domain '%1$s' to '%2$s': write fail= ed"), def->name, path); goto error; } =20 if (safewrite(fd, xml, len) < 0) { virReportSystemError(errno, - _("saving domain '%s' to '%s': write failed"), + _("saving domain '%1$s' to '%2$s': write fail= ed"), def->name, path); goto error; } =20 if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("saving domain '%s' to '%s': write failed"), + _("saving domain '%1$s' to '%2$s': write fail= ed"), def->name, path); goto error; } @@ -2352,12 +2352,12 @@ testDomainSaveImageOpen(testDriver *driver, g_autofree char *xml =3D NULL; =20 if ((fd =3D open(path, O_RDONLY)) < 0) { - virReportSystemError(errno, _("cannot read domain image '%s'"), pa= th); + virReportSystemError(errno, _("cannot read domain image '%1$s'"), = path); goto error; } =20 if (saferead(fd, magic, sizeof(magic)) !=3D sizeof(magic)) { - virReportSystemError(errno, _("incomplete save header in '%s'"), p= ath); + virReportSystemError(errno, _("incomplete save header in '%1$s'"),= path); goto error; } =20 @@ -2368,7 +2368,7 @@ testDomainSaveImageOpen(testDriver *driver, =20 if (saferead(fd, (char*)&len, sizeof(len)) !=3D sizeof(len)) { virReportSystemError(errno, - _("failed to read metadata length in '%s'"), + _("failed to read metadata length in '%1$s'"), path); goto error; } @@ -2382,7 +2382,7 @@ testDomainSaveImageOpen(testDriver *driver, xml =3D g_new0(char, len + 1); =20 if (saferead(fd, xml, len) !=3D len) { - virReportSystemError(errno, _("incomplete metadata in '%s'"), path= ); + virReportSystemError(errno, _("incomplete metadata in '%1$s'"), pa= th); goto error; } xml[len] =3D '\0'; @@ -2583,19 +2583,19 @@ static int testDomainCoreDumpWithFormat(virDomainPt= r domain, =20 if ((fd =3D open(to, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR)) < 0) { virReportSystemError(errno, - _("domain '%s' coredump: failed to open %s"), + _("domain '%1$s' coredump: failed to open %2$= s"), domain->name, to); goto cleanup; } if (safewrite(fd, TEST_SAVE_MAGIC, sizeof(TEST_SAVE_MAGIC)) < 0) { virReportSystemError(errno, - _("domain '%s' coredump: failed to write head= er to %s"), + _("domain '%1$s' coredump: failed to write he= ader to %2$s"), domain->name, to); goto cleanup; } if (VIR_CLOSE(fd) < 0) { virReportSystemError(errno, - _("domain '%s' coredump: write failed: %s"), + _("domain '%1$s' coredump: write failed: %2$s= "), domain->name, to); goto cleanup; } @@ -2916,8 +2916,8 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned= int nrCpus, =20 if (nrCpus > maxvcpus) { virReportError(VIR_ERR_INVALID_ARG, - _("requested cpu amount exceeds maximum supported a= mount " - "(%d > %d)"), nrCpus, maxvcpus); + _("requested cpu amount exceeds maximum supported a= mount (%1$d > %2$d)"), + nrCpus, maxvcpus); return -1; } =20 @@ -2929,7 +2929,7 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned= int nrCpus, =20 if (def && virDomainDefGetVcpusMax(def) < nrCpus) { virReportError(VIR_ERR_INVALID_ARG, - _("requested cpu amount exceeds maximum (%d > %d)"), + _("requested cpu amount exceeds maximum (%1$d > %2$= d)"), nrCpus, virDomainDefGetVcpusMax(def)); goto cleanup; } @@ -2938,7 +2938,7 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned= int nrCpus, !(flags & VIR_DOMAIN_VCPU_MAXIMUM) && virDomainDefGetVcpusMax(persistentDef) < nrCpus) { virReportError(VIR_ERR_INVALID_ARG, - _("requested cpu amount exceeds maximum (%d > %d)"), + _("requested cpu amount exceeds maximum (%1$d > %2$= d)"), nrCpus, virDomainDefGetVcpusMax(persistentDef)); goto cleanup; } @@ -3093,7 +3093,7 @@ static int testDomainPinVcpuFlags(virDomainPtr domain, if (!(vcpuinfo =3D virDomainDefGetVcpu(def, vcpu)) || !vcpuinfo->online) { virReportError(VIR_ERR_INVALID_ARG, - _("requested vcpu '%d' is not present in the domain= "), + _("requested vcpu '%1$d' is not present in the doma= in"), vcpu); goto cleanup; } @@ -3164,7 +3164,7 @@ testDomainRenameCallback(virDomainObj *privdom, =20 if (strchr(new_name, '/')) { virReportError(VIR_ERR_XML_ERROR, - _("name %s cannot contain '/'"), new_name); + _("name %1$s cannot contain '/'"), new_name); return -1; } =20 @@ -3514,7 +3514,7 @@ testDomainSetNumaParameters(virDomainPtr dom, =20 if (mode < 0 || mode >=3D VIR_DOMAIN_NUMATUNE_MEM_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("unsupported numatune mode: '%d'"), mode); + _("unsupported numatune mode: '%1$d'"), mod= e); goto cleanup; } =20 @@ -3525,7 +3525,7 @@ testDomainSetNumaParameters(virDomainPtr dom, =20 if (virBitmapIsAllClear(nodeset)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Invalid nodeset of 'numatune': %s"), + _("Invalid nodeset of 'numatune': %1$s"), param->value.s); goto cleanup; } @@ -3835,7 +3835,7 @@ testDomainSetBlockIoTune(virDomainPtr dom, =20 if (!(conf_disk =3D virDomainDiskByName(def, path, true))) { virReportError(VIR_ERR_INVALID_ARG, - _("missing persistent configuration for disk '%s'"), + _("missing persistent configuration for disk '%1$s'= "), path); goto cleanup; } @@ -3863,8 +3863,8 @@ testDomainSetBlockIoTune(virDomainPtr dom, =20 if (param->value.ul > TEST_BLOCK_IOTUNE_MAX) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("block I/O throttle limit value must" - " be no more than %llu"), TEST_BLOCK_IOTUNE_M= AX); + _("block I/O throttle limit value must be no mo= re than %1$llu"), + TEST_BLOCK_IOTUNE_MAX); goto cleanup; } =20 @@ -3979,7 +3979,7 @@ testDomainSetBlockIoTune(virDomainPtr dom, do { \ if (info.FIELD > info.FIELD_MAX) { \ virReportError(VIR_ERR_INVALID_ARG, \ - _("%s cannot be set higher than %s "), \ + _("%1$s cannot be set higher than %2$s "), \ #FIELD, #FIELD_MAX); \ goto cleanup; \ } \ @@ -4038,7 +4038,7 @@ testDomainGetBlockIoTune(virDomainPtr dom, =20 if (!(disk =3D virDomainDiskByName(def, path, true))) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' was not found in the domain config"), + _("disk '%1$s' was not found in the domain config"), path); goto cleanup; } @@ -4284,7 +4284,7 @@ testDomainGetPercpuStats(virTypedParameterPtr params, =20 if (start_cpu >=3D total_cpus) { virReportError(VIR_ERR_INVALID_ARG, - _("start_cpu %d larger than maximum of %d"), + _("start_cpu %1$d larger than maximum of %2$d"), start_cpu, total_cpus - 1); return -1; } @@ -4376,7 +4376,7 @@ testDomainSendProcessSignal(virDomainPtr dom, =20 if (signum >=3D VIR_DOMAIN_PROCESS_SIGNAL_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("signum value %d is out of range"), + _("signum value %1$d is out of range"), signum); return -1; } @@ -4523,7 +4523,7 @@ static int testDomainCreateWithFlags(virDomainPtr dom= ain, unsigned int flags) =20 if (virDomainObjGetState(privdom, NULL) !=3D VIR_DOMAIN_SHUTOFF) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Domain '%s' is already running"), domain->name); + _("Domain '%1$s' is already running"), domain->name= ); goto cleanup; } =20 @@ -4591,8 +4591,7 @@ static int testDomainUndefineFlags(virDomainPtr domai= n, NULL, 0))) { if (!(flags & VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("cannot delete inactive domain with %d " - "snapshots"), + _("cannot delete inactive domain with %1$d snap= shots"), nsnapshots); goto cleanup; } @@ -4668,7 +4667,7 @@ testDomainFSFreeze(virDomainPtr dom, } } else { virReportError(VIR_ERR_OPERATION_INVALID, - _("mount point not found: %s"), + _("mount point not found: %1$s"), mountpoints[i]); goto cleanup; } @@ -4728,7 +4727,7 @@ testDomainFSThaw(virDomainPtr dom, } } else { virReportError(VIR_ERR_OPERATION_INVALID, - _("mount point not found: %s"), + _("mount point not found: %1$s"), mountpoints[i]); goto cleanup; } @@ -4764,7 +4763,7 @@ testDomainFSTrim(virDomainPtr dom, =20 if (mountPoint && STRNEQ(mountPoint, "/") && STRNEQ(mountPoint, "/boot= ")) { virReportError(VIR_ERR_OPERATION_INVALID, - _("mount point not found: %s"), + _("mount point not found: %1$s"), mountPoint); goto cleanup; } @@ -5127,7 +5126,7 @@ static int testDomainBlockStats(virDomainPtr domain, =20 if (virDomainDiskIndexByName(privdom->def, path, false) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); goto error; } =20 @@ -5204,7 +5203,7 @@ testDomainGetSecurityLabel(virDomainPtr dom, if (virDomainObjIsActive(vm)) { if (virStrcpyStatic(seclabel->label, "libvirt-test") < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security label exceeds maximum: %zu"), + _("security label exceeds maximum: %1$zu"), sizeof(seclabel->label) - 1); goto cleanup; } @@ -5234,7 +5233,7 @@ testNodeGetSecurityModel(virConnectPtr conn, if (virStrcpy(secmodel->model, driver->caps->host.secModels[0].model, VIR_SECURITY_MODEL_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security model string exceeds max %d bytes"), + _("security model string exceeds max %1$d bytes"), VIR_SECURITY_MODEL_BUFLEN - 1); return -1; } @@ -5242,7 +5241,7 @@ testNodeGetSecurityModel(virConnectPtr conn, if (virStrcpy(secmodel->doi, driver->caps->host.secModels[0].doi, VIR_SECURITY_DOI_BUFLEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("security DOI string exceeds max %d bytes"), + _("security DOI string exceeds max %1$d bytes"), VIR_SECURITY_DOI_BUFLEN - 1); return -1; } @@ -5268,7 +5267,7 @@ testDomainInterfaceAddresses(virDomainPtr dom, =20 if (source >=3D VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LAST) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Unknown IP address data source %d"), + _("Unknown IP address data source %1$d"), source); return -1; } @@ -5375,7 +5374,7 @@ testNetworkObjFindByUUID(testDriver *privconn, if (!(obj =3D virNetworkObjFindByUUID(privconn->networks, uuid))) { virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching uuid '%s'"), + _("no network with matching uuid '%1$s'"), uuidstr); } =20 @@ -5412,7 +5411,7 @@ testNetworkObjFindByName(testDriver *privconn, =20 if (!(obj =3D virNetworkObjFindByName(privconn->networks, name))) virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching name '%s'"), + _("no network with matching name '%1$s'"), name); =20 return obj; @@ -5631,7 +5630,7 @@ testNetworkUndefine(virNetworkPtr net) =20 if (virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Network '%s' is still running"), net->name); + _("Network '%1$s' is still running"), net->name); goto cleanup; } =20 @@ -5708,7 +5707,7 @@ testNetworkCreate(virNetworkPtr net) =20 if (virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Network '%s' is already running"), net->name); + _("Network '%1$s' is already running"), net->name); goto cleanup; } =20 @@ -5789,7 +5788,7 @@ testNetworkGetBridgeName(virNetworkPtr net) =20 if (!(def->bridge)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' does not have a bridge name."), + _("network '%1$s' does not have a bridge name."), def->name); goto cleanup; } @@ -5861,7 +5860,7 @@ testInterfaceObjFindByName(testDriver *privconn, =20 if (!obj) virReportError(VIR_ERR_NO_INTERFACE, - _("no interface with matching name '%s'"), + _("no interface with matching name '%1$s'"), name); =20 return obj; @@ -5978,7 +5977,7 @@ testInterfaceLookupByMACString(virConnectPtr conn, =20 if (ifacect =3D=3D 0) { virReportError(VIR_ERR_NO_INTERFACE, - _("no interface with matching mac '%s'"), mac); + _("no interface with matching mac '%1$s'"), mac); goto cleanup; } =20 @@ -6258,7 +6257,7 @@ testStoragePoolObjFindByName(testDriver *privconn, =20 if (!obj) virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching name '%s'"), + _("no storage pool with matching name '%1$s'"), name); =20 return obj; @@ -6276,7 +6275,7 @@ testStoragePoolObjFindActiveByName(testDriver *privco= nn, =20 if (!virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is not active"), name); + _("storage pool '%1$s' is not active"), name); virStoragePoolObjEndAPI(&obj); return NULL; } @@ -6296,7 +6295,7 @@ testStoragePoolObjFindInactiveByName(testDriver *priv= conn, =20 if (virStoragePoolObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("storage pool '%s' is active"), name); + _("storage pool '%1$s' is active"), name); virStoragePoolObjEndAPI(&obj); return NULL; } @@ -6319,7 +6318,7 @@ testStoragePoolObjFindByUUID(testDriver *privconn, if (!obj) { virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_STORAGE_POOL, - _("no storage pool with matching uuid '%s'"), + _("no storage pool with matching uuid '%1$s'"), uuidstr); } =20 @@ -6533,7 +6532,7 @@ testConnectFindStoragePoolSources(virConnectPtr conn = G_GNUC_UNUSED, pool_type =3D virStoragePoolTypeFromString(type); if (!pool_type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown storage pool type %s"), type); + _("unknown storage pool type %1$s"), type); return NULL; } =20 @@ -6561,7 +6560,7 @@ testConnectFindStoragePoolSources(virConnectPtr conn = G_GNUC_UNUSED, =20 default: virReportError(VIR_ERR_NO_SUPPORT, - _("pool type '%s' does not support source discovery= "), type); + _("pool type '%1$s' does not support source discove= ry"), type); } =20 return NULL; @@ -7033,7 +7032,7 @@ testStorageVolDefFindByName(virStoragePoolObj *obj, =20 if (!(privvol =3D virStorageVolDefFindByName(obj, name))) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching name '%s'"), name); + _("no storage vol with matching name '%1$s'"), name= ); } =20 return privvol; @@ -7111,7 +7110,7 @@ testStorageVolLookupByKey(virConnectPtr conn, =20 if (!vol) virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching key '%s'"), key); + _("no storage vol with matching key '%1$s'"), key); =20 return vol; } @@ -7155,7 +7154,7 @@ testStorageVolLookupByPath(virConnectPtr conn, =20 if (!vol) virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching path '%s'"), path); + _("no storage vol with matching path '%1$s'"), path= ); =20 return vol; } @@ -7196,7 +7195,7 @@ testStorageVolCreateXML(virStoragePoolPtr pool, if ((def->allocation + privvol->target.allocation) > def->capacity) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Not enough free space in pool for volume '%s'"), + _("Not enough free space in pool for volume '%1$s'"= ), privvol->name); goto cleanup; } @@ -7258,7 +7257,7 @@ testStorageVolCreateXMLFrom(virStoragePoolPtr pool, origvol =3D virStorageVolDefFindByName(obj, clonevol->name); if (!origvol) { virReportError(VIR_ERR_NO_STORAGE_VOL, - _("no storage vol with matching name '%s'"), + _("no storage vol with matching name '%1$s'"), clonevol->name); goto cleanup; } @@ -7266,7 +7265,7 @@ testStorageVolCreateXMLFrom(virStoragePoolPtr pool, /* Make sure enough space */ if ((def->allocation + privvol->target.allocation) > def->capacity) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Not enough free space in pool for volume '%s'"), + _("Not enough free space in pool for volume '%1$s'"= ), privvol->name); goto cleanup; } @@ -7441,7 +7440,7 @@ testNodeDeviceObjFindByName(testDriver *driver, =20 if (!(obj =3D virNodeDeviceObjListFindByName(driver->devs, name))) virReportError(VIR_ERR_NO_NODE_DEVICE, - _("no node device with matching name '%s'"), + _("no node device with matching name '%1$s'"), name); =20 return obj; @@ -7759,7 +7758,7 @@ testNodeDeviceDestroy(virNodeDevicePtr dev) if (!(parentobj =3D virNodeDeviceObjListFindByName(driver->devs, def->parent))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find parent '%s' definition"), def->paren= t); + _("cannot find parent '%1$s' definition"), def->par= ent); virObjectLock(obj); goto cleanup; } @@ -8041,7 +8040,7 @@ testDomainSendKey(virDomainPtr domain, for (i =3D 0; i < nkeycodes; i++) { if (virKeycodeValueTranslate(codeset, codeset, keycodes[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid keycode %u of %s codeset"), + _("invalid keycode %1$u of %2$s codeset"), keycodes[i], virKeycodeSetTypeToString(codeset)); goto cleanup; @@ -8068,7 +8067,7 @@ testConnectGetCPUModelNames(virConnectPtr conn G_GNUC= _UNUSED, =20 if (!(arch =3D virArchFromString(archName))) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find architecture %s"), + _("cannot find architecture %1$s"), archName); return -1; } @@ -8255,13 +8254,13 @@ testDomainGetBlockInfo(virDomainPtr dom, =20 if (!(disk =3D virDomainDiskByName(vm->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path %s not assigned to domain"), path); + _("invalid path %1$s not assigned to domain"), path= ); goto cleanup; } =20 if (virStorageSourceIsEmpty(disk->src)) { virReportError(VIR_ERR_INVALID_ARG, - _("disk '%s' does not currently have a source assig= ned"), + _("disk '%1$s' does not currently have a source ass= igned"), path); goto cleanup; } @@ -8346,7 +8345,7 @@ testSnapObjFromName(virDomainObj *vm, snap =3D virDomainSnapshotFindByName(vm->snapshots, name); if (!snap) virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("no domain snapshot with matching name '%s'"), + _("no domain snapshot with matching name '%1$s'"), name); return snap; } @@ -8567,7 +8566,7 @@ testDomainSnapshotGetParent(virDomainSnapshotPtr snap= shot, =20 if (!snap->def->parent_name) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("snapshot '%s' does not have a parent"), + _("snapshot '%1$s' does not have a parent"), snap->def->name); goto cleanup; } @@ -9020,7 +9019,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snaps= hot, =20 if (!snap->def->dom) { virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, - _("snapshot '%s' lacks domain '%s' rollback info"), + _("snapshot '%1$s' lacks domain '%2$s' rollback inf= o"), snap->def->name, vm->def->name); goto cleanup; } @@ -9141,7 +9140,7 @@ testCheckpointObjFromName(virDomainObj *vm, chk =3D virDomainCheckpointFindByName(vm->checkpoints, name); if (!chk) virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, - _("no domain checkpoint with matching name '%s'"), + _("no domain checkpoint with matching name '%1$s'"), name); =20 return chk; @@ -9343,7 +9342,7 @@ testDomainCheckpointGetParent(virDomainCheckpointPtr = checkpoint, =20 if (!chk->def->parent_name) { virReportError(VIR_ERR_NO_DOMAIN_CHECKPOINT, - _("checkpoint '%s' does not have a parent"), + _("checkpoint '%1$s' does not have a parent"), chk->def->name); goto cleanup; } @@ -9555,7 +9554,7 @@ testDomainChgIOThread(virDomainObj *vm, case VIR_DOMAIN_IOTHREAD_ACTION_MOD: if (!(virDomainIOThreadIDFind(def, iothread_id))) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find IOThread '%u' in iothreadids= "), + _("cannot find IOThread '%1$u' in iothreadi= ds"), iothread_id); return ret; } @@ -9688,7 +9687,7 @@ testDomainPinIOThread(virDomainPtr dom, =20 if (!(iothrid =3D virDomainIOThreadIDFind(def, iothread_id))) { virReportError(VIR_ERR_INVALID_ARG, - _("iothreadid %d not found"), iothread_id); + _("iothreadid %1$d not found"), iothread_id); goto cleanup; } =20 @@ -9913,7 +9912,7 @@ testConnectGetAllDomainStats(virConnectPtr conn, } else if ((flags & VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS) && (stats & ~supported)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Stats types bits 0x%x are not supported by this = daemon"), + _("Stats types bits 0x%1$x are not supported by thi= s daemon"), stats & ~supported); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464703; cv=none; d=zohomail.com; s=zohoarc; b=jRkfI6nxJHGxiD5Y0w7H0wJRrQWJH1YSRmQSPtXsywIhu4Wd4qhQpniIfQDbFuosowGOoO46RMBDnwazBRTqkJZAKjUOpQ/eLN8nbkpg7kwpDDM4AhVJOs01Dh9rf6KQEIsP/gDoyyaCpVw5FrNt4+bmRY7yJMi5qqpDH3BaTnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464703; 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=BoLD3kogX5euhngm+d2u7XOl/riGe5e77vFvYNdguWA=; b=Snsa/qzC4k0t4Px7zvKdGXqS1MM2DB5K2u+aGZjcLnsUPlWkwclMA/96bKnE7XTKu/qjwmfmY+flVDyRZvWjjBTAqrg30wE8DZRPk285EJfpmEAHrKle2AEaN8GtM7s3JqIAN52h8brlmKfiZwlzMK5WInc63EqBRtSZD+6McLg= 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 1678464703829993.5935418145166; Fri, 10 Mar 2023 08:11:43 -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-140-TcRwkp76PLWXSJVUmAvVoA-1; Fri, 10 Mar 2023 11:11:34 -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 9CEFC87A385; Fri, 10 Mar 2023 16:11:05 +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 8024F492C3E; Fri, 10 Mar 2023 16:11:05 +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 6F7271946A54; Fri, 10 Mar 2023 16:11:05 +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 D799A1946A4A for ; Fri, 10 Mar 2023 16:11:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CC04A492C3E; Fri, 10 Mar 2023 16:11:04 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3990E492B00 for ; Fri, 10 Mar 2023 16:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464702; 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=BoLD3kogX5euhngm+d2u7XOl/riGe5e77vFvYNdguWA=; b=UxUbsCtAle/FhS5CLEofksHkstTLGw8w+EzL59v5QqEDSIYo+6jBf8U1K1mJBJI/WDuIKB 8C8naRC1Cb46Jw/V37GLbcCjWq72to55ps/cZ4teeYK+3ose7OprFw8owsT8otVOodncYR f9BfZ3xberpLkR7S3cBdvh/yImPnsw4= X-MC-Unique: TcRwkp76PLWXSJVUmAvVoA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 40/51] util: Update format strings in translated messages (part 1) Date: Fri, 10 Mar 2023 17:09:56 +0100 Message-Id: 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.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: 1678464705243100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/util/iohelper.c | 10 +- src/util/viralloc.c | 2 +- src/util/virauth.c | 6 +- src/util/virauthconfig.c | 4 +- src/util/virbitmap.c | 4 +- src/util/virccw.c | 2 +- src/util/vircgroup.c | 42 +++---- src/util/vircgroupbackend.c | 2 +- src/util/vircgroupbackend.h | 4 +- src/util/vircgroupv1.c | 78 ++++++------- src/util/vircgroupv2.c | 80 ++++++------- src/util/vircgroupv2devices.c | 4 +- src/util/vircommand.c | 38 +++--- src/util/virconf.c | 40 +++---- src/util/vircrypto.c | 14 +-- src/util/virdaemon.c | 8 +- src/util/virdevmapper.c | 8 +- src/util/virdnsmasq.c | 15 ++- src/util/virerror.c | 212 +++++++++++++++++----------------- src/util/virerror.h | 14 +-- src/util/vireventthread.c | 2 +- tests/virerrortest.c | 7 +- 22 files changed, 298 insertions(+), 298 deletions(-) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index dd77bda723..0a57672bb4 100644 --- a/src/util/iohelper.c +++ b/src/util/iohelper.c @@ -44,9 +44,9 @@ G_GNUC_NORETURN static void usage(int status) { if (status) { - fprintf(stderr, _("%s: try --help for more details"), program_name= ); + fprintf(stderr, _("%1$s: try --help for more details"), program_na= me); } else { - printf(_("Usage: %s FILENAME FD"), program_name); + printf(_("Usage: %1$s FILENAME FD"), program_name); } exit(status); } @@ -61,7 +61,7 @@ main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed"), program_name); + fprintf(stderr, _("%1$s: initialization failed"), program_name); exit(EXIT_FAILURE); } =20 @@ -71,7 +71,7 @@ main(int argc, char **argv) usage(EXIT_SUCCESS); if (argc =3D=3D 3) { /* FILENAME FD */ if (virStrToLong_i(argv[2], NULL, 10, &fd) < 0) { - fprintf(stderr, _("%s: malformed fd %s"), + fprintf(stderr, _("%1$s: malformed fd %2$s"), program_name, argv[3]); exit(EXIT_FAILURE); } @@ -85,7 +85,7 @@ main(int argc, char **argv) return 0; =20 error: - fprintf(stderr, _("%s: failure with %s: %s"), + fprintf(stderr, _("%1$s: failure with %2$s: %3$s"), program_name, path, virGetLastErrorMessage()); exit(EXIT_FAILURE); } diff --git a/src/util/viralloc.c b/src/util/viralloc.c index 4ebbf1cf8c..7aa14cccb2 100644 --- a/src/util/viralloc.c +++ b/src/util/viralloc.c @@ -248,7 +248,7 @@ virInsertElementsN(void *ptrptr, at =3D *countptr; } else if (at > *countptr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("out of bounds index - count %zu at %zu"), + _("out of bounds index - count %1$zu at %2$zu"), *countptr, at); return -1; } diff --git a/src/util/virauth.c b/src/util/virauth.c index 7b4a1bd8a5..d6917bde9f 100644 --- a/src/util/virauth.c +++ b/src/util/virauth.c @@ -153,10 +153,10 @@ virAuthGetUsernamePath(const char *path, memset(&cred, 0, sizeof(virConnectCredential)); =20 if (defaultUsername !=3D NULL) { - prompt =3D g_strdup_printf(_("Enter username for %s [%s]"), hostna= me, + prompt =3D g_strdup_printf(_("Enter username for %1$s [%2$s]"), ho= stname, defaultUsername); } else { - prompt =3D g_strdup_printf(_("Enter username for %s"), hostname); + prompt =3D g_strdup_printf(_("Enter username for %1$s"), hostname); } =20 for (ncred =3D 0; ncred < auth->ncredtype; ncred++) { @@ -230,7 +230,7 @@ virAuthGetPasswordPath(const char *path, return NULL; } =20 - prompt =3D g_strdup_printf(_("Enter %s's password for %s"), username, = hostname); + prompt =3D g_strdup_printf(_("Enter %1$s's password for %2$s"), userna= me, hostname); =20 if (!(cred =3D virAuthAskCredential(auth, prompt, false))) return NULL; diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 818df7a252..0c9eeae76e 100644 --- a/src/util/virauthconfig.c +++ b/src/util/virauthconfig.c @@ -109,7 +109,7 @@ virAuthConfigLookup(virAuthConfig *auth, =20 if (!(authcred =3D g_key_file_get_string(auth->keyfile, authgroup, "cr= edentials", NULL))) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Missing item 'credentials' in group '%s' in '%s'= "), + _("Missing item 'credentials' in group '%1$s' in '%= 2$s'"), authgroup, auth->path); return -1; } @@ -118,7 +118,7 @@ virAuthConfigLookup(virAuthConfig *auth, =20 if (!g_key_file_has_group(auth->keyfile, credgroup)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Missing group 'credentials-%s' referenced from g= roup '%s' in '%s'"), + _("Missing group 'credentials-%1$s' referenced from= group '%2$s' in '%3$s'"), authcred, authgroup, auth->path); return -1; } diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 48ffed0a0f..e48224d709 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -478,7 +478,7 @@ virBitmapParseInternal(const char *str, =20 error: virReportError(VIR_ERR_INVALID_ARG, - _("Failed to parse bitmap '%s'"), str); + _("Failed to parse bitmap '%1$s'"), str); return -1; } =20 @@ -996,7 +996,7 @@ virBitmapNewString(const char *string) =20 if (strspn(string, "0123456789abcdefABCDEF") !=3D len) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid hexadecimal string '%s'"), string); + _("Invalid hexadecimal string '%1$s'"), string); return NULL; } =20 diff --git a/src/util/virccw.c b/src/util/virccw.c index d741743050..c6be013e16 100644 --- a/src/util/virccw.c +++ b/src/util/virccw.c @@ -64,7 +64,7 @@ virCCWDeviceAddressFromString(const char *address) &ccw->ssid, &ccw->devno) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse CCW address '%s'"), + _("Failed to parse CCW address '%1$s'"), address); return NULL; } diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 73675b4478..b424e1b5d4 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -353,7 +353,7 @@ virCgroupDetectPlacement(virCgroup *group, mapping =3D fopen(procfile, "r"); if (mapping =3D=3D NULL) { virReportSystemError(errno, - _("Unable to open '%s'"), + _("Unable to open '%1$s'"), procfile); goto cleanup; } @@ -464,14 +464,14 @@ virCgroupGetBlockDevString(const char *path) =20 if (stat(path, &sb) < 0) { virReportSystemError(errno, - _("Path '%s' is not accessible"), + _("Path '%1$s' is not accessible"), path); return NULL; } =20 if (!S_ISBLK(sb.st_mode)) { virReportSystemError(EINVAL, - _("Path '%s' must be a block device"), + _("Path '%1$s' must be a block device"), path); return NULL; } @@ -524,12 +524,12 @@ virCgroupSetValueRaw(const char *path, if (errno =3D=3D EINVAL && (tmp =3D strrchr(path, '/'))) { virReportSystemError(errno, - _("Invalid value '%s' for '%s'"), + _("Invalid value '%1$s' for '%2$s'"), value, tmp + 1); return -1; } virReportSystemError(errno, - _("Unable to write to '%s'"), path); + _("Unable to write to '%1$s'"), path); return -1; } =20 @@ -549,7 +549,7 @@ virCgroupGetValueRaw(const char *path, =20 if ((rc =3D virFileReadAll(path, 1024*1024, value)) < 0) { virReportSystemError(errno, - _("Unable to read from '%s'"), path); + _("Unable to read from '%1$s'"), path); return -1; } =20 @@ -656,7 +656,7 @@ virCgroupGetValueI64(virCgroup *group, =20 if (virStrToLong_ll(strval, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), strval); return -1; } @@ -678,7 +678,7 @@ virCgroupGetValueU64(virCgroup *group, =20 if (virStrToLong_ull(strval, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), strval); return -1; } @@ -947,7 +947,7 @@ virCgroupNewPartition(const char *path, =20 if (!g_path_is_absolute(path)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Partition path '%s' must start with '/'"), + _("Partition path '%1$s' must start with '/'"), path); return -1; } @@ -1125,7 +1125,7 @@ virCgroupNewThread(virCgroup *domain, break; case VIR_CGROUP_THREAD_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected name value %d"), nameval); + _("unexpected name value %1$d"), nameval); return -1; } =20 @@ -1508,7 +1508,7 @@ virCgroupPathOfController(virCgroup *group, { if (controller >=3D VIR_CGROUP_CONTROLLER_LAST) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid controller id '%d'"), controller); + _("Invalid controller id '%1$d'"), controller); return -1; } =20 @@ -2187,7 +2187,7 @@ virCgroupAllowDevicePath(virCgroup *group, return 1; =20 virReportSystemError(errno, - _("Path '%s' is not accessible"), + _("Path '%1$s' is not accessible"), path); return -1; } @@ -2254,7 +2254,7 @@ virCgroupDenyDevicePath(virCgroup *group, return 1; =20 virReportSystemError(errno, - _("Path '%s' is not accessible"), + _("Path '%1$s' is not accessible"), path); return -1; } @@ -2383,7 +2383,7 @@ virCgroupGetPercpuStats(virCgroup *group, =20 if (start_cpu >=3D total_cpus) { virReportError(VIR_ERR_INVALID_ARG, - _("start_cpu %d larger than maximum of %d"), + _("start_cpu %1$d larger than maximum of %2$d"), start_cpu, total_cpus - 1); return -1; } @@ -2582,7 +2582,7 @@ virCgroupRemoveRecursively(char *grppath) if (errno =3D=3D ENOENT) return 0; rc =3D -errno; - VIR_ERROR(_("Unable to open %s (%d)"), grppath, errno); + VIR_ERROR(_("Unable to open %1$s (%2$d)"), grppath, errno); return rc; } =20 @@ -2601,13 +2601,13 @@ virCgroupRemoveRecursively(char *grppath) } if (direrr < 0) { rc =3D -errno; - VIR_ERROR(_("Failed to readdir for %s (%d)"), grppath, errno); + VIR_ERROR(_("Failed to readdir for %1$s (%2$d)"), grppath, errno); } =20 VIR_DEBUG("Removing cgroup %s", grppath); if (rmdir(grppath) !=3D 0 && errno !=3D ENOENT) { rc =3D -errno; - VIR_ERROR(_("Unable to remove %s (%d)"), grppath, errno); + VIR_ERROR(_("Unable to remove %1$s (%2$d)"), grppath, errno); } =20 return rc; @@ -2677,7 +2677,7 @@ virCgroupKillInternal(virCgroup *group, } =20 virReportSystemError(errno, - _("Failed to read %s"), + _("Failed to read %1$s"), keypath); goto cleanup; } else { @@ -2688,7 +2688,7 @@ virCgroupKillInternal(virCgroup *group, if (feof(fp)) break; virReportSystemError(errno, - _("Failed to read %s"), + _("Failed to read %1$s"), keypath); goto cleanup; } @@ -2701,7 +2701,7 @@ virCgroupKillInternal(virCgroup *group, if (kill((pid_t)*pid_value, signum) < 0) { if (errno !=3D ESRCH) { virReportSystemError(errno, - _("Failed to kill process %ll= d"), + _("Failed to kill process %1$= lld"), *pid_value); goto cleanup; } @@ -3025,7 +3025,7 @@ virCgroupGetInode(virCgroup *cgroup) return -1; =20 if (stat(path, &st) < 0) { - virReportSystemError(errno, _("failed to get stat for '%s'"), path= ); + virReportSystemError(errno, _("failed to get stat for '%1$s'"), pa= th); return -1; } =20 diff --git a/src/util/vircgroupbackend.c b/src/util/vircgroupbackend.c index 6d6f82cbb1..ee049c13b9 100644 --- a/src/util/vircgroupbackend.c +++ b/src/util/vircgroupbackend.c @@ -43,7 +43,7 @@ virCgroupBackendRegister(virCgroupBackend *backend) { if (virCgroupBackends[backend->type]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cgroup backend '%s' already registered."), + _("Cgroup backend '%1$s' already registered."), virCgroupBackendTypeToString(backend->type)); return; } diff --git a/src/util/vircgroupbackend.h b/src/util/vircgroupbackend.h index c4d56896b0..ee2f6c1ec7 100644 --- a/src/util/vircgroupbackend.h +++ b/src/util/vircgroupbackend.h @@ -466,13 +466,13 @@ virCgroupBackendForController(virCgroup *group, virCgroupBackend *backend =3D virCgroupBackendForController(group,= controller); \ if (!backend) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ - _("failed to get cgroup backend for '%s' contro= ller '%u'"), \ + _("failed to get cgroup backend for '%1$s' cont= roller '%2$u'"), \ #func, controller); \ return ret; \ } \ if (!backend->func) { \ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, \ - _("operation '%s' not supported for backend '%s= '"), \ + _("operation '%1$s' not supported for backend '= %2$s'"), \ #func, virCgroupBackendTypeToString(backend->ty= pe)); \ return ret; \ } \ diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c index cbee08e931..c0cac2a6b6 100644 --- a/src/util/vircgroupv1.c +++ b/src/util/vircgroupv1.c @@ -230,7 +230,7 @@ virCgroupV1ResolveMountLink(const char *mntDir, dirName =3D strrchr(tmp, '/'); if (!dirName) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing '/' separator in cgroup mount '%s'"), tm= p); + _("Missing '/' separator in cgroup mount '%1$s'"), = tmp); return -1; } =20 @@ -246,7 +246,7 @@ virCgroupV1ResolveMountLink(const char *mntDir, VIR_WARN("Controller %s co-mounted at %s is missing symlink at= %s", typeStr, tmp, linkSrc); } else { - virReportSystemError(errno, _("Cannot stat %s"), linkSrc); + virReportSystemError(errno, _("Cannot stat %1$s"), linkSrc); return -1; } } else { @@ -409,7 +409,7 @@ virCgroupV1ValidatePlacement(virCgroup *group, =20 if (!group->legacy[i].placement) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find placement for v1 controller %= s"), + _("Could not find placement for v1 controller %= 1$s"), virCgroupV1ControllerTypeToString(i)); return -1; } @@ -478,7 +478,7 @@ virCgroupV1DetectControllers(virCgroup *group, if (STREQ_NULLABLE(group->legacy[i].mountPoint, group->legacy[j].mountPoint)) { virReportSystemError(EINVAL, - _("V1 controller '%s' is not = wanted, but '%s' is co-mounted"), + _("V1 controller '%1$s' is no= t wanted, but '%2$s' is co-mounted"), virCgroupV1ControllerTypeToSt= ring(i), virCgroupV1ControllerTypeToSt= ring(j)); return -1; @@ -547,14 +547,14 @@ virCgroupV1PathOfController(virCgroup *group, { if (group->legacy[controller].mountPoint =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("v1 controller '%s' is not mounted"), + _("v1 controller '%1$s' is not mounted"), virCgroupV1ControllerTypeToString(controller)); return -1; } =20 if (group->legacy[controller].placement =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("v1 controller '%s' is not enabled for group"), + _("v1 controller '%1$s' is not enabled for group"), virCgroupV1ControllerTypeToString(controller)); return -1; } @@ -670,7 +670,7 @@ virCgroupV1MakeGroup(virCgroup *parent, continue; } else { virReportSystemError(errno, - _("Failed to create v1 controller= %s for group"), + _("Failed to create v1 controller= %1$s for group"), virCgroupV1ControllerTypeToString= (i)); return -1; } @@ -828,7 +828,7 @@ virCgroupV1IdentifyRoot(virCgroup *group) continue; if (!(tmp =3D strrchr(group->legacy[i].mountPoint, '/'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find directory separator in %s"), + _("Could not find directory separator in %1$s"), group->legacy[i].mountPoint); return NULL; } @@ -860,7 +860,7 @@ virCgroupV1BindMount(virCgroup *group, =20 if (g_mkdir_with_parents(root, 0777) < 0) { virReportSystemError(errno, - _("Unable to create directory %s"), + _("Unable to create directory %1$s"), root); return -1; } @@ -869,7 +869,7 @@ virCgroupV1BindMount(virCgroup *group, =20 if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC, opts) = < 0) { virReportSystemError(errno, - _("Failed to mount %s on %s type %s"), + _("Failed to mount %1$s on %2$s type %3$s"), "tmpfs", root, "tmpfs"); return -1; } @@ -886,7 +886,7 @@ virCgroupV1BindMount(virCgroup *group, group->legacy[i].mountPoint); if (g_mkdir_with_parents(group->legacy[i].mountPoint, 0777) < = 0) { virReportSystemError(errno, - _("Unable to create directory %s"), + _("Unable to create directory %1$s"), group->legacy[i].mountPoint); return -1; } @@ -894,7 +894,7 @@ virCgroupV1BindMount(virCgroup *group, if (mount(src, group->legacy[i].mountPoint, "none", MS_BIND, NULL) < 0) { virReportSystemError(errno, - _("Failed to bind cgroup '%s' on '%s'= "), + _("Failed to bind cgroup '%1$s' on '%= 2$s'"), src, group->legacy[i].mountPoint); return -1; } @@ -907,7 +907,7 @@ virCgroupV1BindMount(virCgroup *group, if (symlink(group->legacy[i].mountPoint, group->legacy[i].linkPoint) < 0) { virReportSystemError(errno, - _("Unable to symlink directory %s to = %s"), + _("Unable to symlink directory %1$s t= o %2$s"), group->legacy[i].mountPoint, group->legacy[i].linkPoint); return -1; @@ -952,7 +952,7 @@ virCgroupV1SetOwner(virCgroup *cgroup, =20 if (chown(entry, uid, gid) < 0) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u= )"), entry, uid, gid); return -1; } @@ -962,7 +962,7 @@ virCgroupV1SetOwner(virCgroup *cgroup, =20 if (chown(base, uid, gid) < 0) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), base, uid, gid); return -1; } @@ -1042,7 +1042,7 @@ virCgroupV1GetBlkioWeight(virCgroup *group, =20 if (virStrToLong_ui(value, NULL, 10, weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), value); return -1; } @@ -1102,7 +1102,7 @@ virCgroupV1GetBlkioIoServiced(virCgroup *group, p1 +=3D strlen(value_names[i]); if (virStrToLong_ll(p1, &p1, 10, &stats_val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse byte %sstat '%s'"), + _("Cannot parse byte %1$sstat '%2$s'"), value_names[i], p1); return -1; @@ -1112,7 +1112,7 @@ virCgroupV1GetBlkioIoServiced(virCgroup *group, (stats_val > 0 && *bytes_ptrs[i] > (LLONG_MAX - stats_val)= )) { virReportError(VIR_ERR_OVERFLOW, - _("Sum of byte %sstat overflows"), + _("Sum of byte %1$sstat overflows"), value_names[i]); return -1; } @@ -1123,7 +1123,7 @@ virCgroupV1GetBlkioIoServiced(virCgroup *group, p2 +=3D strlen(value_names[i]); if (virStrToLong_ll(p2, &p2, 10, &stats_val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse %srequest stat '%s'"), + _("Cannot parse %1$srequest stat '%2$s'"), value_names[i], p2); return -1; @@ -1133,7 +1133,7 @@ virCgroupV1GetBlkioIoServiced(virCgroup *group, (stats_val > 0 && *requests_ptrs[i] > (LLONG_MAX - stats_v= al))) { virReportError(VIR_ERR_OVERFLOW, - _("Sum of %srequest stat overflows"), + _("Sum of %1$srequest stat overflows"), value_names[i]); return -1; } @@ -1188,14 +1188,14 @@ virCgroupV1GetBlkioIoDeviceServiced(virCgroup *grou= p, =20 if (!(p1 =3D strstr(str1, str3))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find byte stats for block device '%s'"), + _("Cannot find byte stats for block device '%1$s'"), str3); return -1; } =20 if (!(p2 =3D strstr(str2, str3))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find request stats for block device '%s'"= ), + _("Cannot find request stats for block device '%1$s= '"), str3); return -1; } @@ -1203,28 +1203,28 @@ virCgroupV1GetBlkioIoDeviceServiced(virCgroup *grou= p, for (i =3D 0; i < G_N_ELEMENTS(value_names); i++) { if (!(p1 =3D strstr(p1, value_names[i]))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find byte %sstats for block device '%= s'"), + _("Cannot find byte %1$sstats for block device = '%2$s'"), value_names[i], str3); return -1; } =20 if (virStrToLong_ll(p1 + strlen(value_names[i]), &p1, 10, bytes_pt= rs[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse %sstat '%s'"), + _("Cannot parse %1$sstat '%2$s'"), value_names[i], p1 + strlen(value_names[i])); return -1; } =20 if (!(p2 =3D strstr(p2, value_names[i]))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find request %sstats for block device= '%s'"), + _("Cannot find request %1$sstats for block devi= ce '%2$s'"), value_names[i], str3); return -1; } =20 if (virStrToLong_ll(p2 + strlen(value_names[i]), &p2, 10, requests= _ptrs[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse %sstat '%s'"), + _("Cannot parse %1$sstat '%2$s'"), value_names[i], p2 + strlen(value_names[i])); return -1; } @@ -1302,7 +1302,7 @@ virCgroupV1GetBlkioDeviceWeight(virCgroup *group, *weight =3D 0; } else if (virStrToLong_ui(str, NULL, 10, weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1353,7 +1353,7 @@ virCgroupV1GetBlkioDeviceReadIops(virCgroup *group, *riops =3D 0; } else if (virStrToLong_ui(str, NULL, 10, riops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1404,7 +1404,7 @@ virCgroupV1GetBlkioDeviceWriteIops(virCgroup *group, *wiops =3D 0; } else if (virStrToLong_ui(str, NULL, 10, wiops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1455,7 +1455,7 @@ virCgroupV1GetBlkioDeviceReadBps(virCgroup *group, *rbps =3D 0; } else if (virStrToLong_ull(str, NULL, 10, rbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1506,7 +1506,7 @@ virCgroupV1GetBlkioDeviceWriteBps(virCgroup *group, *wbps =3D 0; } else if (virStrToLong_ull(str, NULL, 10, wbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1567,7 +1567,7 @@ virCgroupV1SetMemory(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1710,7 +1710,7 @@ virCgroupV1SetMemorySoftLimit(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1755,7 +1755,7 @@ virCgroupV1SetMemSwapHardLimit(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1906,7 +1906,7 @@ virCgroupV1SetCpuShares(virCgroup *group, if (shares < VIR_CGROUP_CPU_SHARES_MIN || shares > VIR_CGROUP_CPU_SHARES_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("shares '%llu' must be in range [%llu, %llu]"), + _("shares '%1$llu' must be in range [%2$llu, %3$llu= ]"), shares, VIR_CGROUP_CPU_SHARES_MIN, VIR_CGROUP_CPU_SHARES_MAX); @@ -1942,7 +1942,7 @@ virCgroupV1SetCpuCfsPeriod(virCgroup *group, if (cfs_period < VIR_CGROUP_CPU_PERIOD_MIN || cfs_period > VIR_CGROUP_CPU_PERIOD_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("cfs_period '%llu' must be in range (%llu, %llu)"= ), + _("cfs_period '%1$llu' must be in range (%2$llu, %3= $llu)"), cfs_period, VIR_CGROUP_CPU_PERIOD_MIN, VIR_CGROUP_CPU_PERIOD_MAX); @@ -1973,7 +1973,7 @@ virCgroupV1SetCpuCfsQuota(virCgroup *group, (cfs_quota < VIR_CGROUP_CPU_QUOTA_MIN || cfs_quota > VIR_CGROUP_CPU_QUOTA_MAX)) { virReportError(VIR_ERR_INVALID_ARG, - _("cfs_quota '%lld' must be in range (%llu, %llu)"), + _("cfs_quota '%1$lld' must be in range (%2$llu, %3$= llu)"), cfs_quota, VIR_CGROUP_CPU_QUOTA_MIN, VIR_CGROUP_CPU_QUOTA_MAX); @@ -2049,14 +2049,14 @@ virCgroupV1GetCpuacctStat(virCgroup *group, if (!(p =3D STRSKIP(str, "user ")) || virStrToLong_ull(p, &p, 10, user) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse user stat '%s'"), + _("Cannot parse user stat '%1$s'"), p); return -1; } if (!(p =3D STRSKIP(p, "\nsystem ")) || virStrToLong_ull(p, NULL, 10, sys) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse sys stat '%s'"), + _("Cannot parse sys stat '%1$s'"), p); return -1; } diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 219b9c7f21..db115e25f7 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -279,7 +279,7 @@ virCgroupV2ParseControllersFile(virCgroup *group, =20 rc =3D virFileReadAll(contFile, 1024 * 1024, &contStr); if (rc < 0) { - virReportSystemError(errno, _("Unable to read from '%s'"), contFil= e); + virReportSystemError(errno, _("Unable to read from '%1$s'"), contF= ile); return -1; } =20 @@ -360,7 +360,7 @@ virCgroupV2PathOfController(virCgroup *group, { if (!virCgroupV2HasController(group, controller)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("v2 controller '%s' is not available"), + _("v2 controller '%1$s' is not available"), virCgroupV2ControllerTypeToString(controller)); return -1; } @@ -398,7 +398,7 @@ virCgroupV2EnableController(virCgroup *group, if (virFileWriteStr(path, val, 0) < 0) { if (report) { virReportSystemError(errno, - _("Failed to enable controller '%s' for '= %s'"), + _("Failed to enable controller '%1$s' for= '%2$s'"), val, path); } return -2; @@ -439,7 +439,7 @@ virCgroupV2MakeGroup(virCgroup *parent, =20 if (!virFileExists(path) && (!create || (mkdir(path, 0755) < 0 && errno !=3D EEXIST))) { - virReportSystemError(errno, _("Failed to create v2 cgroup '%s'"), + virReportSystemError(errno, _("Failed to create v2 cgroup '%1$s'"), path); return -1; } @@ -590,7 +590,7 @@ virCgroupV2BindMount(virCgroup *group, VIR_DEBUG("Mounting cgroups at '%s'", group->unified.mountPoint); =20 if (g_mkdir_with_parents(group->unified.mountPoint, 0777) < 0) { - virReportSystemError(errno, _("Unable to create directory %s"), + virReportSystemError(errno, _("Unable to create directory %1$s"), group->unified.mountPoint); return -1; } @@ -598,7 +598,7 @@ virCgroupV2BindMount(virCgroup *group, src =3D g_strdup_printf("%s%s", oldroot, group->unified.mountPoint); =20 if (mount(src, group->unified.mountPoint, "none", MS_BIND, NULL) < 0) { - virReportSystemError(errno, _("Failed to bind cgroup '%s' on '%s'"= ), + virReportSystemError(errno, _("Failed to bind cgroup '%1$s' on '%2= $s'"), src, group->unified.mountPoint); return -1; } @@ -622,7 +622,7 @@ virCgroupV2SetOwner(virCgroup *cgroup, return -1; =20 if (chown(base, uid, gid) < 0) { - virReportSystemError(errno, _("cannot chown '%s' to (%u, %u)"), + virReportSystemError(errno, _("cannot chown '%1$s' to (%2$u, %3$u)= "), base, uid, gid); return -1; } @@ -710,7 +710,7 @@ virCgroupV2GetBlkioWeight(virCgroup *group, =20 if (virStrToLong_ui(tmp, &tmp, 10, weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), tmp); return -1; } @@ -763,7 +763,7 @@ virCgroupV2GetBlkioIoServiced(virCgroup *group, p1 +=3D strlen(value_names[i]); if (virStrToLong_ll(p1, &p1, 10, &stats_val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse byte '%s' stat '%s'"), + _("Cannot parse byte '%1$s' stat '%2$s'"), value_names[i], p1); return -1; } @@ -771,7 +771,7 @@ virCgroupV2GetBlkioIoServiced(virCgroup *group, if (stats_val < 0 || (stats_val > 0 && *value_ptrs[i] > (LLONG_MAX - stats_val)= )) { virReportError(VIR_ERR_OVERFLOW, - _("Sum of byte '%s' stat overflows"), + _("Sum of byte '%1$s' stat overflows"), value_names[i]); return -1; } @@ -820,7 +820,7 @@ virCgroupV2GetBlkioIoDeviceServiced(virCgroup *group, =20 if (!(p1 =3D strstr(str1, str2))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find byte stats for block device '%s'"), + _("Cannot find byte stats for block device '%1$s'"), str2); return -1; } @@ -828,7 +828,7 @@ virCgroupV2GetBlkioIoDeviceServiced(virCgroup *group, for (i =3D 0; i < G_N_ELEMENTS(value_names); i++) { if (!(p1 =3D strstr(p1, value_names[i]))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find byte '%s' stats for block device= '%s'"), + _("Cannot find byte '%1$s' stats for block devi= ce '%2$s'"), value_names[i], str2); return -1; } @@ -836,7 +836,7 @@ virCgroupV2GetBlkioIoDeviceServiced(virCgroup *group, p1 +=3D strlen(value_names[i]); if (virStrToLong_ll(p1, &p1, 10, value_ptrs[i]) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse '%s' stat '%s'"), + _("Cannot parse '%1$s' stat '%2$s'"), value_names[i], p1); return -1; } @@ -915,7 +915,7 @@ virCgroupV2GetBlkioDeviceWeight(virCgroup *group, *weight =3D 0; } else if (virStrToLong_ui(str, &tmp, 10, weight) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -973,7 +973,7 @@ virCgroupV2GetBlkioDeviceReadIops(virCgroup *group, } else { if (!(tmp =3D strstr(str, name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find '%s' limit for block device '= %s'"), + _("Unable to find '%1$s' limit for block device= '%2$s'"), name, path); return -1; } @@ -983,7 +983,7 @@ virCgroupV2GetBlkioDeviceReadIops(virCgroup *group, *riops =3D 0; } else if (virStrToLong_ui(tmp, &tmp, 10, riops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1042,7 +1042,7 @@ virCgroupV2GetBlkioDeviceWriteIops(virCgroup *group, } else { if (!(tmp =3D strstr(str, name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find '%s' limit for block device '= %s'"), + _("Unable to find '%1$s' limit for block device= '%2$s'"), name, path); return -1; } @@ -1052,7 +1052,7 @@ virCgroupV2GetBlkioDeviceWriteIops(virCgroup *group, *wiops =3D 0; } else if (virStrToLong_ui(tmp, &tmp, 10, wiops) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1111,7 +1111,7 @@ virCgroupV2GetBlkioDeviceReadBps(virCgroup *group, } else { if (!(tmp =3D strstr(str, name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find '%s' limit for block device '= %s'"), + _("Unable to find '%1$s' limit for block device= '%2$s'"), name, path); return -1; } @@ -1121,7 +1121,7 @@ virCgroupV2GetBlkioDeviceReadBps(virCgroup *group, *rbps =3D 0; } else if (virStrToLong_ull(tmp, &tmp, 10, rbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1180,7 +1180,7 @@ virCgroupV2GetBlkioDeviceWriteBps(virCgroup *group, } else { if (!(tmp =3D strstr(str, name))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find '%s' limit for block device '= %s'"), + _("Unable to find '%1$s' limit for block device= '%2$s'"), name, path); return -1; } @@ -1190,7 +1190,7 @@ virCgroupV2GetBlkioDeviceWriteBps(virCgroup *group, *wbps =3D 0; } else if (virStrToLong_ull(tmp, &tmp, 10, wbps) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), str); return -1; } @@ -1208,7 +1208,7 @@ virCgroupV2SetMemory(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1271,7 +1271,7 @@ virCgroupV2GetMemoryStat(virCgroup *group, =20 if (virStrToLong_ull(valueStr + 1, NULL, 10, &value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse '%s' as an integer"), + _("Unable to parse '%1$s' as an integer"), valueStr + 1); return -1; } @@ -1348,7 +1348,7 @@ virCgroupV2GetMemoryHardLimit(virCgroup *group, =20 if (virStrToLong_ull(value, NULL, 10, &max) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), + _("Failed to parse value '%1$s' as number."), value); return -1; } @@ -1369,7 +1369,7 @@ virCgroupV2SetMemorySoftLimit(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1407,7 +1407,7 @@ virCgroupV2GetMemorySoftLimit(virCgroup *group, =20 if (virStrToLong_ull(value, NULL, 10, &high) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), + _("Failed to parse value '%1$s' as number."), value); return -1; } @@ -1428,7 +1428,7 @@ virCgroupV2SetMemSwapHardLimit(virCgroup *group, =20 if (kb > maxkb) { virReportError(VIR_ERR_INVALID_ARG, - _("Memory '%llu' must be less than %llu"), + _("Memory '%1$llu' must be less than %2$llu"), kb, maxkb); return -1; } @@ -1467,7 +1467,7 @@ virCgroupV2GetMemSwapHardLimit(virCgroup *group, =20 if (virStrToLong_ull(value, NULL, 10, &max) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), + _("Failed to parse value '%1$s' as number."), value); return -1; } @@ -1502,7 +1502,7 @@ virCgroupV2SetCpuShares(virCgroup *group, if (shares < VIR_CGROUPV2_WEIGHT_MIN || shares > VIR_CGROUPV2_WEIGHT_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("shares '%llu' must be in range [%llu, %llu]"), + _("shares '%1$llu' must be in range [%2$llu, %3$llu= ]"), shares, VIR_CGROUPV2_WEIGHT_MIN, VIR_CGROUPV2_WEIGHT_MAX); @@ -1542,7 +1542,7 @@ virCgroupV2SetCpuCfsPeriod(virCgroup *group, if (cfs_period < VIR_CGROUP_CPU_PERIOD_MIN || cfs_period > VIR_CGROUP_CPU_PERIOD_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("cfs_period '%llu' must be in range (%llu, %llu)"= ), + _("cfs_period '%1$llu' must be in range (%2$llu, %3= $llu)"), VIR_CGROUP_CPU_PERIOD_MIN, VIR_CGROUP_CPU_PERIOD_MAX, cfs_period); @@ -1588,7 +1588,7 @@ virCgroupV2GetCpuCfsPeriod(virCgroup *group, =20 if (virStrToLong_ull(tmp, &tmp, 10, cfs_period) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' from cpu.max."), str); + _("Failed to parse value '%1$s' from cpu.max."), st= r); return -1; } =20 @@ -1604,7 +1604,7 @@ virCgroupV2SetCpuCfsQuota(virCgroup *group, (cfs_quota < VIR_CGROUP_CPU_QUOTA_MIN || cfs_quota > VIR_CGROUP_CPU_QUOTA_MAX)) { virReportError(VIR_ERR_INVALID_ARG, - _("cfs_quota '%lld' must be in range (%llu, %llu)"), + _("cfs_quota '%1$lld' must be in range (%2$llu, %3$= llu)"), cfs_quota, VIR_CGROUP_CPU_QUOTA_MIN, VIR_CGROUP_CPU_QUOTA_MAX); @@ -1642,7 +1642,7 @@ virCgroupV2GetCpuCfsQuota(virCgroup *group, =20 if (virStrToLong_ll(str, &tmp, 10, cfs_quota) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' from cpu.max."), str); + _("Failed to parse value '%1$s' from cpu.max."), st= r); return -1; } =20 @@ -1679,14 +1679,14 @@ virCgroupV2GetCpuacctUsage(virCgroup *group, =20 if (!(tmp =3D strstr(str, "usage_usec "))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse cpu usage stat '%s'"), str); + _("cannot parse cpu usage stat '%1$s'"), str); return -1; } tmp +=3D strlen("usage_usec "); =20 if (virStrToLong_ull(tmp, &tmp, 10, usage) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), tmp); + _("Failed to parse value '%1$s' as number."), tmp); return -1; } =20 @@ -1713,27 +1713,27 @@ virCgroupV2GetCpuacctStat(virCgroup *group, =20 if (!(tmp =3D strstr(str, "user_usec "))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse cpu user stat '%s'"), str); + _("cannot parse cpu user stat '%1$s'"), str); return -1; } tmp +=3D strlen("user_usec "); =20 if (virStrToLong_ull(tmp, &tmp, 10, &userVal) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), tmp); + _("Failed to parse value '%1$s' as number."), tmp); return -1; } =20 if (!(tmp =3D strstr(str, "system_usec "))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse cpu sys stat '%s'"), str); + _("cannot parse cpu sys stat '%1$s'"), str); return -1; } tmp +=3D strlen("system_usec "); =20 if (virStrToLong_ull(tmp, &tmp, 10, &sysVal) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse value '%s' as number."), tmp); + _("Failed to parse value '%1$s' as number."), tmp); return -1; } =20 diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c index 05818c4130..f740127bbc 100644 --- a/src/util/vircgroupv2devices.c +++ b/src/util/vircgroupv2devices.c @@ -297,7 +297,7 @@ virCgroupV2DevicesAttachProg(virCgroup *group, =20 cgroupfd =3D open(path, O_RDONLY); if (cgroupfd < 0) { - virReportSystemError(errno, _("unable to open '%s'"), path); + virReportSystemError(errno, _("unable to open '%1$s'"), path); goto cleanup; } =20 @@ -375,7 +375,7 @@ virCgroupV2DevicesDetectProg(virCgroup *group) =20 cgroupfd =3D open(path, O_RDONLY); if (cgroupfd < 0) { - virReportSystemError(errno, _("unable to open '%s'"), path); + virReportSystemError(errno, _("unable to open '%1$s'"), path); return -1; } =20 diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 1144dfb597..180e36e1d9 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -371,7 +371,7 @@ getDevNull(int *null) { if (*null =3D=3D -1 && (*null =3D open("/dev/null", O_RDWR|O_CLOEXEC))= < 0) { virReportSystemError(errno, - _("cannot open %s"), + _("cannot open %1$s"), "/dev/null"); return -1; } @@ -427,7 +427,7 @@ virCommandHandshakeChild(virCommand *cmd) } if (c !=3D '1') { virReportSystemError(EINVAL, - _("Unexpected confirm code '%c' from parent"), + _("Unexpected confirm code '%1$c' from parent= "), c); return -1; } @@ -452,7 +452,7 @@ virExecCommon(virCommand *cmd, gid_t *groups, int ngrou= ps) if (cmd->schedCore > 0 && virProcessSchedCoreShareFrom(cmd->schedCore) < 0) { virReportSystemError(errno, - _("Unable to run among %llu"), + _("Unable to run among %1$llu"), (unsigned long long) cmd->schedCore); return -1; } @@ -471,7 +471,7 @@ virExecCommon(virCommand *cmd, gid_t *groups, int ngrou= ps) VIR_DEBUG("Running child in %s", cmd->pwd); if (chdir(cmd->pwd) < 0) { virReportSystemError(errno, - _("Unable to change to %s"), cmd->pwd); + _("Unable to change to %1$s"), cmd->pwd); return -1; } } @@ -500,7 +500,7 @@ virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_U= NUSED, =20 if (virStrToLong_i(entry->d_name, NULL, 10, &fd) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse FD: %s"), + _("unable to parse FD: %1$s"), entry->d_name); return -1; } @@ -567,7 +567,7 @@ virCommandMassClose(virCommand *cmd, int tmpfd =3D fd; VIR_MASS_CLOSE(tmpfd); } else if (virSetInherit(fd, true) < 0) { - virReportSystemError(errno, _("failed to preserve fd %d"), fd); + virReportSystemError(errno, _("failed to preserve fd %1$d"), f= d); return -1; } } @@ -620,7 +620,7 @@ virCommandMassClose(virCommand *cmd, int tmpfd =3D fd; VIR_MASS_CLOSE(tmpfd); } else if (virSetInherit(fd, true) < 0) { - virReportSystemError(errno, _("failed to preserve fd %d"), fd); + virReportSystemError(errno, _("failed to preserve fd %1$d"), f= d); return -1; } } @@ -655,7 +655,7 @@ virExec(virCommand *cmd) if (!g_path_is_absolute(cmd->args[0])) { if (!(binary =3D binarystr =3D virFindFileInPath(cmd->args[0]))) { virReportSystemError(ENOENT, - _("Cannot find '%s' in path"), + _("Cannot find '%1$s' in path"), cmd->args[0]); return -1; } @@ -874,8 +874,7 @@ virExec(virCommand *cmd) VIR_DEBUG("Setting child security label to %s", cmd->seLinuxLabel); if (setexeccon_raw(cmd->seLinuxLabel) =3D=3D -1) { virReportSystemError(errno, - _("unable to set SELinux security context= " - "'%s' for '%s'"), + _("unable to set SELinux security context= '%1$s' for '%2$s'"), cmd->seLinuxLabel, cmd->args[0]); if (security_getenforce() =3D=3D 1) goto fork_error; @@ -887,8 +886,7 @@ virExec(virCommand *cmd) VIR_DEBUG("Setting child AppArmor profile to %s", cmd->appArmorPro= file); if (aa_change_profile(cmd->appArmorProfile) < 0) { virReportSystemError(errno, - _("unable to set AppArmor profile '%s' " - "for '%s'"), + _("unable to set AppArmor profile '%1$s' = for '%2$s'"), cmd->appArmorProfile, cmd->args[0]); goto fork_error; } @@ -911,7 +909,7 @@ virExec(virCommand *cmd) =20 ret =3D errno =3D=3D ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE; virReportSystemError(errno, - _("cannot execute binary %s"), + _("cannot execute binary %1$s"), cmd->args[0]); =20 fork_error: @@ -2342,7 +2340,7 @@ int virCommandExec(virCommand *cmd, gid_t *groups, in= t ngroups) execve(cmd->args[0], cmd->args, cmd->env); =20 virReportSystemError(errno, - _("cannot execute binary %s"), + _("cannot execute binary %1$s"), cmd->args[0]); return -1; } @@ -2557,7 +2555,7 @@ virCommandRunAsync(virCommand *cmd, pid_t *pid) =20 if (cmd->pid !=3D -1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("command is already running as pid %lld"), + _("command is already running as pid %1$lld"), (long long) cmd->pid); goto cleanup; } @@ -2569,7 +2567,7 @@ virCommandRunAsync(virCommand *cmd, pid_t *pid) } if (cmd->pwd && (cmd->flags & VIR_EXEC_DAEMON)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("daemonized command cannot set working directory = %s"), + _("daemonized command cannot set working directory = %1$s"), cmd->pwd); goto cleanup; } @@ -2723,7 +2721,7 @@ virCommandWait(virCommand *cmd, int *exitstatus) bool haveErrMsg =3D cmd->errbuf && *cmd->errbuf && (*cmd->errb= uf)[0]; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Child process (%s) unexpected %s%s%s"), + _("Child process (%1$s) unexpected %2$s%3$s%4$s= "), str ? str : cmd->args[0], NULLSTR(st), haveErrMsg ? ": " : "", haveErrMsg ? *cmd->errbuf : ""); @@ -3231,7 +3229,7 @@ virCommandRunRegex(virCommand *cmd, reg[i] =3D g_regex_new(regex[i], G_REGEX_OPTIMIZE, 0, &err); if (!reg[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message= ); for (j =3D 0; j < i; j++) g_regex_unref(reg[j]); VIR_FREE(reg); @@ -3397,7 +3395,7 @@ virCommandRunRegex(virCommand *cmd G_GNUC_UNUSED, int *exitstatus G_GNUC_UNUSED) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s not implemented on Win32"), __FUNCTION__); + _("%1$s not implemented on Win32"), __FUNCTION__); return -1; } =20 @@ -3408,7 +3406,7 @@ virCommandRunNul(virCommand *cmd G_GNUC_UNUSED, void *data G_GNUC_UNUSED) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s not implemented on Win32"), __FUNCTION__); + _("%1$s not implemented on Win32"), __FUNCTION__); return -1; } #endif /* WIN32 */ diff --git a/src/util/virconf.c b/src/util/virconf.c index c39489973b..934632a35f 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -106,7 +106,7 @@ virConfErrorHelper(const char *file, const char *func, = size_t line, /* Construct the string 'filename:line: info' if we have that. */ if (ctxt && ctxt->filename) { virReportErrorHelper(VIR_FROM_CONF, error, file, func, line, - _("%s:%d: %s"), ctxt->filename, ctxt->line, i= nfo); + _("%1$s:%2$d: %3$s"), ctxt->filename, ctxt->l= ine, info); } else { virReportErrorHelper(VIR_FROM_CONF, error, file, func, line, "%s", info); @@ -870,7 +870,7 @@ int virConfGetValueString(virConf *conf, =20 if (cval->type !=3D VIR_CONF_STRING) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected a string for '%s' parameter"), + _("%1$s: expected a string for '%2$s' parameter"), conf->filename, setting); return -1; } @@ -924,7 +924,7 @@ int virConfGetValueStringList(virConf *conf, for (len =3D 0, eval =3D cval->list; eval; len++, eval =3D eval->n= ext) { if (eval->type !=3D VIR_CONF_STRING) { virReportError(VIR_ERR_CONF_SYNTAX, - _("%s: expected a string list for '%s' para= meter"), + _("%1$s: expected a string list for '%2$s' = parameter"), conf->filename, setting); return -1; } @@ -950,8 +950,8 @@ int virConfGetValueStringList(virConf *conf, case VIR_CONF_NONE: virReportError(VIR_ERR_INTERNAL_ERROR, compatString ? - _("%s: expected a string or string list for '%s' pa= rameter") : - _("%s: expected a string list for '%s' parameter"), + _("%1$s: expected a string or string list for '%2$s= ' parameter") : + _("%1$s: expected a string list for '%2$s' paramete= r"), conf->filename, setting); return -1; =20 @@ -994,14 +994,14 @@ int virConfGetValueBool(virConf *conf, =20 if (cval->type !=3D VIR_CONF_ULLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected a bool for '%s' parameter"), + _("%1$s: expected a bool for '%2$s' parameter"), conf->filename, setting); return -1; } =20 if (((unsigned long long)cval->l) > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be 0 or 1"), + _("%1$s: value for '%2$s' parameter must be 0 or 1"= ), conf->filename, setting); return -1; } @@ -1043,14 +1043,14 @@ int virConfGetValueInt(virConf *conf, if (cval->type !=3D VIR_CONF_LLONG && cval->type !=3D VIR_CONF_ULLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected a signed integer for '%s' parameter= "), + _("%1$s: expected a signed integer for '%2$s' param= eter"), conf->filename, setting); return -1; } =20 if (cval->l > INT_MAX || cval->l < INT_MIN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in range %d= :%d"), + _("%1$s: value for '%2$s' parameter must be in rang= e %3$d:%4$d"), conf->filename, setting, INT_MIN, INT_MAX); return -1; } @@ -1091,14 +1091,14 @@ int virConfGetValueUInt(virConf *conf, =20 if (cval->type !=3D VIR_CONF_ULLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected an unsigned integer for '%s' parame= ter"), + _("%1$s: expected an unsigned integer for '%2$s' pa= rameter"), conf->filename, setting); return -1; } =20 if (((unsigned long long)cval->l) > UINT_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in range 0:= %u"), + _("%1$s: value for '%2$s' parameter must be in rang= e 0:%3$u"), conf->filename, setting, UINT_MAX); return -1; } @@ -1139,7 +1139,7 @@ int virConfGetValueSizeT(virConf *conf, =20 if (cval->type !=3D VIR_CONF_ULLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected an unsigned integer for '%s' parame= ter"), + _("%1$s: expected an unsigned integer for '%2$s' pa= rameter"), conf->filename, setting); return -1; } @@ -1147,7 +1147,7 @@ int virConfGetValueSizeT(virConf *conf, #if ULLONG_MAX > SIZE_MAX if (((unsigned long long)cval->l) > SIZE_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in range 0:= %zu"), + _("%1$s: value for '%2$s' parameter must be in rang= e 0:%3$zu"), conf->filename, setting, SIZE_MAX); return -1; } @@ -1190,7 +1190,7 @@ int virConfGetValueSSizeT(virConf *conf, if (cval->type =3D=3D VIR_CONF_ULLONG) { if (((unsigned long long)cval->l) > SSIZE_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in rang= e %zd:%zd"), + _("%1$s: value for '%2$s' parameter must be in = range %3$zd:%4$zd"), conf->filename, setting, (ssize_t)-SSIZE_MAX - = 1, (ssize_t)SSIZE_MAX); return -1; } @@ -1198,14 +1198,14 @@ int virConfGetValueSSizeT(virConf *conf, #if SSIZE_MAX < LLONG_MAX if (cval->l < (-SSIZE_MAX - 1) || cval->l > SSIZE_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in rang= e %zd:%zd"), + _("%1$s: value for '%2$s' parameter must be in = range %3$zd:%4$zd"), conf->filename, setting, (ssize_t)-SSIZE_MAX - = 1, (ssize_t)SSIZE_MAX); return -1; } #endif } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected a signed integer for '%s' parameter= "), + _("%1$s: expected a signed integer for '%2$s' param= eter"), conf->filename, setting); return -1; } @@ -1247,13 +1247,13 @@ int virConfGetValueLLong(virConf *conf, if (cval->type =3D=3D VIR_CONF_ULLONG) { if (((unsigned long long)cval->l) > LLONG_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: value for '%s' parameter must be in rang= e %lld:%lld"), + _("%1$s: value for '%2$s' parameter must be in = range %3$lld:%4$lld"), conf->filename, setting, LLONG_MIN, LLONG_MAX); return -1; } } else if (cval->type !=3D VIR_CONF_LLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected a signed integer for '%s' parameter= "), + _("%1$s: expected a signed integer for '%2$s' param= eter"), conf->filename, setting); return -1; } @@ -1293,7 +1293,7 @@ int virConfGetValueULLong(virConf *conf, =20 if (cval->type !=3D VIR_CONF_ULLONG) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: expected an unsigned integer for '%s' parame= ter"), + _("%1$s: expected an unsigned integer for '%2$s' pa= rameter"), conf->filename, setting); return -1; } @@ -1332,7 +1332,7 @@ virConfSetValue(virConf *conf, =20 if (*value && (*value)->type =3D=3D VIR_CONF_STRING && !(*value)->str)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("expecting a value for value of type %s"), + _("expecting a value for value of type %1$s"), virConfTypeToString(VIR_CONF_STRING)); g_clear_pointer(value, virConfFreeValue); return -1; diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 12d051a55a..3ce23264ca 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -56,14 +56,14 @@ virCryptoHashBuf(virCryptoHash hash, int rc; if (hash >=3D VIR_CRYPTO_HASH_LAST) { virReportError(VIR_ERR_INVALID_ARG, - _("Unknown crypto hash %d"), hash); + _("Unknown crypto hash %1$d"), hash); return -1; } =20 rc =3D gnutls_hash_fast(hashinfo[hash].algorithm, input, strlen(input)= , output); if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to compute hash of data: %s"), + _("Unable to compute hash of data: %1$s"), gnutls_strerror(rc)); return -1; } @@ -133,7 +133,7 @@ virCryptoEncryptDataAESgnutls(gnutls_cipher_algorithm_t= gnutls_enc_alg, if ((rc =3D gnutls_cipher_init(&handle, gnutls_enc_alg, &enc_key, &iv_buf)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to initialize cipher: '%s'"), + _("failed to initialize cipher: '%1$s'"), gnutls_strerror(rc)); return -1; } @@ -160,7 +160,7 @@ virCryptoEncryptDataAESgnutls(gnutls_cipher_algorithm_t= gnutls_enc_alg, if (rc < 0) { virSecureErase(ciphertext, ciphertextlen); virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to encrypt the data: '%s'"), + _("failed to encrypt the data: '%1$s'"), gnutls_strerror(rc)); return -1; } @@ -202,14 +202,14 @@ virCryptoEncryptData(virCryptoCipher algorithm, case VIR_CRYPTO_CIPHER_AES256CBC: if (enckeylen !=3D 32) { virReportError(VIR_ERR_INVALID_ARG, - _("AES256CBC encryption invalid keylen=3D%zu"), + _("AES256CBC encryption invalid keylen=3D%1$zu"= ), enckeylen); return -1; } =20 if (ivlen !=3D 16) { virReportError(VIR_ERR_INVALID_ARG, - _("AES256CBC initialization vector invalid len= =3D%zu"), + _("AES256CBC initialization vector invalid len= =3D%1$zu"), ivlen); return -1; } @@ -230,6 +230,6 @@ virCryptoEncryptData(virCryptoCipher algorithm, } =20 virReportError(VIR_ERR_INVALID_ARG, - _("algorithm=3D%d is not supported"), algorithm); + _("algorithm=3D%1$d is not supported"), algorithm); return -1; } diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c index 00bd7095f6..7a288f81e4 100644 --- a/src/util/virdaemon.c +++ b/src/util/virdaemon.c @@ -123,14 +123,14 @@ virDaemonForkIntoBackground(const char *argv0) =20 if (ret !=3D 1) { fprintf(stderr, - _("%s: error: unable to determine if daemon is " - "running: %s\n"), argv0, + _("%1$s: error: unable to determine if daemon is r= unning: %2$s\n"), + argv0, g_strerror(errno)); exit(EXIT_FAILURE); } else if (status !=3D 0) { fprintf(stderr, - _("%s: error: %s. Check /var/log/messages or run w= ithout " - "--daemon for more info.\n"), argv0, + _("%1$s: error: %2$s. Check /var/log/messages or r= un without --daemon for more info.\n"), + argv0, virDaemonErrTypeToString(status)); exit(EXIT_FAILURE); } diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c index 7796e7719b..33cf3e202b 100644 --- a/src/util/virdevmapper.c +++ b/src/util/virdevmapper.c @@ -82,7 +82,7 @@ virDevMapperGetMajor(unsigned int *major) =20 if (!lines[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find major for %s"), + _("Unable to find major for %1$s"), DM_NAME); return -1; } @@ -154,7 +154,7 @@ virDMOpen(void) =20 if (dm.version[0] !=3D DM_VERSION_MAJOR) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Unsupported device-mapper version. Expected %d g= ot %d"), + _("Unsupported device-mapper version. Expected %1$d= got %2$d"), DM_VERSION_MAJOR, dm.version[0]); return -1; } @@ -185,7 +185,7 @@ virDMSanitizepath(const char *path) /* It's a path. Check if the last component is DM name */ if (stat(path, &sb[0]) < 0) { virReportError(errno, - _("Unable to stat %p"), + _("Unable to stat %1$p"), path); return NULL; } @@ -252,7 +252,7 @@ virDevMapperGetTargetsImpl(int controlFD, return 0; =20 virReportSystemError(errno, - _("Unable to query dependencies for %s"), + _("Unable to query dependencies for %1$s"), path); return -1; } diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 342b489ab7..91106b5a28 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -230,7 +230,7 @@ addnhostsSave(dnsmasqAddnHostsfile *addnhostsfile) addnhostsfile->nhosts); =20 if (err < 0) { - virReportSystemError(-err, _("cannot write config file '%s'"), + virReportSystemError(-err, _("cannot write config file '%1$s'"), addnhostsfile->path); return -1; } @@ -245,7 +245,7 @@ genericFileDelete(char *path) return 0; =20 if (unlink(path) < 0) { - virReportSystemError(errno, _("cannot remove config file '%s'"), + virReportSystemError(errno, _("cannot remove config file '%1$s'"), path); return -1; } @@ -400,7 +400,7 @@ hostsfileSave(dnsmasqHostsfile *hostsfile) hostsfile->nhosts); =20 if (err < 0) { - virReportSystemError(-err, _("cannot write config file '%s'"), + virReportSystemError(-err, _("cannot write config file '%1$s'"), hostsfile->path); return -1; } @@ -509,7 +509,7 @@ dnsmasqSave(const dnsmasqContext *ctx) int ret =3D 0; =20 if (g_mkdir_with_parents(ctx->config_dir, 0777) < 0) { - virReportSystemError(errno, _("cannot create config directory '%s'= "), + virReportSystemError(errno, _("cannot create config directory '%1$= s'"), ctx->config_dir); return -1; } @@ -556,8 +556,7 @@ dnsmasqReload(pid_t pid G_GNUC_UNUSED) #ifndef WIN32 if (kill(pid, SIGHUP) !=3D 0) { virReportSystemError(errno, - _("Failed to make dnsmasq (PID: %d)" - " reload config files."), + _("Failed to make dnsmasq (PID: %1$d) reload = config files."), pid); return -1; } @@ -617,7 +616,7 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char = *buf) =20 if (version < DNSMASQ_MIN_MAJOR * 1000000 + DNSMASQ_MIN_MINOR * 1000) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("dnsmasq version >=3D %u.%u required but %lu.%lu = found"), + _("dnsmasq version >=3D %1$u.%2$u required but %3$l= u.%4$lu found"), DNSMASQ_MIN_MAJOR, DNSMASQ_MIN_MINOR, version / 1000000, version % 1000000 / 1000); @@ -636,7 +635,7 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char = *buf) else len =3D p - buf; virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse %s version number in '%.*s'"), + _("cannot parse %1$s version number in '%3$.*2$s'"), caps->binaryPath, len, buf); return -1; =20 diff --git a/src/util/virerror.c b/src/util/virerror.c index d114c0a346..0bfa803b1f 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -957,115 +957,115 @@ static const virErrorMsgTuple virErrorMsgStrings[] = =3D { [VIR_ERR_OK] =3D { NULL, NULL }, [VIR_ERR_INTERNAL_ERROR] =3D { N_("internal error"), - N_("internal error: %s") }, + N_("internal error: %1$s") }, [VIR_ERR_NO_MEMORY] =3D { N_("out of memory"), - N_("out of memory: %s") }, + N_("out of memory: %1$s") }, [VIR_ERR_NO_SUPPORT] =3D { N_("this function is not supported by the connection driver"), - N_("this function is not supported by the connection driver: %s") = }, + N_("this function is not supported by the connection driver: %1$s"= ) }, [VIR_ERR_UNKNOWN_HOST] =3D { N_("unknown host"), - N_("unknown host %s") }, + N_("unknown host %1$s") }, [VIR_ERR_NO_CONNECT] =3D { N_("no connection driver available"), - N_("no connection driver available for %s") }, + N_("no connection driver available for %1$s") }, [VIR_ERR_INVALID_CONN] =3D { N_("invalid connection pointer in"), - N_("invalid connection pointer in %s") }, + N_("invalid connection pointer in %1$s") }, [VIR_ERR_INVALID_DOMAIN] =3D { N_("invalid domain pointer in"), - N_("invalid domain pointer in %s") }, + N_("invalid domain pointer in %1$s") }, [VIR_ERR_INVALID_ARG] =3D { N_("invalid argument"), - N_("invalid argument: %s") }, + N_("invalid argument: %1$s") }, [VIR_ERR_OPERATION_FAILED] =3D { N_("operation failed"), - N_("operation failed: %s") }, + N_("operation failed: %1$s") }, [VIR_ERR_GET_FAILED] =3D { N_("GET operation failed"), - N_("GET operation failed: %s") }, + N_("GET operation failed: %1$s") }, [VIR_ERR_POST_FAILED] =3D { N_("POST operation failed"), - N_("POST operation failed: %s") }, + N_("POST operation failed: %1$s") }, [VIR_ERR_HTTP_ERROR] =3D { N_("got unknown HTTP error code"), - N_("got unknown HTTP error code %s") }, + N_("got unknown HTTP error code %1$s") }, [VIR_ERR_SEXPR_SERIAL] =3D { N_("failed to serialize S-Expr"), - N_("failed to serialize S-Expr: %s") }, + N_("failed to serialize S-Expr: %1$s") }, [VIR_ERR_NO_XEN] =3D { N_("could not use Xen hypervisor entry"), - N_("could not use Xen hypervisor entry %s") }, + N_("could not use Xen hypervisor entry %1$s") }, [VIR_ERR_XEN_CALL] =3D { N_("failed Xen syscall"), - N_("failed Xen syscall %s") }, + N_("failed Xen syscall %1$s") }, [VIR_ERR_OS_TYPE] =3D { N_("unknown OS type"), - N_("unknown OS type %s") }, + N_("unknown OS type %1$s") }, [VIR_ERR_NO_KERNEL] =3D { N_("missing kernel information"), - N_("missing kernel information: %s") }, + N_("missing kernel information: %1$s") }, [VIR_ERR_NO_ROOT] =3D { N_("missing root device information"), - N_("missing root device information in %s") }, + N_("missing root device information in %1$s") }, [VIR_ERR_NO_SOURCE] =3D { N_("missing source information for device"), - N_("missing source information for device %s") }, + N_("missing source information for device %1$s") }, [VIR_ERR_NO_TARGET] =3D { N_("missing target information for device"), - N_("missing target information for device %s") }, + N_("missing target information for device %1$s") }, [VIR_ERR_NO_NAME] =3D { N_("missing name information"), - N_("missing name information in %s") }, + N_("missing name information in %1$s") }, [VIR_ERR_NO_OS] =3D { N_("missing operating system information"), - N_("missing operating system information for %s") }, + N_("missing operating system information for %1$s") }, [VIR_ERR_NO_DEVICE] =3D { N_("missing devices information"), - N_("missing devices information for %s") }, + N_("missing devices information for %1$s") }, [VIR_ERR_NO_XENSTORE] =3D { N_("could not connect to Xen Store"), - N_("could not connect to Xen Store %s") }, + N_("could not connect to Xen Store %1$s") }, [VIR_ERR_DRIVER_FULL] =3D { N_("too many drivers registered"), - N_("too many drivers registered in %s") }, + N_("too many drivers registered in %1$s") }, [VIR_ERR_CALL_FAILED] =3D { N_("library call failed"), - N_("library call failed: %s") }, + N_("library call failed: %1$s") }, [VIR_ERR_XML_ERROR] =3D { N_("XML description is invalid or not well formed"), - N_("XML error: %s") }, + N_("XML error: %1$s") }, [VIR_ERR_DOM_EXIST] =3D { N_("this domain exists already"), - N_("domain %s exists already") }, + N_("domain %1$s exists already") }, [VIR_ERR_OPERATION_DENIED] =3D { N_("operation forbidden for read only access"), - N_("operation forbidden: %s") }, + N_("operation forbidden: %1$s") }, [VIR_ERR_OPEN_FAILED] =3D { N_("failed to open configuration file"), - N_("failed to open configuration file %s") }, + N_("failed to open configuration file %1$s") }, [VIR_ERR_READ_FAILED] =3D { N_("failed to read configuration file"), - N_("failed to read configuration file %s") }, + N_("failed to read configuration file %1$s") }, [VIR_ERR_PARSE_FAILED] =3D { N_("failed to parse configuration file"), - N_("failed to parse configuration file %s") }, + N_("failed to parse configuration file %1$s") }, [VIR_ERR_CONF_SYNTAX] =3D { N_("configuration file syntax error"), - N_("configuration file syntax error: %s") }, + N_("configuration file syntax error: %1$s") }, [VIR_ERR_WRITE_FAILED] =3D { N_("failed to write configuration file"), - N_("failed to write configuration file: %s") }, + N_("failed to write configuration file: %1$s") }, [VIR_ERR_XML_DETAIL] =3D { N_("parser error"), "%s" }, [VIR_ERR_INVALID_NETWORK] =3D { N_("invalid network pointer in"), - N_("invalid network pointer in %s") }, + N_("invalid network pointer in %1$s") }, [VIR_ERR_NETWORK_EXIST] =3D { N_("this network exists already"), - N_("network %s exists already") }, + N_("network %1$s exists already") }, [VIR_ERR_SYSTEM_ERROR] =3D { N_("system call error"), "%s" }, @@ -1077,214 +1077,214 @@ static const virErrorMsgTuple virErrorMsgStrings[= ] =3D { "%s" }, [VIR_WAR_NO_NETWORK] =3D { N_("Failed to find the network"), - N_("Failed to find the network: %s") }, + N_("Failed to find the network: %1$s") }, [VIR_ERR_NO_DOMAIN] =3D { N_("Domain not found"), - N_("Domain not found: %s") }, + N_("Domain not found: %1$s") }, [VIR_ERR_NO_NETWORK] =3D { N_("Network not found"), - N_("Network not found: %s") }, + N_("Network not found: %1$s") }, [VIR_ERR_INVALID_MAC] =3D { N_("invalid MAC address"), - N_("invalid MAC address: %s") }, + N_("invalid MAC address: %1$s") }, [VIR_ERR_AUTH_FAILED] =3D { N_("authentication failed"), - N_("authentication failed: %s") }, + N_("authentication failed: %1$s") }, [VIR_ERR_INVALID_STORAGE_POOL] =3D { N_("invalid storage pool pointer in"), - N_("invalid storage pool pointer in %s") }, + N_("invalid storage pool pointer in %1$s") }, [VIR_ERR_INVALID_STORAGE_VOL] =3D { N_("invalid storage volume pointer in"), - N_("invalid storage volume pointer in %s") }, + N_("invalid storage volume pointer in %1$s") }, [VIR_WAR_NO_STORAGE] =3D { N_("Failed to find a storage driver"), - N_("Failed to find a storage driver: %s") }, + N_("Failed to find a storage driver: %1$s") }, [VIR_ERR_NO_STORAGE_POOL] =3D { N_("Storage pool not found"), - N_("Storage pool not found: %s") }, + N_("Storage pool not found: %1$s") }, [VIR_ERR_NO_STORAGE_VOL] =3D { N_("Storage volume not found"), - N_("Storage volume not found: %s") }, + N_("Storage volume not found: %1$s") }, [VIR_WAR_NO_NODE] =3D { N_("Failed to find a node driver"), - N_("Failed to find a node driver: %s") }, + N_("Failed to find a node driver: %1$s") }, [VIR_ERR_INVALID_NODE_DEVICE] =3D { N_("invalid node device pointer"), - N_("invalid node device pointer in %s") }, + N_("invalid node device pointer in %1$s") }, [VIR_ERR_NO_NODE_DEVICE] =3D { N_("Node device not found"), - N_("Node device not found: %s") }, + N_("Node device not found: %1$s") }, [VIR_ERR_NO_SECURITY_MODEL] =3D { N_("Security model not found"), - N_("Security model not found: %s") }, + N_("Security model not found: %1$s") }, [VIR_ERR_OPERATION_INVALID] =3D { N_("Requested operation is not valid"), - N_("Requested operation is not valid: %s") }, + N_("Requested operation is not valid: %1$s") }, [VIR_WAR_NO_INTERFACE] =3D { N_("Failed to find the interface"), - N_("Failed to find the interface: %s") }, + N_("Failed to find the interface: %1$s") }, [VIR_ERR_NO_INTERFACE] =3D { N_("Interface not found"), - N_("Interface not found: %s") }, + N_("Interface not found: %1$s") }, [VIR_ERR_INVALID_INTERFACE] =3D { N_("invalid interface pointer in"), - N_("invalid interface pointer in %s") }, + N_("invalid interface pointer in %1$s") }, [VIR_ERR_MULTIPLE_INTERFACES] =3D { N_("multiple matching interfaces found"), - N_("multiple matching interfaces found: %s") }, + N_("multiple matching interfaces found: %1$s") }, [VIR_WAR_NO_NWFILTER] =3D { N_("Failed to start the nwfilter driver"), - N_("Failed to start the nwfilter driver: %s") }, + N_("Failed to start the nwfilter driver: %1$s") }, [VIR_ERR_INVALID_NWFILTER] =3D { N_("Invalid network filter"), - N_("Invalid network filter: %s") }, + N_("Invalid network filter: %1$s") }, [VIR_ERR_NO_NWFILTER] =3D { N_("Network filter not found"), - N_("Network filter not found: %s") }, + N_("Network filter not found: %1$s") }, [VIR_ERR_BUILD_FIREWALL] =3D { N_("Error while building firewall"), - N_("Error while building firewall: %s") }, + N_("Error while building firewall: %1$s") }, [VIR_WAR_NO_SECRET] =3D { N_("Failed to find a secret storage driver"), - N_("Failed to find a secret storage driver: %s") }, + N_("Failed to find a secret storage driver: %1$s") }, [VIR_ERR_INVALID_SECRET] =3D { N_("Invalid secret"), - N_("Invalid secret: %s") }, + N_("Invalid secret: %1$s") }, [VIR_ERR_NO_SECRET] =3D { N_("Secret not found"), - N_("Secret not found: %s") }, + N_("Secret not found: %1$s") }, [VIR_ERR_CONFIG_UNSUPPORTED] =3D { N_("unsupported configuration"), - N_("unsupported configuration: %s") }, + N_("unsupported configuration: %1$s") }, [VIR_ERR_OPERATION_TIMEOUT] =3D { N_("Timed out during operation"), - N_("Timed out during operation: %s") }, + N_("Timed out during operation: %1$s") }, [VIR_ERR_MIGRATE_PERSIST_FAILED] =3D { N_("Failed to make domain persistent after migration"), - N_("Failed to make domain persistent after migration: %s") }, + N_("Failed to make domain persistent after migration: %1$s") }, [VIR_ERR_HOOK_SCRIPT_FAILED] =3D { N_("Hook script execution failed"), - N_("Hook script execution failed: %s") }, + N_("Hook script execution failed: %1$s") }, [VIR_ERR_INVALID_DOMAIN_SNAPSHOT] =3D { N_("Invalid domain snapshot"), - N_("Invalid domain snapshot: %s") }, + N_("Invalid domain snapshot: %1$s") }, [VIR_ERR_NO_DOMAIN_SNAPSHOT] =3D { N_("Domain snapshot not found"), - N_("Domain snapshot not found: %s") }, + N_("Domain snapshot not found: %1$s") }, [VIR_ERR_INVALID_STREAM] =3D { N_("invalid stream pointer"), - N_("invalid stream pointer in %s") }, + N_("invalid stream pointer in %1$s") }, [VIR_ERR_ARGUMENT_UNSUPPORTED] =3D { N_("argument unsupported"), - N_("argument unsupported: %s") }, + N_("argument unsupported: %1$s") }, [VIR_ERR_STORAGE_PROBE_FAILED] =3D { N_("Storage pool probe failed"), - N_("Storage pool probe failed: %s") }, + N_("Storage pool probe failed: %1$s") }, [VIR_ERR_STORAGE_POOL_BUILT] =3D { N_("Storage pool already built"), - N_("Storage pool already built: %s") }, + N_("Storage pool already built: %1$s") }, [VIR_ERR_SNAPSHOT_REVERT_RISKY] =3D { N_("revert requires force"), - N_("revert requires force: %s") }, + N_("revert requires force: %1$s") }, [VIR_ERR_OPERATION_ABORTED] =3D { N_("operation aborted"), - N_("operation aborted: %s") }, + N_("operation aborted: %1$s") }, [VIR_ERR_AUTH_CANCELLED] =3D { N_("authentication cancelled"), - N_("authentication cancelled: %s") }, + N_("authentication cancelled: %1$s") }, [VIR_ERR_NO_DOMAIN_METADATA] =3D { N_("metadata not found"), - N_("metadata not found: %s") }, + N_("metadata not found: %1$s") }, [VIR_ERR_MIGRATE_UNSAFE] =3D { N_("Unsafe migration"), - N_("Unsafe migration: %s") }, + N_("Unsafe migration: %1$s") }, [VIR_ERR_OVERFLOW] =3D { N_("numerical overflow"), - N_("numerical overflow: %s") }, + N_("numerical overflow: %1$s") }, [VIR_ERR_BLOCK_COPY_ACTIVE] =3D { N_("block copy still active"), - N_("block copy still active: %s") }, + N_("block copy still active: %1$s") }, [VIR_ERR_OPERATION_UNSUPPORTED] =3D { N_("Operation not supported"), - N_("Operation not supported: %s") }, + N_("Operation not supported: %1$s") }, [VIR_ERR_SSH] =3D { N_("SSH transport error"), - N_("SSH transport error: %s") }, + N_("SSH transport error: %1$s") }, [VIR_ERR_AGENT_UNRESPONSIVE] =3D { N_("Guest agent is not responding"), - N_("Guest agent is not responding: %s") }, + N_("Guest agent is not responding: %1$s") }, [VIR_ERR_RESOURCE_BUSY] =3D { N_("resource busy"), - N_("resource busy: %s") }, + N_("resource busy: %1$s") }, [VIR_ERR_ACCESS_DENIED] =3D { N_("access denied"), - N_("access denied: %s") }, + N_("access denied: %1$s") }, [VIR_ERR_DBUS_SERVICE] =3D { N_("error from service"), - N_("error from service: %s") }, + N_("error from service: %1$s") }, [VIR_ERR_STORAGE_VOL_EXIST] =3D { N_("this storage volume exists already"), - N_("storage volume %s exists already") }, + N_("storage volume %1$s exists already") }, [VIR_ERR_CPU_INCOMPATIBLE] =3D { N_("the CPU is incompatible with host CPU"), - N_("the CPU is incompatible with host CPU: %s") }, + N_("the CPU is incompatible with host CPU: %1$s") }, [VIR_ERR_XML_INVALID_SCHEMA] =3D { N_("XML document failed to validate against schema"), - N_("XML document failed to validate against schema: %s") }, + N_("XML document failed to validate against schema: %1$s") }, [VIR_ERR_MIGRATE_FINISH_OK] =3D { N_("migration successfully aborted"), - N_("migration successfully aborted: %s") }, + N_("migration successfully aborted: %1$s") }, [VIR_ERR_AUTH_UNAVAILABLE] =3D { N_("authentication unavailable"), - N_("authentication unavailable: %s") }, + N_("authentication unavailable: %1$s") }, [VIR_ERR_NO_SERVER] =3D { N_("Server not found"), - N_("Server not found: %s") }, + N_("Server not found: %1$s") }, [VIR_ERR_NO_CLIENT] =3D { N_("Client not found"), - N_("Client not found: %s") }, + N_("Client not found: %1$s") }, [VIR_ERR_AGENT_UNSYNCED] =3D { N_("guest agent replied with wrong id to guest-sync command"), - N_("guest agent replied with wrong id to guest-sync command: %s") = }, + N_("guest agent replied with wrong id to guest-sync command: %1$s"= ) }, [VIR_ERR_LIBSSH] =3D { N_("libssh transport error"), - N_("libssh transport error: %s") }, + N_("libssh transport error: %1$s") }, [VIR_ERR_DEVICE_MISSING] =3D { N_("device not found"), - N_("device not found: %s") }, + N_("device not found: %1$s") }, [VIR_ERR_INVALID_NWFILTER_BINDING] =3D { N_("Invalid network filter binding"), - N_("Invalid network filter binding: %s") }, + N_("Invalid network filter binding: %1$s") }, [VIR_ERR_NO_NWFILTER_BINDING] =3D { N_("Network filter binding not found"), - N_("Network filter binding not found: %s") }, + N_("Network filter binding not found: %1$s") }, [VIR_ERR_INVALID_DOMAIN_CHECKPOINT] =3D { N_("Invalid domain checkpoint"), - N_("Invalid domain checkpoint: %s") }, + N_("Invalid domain checkpoint: %1$s") }, [VIR_ERR_NO_DOMAIN_CHECKPOINT] =3D { N_("Domain checkpoint not found"), - N_("Domain checkpoint not found: %s") }, + N_("Domain checkpoint not found: %1$s") }, [VIR_ERR_NO_DOMAIN_BACKUP] =3D { N_("Domain backup job id not found"), - N_("Domain backup job id not found: %s") }, + N_("Domain backup job id not found: %1$s") }, [VIR_ERR_INVALID_NETWORK_PORT] =3D { N_("Invalid network port pointer"), - N_("Invalid network port pointer: %s") }, + N_("Invalid network port pointer: %1$s") }, [VIR_ERR_NETWORK_PORT_EXIST] =3D { N_("this network port exists already"), - N_("network port %s exists already") }, + N_("network port %1$s exists already") }, [VIR_ERR_NO_NETWORK_PORT] =3D { N_("network port not found"), - N_("network port not found: %s") }, + N_("network port not found: %1$s") }, [VIR_ERR_NO_HOSTNAME] =3D { N_("no hostname found"), - N_("no hostname found: %s") }, + N_("no hostname found: %1$s") }, [VIR_ERR_CHECKPOINT_INCONSISTENT] =3D { N_("checkpoint inconsistent"), - N_("checkpoint inconsistent: %s") }, + N_("checkpoint inconsistent: %1$s") }, [VIR_ERR_MULTIPLE_DOMAINS] =3D { N_("multiple matching domains found"), - N_("multiple matching domains found: %s") }, + N_("multiple matching domains found: %1$s") }, }; =20 G_STATIC_ASSERT(G_N_ELEMENTS(virErrorMsgStrings) =3D=3D VIR_ERR_NUMBER_LAS= T); diff --git a/src/util/virerror.h b/src/util/virerror.h index bec3863c3f..ee85247433 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -76,7 +76,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must be NULL"), \ + _("%1$s in %2$s must be NULL"), \ #argname, __FUNCTION__) #define virReportInvalidNonNullArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -87,7 +87,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must not be NULL"), \ + _("%1$s in %2$s must not be NULL"), \ #argname, __FUNCTION__) #define virReportInvalidEmptyStringArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -98,7 +98,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("string %s in %s must not be empty"), \ + _("string %1$s in %2$s must not be empty"), \ #argname, __FUNCTION__) #define virReportInvalidPositiveArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -109,7 +109,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must be greater than zero"), \ + _("%1$s in %2$s must be greater than zero"), \ #argname, __FUNCTION__) #define virReportInvalidNonZeroArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -120,7 +120,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must not be zero"), \ + _("%1$s in %2$s must not be zero"), \ #argname, __FUNCTION__) #define virReportInvalidZeroArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -131,7 +131,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must be zero"), \ + _("%1$s in %2$s must be zero"), \ #argname, __FUNCTION__) #define virReportInvalidNonNegativeArg(argname) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ @@ -142,7 +142,7 @@ void virReportSystemErrorFull(int domcode, #argname, \ NULL, \ 0, 0, \ - _("%s in %s must be zero or greater"), \ + _("%1$s in %2$s must be zero or greater"), \ #argname, __FUNCTION__) #define virReportInvalidArg(argname, fmt, ...) \ virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ diff --git a/src/util/vireventthread.c b/src/util/vireventthread.c index 8342f420f6..20d52b9efb 100644 --- a/src/util/vireventthread.c +++ b/src/util/vireventthread.c @@ -162,7 +162,7 @@ virEventThreadStart(virEventThread *evt, const char *na= me) if (!evt->thread) { virEventThreadDataFree(data); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to start event thread: %s"), + _("Unable to start event thread: %1$s"), gerr->message); return -1; } diff --git a/tests/virerrortest.c b/tests/virerrortest.c index 85f4071ae8..c1b1a2ba65 100644 --- a/tests/virerrortest.c +++ b/tests/virerrortest.c @@ -29,8 +29,11 @@ virErrorTestMsgFormatInfoOne(const char *msg) char *next; int ret =3D 0; =20 + if (STREQ(msg, "%s")) + return 0; + for (next =3D (char *)msg; (next =3D strchr(next, '%')); next++) { - if (next[1] !=3D 's') { + if (!STRPREFIX(next + 1, "1$s")) { VIR_TEST_VERBOSE("\nerror message '%s' contains disallowed pri= ntf modifiers", msg); ret =3D -1; } else { @@ -44,7 +47,7 @@ virErrorTestMsgFormatInfoOne(const char *msg) } =20 if (!found) { - VIR_TEST_VERBOSE("\nerror message '%s' does not contain any %%s mo= difiers", msg); + VIR_TEST_VERBOSE("\nerror message '%s' does not contain correct %%= s modifiers", msg); ret =3D -1; } =20 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464862; cv=none; d=zohomail.com; s=zohoarc; b=NISvsQn7iFz+ltOkPEjI1AyYHAgD3Nv2fkYjvo8l3lQ2WzhUM+MTMjI5DQwFUGfdzCvpLA+cyv/1IGuwHqvmHU8TFNQcEJ4ryFUZ6kCZ4Syre3QoosPE86R9H+pAPZVrxbQwY4hZ9uTQzZGVtYAKrLph45HN636yBbUrVrgeFm8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464862; 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=Tkf3uBeTfyKe3hYV6i+nBwIokz1KTc6ZQ8WrlQmzVAo=; b=GPj1InjLzMC2DFJ3T5OgNr0t/SF3PMHSb6VOlLuww6gpJt/40388wnzUM3+9K8vFsrKwHF0+je5NR83KOWJNSYiERZGBaZX+r8xWamdMAJVOQxbAoVnILaKtZJCZ4865dTw9zoh4eHQYGCFFS36THb8vT+QjZmbDWTdPJ929KME= 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 1678464862321840.3434898912806; Fri, 10 Mar 2023 08:14:22 -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-615-wSIFUynUNOeSwqE0jJowmw-1; Fri, 10 Mar 2023 11:13:03 -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 05D7C101A5B4; Fri, 10 Mar 2023 16:11:08 +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 DE7C5440D8; Fri, 10 Mar 2023 16:11:07 +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 C6D541946A54; Fri, 10 Mar 2023 16:11:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4A8861946A4A for ; Fri, 10 Mar 2023 16:11:06 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4018F2166B2B; Fri, 10 Mar 2023 16:11:06 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85DA62166B26 for ; Fri, 10 Mar 2023 16:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464861; 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=Tkf3uBeTfyKe3hYV6i+nBwIokz1KTc6ZQ8WrlQmzVAo=; b=fDgcTQv1OurRAjcgqPOGwIKg8lC8NbSHuD9Xrq6aseFRjIsm60Ow2ZFvytZWU9Gs8LHep5 dLK6xNHnEO1FQkGn1lPtTIVut4BRhRrXmRTZVc8Zky5kSXc1SjYJOA+/C+b2ps/vlZ15Bx SvMriYOLUqicy/Csq/2Tn8HM5OQ1EzA= X-MC-Unique: wSIFUynUNOeSwqE0jJowmw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 41/51] util: Update format strings in translated messages (part 2) Date: Fri, 10 Mar 2023 17:09:57 +0100 Message-Id: <1a65932bc3a93edf1cbd533e5d7813811b073728.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678464864232100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/util/virfdstream.c | 30 +++---- src/util/virfile.c | 184 +++++++++++++++++++-------------------- src/util/virfilecache.c | 4 +- src/util/virfirewall.c | 4 +- src/util/virfirewalld.c | 6 +- src/util/virfirmware.c | 4 +- src/util/virgdbus.c | 4 +- src/util/virhash.c | 2 +- src/util/virhook.c | 4 +- src/util/virhostcpu.c | 36 ++++---- src/util/virhostmem.c | 32 +++---- src/util/virhostuptime.c | 4 +- src/util/viridentity.c | 16 ++-- src/util/virinitctl.c | 6 +- src/util/viriptables.c | 2 +- src/util/viriscsi.c | 16 ++-- src/util/virjson.c | 24 ++--- src/util/virlease.c | 4 +- src/util/virlockspace.c | 34 ++++---- src/util/virlog.c | 28 +++--- src/util/virmacmap.c | 6 +- src/util/virmdev.c | 18 ++-- src/util/virmodule.c | 10 +-- src/util/virnetdev.c | 145 +++++++++++++++--------------- 24 files changed, 307 insertions(+), 316 deletions(-) diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index 3de0d59a8b..0e39889ac9 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -152,7 +152,7 @@ virFDStreamMsgQueuePush(virFDStreamData *fdst, =20 if (safewrite(fd, &c, sizeof(c)) !=3D sizeof(c)) { virReportSystemError(errno, - _("Unable to write to %s"), + _("Unable to write to %1$s"), fdname); return -1; } @@ -177,7 +177,7 @@ virFDStreamMsgQueuePop(virFDStreamData *fdst, =20 if (saferead(fd, &c, sizeof(c)) !=3D sizeof(c)) { virReportSystemError(errno, - _("Unable to read from %s"), + _("Unable to read from %1$s"), fdname); return NULL; } @@ -473,7 +473,7 @@ virFDStreamThreadDoRead(virFDStreamData *fdst, if (sectionLen && lseek(fdin, sectionLen, SEEK_CUR) =3D=3D (off_t) -1) { virReportSystemError(errno, - _("unable to seek in %s"), + _("unable to seek in %1$s"), fdinname); return -1; } @@ -486,7 +486,7 @@ virFDStreamThreadDoRead(virFDStreamData *fdst, =20 if ((got =3D saferead(fdin, buf, buflen)) < 0) { virReportSystemError(errno, - _("Unable to read %s"), + _("Unable to read %1$s"), fdinname); return -1; } @@ -524,7 +524,7 @@ virFDStreamThreadDoWrite(virFDStreamData *fdst, msg->stream.data.len - msg->stream.data.offset); if (got < 0) { virReportSystemError(errno, - _("Unable to write %s"), + _("Unable to write %1$s"), fdoutname); return -1; } @@ -560,7 +560,7 @@ virFDStreamThreadDoWrite(virFDStreamData *fdst, =20 if ((r =3D safewrite(fdout, buf, count)) < 0) { virReportSystemError(errno, - _("Unable to write %s"), + _("Unable to write %1$s"), fdoutname); return -1; } @@ -573,14 +573,14 @@ virFDStreamThreadDoWrite(virFDStreamData *fdst, off =3D lseek(fdout, got, SEEK_CUR); if (off =3D=3D (off_t) -1) { virReportSystemError(errno, - _("unable to seek in %s"), + _("unable to seek in %1$s"), fdoutname); return -1; } =20 if (ftruncate(fdout, off) < 0) { virReportSystemError(errno, - _("unable to truncate %s"), + _("unable to truncate %1$s"), fdoutname); return -1; } @@ -1265,7 +1265,7 @@ virFDStreamOpenFileInternal(virStreamPtr st, fd =3D open(path, oflags); if (fd < 0) { virReportSystemError(errno, - _("Unable to open stream for '%s'"), + _("Unable to open stream for '%1$s'"), path); return -1; } @@ -1273,7 +1273,7 @@ virFDStreamOpenFileInternal(virStreamPtr st, =20 if (fstat(fd, &sb) < 0) { virReportSystemError(errno, - _("Unable to access stream for '%s'"), + _("Unable to access stream for '%1$s'"), path); goto error; } @@ -1281,7 +1281,7 @@ virFDStreamOpenFileInternal(virStreamPtr st, if (offset && lseek(fd, offset, SEEK_SET) < 0) { virReportSystemError(errno, - _("Unable to seek %s to %llu"), + _("Unable to seek %1$s to %2$llu"), path, offset); goto error; } @@ -1297,7 +1297,7 @@ virFDStreamOpenFileInternal(virStreamPtr st, =20 if ((oflags & O_ACCMODE) =3D=3D O_RDWR) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s: Cannot request read and write flags toge= ther"), + _("%1$s: Cannot request read and write flags to= gether"), path); goto error; } @@ -1352,7 +1352,7 @@ int virFDStreamOpenFile(virStreamPtr st, { if (oflags & O_CREAT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Attempt to create %s without specifying mode"), + _("Attempt to create %1$s without specifying mode"), path); return -1; } @@ -1393,7 +1393,7 @@ int virFDStreamOpenPTY(virStreamPtr st, =20 if (tcgetattr(fdst->fd, &rawattr) < 0) { virReportSystemError(errno, - _("unable to get tty attributes: %s"), + _("unable to get tty attributes: %1$s"), path); goto cleanup; } @@ -1402,7 +1402,7 @@ int virFDStreamOpenPTY(virStreamPtr st, =20 if (tcsetattr(fdst->fd, TCSANOW, &rawattr) < 0) { virReportSystemError(errno, - _("unable to set tty attributes: %s"), + _("unable to set tty attributes: %1$s"), path); goto cleanup; } diff --git a/src/util/virfile.c b/src/util/virfile.c index feb0d7f8ba..657e74e026 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -312,13 +312,13 @@ virFileWrapperFdNew(int *fd, const char *name, unsign= ed int flags) mode =3D fcntl(*fd, F_GETFL); =20 if (mode < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid fd %d for %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid fd %1$d for %2$s= "), *fd, name); goto error; } else if ((mode & O_ACCMODE) =3D=3D O_WRONLY) { output =3D true; } else if ((mode & O_ACCMODE) !=3D O_RDONLY) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected mode 0x%x for= %s"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected mode 0x%1$x f= or %2$s"), mode & O_ACCMODE, name); goto error; } @@ -575,7 +575,7 @@ virFileRewrite(const char *path, uid, gid, VIR_FILE_OPEN_FORCE_OWNER | VIR_FILE_OPEN_FORC= E_MODE)) < 0) { virReportSystemError(-fd, - _("Failed to create file '%s'"), + _("Failed to create file '%1$s'"), newfile); goto cleanup; } @@ -585,19 +585,19 @@ virFileRewrite(const char *path, } =20 if (g_fsync(fd) < 0) { - virReportSystemError(errno, _("cannot sync file '%s'"), + virReportSystemError(errno, _("cannot sync file '%1$s'"), newfile); goto cleanup; } =20 if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("cannot save file '%s'"), + virReportSystemError(errno, _("cannot save file '%1$s'"), newfile); goto cleanup; } =20 if (rename(newfile, path) < 0) { - virReportSystemError(errno, _("cannot rename file '%s' as '%s'"), + virReportSystemError(errno, _("cannot rename file '%1$s' as '%2$s'= "), newfile, path); goto cleanup; } @@ -620,7 +620,7 @@ virFileRewriteStrHelper(int fd, =20 if (safewrite(fd, data, strlen(data)) < 0) { virReportSystemError(errno, - _("cannot write data to file '%s'"), + _("cannot write data to file '%1$s'"), path); return -1; } @@ -653,7 +653,7 @@ virFileResize(const char *path, VIR_AUTOCLOSE fd =3D -1; =20 if ((fd =3D open(path, O_RDWR)) < 0) { - virReportSystemError(errno, _("Unable to open '%s'"), path); + virReportSystemError(errno, _("Unable to open '%1$s'"), path); return -1; } =20 @@ -664,8 +664,8 @@ virFileResize(const char *path, _("preallocate is not supported on this pla= tform")); } else { virReportSystemError(errno, - _("Failed to pre-allocate space for " - "file '%s'"), path); + _("Failed to pre-allocate space for f= ile '%1$s'"), + path); } return -1; } @@ -673,12 +673,12 @@ virFileResize(const char *path, =20 if (ftruncate(fd, capacity) < 0) { virReportSystemError(errno, - _("Failed to truncate file '%s'"), path); + _("Failed to truncate file '%1$s'"), path); return -1; } =20 if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("Unable to save '%s'"), path); + virReportSystemError(errno, _("Unable to save '%1$s'"), path); return -1; } =20 @@ -691,13 +691,13 @@ int virFileTouch(const char *path, mode_t mode) int fd =3D -1; =20 if ((fd =3D open(path, O_WRONLY | O_CREAT, mode)) < 0) { - virReportSystemError(errno, _("cannot create file '%s'"), + virReportSystemError(errno, _("cannot create file '%1$s'"), path); return -1; } =20 if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("cannot save file '%s'"), + virReportSystemError(errno, _("cannot save file '%1$s'"), path); VIR_FORCE_CLOSE(fd); return -1; @@ -722,7 +722,7 @@ int virFileUpdatePerm(const char *path, } =20 if (stat(path, &sb) < 0) { - virReportSystemError(errno, _("cannot stat '%s'"), path); + virReportSystemError(errno, _("cannot stat '%1$s'"), path); return -1; } =20 @@ -735,7 +735,7 @@ int virFileUpdatePerm(const char *path, mode |=3D mode_add; =20 if (chmod(path, mode) < 0) { - virReportSystemError(errno, _("cannot change permission of '%s'"), + virReportSystemError(errno, _("cannot change permission of '%1$s'"= ), path); return -1; } @@ -781,7 +781,7 @@ static int virFileLoopDeviceOpenLoopCtl(char **dev_name= , int *fd) =20 if ((*fd =3D open(looppath, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s"), looppath); + _("Unable to open %1$s"), looppath); VIR_FREE(looppath); return -1; } @@ -817,7 +817,7 @@ static int virFileLoopDeviceOpenSearch(char **dev_name) VIR_DEBUG("Checking up on device %s", looppath); if ((fd =3D open(looppath, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s"), looppath); + _("Unable to open %1$s"), looppath); goto cleanup; } =20 @@ -828,7 +828,7 @@ static int virFileLoopDeviceOpenSearch(char **dev_name) =20 VIR_FORCE_CLOSE(fd); virReportSystemError(errno, - _("Unable to get loop status on %s"), + _("Unable to get loop status on %1$s"), looppath); goto cleanup; } @@ -889,19 +889,19 @@ int virFileLoopDeviceAssociate(const char *file, /* Set backing file name for LOOP_GET_STATUS64 queries */ if (virStrcpy((char *) lo.lo_file_name, file, LO_NAME_SIZE) < 0) { virReportSystemError(errno, - _("Unable to set backing file %s"), file); + _("Unable to set backing file %1$s"), file); goto cleanup; } =20 if ((fsfd =3D open(file, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s"), file); + _("Unable to open %1$s"), file); goto cleanup; } =20 if (ioctl(lofd, LOOP_SET_FD, fsfd) < 0) { virReportSystemError(errno, - _("Unable to attach %s to loop device"), + _("Unable to attach %1$s to loop device"), file); goto cleanup; } @@ -944,7 +944,7 @@ virFileNBDDeviceIsBusy(const char *dev_name) return 0; else virReportSystemError(errno, - _("Cannot check NBD device %s pid"), + _("Cannot check NBD device %1$s pid"), dev_name); return -1; } @@ -1055,7 +1055,7 @@ int virFileLoopDeviceAssociate(const char *file, char **dev G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to associate file %s with loop device"), + _("Unable to associate file %1$s with loop device= "), file); *dev =3D NULL; return -1; @@ -1067,7 +1067,7 @@ int virFileNBDDeviceAssociate(const char *file, char **dev G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to associate file %s with NBD device"), + _("Unable to associate file %1$s with NBD device"= ), file); return -1; } @@ -1107,7 +1107,7 @@ int virFileDeleteTree(const char *dir) filepath =3D g_build_filename(dir, de->d_name, NULL); =20 if (g_lstat(filepath, &sb) < 0) { - virReportSystemError(errno, _("Cannot access '%s'"), + virReportSystemError(errno, _("Cannot access '%1$s'"), filepath); return -1; } @@ -1118,7 +1118,7 @@ int virFileDeleteTree(const char *dir) } else { if (unlink(filepath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Cannot delete file '%s'"), + _("Cannot delete file '%1$s'"), filepath); return -1; } @@ -1129,7 +1129,7 @@ int virFileDeleteTree(const char *dir) =20 if (rmdir(dir) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Cannot delete directory '%s'"), + _("Cannot delete directory '%1$s'"), dir); return -1; } @@ -1520,14 +1520,14 @@ virFileReadAll(const char *path, int maxlen, char *= *buf) =20 fd =3D open(path, O_RDONLY); if (fd < 0) { - virReportSystemError(errno, _("Failed to open file '%s'"), path); + virReportSystemError(errno, _("Failed to open file '%1$s'"), path); return -1; } =20 len =3D virFileReadLimFD(fd, maxlen, buf); VIR_FORCE_CLOSE(fd); if (len < 0) { - virReportSystemError(errno, _("Failed to read file '%s'"), path); + virReportSystemError(errno, _("Failed to read file '%1$s'"), path); return -1; } =20 @@ -1640,7 +1640,7 @@ virFileRelLinkPointsTo(const char *directory, return virFileLinkPointsTo(checkLink, checkDest); if (!directory) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot resolve '%s' without starting directory"), + _("cannot resolve '%1$s' without starting directory= "), checkLink); return -1; } @@ -1970,14 +1970,14 @@ int virFileIsMountPoint(const char *file) return 0; else virReportSystemError(errno, - _("Cannot stat '%s'"), + _("Cannot stat '%1$s'"), file); return -1; } =20 if (stat(parent, &sb2) < 0) { virReportSystemError(errno, - _("Cannot stat '%s'"), + _("Cannot stat '%1$s'"), parent); return -1; } @@ -2059,7 +2059,7 @@ virFileGetMountSubtreeImpl(const char *mtabpath, =20 if (!(procmnt =3D setmntent(mtabpath, "r"))) { virReportSystemError(errno, - _("Failed to read %s"), mtabpath); + _("Failed to read %1$s"), mtabpath); return -1; } =20 @@ -2219,7 +2219,7 @@ virFileOpenForceOwnerMode(const char *path, int fd, m= ode_t mode, =20 if (fstat(fd, &st) =3D=3D -1) { ret =3D -errno; - virReportSystemError(errno, _("stat of '%s' failed"), path); + virReportSystemError(errno, _("stat of '%1$s' failed"), path); return ret; } /* NB: uid:gid are never "-1" (default) at this point - the caller @@ -2230,7 +2230,7 @@ virFileOpenForceOwnerMode(const char *path, int fd, m= ode_t mode, (fchown(fd, uid, gid) < 0)) { ret =3D -errno; virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), path, (unsigned int) uid, (unsigned int) gid); return ret; @@ -2241,7 +2241,7 @@ virFileOpenForceOwnerMode(const char *path, int fd, m= ode_t mode, (fchmod(fd, mode) < 0)) { ret =3D -errno; virReportSystemError(errno, - _("cannot set mode of '%s' to %04o"), + _("cannot set mode of '%1$s' to %2$04o"), path, mode); return ret; } @@ -2283,7 +2283,7 @@ virFileOpenForked(const char *path, int openflags, mo= de_t mode, if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) < 0) { ret =3D -errno; virReportSystemError(errno, - _("failed to create socket needed for '%s'"), + _("failed to create socket needed for '%1$s'"= ), path); return ret; } @@ -2306,7 +2306,7 @@ virFileOpenForked(const char *path, int openflags, mo= de_t mode, if ((fd =3D open(path, openflags, mode)) < 0) { ret =3D -errno; virReportSystemError(errno, - _("child process failed to create file '%= s'"), + _("child process failed to create file '%= 1$s'"), path); goto childerror; } @@ -2318,7 +2318,7 @@ virFileOpenForked(const char *path, int openflags, mo= de_t mode, if (ret < 0) { ret =3D -errno; virReportSystemError(errno, - _("child process failed to force owner mo= de file '%s'"), + _("child process failed to force owner mo= de file '%1$s'"), path); goto childerror; } @@ -2384,7 +2384,7 @@ virFileOpenForked(const char *path, int openflags, mo= de_t mode, /* if waitpid succeeded, but recvfd failed, report recvfd_errno */ if (recvfd_errno !=3D 0) { virReportSystemError(recvfd_errno, - _("failed recvfd for child creating '%s'"), + _("failed recvfd for child creating '%1$s'"), path); return -recvfd_errno; } @@ -2656,7 +2656,7 @@ virDirCreateNoFork(const char *path, if (!((flags & VIR_DIR_CREATE_ALLOW_EXIST) && virFileExists(path))) { if (mkdir(path, mode) < 0) { ret =3D -errno; - virReportSystemError(errno, _("failed to create directory '%s'= "), + virReportSystemError(errno, _("failed to create directory '%1$= s'"), path); goto error; } @@ -2665,7 +2665,7 @@ virDirCreateNoFork(const char *path, =20 if (stat(path, &st) =3D=3D -1) { ret =3D -errno; - virReportSystemError(errno, _("stat of '%s' failed"), path); + virReportSystemError(errno, _("stat of '%1$s' failed"), path); goto error; } =20 @@ -2673,7 +2673,7 @@ virDirCreateNoFork(const char *path, (gid !=3D (gid_t) -1 && st.st_gid !=3D gid)) && (chown(path, uid, gid) < 0)) { ret =3D -errno; - virReportSystemError(errno, _("cannot chown '%s' to (%u, %u)"), + virReportSystemError(errno, _("cannot chown '%1$s' to (%2$u, %3$u)= "), path, (unsigned int) uid, (unsigned int) gid); goto error; } @@ -2681,7 +2681,7 @@ virDirCreateNoFork(const char *path, if (mode !=3D (mode_t) -1 && chmod(path, mode) < 0) { ret =3D -errno; virReportSystemError(errno, - _("cannot set mode of '%s' to %04o"), + _("cannot set mode of '%1$s' to %2$04o"), path, mode); goto error; } @@ -2799,7 +2799,7 @@ virDirCreate(const char *path, ret =3D errno; if (ret !=3D EACCES) { /* in case of EACCES, the parent will retry */ - virReportSystemError(errno, _("child failed to create director= y '%s'"), + virReportSystemError(errno, _("child failed to create director= y '%1$s'"), path); } goto childerror; @@ -2811,21 +2811,21 @@ virDirCreate(const char *path, if (stat(path, &st) =3D=3D -1) { ret =3D errno; virReportSystemError(errno, - _("stat of '%s' failed"), path); + _("stat of '%1$s' failed"), path); goto childerror; } =20 if ((st.st_gid !=3D gid) && (chown(path, (uid_t) -1, gid) < 0)) { ret =3D errno; virReportSystemError(errno, - _("cannot chown '%s' to group %u"), + _("cannot chown '%1$s' to group %2$u"), path, (unsigned int) gid); goto childerror; } =20 if (mode !=3D (mode_t) -1 && chmod(path, mode) < 0) { virReportSystemError(errno, - _("cannot set mode of '%s' to %04o"), + _("cannot set mode of '%1$s' to %2$04o"), path, mode); goto childerror; } @@ -2888,7 +2888,7 @@ virFileRemove(const char *path, gid_t gid G_GNUC_UNUSED) { if (unlink(path) < 0) { - virReportSystemError(errno, _("Unable to unlink path '%s'"), + virReportSystemError(errno, _("Unable to unlink path '%1$s'"), path); return -1; } @@ -2907,7 +2907,7 @@ virDirOpenInternal(DIR **dirp, const char *name, bool= ignoreENOENT, bool quiet) =20 if (ignoreENOENT && errno =3D=3D ENOENT) return 0; - virReportSystemError(errno, _("cannot open directory '%s'"), name); + virReportSystemError(errno, _("cannot open directory '%1$s'"), nam= e); return -1; } return 1; @@ -2985,7 +2985,7 @@ int virDirRead(DIR *dirp, struct dirent **ent, const = char *name) *ent =3D readdir(dirp); /* exempt from syntax-check */ if (!*ent && errno) { if (name) - virReportSystemError(errno, _("Unable to read directory '%= s'"), + virReportSystemError(errno, _("Unable to read directory '%= 1$s'"), name); return -1; } @@ -3035,7 +3035,7 @@ int virFileChownFiles(const char *name, =20 if (chown(path, uid, gid) < 0) { virReportSystemError(errno, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), ent->d_name, (unsigned int) uid, (unsigned int) gid); return -1; @@ -3055,7 +3055,7 @@ int virFileChownFiles(const char *name, gid_t gid) { virReportSystemError(ENOSYS, - _("cannot chown '%s' to (%u, %u)"), + _("cannot chown '%1$s' to (%2$u, %3$u)"), name, (unsigned int) uid, (unsigned int) gid); return -1; @@ -3336,14 +3336,14 @@ virFileIsSharedFsFUSE(const char *path, bool isShared =3D false; =20 if (!(canonPath =3D virFileCanonicalizePath(path))) { - virReportSystemError(errno, _("unable to canonicalize %s"), path); + virReportSystemError(errno, _("unable to canonicalize %1$s"), path= ); return -1; } =20 VIR_DEBUG("Path canonicalization: %s->%s", path, canonPath); =20 if (!(f =3D setmntent(PROC_MOUNTS, "r"))) { - virReportSystemError(errno, _("Unable to open %s"), PROC_MOUNTS); + virReportSystemError(errno, _("Unable to open %1$s"), PROC_MOUNTS); return -1; } =20 @@ -3425,7 +3425,7 @@ virFileIsSharedFSType(const char *path, =20 if ((p =3D strrchr(dirpath, '/')) =3D=3D NULL) { virReportSystemError(EINVAL, - _("Invalid relative path '%s'"), path); + _("Invalid relative path '%1$s'"), path); return -1; } =20 @@ -3439,7 +3439,7 @@ virFileIsSharedFSType(const char *path, =20 if (statfs_ret < 0) { virReportSystemError(errno, - _("cannot determine filesystem for '%s'"), + _("cannot determine filesystem for '%1$s'"), path); return -1; } @@ -3471,14 +3471,14 @@ virFileGetHugepageSize(const char *path, =20 if (statfs(path, &fs) < 0) { virReportSystemError(errno, - _("cannot determine filesystem for '%s'"), + _("cannot determine filesystem for '%1$s'"), path); return -1; } =20 if (fs.f_type !=3D HUGETLBFS_MAGIC) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("not a hugetlbfs mount: '%s'"), + _("not a hugetlbfs mount: '%1$s'"), path); return -1; } @@ -3504,7 +3504,7 @@ virFileGetDefaultHugepageSize(unsigned long long *siz= e) =20 if (!(c =3D strstr(meminfo, HUGEPAGESIZE_STR))) { virReportError(VIR_ERR_NO_SUPPORT, - _("%s not found in %s"), + _("%1$s not found in %2$s"), HUGEPAGESIZE_STR, PROC_MEMINFO); return -1; @@ -3518,7 +3518,7 @@ virFileGetDefaultHugepageSize(unsigned long long *siz= e) =20 if (virStrToLong_ull(c, &unit, 10, size) < 0 || STRNEQ(unit, " kB")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse %s %s"), + _("Unable to parse %1$s %2$s"), HUGEPAGESIZE_STR, c); return -1; } @@ -3540,7 +3540,7 @@ virFileFindHugeTLBFS(virHugeTLBFS **ret_fs, =20 if (!(f =3D setmntent(PROC_MOUNTS, "r"))) { virReportSystemError(errno, - _("Unable to open %s"), + _("Unable to open %1$s"), PROC_MOUNTS); goto cleanup; } @@ -3674,7 +3674,7 @@ virFileSetupDev(const char *path, =20 if (g_mkdir_with_parents(path, 0777) < 0) { virReportSystemError(errno, - _("Failed to make path %s"), path); + _("Failed to make path %1$s"), path); return -1; } =20 @@ -3682,7 +3682,7 @@ virFileSetupDev(const char *path, path, mount_flags, mount_options); if (mount("devfs", path, mount_fs, mount_flags, mount_options) < 0) { virReportSystemError(errno, - _("Failed to mount devfs on %s type %s (%s)"), + _("Failed to mount devfs on %1$s type %2$s (%= 3$s)"), path, mount_fs, mount_options); return -1; } @@ -3698,7 +3698,7 @@ virFileBindMountDevice(const char *src, if (!virFileExists(dst)) { if (virFileIsDir(src)) { if (g_mkdir_with_parents(dst, 0777) < 0) { - virReportSystemError(errno, _("Unable to make dir %s"), ds= t); + virReportSystemError(errno, _("Unable to make dir %1$s"), = dst); return -1; } } else { @@ -3708,7 +3708,7 @@ virFileBindMountDevice(const char *src, } =20 if (mount(src, dst, "none", MS_BIND, NULL) < 0) { - virReportSystemError(errno, _("Failed to bind %s on to %s"), src, + virReportSystemError(errno, _("Failed to bind %1$s on to %2$s"), s= rc, dst); return -1; } @@ -3725,7 +3725,7 @@ virFileMoveMount(const char *src, =20 if (mount(src, dst, "none", mount_flags, NULL) < 0) { virReportSystemError(errno, - _("Unable to move %s mount to %s"), + _("Unable to move %1$s mount to %2$s"), src, dst); return -1; } @@ -4045,7 +4045,7 @@ virFileReadValueInt(int *value, const char *format, .= ..) =20 if (virStrToLong_i(str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid integer value '%s' in file '%s'"), + _("Invalid integer value '%1$s' in file '%2$s'"), str, path); return -1; } @@ -4085,7 +4085,7 @@ virFileReadValueUint(unsigned int *value, const char = *format, ...) =20 if (virStrToLong_uip(str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid unsigned integer value '%s' in file '%s'= "), + _("Invalid unsigned integer value '%1$s' in file '%= 2$s'"), str, path); return -1; } @@ -4125,7 +4125,7 @@ virFileReadValueUllong(unsigned long long *value, con= st char *format, ...) =20 if (virStrToLong_ullp(str, NULL, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid unsigned long long value '%s' in file '%= s'"), + _("Invalid unsigned long long value '%1$s' in file = '%2$s'"), str, path); return -1; } @@ -4190,7 +4190,7 @@ virFileReadValueScaledInt(unsigned long long *value, = const char *format, ...) =20 if (virStrToLong_ullp(str, &endp, 10, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid unsigned scaled integer value '%s' in fi= le '%s'"), + _("Invalid unsigned scaled integer value '%1$s' in = file '%2$s'"), str, path); return -1; } @@ -4367,7 +4367,7 @@ virFileSetXAttr(const char *path, { if (setxattr(path, name, value, strlen(value), 0) < 0) { virReportSystemError(errno, - _("Unable to set XATTR %s on %s"), + _("Unable to set XATTR %1$s on %2$s"), name, path); return -1; } @@ -4391,7 +4391,7 @@ virFileRemoveXAttr(const char *path, { if (removexattr(path, name) < 0) { virReportSystemError(errno, - _("Unable to remove XATTR %s on %s"), + _("Unable to remove XATTR %1$s on %2$s"), name, path); return -1; } @@ -4417,7 +4417,7 @@ virFileSetXAttr(const char *path, { errno =3D ENOSYS; virReportSystemError(errno, - _("Unable to set XATTR %s on %s"), + _("Unable to set XATTR %1$s on %2$s"), name, path); return -1; } @@ -4428,7 +4428,7 @@ virFileRemoveXAttr(const char *path, { errno =3D ENOSYS; virReportSystemError(errno, - _("Unable to remove XATTR %s on %s"), + _("Unable to remove XATTR %1$s on %2$s"), name, path); return -1; } @@ -4456,7 +4456,7 @@ virFileGetXAttr(const char *path, =20 if ((ret =3D virFileGetXAttrQuiet(path, name, value)) < 0) { virReportSystemError(errno, - _("Unable to get XATTR %s on %s"), + _("Unable to get XATTR %1$s on %2$s"), name, path); } =20 @@ -4506,13 +4506,13 @@ virFileSetCOW(const char *path, =20 fd =3D open(path, O_RDONLY|O_NONBLOCK|O_LARGEFILE); if (fd < 0) { - virReportSystemError(errno, _("unable to open '%s'"), + virReportSystemError(errno, _("unable to open '%1$s'"), path); return -1; } =20 if (fstatfs(fd, &buf) < 0) { - virReportSystemError(errno, _("unable query filesystem type on '%s= '"), + virReportSystemError(errno, _("unable query filesystem type on '%1= $s'"), path); return -1; } @@ -4520,7 +4520,7 @@ virFileSetCOW(const char *path, if (buf.f_type !=3D BTRFS_SUPER_MAGIC) { if (state !=3D VIR_TRISTATE_BOOL_ABSENT) { virReportSystemError(ENOSYS, - _("unable to control COW flag on '%s', no= t btrfs"), + _("unable to control COW flag on '%1$s', = not btrfs"), path); return -1; } @@ -4528,7 +4528,7 @@ virFileSetCOW(const char *path, } =20 if (ioctl(fd, FS_IOC_GETFLAGS, &val) < 0) { - virReportSystemError(errno, _("unable get directory flags on '%s'"= ), + virReportSystemError(errno, _("unable get directory flags on '%1$s= '"), path); return -1; } @@ -4546,7 +4546,7 @@ virFileSetCOW(const char *path, VIR_DEBUG("Failed to set flags on '%s': %s", path, g_strerror(save= d_err)); if (state !=3D VIR_TRISTATE_BOOL_ABSENT) { virReportSystemError(saved_err, - _("unable control COW flag on '%s'"), + _("unable control COW flag on '%1$s'"), path); return -1; } else { @@ -4558,7 +4558,7 @@ virFileSetCOW(const char *path, #else /* ! __linux__ */ if (state !=3D VIR_TRISTATE_BOOL_ABSENT) { virReportSystemError(ENOSYS, - _("Unable to set copy-on-write state on '%s' = to '%s'"), + _("Unable to set copy-on-write state on '%1$s= ' to '%2$s'"), path, virTristateBoolTypeToString(state)); return -1; } @@ -4623,7 +4623,7 @@ runIOCopy(const struct runIOParams p) } =20 if (got < 0) { - virReportSystemError(errno, _("Unable to read %s"), p.fdinname= ); + virReportSystemError(errno, _("Unable to read %1$s"), p.fdinna= me); return -2; } if (got =3D=3D 0) @@ -4638,12 +4638,12 @@ runIOCopy(const struct runIOParams p) memset(buf + got, 0, aligned_got - got); =20 if (safewrite(p.fdout, buf, aligned_got) < 0) { - virReportSystemError(errno, _("Unable to write %s"), p.fdo= utname); + virReportSystemError(errno, _("Unable to write %1$s"), p.f= doutname); return -3; } =20 if (!p.isBlockDev && ftruncate(p.fdout, total) < 0) { - virReportSystemError(errno, _("Unable to truncate %s"), p.= fdoutname); + virReportSystemError(errno, _("Unable to truncate %1$s"), = p.fdoutname); return -4; } =20 @@ -4651,7 +4651,7 @@ runIOCopy(const struct runIOParams p) } =20 if (safewrite(p.fdout, buf, got) < 0) { - virReportSystemError(errno, _("Unable to write %s"), p.fdoutna= me); + virReportSystemError(errno, _("Unable to write %1$s"), p.fdout= name); return -3; } } @@ -4690,13 +4690,13 @@ virFileDiskCopy(int disk_fd, const char *disk_path,= int remote_fd, const char *r =20 if (oflags < 0) { virReportSystemError(errno, - _("unable to determine access mode of %s"), + _("unable to determine access mode of %1$s"), disk_path); goto cleanup; } if (fstat(disk_fd, &sb) < 0) { virReportSystemError(errno, - _("unable to stat file descriptor %d path %s"= ), + _("unable to stat file descriptor %1$d path %= 2$s"), disk_fd, disk_path); goto cleanup; } @@ -4720,7 +4720,7 @@ virFileDiskCopy(int disk_fd, const char *disk_path, i= nt remote_fd, const char *r break; case O_RDWR: default: - virReportSystemError(EINVAL, _("Unable to process file with flags = %d"), + virReportSystemError(EINVAL, _("Unable to process file with flags = %1$d"), (oflags & O_ACCMODE)); goto cleanup; } @@ -4752,7 +4752,7 @@ virFileDiskCopy(int disk_fd, const char *disk_path, i= nt remote_fd, const char *r if (virFileDataSync(p.fdout) < 0) { if (errno !=3D EINVAL && errno !=3D EROFS) { /* fdatasync() may fail on some special FDs, e.g. pipes */ - virReportSystemError(errno, _("unable to fsync %s"), p.fdoutna= me); + virReportSystemError(errno, _("unable to fsync %1$s"), p.fdout= name); goto cleanup; } } @@ -4761,7 +4761,7 @@ virFileDiskCopy(int disk_fd, const char *disk_path, i= nt remote_fd, const char *r =20 cleanup: if (VIR_CLOSE(disk_fd) < 0 && ret =3D=3D 0) { - virReportSystemError(errno, _("Unable to close %s"), disk_path); + virReportSystemError(errno, _("Unable to close %1$s"), disk_path); ret =3D -1; } return ret; diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index b9e06545c0..c730de066e 100644 --- a/src/util/virfilecache.c +++ b/src/util/virfilecache.c @@ -106,7 +106,7 @@ virFileCacheGetFileName(virFileCache *cache, =20 if (g_mkdir_with_parents(cache->dir, 0777) < 0) { virReportSystemError(errno, - _("Unable to create directory '%s'"), + _("Unable to create directory '%1$s'"), cache->dir); return NULL; } @@ -142,7 +142,7 @@ virFileCacheLoad(virFileCache *cache, goto cleanup; } virReportSystemError(errno, - _("Unable to access cache '%s' for '%s'"), + _("Unable to access cache '%1$s' for '%2$s'"), file, name); goto cleanup; } diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index fbb0e438b3..30e73f603e 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -492,7 +492,7 @@ virFirewallApplyRuleDirect(virFirewallRule *rule, =20 if (!bin) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown firewall layer %d"), + _("Unknown firewall layer %1$d"), rule->layer); return -1; } @@ -516,7 +516,7 @@ virFirewallApplyRuleDirect(virFirewallRule *rule, VIR_DEBUG("Ignoring error running command"); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to apply firewall rules %s: %s"), + _("Failed to apply firewall rules %1$s: %2$s"), NULLSTR(cmdStr), NULLSTR(error)); VIR_FREE(*output); return -1; diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c index d11e974cc2..7733ef2410 100644 --- a/src/util/virfirewalld.c +++ b/src/util/virfirewalld.c @@ -109,7 +109,7 @@ virFirewallDGetVersion(unsigned long *version) =20 if (virStringParseVersion(version, versionStr, false) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse firewalld version '%s'"), + _("Failed to parse firewalld version '%1$s'"), versionStr); return -1; } @@ -173,7 +173,7 @@ virFirewallDGetBackend(void) =20 if ((backend =3D virFirewallDBackendTypeFromString(backendStr)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unrecognized firewalld backend type: %s"), + _("Unrecognized firewalld backend type: %1$s"), backendStr); return -1; } @@ -364,7 +364,7 @@ virFirewallDApplyRule(virFirewallLayer layer, =20 if (!ipv) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown firewall layer %d"), + _("Unknown firewall layer %1$d"), layer); return -1; } diff --git a/src/util/virfirmware.c b/src/util/virfirmware.c index 9b333cf04b..33d2789ca7 100644 --- a/src/util/virfirmware.c +++ b/src/util/virfirmware.c @@ -72,7 +72,7 @@ virFirmwareParse(const char *str, virFirmware *firmware) if (!token[0] || !token[1] || token[2] || STREQ(token[0], "") || STREQ(token[1], "")) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Invalid nvram format: '%s'"), + _("Invalid nvram format: '%1$s'"), str); return -1; } @@ -99,7 +99,7 @@ virFirmwareParseList(const char *list, if (!token[i] || !token[i + 1] || STREQ(token[i], "") || STREQ(token[i + 1], "")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid --with-loader-nvram list: %s"), + _("Invalid --with-loader-nvram list: %1$s"), list); return -1; } diff --git a/src/util/virgdbus.c b/src/util/virgdbus.c index 87b48256af..71ca3cd43b 100644 --- a/src/util/virgdbus.c +++ b/src/util/virgdbus.c @@ -97,7 +97,7 @@ virGDBusGetSystemBus(void) =20 if (!bus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to get system bus connection: %s"), + _("Unable to get system bus connection: %1$s"), systemError->message); return NULL; } @@ -124,7 +124,7 @@ virGDBusGetSessionBus(void) =20 if (!sessionBus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to get session bus connection: %s"), + _("Unable to get session bus connection: %1$s"), sessionError->message); return NULL; } diff --git a/src/util/virhash.c b/src/util/virhash.c index c72c248186..8365f51eb3 100644 --- a/src/util/virhash.c +++ b/src/util/virhash.c @@ -139,7 +139,7 @@ virHashAddEntry(GHashTable *table, const char *name, vo= id *userdata) =20 if (g_hash_table_contains(table, name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Duplicate hash table key '%s'"), name); + _("Duplicate hash table key '%1$s'"), name); return -1; } =20 diff --git a/src/util/virhook.c b/src/util/virhook.c index 871bfcc670..50e178723f 100644 --- a/src/util/virhook.c +++ b/src/util/virhook.c @@ -149,7 +149,7 @@ virHookCheck(int no, const char *driver) =20 if (driver =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid hook name for #%d"), no); + _("Invalid hook name for #%1$d"), no); return -1; } =20 @@ -388,7 +388,7 @@ virHookCall(int driver, } if (opstr =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Hook for %s, failed to find operation #%d"), + _("Hook for %1$s, failed to find operation #%2$d"), drvstr, op); return 1; } diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index c1e8dc8078..19195a1470 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -107,7 +107,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum, =20 if ((*nparams) !=3D BSD_CPU_STATS_ALL) { virReportInvalidArg(*nparams, - _("nparams in %s must be equal to %d"), + _("nparams in %1$s must be equal to %2$d"), __FUNCTION__, BSD_CPU_STATS_ALL); return -1; } @@ -115,7 +115,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum, clkinfo_size =3D sizeof(clkinfo); if (sysctlbyname("kern.clockrate", &clkinfo, &clkinfo_size, NULL, 0) <= 0) { virReportSystemError(errno, - _("sysctl failed for '%s'"), + _("sysctl failed for '%1$s'"), "kern.clockrate"); return -1; } @@ -133,7 +133,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum, =20 if (cpuNum >=3D cpu_times_num) { virReportInvalidArg(cpuNum, - _("Invalid cpuNum in %s"), + _("Invalid cpuNum in %1$s"), __FUNCTION__); return -1; } @@ -147,7 +147,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum, =20 if (sysctlbyname(sysctl_name, cpu_times, &cpu_times_size, NULL, 0) < 0= ) { virReportSystemError(errno, - _("sysctl failed for '%s'"), + _("sysctl failed for '%1$s'"), sysctl_name); return -1; } @@ -157,7 +157,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum, =20 if (virStrcpyStatic(param->field, cpu_map[i].field) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Field '%s' too long for destination"), + _("Field '%1$s' too long for destination"), cpu_map[i].field); return -1; } @@ -529,7 +529,7 @@ virHostCPUParseFrequencyString(const char *str, =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or invalid CPU frequency in %s"), + _("Missing or invalid CPU frequency in %1$s"), CPUINFO_PATH); return -1; } @@ -596,7 +596,7 @@ virHostCPUParsePhysAddrSize(FILE *cpuinfo, unsigned int= *addrsz) =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or invalid CPU address size in %s"), + _("Missing or invalid CPU address size in %1$s"), CPUINFO_PATH); return -1; } @@ -801,7 +801,7 @@ virHostCPUGetStatsLinux(FILE *procstat, =20 if ((*nparams) !=3D LINUX_NB_CPU_STATS) { virReportInvalidArg(*nparams, - _("nparams in %s must be equal to %d"), + _("nparams in %1$s must be equal to %2$d"), __FUNCTION__, LINUX_NB_CPU_STATS); return -1; } @@ -845,7 +845,7 @@ virHostCPUGetStatsLinux(FILE *procstat, } =20 virReportInvalidArg(cpuNum, - _("Invalid cpuNum in %s"), + _("Invalid cpuNum in %1$s"), __FUNCTION__); =20 return -1; @@ -916,7 +916,7 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, =20 if (!cpuinfo) { virReportSystemError(errno, - _("cannot open %s"), CPUINFO_PATH); + _("cannot open %1$s"), CPUINFO_PATH); return -1; } =20 @@ -995,7 +995,7 @@ virHostCPUGetStats(int cpuNum G_GNUC_UNUSED, FILE *procstat =3D fopen(PROCSTAT_PATH, "r"); if (!procstat) { virReportSystemError(errno, - _("cannot open %s"), PROCSTAT_PATH); + _("cannot open %1$s"), PROCSTAT_PATH); return -1; } ret =3D virHostCPUGetStatsLinux(procstat, cpuNum, params, nparams); @@ -1160,7 +1160,7 @@ virHostCPUGetThreadsPerSubcore(virArch arch) * is better than silently falling back and reporting * different nodeinfo depending on the user */ virReportSystemError(errno, - _("Failed to open '%s'"), + _("Failed to open '%1$s'"), KVM_DEVICE); return -1; } @@ -1198,7 +1198,7 @@ virHostCPUGetKVMMaxVCPUs(void) int ret; =20 if ((fd =3D open(KVM_DEVICE, O_RDONLY)) < 0) { - virReportSystemError(errno, _("Unable to open %s"), KVM_DEVICE); + virReportSystemError(errno, _("Unable to open %1$s"), KVM_DEVICE); return -1; } =20 @@ -1293,7 +1293,7 @@ virHostCPUGetMSRFromKVM(unsigned long index, msr->entries[0].index =3D index; =20 if ((fd =3D open(KVM_DEVICE, O_RDONLY)) < 0) { - virReportSystemError(errno, _("Unable to open %s"), KVM_DEVICE); + virReportSystemError(errno, _("Unable to open %1$s"), KVM_DEVICE); return -1; } =20 @@ -1419,7 +1419,7 @@ virHostCPUGetCPUID(void) VIR_AUTOCLOSE fd =3D open(KVM_DEVICE, O_RDONLY); =20 if (fd < 0) { - virReportSystemError(errno, _("Unable to open %s"), KVM_DEVICE); + virReportSystemError(errno, _("Unable to open %1$s"), KVM_DEVICE); return NULL; } =20 @@ -1473,7 +1473,7 @@ virHostCPUGetTscInfo(void) int rc; =20 if ((kvmFd =3D open(KVM_DEVICE, O_RDONLY)) < 0) { - virReportSystemError(errno, _("Unable to open %s"), KVM_DEVICE); + virReportSystemError(errno, _("Unable to open %1$s"), KVM_DEVICE); return NULL; } =20 @@ -1637,7 +1637,7 @@ virHostCPUGetSignature(char **signature) *signature =3D NULL; =20 if (!(cpuinfo =3D fopen(CPUINFO_PATH, "r"))) { - virReportSystemError(errno, _("Failed to open cpuinfo file '%s'"), + virReportSystemError(errno, _("Failed to open cpuinfo file '%1$s'"= ), CPUINFO_PATH); return -1; } @@ -1651,7 +1651,7 @@ virHostCPUGetPhysAddrSize(unsigned int *size) g_autoptr(FILE) cpuinfo =3D NULL; =20 if (!(cpuinfo =3D fopen(CPUINFO_PATH, "r"))) { - virReportSystemError(errno, _("Failed to open cpuinfo file '%s'"), + virReportSystemError(errno, _("Failed to open cpuinfo file '%1$s'"= ), CPUINFO_PATH); return -1; } diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c index 052f7cd935..83c10206cd 100644 --- a/src/util/virhostmem.c +++ b/src/util/virhostmem.c @@ -80,7 +80,7 @@ virHostMemGetStatsFreeBSD(virNodeMemoryStatsPtr params, =20 if ((*nparams) !=3D BSD_MEMORY_STATS_ALL) { virReportInvalidArg(nparams, - _("nparams in %s must be %d"), + _("nparams in %1$s must be %2$d"), __FUNCTION__, BSD_MEMORY_STATS_ALL); return -1; } @@ -93,7 +93,7 @@ virHostMemGetStatsFreeBSD(virNodeMemoryStatsPtr params, if (sysctlbyname(sysctl_map[i].sysctl_name, &value, &value_size, NULL, 0) < 0) { virReportSystemError(errno, - _("sysctl failed for '%s'"), + _("sysctl failed for '%1$s'"), sysctl_map[i].sysctl_name); return -1; } @@ -101,7 +101,7 @@ virHostMemGetStatsFreeBSD(virNodeMemoryStatsPtr params, param =3D ¶ms[j++]; if (virStrcpyStatic(param->field, sysctl_map[i].field) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Field '%s' too long for destination"), + _("Field '%1$s' too long for destination"), sysctl_map[i].field); return -1; } @@ -113,13 +113,13 @@ virHostMemGetStatsFreeBSD(virNodeMemoryStatsPtr param= s, =20 if (sysctlbyname("vfs.bufspace", &bufpages, &bufpages_size, NULL, = 0) < 0) { virReportSystemError(errno, - _("sysctl failed for '%s'"), + _("sysctl failed for '%1$s'"), "vfs.bufspace"); return -1; } if (virStrcpyStatic(param->field, VIR_NODE_MEMORY_STATS_BUFFERS) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Field '%s' too long for destination"), + _("Field '%1$s' too long for destination"), VIR_NODE_MEMORY_STATS_BUFFERS); return -1; } @@ -176,7 +176,7 @@ virHostMemGetStatsLinux(FILE *meminfo, =20 if ((*nparams) !=3D nr_param) { virReportInvalidArg(nparams, - _("nparams in %s must be %d"), + _("nparams in %1$s must be %2$d"), __FUNCTION__, nr_param); return -1; } @@ -275,7 +275,7 @@ virHostMemGetStats(int cellNum G_GNUC_UNUSED, =20 if (cellNum > max_node) { virReportInvalidArg(cellNum, - _("cellNum in %s must be less than or = equal to %d"), + _("cellNum in %1$s must be less than o= r equal to %2$d"), __FUNCTION__, max_node); return -1; } @@ -287,7 +287,7 @@ virHostMemGetStats(int cellNum G_GNUC_UNUSED, =20 if (!meminfo) { virReportSystemError(errno, - _("cannot open %s"), meminfo_path); + _("cannot open %1$s"), meminfo_path); return -1; } ret =3D virHostMemGetStatsLinux(meminfo, cellNum, params, nparams); @@ -320,7 +320,7 @@ virHostMemSetParameterValue(virTypedParameterPtr param) strval =3D g_strdup_printf("%u", param->value.ui); =20 if ((rc =3D virFileWriteStr(path, strval, 0)) < 0) { - virReportSystemError(-rc, _("failed to set %s"), param->field); + virReportSystemError(-rc, _("failed to set %1$s"), param->field); return -1; } =20 @@ -343,8 +343,8 @@ virHostMemParametersAreAllSupported(virTypedParameterPt= r params, =20 if (!virFileExists(path)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Parameter '%s' is not supported by " - "this kernel"), param->field); + _("Parameter '%1$s' is not supported by this ke= rnel"), + param->field); return false; } } @@ -432,7 +432,7 @@ virHostMemGetParameterValue(const char *field, =20 if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse %s"), field); + _("failed to parse %1$s"), field); return -1; } =20 @@ -740,7 +740,7 @@ virHostMemGetCellsFreeFake(unsigned long long *freeMems, { if (startCell !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, 0); return -1; } @@ -785,7 +785,7 @@ virHostMemGetCellsFree(unsigned long long *freeMems, =20 if (startCell > maxCell) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, maxCell); return -1; } @@ -860,7 +860,7 @@ virHostMemGetFreePages(unsigned int npages, =20 if (startCell > lastCell) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, lastCell); return -1; } @@ -910,7 +910,7 @@ virHostMemAllocPages(unsigned int npages, =20 if (startCell > lastCell) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start cell %d out of range (0-%d)"), + _("start cell %1$d out of range (0-%2$d)"), startCell, lastCell); return -1; } diff --git a/src/util/virhostuptime.c b/src/util/virhostuptime.c index 3d41fa081d..2467ea51b0 100644 --- a/src/util/virhostuptime.c +++ b/src/util/virhostuptime.c @@ -63,7 +63,7 @@ virHostGetBootTimeProcfs(unsigned long long *btime) * We're interested only in the first one */ if (!(tmp =3D strchr(buf, ' '))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("uptime file has unexpected format '%s'"), + _("uptime file has unexpected format '%1$s'"), buf); return -EINVAL; } @@ -72,7 +72,7 @@ virHostGetBootTimeProcfs(unsigned long long *btime) =20 if (virStrToDouble(buf, NULL, &up) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse uptime value '%s'"), + _("Unable to parse uptime value '%1$s'"), buf); return -EINVAL; } diff --git a/src/util/viridentity.c b/src/util/viridentity.c index 4e9a783cee..b7b88056ac 100644 --- a/src/util/viridentity.c +++ b/src/util/viridentity.c @@ -220,7 +220,7 @@ virIdentityConstructSystemTokenPath(void) =20 if (g_mkdir_with_parents(commondir, 0700) < 0) { virReportSystemError(errno, - _("Cannot create daemon common directory '%s'= "), + _("Cannot create daemon common directory '%1$= s'"), commondir); return NULL; } @@ -243,28 +243,28 @@ virIdentityEnsureSystemToken(void) fd =3D open(tokenfile, O_RDWR|O_APPEND|O_CREAT, 0600); if (fd < 0) { virReportSystemError(errno, - _("Unable to open system token %s"), + _("Unable to open system token %1$s"), tokenfile); return NULL; } =20 if (virSetCloseExec(fd) < 0) { virReportSystemError(errno, - _("Failed to set close-on-exec flag '%s'"), + _("Failed to set close-on-exec flag '%1$s'"), tokenfile); return NULL; } =20 if (virFileLock(fd, false, 0, 1, true) < 0) { virReportSystemError(errno, - _("Failed to lock system token '%s'"), + _("Failed to lock system token '%1$s'"), tokenfile); return NULL; } =20 if (fstat(fd, &st) < 0) { virReportSystemError(errno, - _("Failed to check system token '%s'"), + _("Failed to check system token '%1$s'"), tokenfile); return NULL; } @@ -276,20 +276,20 @@ virIdentityEnsureSystemToken(void) } if (safewrite(fd, token, TOKEN_STRLEN) !=3D TOKEN_STRLEN) { virReportSystemError(errno, - _("Failed to write system token '%s'"), + _("Failed to write system token '%1$s'"), tokenfile); return NULL; } } else { if (virFileReadLimFD(fd, TOKEN_STRLEN, &token) < 0) { virReportSystemError(errno, - _("Failed to read system token '%s'"), + _("Failed to read system token '%1$s'"), tokenfile); return NULL; } if (strlen(token) !=3D TOKEN_STRLEN) { virReportSystemError(errno, - _("System token in %s was corrupt"), + _("System token in %1$s was corrupt"), tokenfile); return NULL; } diff --git a/src/util/virinitctl.c b/src/util/virinitctl.c index 1b9f2ad022..430f23a235 100644 --- a/src/util/virinitctl.c +++ b/src/util/virinitctl.c @@ -141,7 +141,7 @@ virInitctlSetRunLevel(const char *fifo, if (fifo) { if ((fd =3D open(fifo, open_flags)) < 0) { virReportSystemError(errno, - _("Cannot open init control %s"), + _("Cannot open init control %1$s"), fifo); goto cleanup; } @@ -154,7 +154,7 @@ virInitctlSetRunLevel(const char *fifo, =20 if (errno !=3D ENOENT) { virReportSystemError(errno, - _("Cannot open init control %s"), + _("Cannot open init control %1$s"), fifo); goto cleanup; } @@ -169,7 +169,7 @@ virInitctlSetRunLevel(const char *fifo, =20 if (safewrite(fd, &req, sizeof(req)) !=3D sizeof(req)) { virReportSystemError(errno, - _("Failed to send request to init control %s"= ), + _("Failed to send request to init control %1$= s"), fifo); goto cleanup; } diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 6275760de4..018021bc1b 100644 --- a/src/util/viriptables.c +++ b/src/util/viriptables.c @@ -837,7 +837,7 @@ iptablesForwardMasquerade(virFirewall *fw, portRangeStr =3D g_strdup_printf(":%u-%u", port->start, port->= end); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid port range '%u-%u'."), + _("Invalid port range '%1$u-%2$u'."), port->start, port->end); return -1; } diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c index fbf84c9305..4790bd4b55 100644 --- a/src/util/viriscsi.c +++ b/src/util/viriscsi.c @@ -102,7 +102,7 @@ virISCSIGetSession(const char *devpath, =20 if (cbdata.session =3D=3D NULL && !probe) virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find iscsiadm session: %s"), + _("cannot find iscsiadm session: %1$s"), NULLSTR(error)); =20 return cbdata.session; @@ -193,7 +193,7 @@ virStorageBackendIQNFound(const char *initiatoriqn, =20 error: virReportError(VIR_ERR_INTERNAL_ERROR, - _("malformed output of %s: %s"), + _("malformed output of %1$s: %2$s"), ISCSIADM, line); goto cleanup; } @@ -226,7 +226,7 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriq= n, * properly. */ if (virCommandRun(newcmd, &exitstatus) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to run command '%s' to create new iscsi i= nterface"), + _("Failed to run command '%1$s' to create new iscsi= interface"), ISCSIADM); return -1; } @@ -244,7 +244,7 @@ virStorageBackendCreateIfaceIQN(const char *initiatoriq= n, * rely on whether iface file got updated properly. */ if (virCommandRun(updatecmd, &exitstatus) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to run command '%s' to update iscsi inter= face with IQN '%s'"), + _("Failed to run command '%1$s' to update iscsi int= erface with IQN '%2$s'"), ISCSIADM, initiatoriqn); return -1; } @@ -477,7 +477,7 @@ virISCSIScanTargets(const char *portal, =20 case IQN_MISSING: virReportError(VIR_ERR_OPERATION_FAILED, - _("no iSCSI interface defined for IQN %s"), + _("no iSCSI interface defined for IQN %1$s"), initiatoriqn); G_GNUC_FALLTHROUGH; case IQN_ERROR: @@ -523,14 +523,14 @@ virISCSINodeNew(const char *portal, =20 if (virCommandRun(cmd, &status) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed new node mode for target '%s'"), + _("Failed new node mode for target '%1$s'"), target); return -1; } =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s failed new mode for target '%s' with status '= %d'"), + _("%1$s failed new mode for target '%2$s' with stat= us '%3$d'"), ISCSIADM, target, status); return -1; } @@ -560,7 +560,7 @@ virISCSINodeUpdate(const char *portal, /* Ignore non-zero status. */ if (virCommandRun(cmd, &status) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to update '%s' of node mode for target '%= s'"), + _("Failed to update '%1$s' of node mode for target = '%2$s'"), name, target); return -1; } diff --git a/src/util/virjson.c b/src/util/virjson.c index 4e822063bc..7e20443f93 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -168,7 +168,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, =20 if (strlen(key) < 3 || key[1] !=3D ':') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' is too short or malformed"= ), + _("argument key '%1$s' is too short or malforme= d"), key); return -1; } @@ -186,7 +186,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, continue; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' must not have null val= ue"), + _("argument key '%1$s' must not have null v= alue"), key); return -1; } @@ -202,7 +202,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, =20 if (val < 0 && (type =3D=3D 'j' || type =3D=3D 'y')) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' must not be negative"), + _("argument key '%1$s' must not be negative= "), key); return -1; } @@ -235,7 +235,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, =20 if (val < 0 && (type =3D=3D 'J' || type =3D=3D 'Y')) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' must not be negative"), + _("argument key '%1$s' must not be negative= "), key); return -1; } @@ -303,7 +303,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, continue; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' must not have null val= ue"), + _("argument key '%1$s' must not have null v= alue"), key); return -1; } @@ -322,7 +322,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, continue; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("argument key '%s' must not have null val= ue"), + _("argument key '%1$s' must not have null v= alue"), key); return -1; } @@ -340,7 +340,7 @@ virJSONValueObjectAddVArgs(virJSONValue **objptr, =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported data type '%c' for arg '%s'"), t= ype, key - 2); + _("unsupported data type '%1$c' for arg '%2$s'"= ), type, key - 2); return -1; } =20 @@ -556,7 +556,7 @@ virJSONValueObjectInsert(virJSONValue *object, } =20 if (virJSONValueObjectHasKey(object, key)) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("duplicate key '%s'"), ke= y); + virReportError(VIR_ERR_INTERNAL_ERROR, _("duplicate key '%1$s'"), = key); return -1; } =20 @@ -1681,7 +1681,7 @@ virJSONValueFromString(const char *jsonstring) strlen(jsonstring)); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse json %s: %s"), + _("cannot parse json %1$s: %2$s"), jsonstring, (const char*) errstr); yajl_free_error(hand, errstr); virJSONValueFree(parser.head); @@ -1690,7 +1690,7 @@ virJSONValueFromString(const char *jsonstring) =20 if (parser.nstate !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse json %s: unterminated string/map/ar= ray"), + _("cannot parse json %1$s: unterminated string/map/= array"), jsonstring); virJSONValueFree(parser.head); } else { @@ -1909,7 +1909,7 @@ virJSONValueObjectDeflattenWorker(const char *key, =20 if (virJSONValueObjectHasKey(retobj, key)) { virReportError(VIR_ERR_INVALID_ARG, - _("can't deflatten colliding key '%s'"), key); + _("can't deflatten colliding key '%1$s'"), key); return -1; } =20 @@ -1924,7 +1924,7 @@ virJSONValueObjectDeflattenWorker(const char *key, =20 if (!tokens[0] || !tokens[1]) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid nested value key '%s'"), key); + _("invalid nested value key '%1$s'"), key); return -1; } =20 diff --git a/src/util/virlease.c b/src/util/virlease.c index 357bacd83d..6fd7b88d88 100644 --- a/src/util/virlease.c +++ b/src/util/virlease.c @@ -64,7 +64,7 @@ virLeaseReadCustomLeaseFile(virJSONValue *leases_array_ne= w, =20 if (!(leases_array =3D virJSONValueFromString(lease_entries))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid json in file: %s, rewriting it"), + _("invalid json in file: %1$s, rewriting it"), custom_lease_file); return 0; } @@ -228,7 +228,7 @@ virLeaseNew(virJSONValue **lease_ret, =20 if (virStrToLong_ll(exptime, NULL, 10, &expirytime) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to convert lease expiry time to long = long: %s"), + _("Unable to convert lease expiry time to long = long: %1$s"), NULLSTR(exptime)); return -1; } diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index d54162b3d7..19aacf61bc 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -131,21 +131,21 @@ virLockSpaceResourceNew(virLockSpace *lockspace, struct stat a, b; if ((res->fd =3D open(res->path, O_RDWR|O_CREAT, 0600)) < 0) { virReportSystemError(errno, - _("Unable to open/create resource %s"= ), + _("Unable to open/create resource %1$= s"), res->path); goto error; } =20 if (virSetCloseExec(res->fd) < 0) { virReportSystemError(errno, - _("Failed to set close-on-exec flag '= %s'"), + _("Failed to set close-on-exec flag '= %1$s'"), res->path); goto error; } =20 if (fstat(res->fd, &b) < 0) { virReportSystemError(errno, - _("Unable to check status of pid file= '%s'"), + _("Unable to check status of pid file= '%1$s'"), res->path); goto error; } @@ -153,11 +153,11 @@ virLockSpaceResourceNew(virLockSpace *lockspace, if (virFileLock(res->fd, shared, 0, 1, false) < 0) { if (errno =3D=3D EACCES || errno =3D=3D EAGAIN) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is locked"), + _("Lockspace resource '%1$s' is locked"= ), resname); } else { virReportSystemError(errno, - _("Unable to acquire lock on '%s'= "), + _("Unable to acquire lock on '%1$= s'"), res->path); } goto error; @@ -184,14 +184,14 @@ virLockSpaceResourceNew(virLockSpace *lockspace, } else { if ((res->fd =3D open(res->path, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open resource %s"), + _("Unable to open resource %1$s"), res->path); goto error; } =20 if (virSetCloseExec(res->fd) < 0) { virReportSystemError(errno, - _("Failed to set close-on-exec flag '%s'"= ), + _("Failed to set close-on-exec flag '%1$s= '"), res->path); goto error; } @@ -199,11 +199,11 @@ virLockSpaceResourceNew(virLockSpace *lockspace, if (virFileLock(res->fd, shared, 0, 1, false) < 0) { if (errno =3D=3D EACCES || errno =3D=3D EAGAIN) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is locked"), + _("Lockspace resource '%1$s' is locked"), resname); } else { virReportSystemError(errno, - _("Unable to acquire lock on '%s'"), + _("Unable to acquire lock on '%1$s'"), res->path); } goto error; @@ -252,14 +252,14 @@ virLockSpace *virLockSpaceNew(const char *directory) if (virFileExists(directory)) { if (!virFileIsDir(directory)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Lockspace location %s exists, but is not= a directory"), + _("Lockspace location %1$s exists, but is n= ot a directory"), directory); goto error; } } else { if (g_mkdir_with_parents(directory, 0700) < 0) { virReportSystemError(errno, - _("Unable to create lockspace %s"), + _("Unable to create lockspace %1$s"), directory); goto error; } @@ -493,7 +493,7 @@ int virLockSpaceCreateResource(virLockSpace *lockspace, =20 if (virHashLookup(lockspace->resources, resname) !=3D NULL) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is locked"), + _("Lockspace resource '%1$s' is locked"), resname); return -1; } @@ -518,7 +518,7 @@ int virLockSpaceDeleteResource(virLockSpace *lockspace, =20 if (virHashLookup(lockspace->resources, resname) !=3D NULL) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is locked"), + _("Lockspace resource '%1$s' is locked"), resname); return -1; } @@ -529,7 +529,7 @@ int virLockSpaceDeleteResource(virLockSpace *lockspace, if (unlink(respath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to delete lockspace resource %s"), + _("Unable to delete lockspace resource %1$s"), respath); return -1; } @@ -562,7 +562,7 @@ int virLockSpaceAcquireResource(virLockSpace *lockspace, return 0; } virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is locked"), + _("Lockspace resource '%1$s' is locked"), resname); return -1; } @@ -592,7 +592,7 @@ int virLockSpaceReleaseResource(virLockSpace *lockspace, =20 if (!(res =3D virHashLookup(lockspace->resources, resname))) { virReportError(VIR_ERR_RESOURCE_BUSY, - _("Lockspace resource '%s' is not locked"), + _("Lockspace resource '%1$s' is not locked"), resname); return -1; } @@ -604,7 +604,7 @@ int virLockSpaceReleaseResource(virLockSpace *lockspace, =20 if (i =3D=3D res->nOwners) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("owner %lld does not hold the resource lock"), + _("owner %1$lld does not hold the resource lock"), (unsigned long long)owner); return -1; } diff --git a/src/util/virlog.c b/src/util/virlog.c index 443e948917..6bbd69fe43 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -306,8 +306,8 @@ virLogSetDefaultPriority(virLogPriority priority) { if ((priority < VIR_LOG_DEBUG) || (priority > VIR_LOG_ERROR)) { virReportError(VIR_ERR_INVALID_ARG, - _("Failed to set logging priority, argument '%u' is= " - "invalid"), priority); + _("Failed to set logging priority, argument '%1$u' = is invalid"), + priority); return -1; } if (virLogInitialize() < 0) @@ -689,7 +689,7 @@ virLogNewOutputToFile(virLogPriority priority, =20 fd =3D open(file, O_CREAT | O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR); if (fd < 0) { - virReportSystemError(errno, _("failed to open %s"), file); + virReportSystemError(errno, _("failed to open %1$s"), file); return NULL; } =20 @@ -1195,8 +1195,8 @@ virLogParseDefaultPriority(const char *priority) return VIR_LOG_ERROR; =20 virReportError(VIR_ERR_INVALID_ARG, - _("Failed to set logging priority, argument '%s' is " - "invalid"), priority); + _("Failed to set logging priority, argument '%1$s' is i= nvalid"), + priority); return -1; } =20 @@ -1326,7 +1326,7 @@ virLogFilterNew(const char *match, size_t mlen =3D strlen(match); =20 if (priority < VIR_LOG_DEBUG || priority > VIR_LOG_ERROR) { - virReportError(VIR_ERR_INVALID_ARG, _("Invalid log priority %d"), + virReportError(VIR_ERR_INVALID_ARG, _("Invalid log priority %1$d"), priority); return NULL; } @@ -1493,21 +1493,21 @@ virLogParseOutput(const char *src) if (!(tokens =3D g_strsplit(src, ":", 0)) || (count =3D g_strv_length(tokens)) < 2) { virReportError(VIR_ERR_INVALID_ARG, - _("Malformed format for log output '%s'"), src); + _("Malformed format for log output '%1$s'"), src); return NULL; } =20 if (virStrToLong_uip(tokens[0], NULL, 10, &prio) < 0 || (prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR)) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid log priority '%s' for log output '%s'"), + _("Invalid log priority '%1$s' for log output '%2$s= '"), tokens[0], src); return NULL; } =20 if ((dest =3D virLogDestinationTypeFromString(tokens[1])) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid log destination '%s' for log output '%s'= "), + _("Invalid log destination '%1$s' for log output '%= 2$s'"), tokens[1], src); return NULL; } @@ -1517,8 +1517,8 @@ virLogParseOutput(const char *src) ((dest =3D=3D VIR_LOG_TO_FILE || dest =3D=3D VIR_LOG_TO_SYSLOG) && count !=3D 3)) { virReportError(VIR_ERR_INVALID_ARG, - _("Log output '%s' does not meet the format require= ments " - "for destination type '%s'"), src, tokens[1]); + _("Log output '%1$s' does not meet the format requi= rements for destination type '%2$s'"), + src, tokens[1]); return NULL; } =20 @@ -1587,14 +1587,14 @@ virLogParseFilter(const char *src) if (!(tokens =3D g_strsplit(src, ":", 0)) || !tokens[0] || !tokens[1]) { virReportError(VIR_ERR_INVALID_ARG, - _("Malformed format for filter '%s'"), src); + _("Malformed format for filter '%1$s'"), src); return NULL; } =20 if (virStrToLong_uip(tokens[0], NULL, 10, &prio) < 0 || (prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR)) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid priority '%s' for filter '%s'"), + _("Invalid priority '%1$s' for filter '%2$s'"), tokens[0], src); return NULL; } @@ -1610,7 +1610,7 @@ virLogParseFilter(const char *src) /* match string cannot comprise just from a single '+' */ if (!*match) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid match string '%s'"), tokens[1]); + _("Invalid match string '%1$s'"), tokens[1]); return NULL; } =20 diff --git a/src/util/virmacmap.c b/src/util/virmacmap.c index 98be64fb31..41baf736ab 100644 --- a/src/util/virmacmap.c +++ b/src/util/virmacmap.c @@ -149,14 +149,14 @@ virMacMapLoadFile(virMacMap *mgr, =20 if (!(map =3D virJSONValueFromString(map_str))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid json in file: %s"), + _("invalid json in file: %1$s"), file); return -1; } =20 if (!virJSONValueIsArray(map)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed file structure: %s"), + _("Malformed file structure: %1$s"), file); return -1; } @@ -182,7 +182,7 @@ virMacMapLoadFile(virMacMap *mgr, =20 if (g_hash_table_contains(mgr->macs, domain)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("duplicate domain '%s'"), domain); + _("duplicate domain '%1$s'"), domain); return -1; =20 } diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 41d4cef8b9..d0f35ca347 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -85,7 +85,7 @@ virMediatedDeviceGetSysfsDeviceAPI(virMediatedDevice *dev, * kinds of devices */ if (!virFileExists(file)) { - virReportSystemError(errno, _("failed to read '%s'"), file); + virReportSystemError(errno, _("failed to read '%1$s'"), file); return -1; } =20 @@ -116,15 +116,14 @@ virMediatedDeviceCheckModel(virMediatedDevice *dev, */ if ((actual_model =3D virMediatedDeviceModelTypeFromString(dev_api)) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("device API '%s' not supported yet"), + _("device API '%1$s' not supported yet"), dev_api); return -1; } =20 if (actual_model !=3D model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid device API '%s' for device %s: " - "device only supports '%s'"), + _("invalid device API '%1$s' for device %2$s: devic= e only supports '%3$s'"), virMediatedDeviceModelTypeToString(model), dev->path, dev_api); return -1; @@ -143,7 +142,7 @@ virMediatedDeviceNew(const char *uuidstr, virMediatedDe= viceModelType model) sysfspath =3D virMediatedDeviceGetSysfsPath(uuidstr); if (!virFileExists(sysfspath)) { virReportError(VIR_ERR_DEVICE_MISSING, - _("mediated device '%s' not found"), uuidstr); + _("mediated device '%1$s' not found"), uuidstr); return NULL; } =20 @@ -222,12 +221,12 @@ virMediatedDeviceGetIOMMUGroupNum(const char *uuidstr) iommu_path =3D g_strdup_printf("%s/iommu_group", dev_path); =20 if (!virFileExists(iommu_path)) { - virReportSystemError(errno, _("failed to access '%s'"), iommu_path= ); + virReportSystemError(errno, _("failed to access '%1$s'"), iommu_pa= th); return -1; } =20 if (virFileResolveLink(iommu_path, &result_path) < 0) { - virReportSystemError(errno, _("failed to resolve '%s'"), iommu_pat= h); + virReportSystemError(errno, _("failed to resolve '%1$s'"), iommu_p= ath); return -1; } =20 @@ -299,7 +298,7 @@ virMediatedDeviceListAdd(virMediatedDeviceList *list, { if (virMediatedDeviceListFind(list, (*dev)->path)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("device %s is already in use"), (*dev)->path); + _("device %1$s is already in use"), (*dev)->path); return -1; } VIR_APPEND_ELEMENT(list->devs, list->count, *dev); @@ -402,8 +401,7 @@ virMediatedDeviceIsUsed(virMediatedDevice *dev, if ((tmp =3D virMediatedDeviceListFind(list, dev->path))) { virMediatedDeviceGetUsedBy(tmp, &drvname, &domname); virReportError(VIR_ERR_OPERATION_INVALID, - _("mediated device %s is in use by " - "driver %s, domain %s"), + _("mediated device %1$s is in use by driver %2$s, d= omain %3$s"), tmp->path, drvname, domname); } =20 diff --git a/src/util/virmodule.c b/src/util/virmodule.c index 36cf77ac46..2b78068814 100644 --- a/src/util/virmodule.c +++ b/src/util/virmodule.c @@ -51,7 +51,7 @@ virModuleLoadFile(const char *file) =20 if (!(handle =3D dlopen(file, flags))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to load module '%s': %s"), file, dlerror(= )); + _("Failed to load module '%1$s': %2$s"), file, dler= ror()); return NULL; } =20 @@ -70,7 +70,7 @@ virModuleLoadFunc(void *handle, =20 if (!(regsym =3D dlsym(handle, funcname))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find symbol '%s' in module '%s': %s"), + _("Failed to find symbol '%1$s' in module '%2$s': %= 3$s"), funcname, file, dlerror()); return NULL; } @@ -107,7 +107,7 @@ virModuleLoad(const char *path, if (!virFileExists(path)) { if (required) { virReportSystemError(errno, - _("Failed to find module '%s'"), path); + _("Failed to find module '%1$s'"), path); return -1; } else { VIR_INFO("Module '%s' does not exist", path); @@ -126,7 +126,7 @@ virModuleLoad(const char *path, * just make sure */ if (virGetLastErrorCode() =3D=3D VIR_ERR_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to execute symbol '%s' in module '%s'= "), + _("Failed to execute symbol '%1$s' in module '%= 2$s'"), regfunc, path); } goto cleanup; @@ -150,7 +150,7 @@ virModuleLoad(const char *path, VIR_DEBUG("dlopen not available on this platform"); if (required) { virReportSystemError(ENOSYS, - _("Failed to find module '%s'"), path); + _("Failed to find module '%1$s'"), path); return -1; } else { /* Since we have no dlopen(), but definition we have no diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 62d8162e03..38a4f480eb 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -147,7 +147,7 @@ static int virNetDevSetupControlFull(const char *ifname, =20 if (virStrcpyStatic(ifr->ifr_name, ifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too lon= g"), + _("Network interface name '%1$s' is too l= ong"), ifname); return -1; } @@ -210,7 +210,7 @@ int virNetDevExists(const char *ifname) if (errno =3D=3D ENODEV || errno =3D=3D ENXIO) return 0; =20 - virReportSystemError(errno, _("Unable to check interface flags for= %s"), + virReportSystemError(errno, _("Unable to check interface flags for= %1$s"), ifname); return -1; } @@ -221,7 +221,7 @@ int virNetDevExists(const char *ifname) int virNetDevExists(const char *ifname) { virReportSystemError(ENOSYS, - _("Unable to check interface %s"), ifname); + _("Unable to check interface %1$s"), ifname); return -1; } #endif @@ -255,7 +255,7 @@ virNetDevSetMACInternal(const char *ifname, =20 /* To fill ifr.ifr_hdaddr.sa_family field */ if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { - virReportSystemError(errno, _("Cannot get interface MAC on '%s'"), + virReportSystemError(errno, _("Cannot get interface MAC on '%1$s'"= ), ifname); =20 VIR_DEBUG("SIOCSIFHWADDR %s get MAC - Fail", ifname); @@ -274,7 +274,7 @@ virNetDevSetMACInternal(const char *ifname, } =20 virReportSystemError(errno, - _("Cannot set interface MAC to %s on '%s'"), + _("Cannot set interface MAC to %1$s on '%2$s'= "), virMacAddrFormat(macaddr, macstr), ifname); return -1; } @@ -318,7 +318,7 @@ virNetDevSetMACInternal(const char *ifname, } =20 virReportSystemError(errno, - _("Cannot set interface MAC to %s on '%s'"), + _("Cannot set interface MAC to %1$s on '%2$s'= "), mac + 1, ifname); return -1; } @@ -337,7 +337,7 @@ virNetDevSetMACInternal(const char *ifname, bool quiet G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Cannot set interface MAC on '%s'"), + _("Cannot set interface MAC on '%1$s'"), ifname); return -1; } @@ -375,7 +375,7 @@ int virNetDevGetMAC(const char *ifname, =20 if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { virReportSystemError(errno, - _("Cannot get interface MAC on '%s'"), + _("Cannot get interface MAC on '%1$s'"), ifname); return -1; } @@ -389,7 +389,7 @@ int virNetDevGetMAC(const char *ifname, virMacAddr *macaddr G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Cannot get interface MAC on '%s'"), + _("Cannot get interface MAC on '%1$s'"), ifname); return -1; } @@ -415,7 +415,7 @@ int virNetDevGetMTU(const char *ifname) =20 if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) { virReportSystemError(errno, - _("Cannot get interface MTU on '%s'"), + _("Cannot get interface MTU on '%1$s'"), ifname); return -1; } @@ -426,7 +426,7 @@ int virNetDevGetMTU(const char *ifname) int virNetDevGetMTU(const char *ifname) { virReportSystemError(ENOSYS, - _("Cannot get interface MTU on '%s'"), + _("Cannot get interface MTU on '%1$s'"), ifname); return -1; } @@ -456,7 +456,7 @@ int virNetDevSetMTU(const char *ifname, int mtu) =20 if (ioctl(fd, SIOCSIFMTU, &ifr) < 0) { virReportSystemError(errno, - _("Cannot set interface MTU on '%s'"), + _("Cannot set interface MTU on '%1$s'"), ifname); return -1; } @@ -467,7 +467,7 @@ int virNetDevSetMTU(const char *ifname, int mtu) int virNetDevSetMTU(const char *ifname, int mtu G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Cannot set interface MTU on '%s'"), + _("Cannot set interface MTU on '%1$s'"), ifname); return -1; } @@ -559,7 +559,7 @@ int virNetDevSetName(const char* ifname, const char *ne= wifname) # ifdef WITH_STRUCT_IFREQ_IFR_NEWNAME if (virStrcpyStatic(ifr.ifr_newname, newifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too long"), + _("Network interface name '%1$s' is too long"= ), newifname); return -1; } @@ -569,7 +569,7 @@ int virNetDevSetName(const char* ifname, const char *ne= wifname) =20 if (ioctl(fd, SIOCSIFNAME, &ifr)) { virReportSystemError(errno, - _("Unable to rename '%s' to '%s'"), + _("Unable to rename '%1$s' to '%2$s'"), ifname, newifname); return -1; } @@ -580,7 +580,7 @@ int virNetDevSetName(const char* ifname, const char *ne= wifname) int virNetDevSetName(const char* ifname, const char *newifname) { virReportSystemError(ENOSYS, - _("Cannot rename interface '%s' to '%s' on this p= latform"), + _("Cannot rename interface '%1$s' to '%2$s' on th= is platform"), ifname, newifname); return -1; } @@ -600,7 +600,7 @@ virNetDevSetIFFlag(const char *ifname, int flag, bool v= al) =20 if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) { virReportSystemError(errno, - _("Cannot get interface flags on '%s'"), + _("Cannot get interface flags on '%1$s'"), ifname); return -1; } @@ -614,7 +614,7 @@ virNetDevSetIFFlag(const char *ifname, int flag, bool v= al) ifr.ifr_flags =3D ifflags; if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) { virReportSystemError(errno, - _("Cannot set interface flags on '%s'"), + _("Cannot set interface flags on '%1$s'"), ifname); return -1; } @@ -629,7 +629,7 @@ virNetDevSetIFFlag(const char *ifname, bool val G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Cannot set interface flags on '%s'"), + _("Cannot set interface flags on '%1$s'"), ifname); return -1; } @@ -720,7 +720,7 @@ virNetDevGetIFFlag(const char *ifname, int flag, bool *= val) =20 if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) { virReportSystemError(errno, - _("Cannot get interface flags on '%s'"), + _("Cannot get interface flags on '%1$s'"), ifname); return -1; } @@ -735,7 +735,7 @@ virNetDevGetIFFlag(const char *ifname, bool *val G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Cannot get interface flags on '%s'"), + _("Cannot get interface flags on '%1$s'"), ifname); return -1; } @@ -818,7 +818,7 @@ char *virNetDevGetName(int ifindex) =20 if (!if_indextoname(ifindex, name)) { virReportSystemError(errno, - _("Failed to convert interface index %d to a = name"), + _("Failed to convert interface index %1$d to = a name"), ifindex); return NULL; } @@ -829,7 +829,7 @@ char *virNetDevGetName(int ifindex) char *virNetDevGetName(int ifindex) { virReportSystemError(ENOSYS, - _("Cannot get interface name for index '%i'"), + _("Cannot get interface name for index '%1$i'"), ifindex); return NULL; } @@ -860,14 +860,14 @@ int virNetDevGetIndex(const char *ifname, int *ifinde= x) =20 if (virStrcpyStatic(ifreq.ifr_name, ifname) < 0) { virReportSystemError(ERANGE, - _("invalid interface name %s"), + _("invalid interface name %1$s"), ifname); return -1; } =20 if (ioctl(fd, SIOCGIFINDEX, &ifreq) < 0) { virReportSystemError(errno, - _("Unable to get index for interface %s"), if= name); + _("Unable to get index for interface %1$s"), = ifname); return -1; } =20 @@ -973,14 +973,14 @@ int virNetDevGetVLanID(const char *ifname, int *vlani= d) =20 if (virStrcpyStatic(vlanargs.device1, ifname) < 0) { virReportSystemError(ERANGE, - _("invalid interface name %s"), + _("invalid interface name %1$s"), ifname); return -1; } =20 if (ioctl(fd, SIOCGIFVLAN, &vlanargs) !=3D 0) { virReportSystemError(errno, - _("Unable to get VLAN for interface %s"), ifn= ame); + _("Unable to get VLAN for interface %1$s"), i= fname); return -1; } =20 @@ -1033,7 +1033,7 @@ int virNetDevValidateConfig(const char *ifname, return 0; =20 virReportSystemError(errno, - _("could not get MAC address of interface= %s"), + _("could not get MAC address of interface= %1$s"), ifname); return -1; } @@ -1110,7 +1110,7 @@ virNetDevIsPCIDevice(const char *devpath) =20 if (virFileResolveLink(subsys_link, &abs_path) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to resolve device subsystem symlink %s"), + _("Unable to resolve device subsystem symlink %1$s"= ), subsys_link); return false; } @@ -1371,7 +1371,7 @@ virNetDevGetVirtualFunctionInfo(const char *vfname, c= har **pfname, * VFINFO does. */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("The PF device for VF %s has no network device na= me, cannot get virtual function info"), + _("The PF device for VF %1$s has no network device = name, cannot get virtual function info"), vfname); return -1; } @@ -1596,7 +1596,7 @@ virNetDevSetVfVlan(const char *ifname, if (vlanid) { /* VLAN ids 0 and 4095 are reserved per 802.1Q but are valid value= s. */ if ((*vlanid < 0 || *vlanid > 4095)) { - virReportError(ERANGE, _("vlanid out of range: %d"), *vlanid); + virReportError(ERANGE, _("vlanid out of range: %1$d"), *vlanid= ); return -ERANGE; } ifla_vf_vlan.vlan =3D *vlanid; @@ -1615,7 +1615,7 @@ virNetDevSetVfVlan(const char *ifname, ret =3D 0; } else if (ret < 0) { virReportSystemError(-ret, - _("Cannot set interface vlanid to %d for ifna= me %s vf %d"), + _("Cannot set interface vlanid to %1$d for if= name %2$s vf %3$d"), ifla_vf_vlan.vlan, ifname ? ifname : "(unspec= ified)", vf); } =20 @@ -1638,7 +1638,7 @@ virNetDevSetVfMac(const char *ifname, int vf, =20 if (macaddr =3D=3D NULL || allowRetry =3D=3D NULL) { virReportError(EINVAL, - _("Invalid parameters macaddr=3D%p allowRetry=3D%p"= ), + _("Invalid parameters macaddr=3D%1$p allowRetry=3D%= 2$p"), macaddr, allowRetry); return -EINVAL; } @@ -1654,7 +1654,7 @@ virNetDevSetVfMac(const char *ifname, int vf, } else if (ret < 0) { /* other errors are permanent */ virReportSystemError(-ret, - _("Cannot set interface MAC to %s for ifname = %s vf %d"), + _("Cannot set interface MAC to %1$s for ifnam= e %2$s vf %3$d"), macaddr ? virMacAddrFormat(macaddr, macstr) := "(unchanged)", ifname ? ifname : "(unspecified)", vf); @@ -1761,8 +1761,8 @@ virNetDevParseVfInfo(struct nlattr **tb, int32_t vf, = virMacAddr *mac, } if (rc < 0) virReportError(VIR_ERR_INTERNAL_ERROR, - _("couldn't find IFLA_VF_INFO for VF %d " - "in netlink response"), vf); + _("couldn't find IFLA_VF_INFO for VF %1$d in netlin= k response"), + vf); return rc; } =20 @@ -1803,7 +1803,7 @@ virNetDevVFInterfaceStats(virPCIDeviceAddress *vfAddr, return -1; =20 if (!virPCIIsVirtualFunction(vfSysfsPath)) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("'%s' is not a VF device"= ), vfSysfsPath); + virReportError(VIR_ERR_INTERNAL_ERROR, _("'%1$s' is not a VF devic= e"), vfSysfsPath); return -1; } =20 @@ -1921,10 +1921,7 @@ virNetDevSaveNetConfig(const char *linkdev, int vf, =20 if (!pfIsOnline) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to configure VF %d of PF '%s' " - "because the PF is not online. Please " - "change host network config to put the " - "PF online."), + _("Unable to configure VF %1$d of PF '%2$s' bec= ause the PF is not online. Please change host network config to put the PF = online."), vf, pfDevName); return -1; } @@ -1973,8 +1970,9 @@ virNetDevSaveNetConfig(const char *linkdev, int vf, return -1; =20 if (virFileWriteStr(filePath, fileStr, 0600) < 0) { - virReportSystemError(errno, _("Unable to preserve mac/vlan tag " - "for device =3D %s, vf =3D %d"), lin= kdev, vf); + virReportSystemError(errno, + _("Unable to preserve mac/vlan tag for device= =3D %1$s, vf =3D %2$d"), + linkdev, vf); return -1; } =20 @@ -2097,7 +2095,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, if ((virStrToLong_i(vlanStr, &endptr, 10, &vlanTag) < 0) || (endptr && *endptr !=3D '\n' && *endptr !=3D 0)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse vlan tag '%s' from file '%s= '"), + _("cannot parse vlan tag '%1$s' from file '= %2$s'"), vlanStr, filePath); goto cleanup; } @@ -2112,8 +2110,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, */ if (!(configJSON =3D virJSONValueFromString(fileStr))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid json in net device saved " - "config file '%s': '%.60s'"), + _("invalid json in net device saved config file= '%1$s': '%2$.60s'"), filePath, fileStr); goto cleanup; } @@ -2128,9 +2125,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, =20 if (!(MACStr || adminMACStr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network device saved config file '%s' " - "has unexpected contents, missing both " - "'MAC' and 'adminMAC': '%.60s'"), + _("network device saved config file '%1$s' has = unexpected contents, missing both 'MAC' and 'adminMAC': '%2$.60s'"), filePath, fileStr); goto cleanup; } @@ -2141,7 +2136,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, =20 if (virMacAddrParse(MACStr, *MAC) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse MAC address '%s' from file '%s'= "), + _("cannot parse MAC address '%1$s' from file '%= 2$s'"), MACStr, filePath); goto cleanup; } @@ -2152,7 +2147,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, =20 if (virMacAddrParse(adminMACStr, *adminMAC) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot parse MAC address '%s' from file '%s'= "), + _("cannot parse MAC address '%1$s' from file '%= 2$s'"), adminMACStr, filePath); goto cleanup; } @@ -2241,15 +2236,15 @@ virNetDevSetNetConfig(const char *linkdev, int vf, */ if (adminMAC) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("admin MAC can only be set for SR-IOV VFs, bu= t " - "%s is not a VF"), linkdev); + _("admin MAC can only be set for SR-IOV VFs, bu= t %1$s is not a VF"), + linkdev); return -1; } =20 if (vlan) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vlan can only be set for SR-IOV VFs, but " - "%s is not a VF"), linkdev); + _("vlan can only be set for SR-IOV VFs, but %1$= s is not a VF"), + linkdev); return -1; } =20 @@ -2264,8 +2259,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf, =20 if (!setVlan) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("vlan tag set for interface %s but " - "caller requested it not be set")); + _("vlan tag set for interface %1$s but call= er requested it not be set")); return -1; } =20 @@ -2288,8 +2282,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf, =20 if (!linkdev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VF %d of PF '%s' is not bound to a net drive= r, " - "so its MAC address cannot be set to %s"), + _("VF %1$d of PF '%2$s' is not bound to a net d= river, so its MAC address cannot be set to %3$s"), vf, pfDevName, virMacAddrFormat(MAC, MACStr)); return -1; } @@ -2545,14 +2538,14 @@ virNetDevGetLinkInfo(const char *ifname, =20 if (virFileReadAll(path, 1024, &buf) < 0) { virReportSystemError(errno, - _("unable to read: %s"), + _("unable to read: %1$s"), path); return -1; } =20 if (!(tmp =3D strchr(buf, '\n'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse: %s"), + _("Unable to parse: %1$s"), buf); return -1; } @@ -2563,7 +2556,7 @@ virNetDevGetLinkInfo(const char *ifname, * virInterfaceState enum starts from 1. */ if ((tmp_state =3D virNetDevIfStateTypeFromString(buf)) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse: %s"), + _("Unable to parse: %1$s"), buf); return -1; } @@ -2590,7 +2583,7 @@ virNetDevGetLinkInfo(const char *ifname, if (errno =3D=3D EINVAL) return 0; virReportSystemError(errno, - _("unable to read: %s"), + _("unable to read: %1$s"), path); return -1; } @@ -2598,7 +2591,7 @@ virNetDevGetLinkInfo(const char *ifname, if (virStrToLong_ui(buf, &tmp, 10, &tmp_speed) < 0 || *tmp !=3D '\n') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse: %s"), + _("Unable to parse: %1$s"), buf); return -1; } @@ -2650,7 +2643,7 @@ int virNetDevAddMulti(const char *ifname, if (ioctl(fd, SIOCADDMULTI, &ifr) < 0) { char macstr[VIR_MAC_STRING_BUFLEN]; virReportSystemError(errno, - _("Cannot add multicast MAC %s on '%s' interf= ace"), + _("Cannot add multicast MAC %1$s on '%2$s' in= terface"), virMacAddrFormat(macaddr, macstr), ifname); return -1; } @@ -2695,7 +2688,7 @@ int virNetDevDelMulti(const char *ifname, if (ioctl(fd, SIOCDELMULTI, &ifr) < 0) { char macstr[VIR_MAC_STRING_BUFLEN]; virReportSystemError(errno, - _("Cannot add multicast MAC %s on '%s' interf= ace"), + _("Cannot add multicast MAC %1$s on '%2$s' in= terface"), virMacAddrFormat(macaddr, macstr), ifname); return -1; } @@ -2728,7 +2721,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) =20 if (token =3D=3D NULL) { virReportSystemError(EINVAL, - _("failed to parse multicast address from= '%s'"), + _("failed to parse multicast address from= '%1$s'"), buf); return -1; } @@ -2737,7 +2730,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) case VIR_MCAST_TYPE_INDEX_TOKEN: if (virStrToLong_i(token, &endptr, 10, &num) < 0) { virReportSystemError(EINVAL, - _("Failed to parse interface inde= x from '%s'"), + _("Failed to parse interface inde= x from '%1$s'"), buf); return -1; =20 @@ -2747,7 +2740,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) case VIR_MCAST_TYPE_NAME_TOKEN: if (virStrcpy(mcast->name, token, VIR_MCAST_NAME_LEN) < 0)= { virReportSystemError(EINVAL, - _("Failed to parse network device= name from '%s'"), + _("Failed to parse network device= name from '%1$s'"), buf); return -1; } @@ -2755,7 +2748,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) case VIR_MCAST_TYPE_USERS_TOKEN: if (virStrToLong_i(token, &endptr, 10, &num) < 0) { virReportSystemError(EINVAL, - _("Failed to parse users from '%s= '"), + _("Failed to parse users from '%1= $s'"), buf); return -1; =20 @@ -2765,7 +2758,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) case VIR_MCAST_TYPE_GLOBAL_TOKEN: if (virStrToLong_i(token, &endptr, 10, &num) < 0) { virReportSystemError(EINVAL, - _("Failed to parse users from '%s= '"), + _("Failed to parse users from '%1= $s'"), buf); return -1; =20 @@ -2776,7 +2769,7 @@ static int virNetDevParseMcast(char *buf, virNetDevMc= astEntry *mcast) if (virMacAddrParseHex((const char*)token, &mcast->macaddr) < 0) { virReportSystemError(EINVAL, - _("Failed to parse MAC address fr= om '%s'"), + _("Failed to parse MAC address fr= om '%1$s'"), buf); } break; @@ -3031,7 +3024,7 @@ virNetDevSendEthtoolIoctl(const char *ifname, int fd,= struct ifreq *ifr) VIR_DEBUG("ethtool ioctl: request not supported on %s", ifname= ); break; default: - virReportSystemError(errno, _("ethtool ioctl error on %s"), if= name); + virReportSystemError(errno, _("ethtool ioctl error on %1$s"), = ifname); break; } } @@ -3361,7 +3354,7 @@ int virNetDevSetCoalesce(const char *ifname, =20 if (virNetDevSendEthtoolIoctl(ifname, fd, &ifr) < 0) { virReportSystemError(errno, - _("Cannot set coalesce info on '%s'"), + _("Cannot set coalesce info on '%1$s'"), ifname); return -1; } @@ -3454,7 +3447,7 @@ int virNetDevSetCoalesce(const char *ifname, return 0; =20 virReportSystemError(ENOSYS, - _("Cannot set coalesce info on interface '%s'"), + _("Cannot set coalesce info on interface '%1$s'"), ifname); return -1; } @@ -3595,7 +3588,7 @@ virNetDevGenerateName(char **ifname, virNetDevGenName= Type type) } while (++attempts < 10000); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("no unused %s names available"), + _("no unused %1$s names available"), prefix); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464696; cv=none; d=zohomail.com; s=zohoarc; b=EndCdtKMseyHlCnyG/YkrmmfDh7PKxTQQX/7Huaxm+KzbkX38XFy3m1MlRofJcMSdr5Ml4Tx6fEj42OEzVQq2wfjyuxB5bHt6ZttBBhI6EB/FsBwEzHo8KxSeLNueiqZHePxLp4gIuv0iiC4fFgDLQ4jUICEhIfZdqbwmpE7Ae0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464696; 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=+sPG9NCTvvrVXs12dm+UCUpGLTeow9kBHupjP1RRDoI=; b=Wn2jhQStkFd5BMoIyoVzgSx6zL9tIEhE1iz2oWx+xtFSzanStgEIsvRVTtpNAki2yqa9Qe3nt9YDFFPnfXTeWz7RC4hBDzav4DLt/tXt8iHCTJjovItTQfaFSUhdTENH4WFDfPevMjapt2u4K6JiEWMra6B4Mv5L1ZRQ1/43NHg= 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 1678464696449538.7668021285803; Fri, 10 Mar 2023 08:11:36 -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-197-5_oWMLFzPEaa2jQ9qkWMPg-1; Fri, 10 Mar 2023 11:11:29 -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 64345887408; Fri, 10 Mar 2023 16:11:09 +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 442571121315; Fri, 10 Mar 2023 16:11:09 +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 336F61946A54; Fri, 10 Mar 2023 16:11:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D81A51946A6F for ; Fri, 10 Mar 2023 16:11:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CA88A140EBF6; Fri, 10 Mar 2023 16:11:07 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1988D140EBF4 for ; Fri, 10 Mar 2023 16:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464695; 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=+sPG9NCTvvrVXs12dm+UCUpGLTeow9kBHupjP1RRDoI=; b=XKIjQhN6ggdtPmk5cexxWkq/SkoicQZizn2vj+fcbBob50XqpIcxuOdEiLCvY6HEXgFULl fNdbh/8twNy/O9+S1hjmCojegZzrFJxdYrvmNyFD+V8GWNV/tCgY8P9p/CFn8qwDdb1j9r VS2WNMv7DuVJkyCPW5eiqlk+waYvrMo= X-MC-Unique: 5_oWMLFzPEaa2jQ9qkWMPg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 42/51] util: Update format strings in translated messages (part 3) Date: Fri, 10 Mar 2023 17:09:58 +0100 Message-Id: <5841220ac727cd7fd6e63f2d94c3ef1f34bfc88c.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1678464697289100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/util/virnetdevbandwidth.c | 7 +- src/util/virnetdevbridge.c | 64 +++++++++--------- src/util/virnetdevip.c | 28 ++++---- src/util/virnetdevmacvlan.c | 4 +- src/util/virnetdevmidonet.c | 4 +- src/util/virnetdevopenvswitch.c | 28 ++++---- src/util/virnetdevtap.c | 24 +++---- src/util/virnetdevveth.c | 4 +- src/util/virnetdevvportprofile.c | 39 +++++------ src/util/virnetlink.c | 14 ++-- src/util/virnodesuspend.c | 2 +- src/util/virnuma.c | 26 ++++---- src/util/virnvme.c | 6 +- src/util/virobject.c | 6 +- src/util/virpci.c | 108 ++++++++++++++----------------- src/util/virperf.c | 8 +-- src/util/virpidfile.c | 14 ++-- src/util/virpolkit.c | 2 +- src/util/virportallocator.c | 10 +-- src/util/virprocess.c | 61 ++++++++--------- src/util/virrandom.c | 2 +- src/util/virresctrl.c | 86 +++++++++++------------- src/util/virrotatingfile.c | 30 ++++----- src/util/virscsi.c | 6 +- src/util/virscsihost.c | 7 +- src/util/virscsivhost.c | 6 +- src/util/virsecret.c | 5 +- src/util/virsocketaddr.c | 51 ++++++--------- src/util/virstoragefile.c | 2 +- src/util/virstring.c | 8 +-- src/util/virsysinfo.c | 16 ++--- src/util/virsystemd.c | 2 +- src/util/virthreadjob.c | 4 +- src/util/virtpm.c | 10 +-- src/util/virtypedparam-public.c | 25 +++---- src/util/virtypedparam.c | 29 ++++----- src/util/viruri.c | 11 ++-- src/util/virusb.c | 16 ++--- src/util/virutil.c | 35 +++++----- src/util/virvhba.c | 7 +- src/util/virxml.c | 72 ++++++++++----------- 41 files changed, 415 insertions(+), 474 deletions(-) diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index e67cbd164d..52fb94a9fc 100644 --- a/src/util/virnetdevbandwidth.c +++ b/src/util/virnetdevbandwidth.c @@ -548,7 +548,7 @@ virNetDevBandwidthPlug(const char *brname, char ifmacStr[VIR_MAC_STRING_BUFLEN]; =20 if (id <=3D 2) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid class ID %d"), i= d); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid class ID %1$d"),= id); return -1; } =20 @@ -556,8 +556,7 @@ virNetDevBandwidthPlug(const char *brname, =20 if (!net_bandwidth || !net_bandwidth->in) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Bridge '%s' has no QoS set, therefore " - "unable to set 'floor' on '%s'"), + _("Bridge '%1$s' has no QoS set, therefore unable t= o set 'floor' on '%2$s'"), brname, ifmacStr); return -1; } @@ -613,7 +612,7 @@ virNetDevBandwidthUnplug(const char *brname, g_autofree char *qdisc_id =3D NULL; =20 if (id <=3D 2) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid class ID %d"), i= d); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid class ID %1$d"),= id); return -1; } =20 diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index f1a1c7f509..b870e26e5f 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -70,7 +70,7 @@ static int virNetDevBridgeCmd(const char *brname, =20 if (virStrcpyStatic(ifd.ifd_name, brname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too long"), + _("Network interface name '%1$s' is too long"), brname); return -1; } @@ -117,7 +117,7 @@ static int virNetDevBridgeSet(const char *brname, paramid =3D BRCTL_SET_BRIDGE_FORWARD_DELAY; } else { virReportSystemError(EINVAL, - _("Unable to set bridge %s %s via ioctl"), + _("Unable to set bridge %1$s %2$s via ioctl"), brname, paramname); return -1; } @@ -126,7 +126,7 @@ static int virNetDevBridgeSet(const char *brname, ifr->ifr_data =3D (char*)&args; if (ioctl(fd, SIOCDEVPRIVATE, ifr) < 0) { virReportSystemError(errno, - _("Failed to set bridge %s %s via ioctl"), + _("Failed to set bridge %1$s %2$s via ioctl"), brname, paramname); return -1; } @@ -154,7 +154,7 @@ static int virNetDevBridgeGet(const char *brname, =20 if (virStrToLong_ul(valuestr, NULL, 10, value) < 0) { virReportSystemError(EINVAL, - _("Unable to get bridge %s %s"), + _("Unable to get bridge %1$s %2$s"), brname, paramname); return -1; } @@ -168,7 +168,7 @@ static int virNetDevBridgeGet(const char *brname, ifr.ifr_data =3D (char*)&args; if (ioctl(fd, SIOCDEVPRIVATE, ifr) < 0) { virReportSystemError(errno, - _("Unable to get bridge %s %s"), brname, = paramname); + _("Unable to get bridge %1$s %2$s"), brna= me, paramname); return -1; } =20 @@ -178,7 +178,7 @@ static int virNetDevBridgeGet(const char *brname, *value =3D info.forward_delay; } else { virReportSystemError(EINVAL, - _("Unable to get bridge %s %s"), brname, = paramname); + _("Unable to get bridge %1$s %2$s"), brna= me, paramname); return -1; } } @@ -210,7 +210,7 @@ virNetDevBridgePortSet(const char *brname, =20 if (ret < 0) { virReportSystemError(errno, - _("Unable to set bridge %s port %s %s to %s"), + _("Unable to set bridge %1$s port %2$s %3$s t= o %4$s"), brname, ifname, paramname, valuestr); } =20 @@ -235,7 +235,7 @@ virNetDevBridgePortGet(const char *brname, =20 if (virStrToLong_ul(valuestr, NULL, 10, value) < 0) { virReportSystemError(EINVAL, - _("Unable to get bridge %s port %s %s"), + _("Unable to get bridge %1$s port %2$s %3$s"), brname, ifname, paramname); return -1; } @@ -404,7 +404,7 @@ virNetDevBridgeCreateWithIoctl(const char *brname, =20 if (ioctl(fd, SIOCBRADDBR, brname) < 0) { virReportSystemError(errno, - _("Unable to create bridge %s"), brname); + _("Unable to create bridge %1$s"), brname); return -1; } =20 @@ -441,7 +441,7 @@ virNetDevBridgeCreate(const char *brname, } # endif if (error < 0) - virReportSystemError(-error, _("error creating bridge interfac= e %s"), + virReportSystemError(-error, _("error creating bridge interfac= e %1$s"), brname); =20 return -1; @@ -497,7 +497,7 @@ virNetDevBridgeCreate(const char *brname, const virMacAddr *mac G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to create bridge %s"), brname); + _("Unable to create bridge %1$s"), brname); return -1; } #endif @@ -523,7 +523,7 @@ virNetDevBridgeDeleteWithIoctl(const char *brname) =20 if (ioctl(fd, SIOCBRDELBR, brname) < 0) { virReportSystemError(errno, - _("Unable to delete bridge %s"), brname); + _("Unable to delete bridge %1$s"), brname); return -1; } =20 @@ -568,7 +568,7 @@ virNetDevBridgeDelete(const char *brname) =20 if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) { virReportSystemError(errno, - _("Unable to remove bridge %s"), + _("Unable to remove bridge %1$s"), brname); return -1; } @@ -579,7 +579,7 @@ virNetDevBridgeDelete(const char *brname) int virNetDevBridgeDelete(const char *brname G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to delete bridge %s"), brname); + _("Unable to delete bridge %1$s"), brname); return EINVAL; } #endif @@ -605,13 +605,13 @@ int virNetDevBridgeAddPort(const char *brname, =20 if (!(ifr.ifr_ifindex =3D if_nametoindex(ifname))) { virReportSystemError(ENODEV, - _("Unable to get interface index for %s"), if= name); + _("Unable to get interface index for %1$s"), = ifname); return -1; } =20 if (ioctl(fd, SIOCBRADDIF, &ifr) < 0) { virReportSystemError(errno, - _("Unable to add bridge %s port %s"), brname,= ifname); + _("Unable to add bridge %1$s port %2$s"), brn= ame, ifname); return -1; } =20 @@ -626,14 +626,14 @@ int virNetDevBridgeAddPort(const char *brname, memset(&req, 0, sizeof(req)); if (virStrcpyStatic(req.ifbr_ifsname, ifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too long"), + _("Network interface name '%1$s' is too long"= ), ifname); return -1; } =20 if (virNetDevBridgeCmd(brname, BRDGADD, &req, sizeof(req)) < 0) { virReportSystemError(errno, - _("Unable to add bridge %s port %s"), brname,= ifname); + _("Unable to add bridge %1$s port %2$s"), brn= ame, ifname); return -1; } =20 @@ -644,7 +644,7 @@ int virNetDevBridgeAddPort(const char *brname, const char *ifname) { virReportSystemError(ENOSYS, - _("Unable to add bridge %s port %s"), brname, ifn= ame); + _("Unable to add bridge %1$s port %2$s"), brname,= ifname); return -1; } #endif @@ -670,14 +670,14 @@ int virNetDevBridgeRemovePort(const char *brname, =20 if (!(ifr.ifr_ifindex =3D if_nametoindex(ifname))) { virReportSystemError(ENODEV, - _("Unable to get interface index for %s"), if= name); + _("Unable to get interface index for %1$s"), = ifname); =20 return -1; } =20 if (ioctl(fd, SIOCBRDELIF, &ifr) < 0) { virReportSystemError(errno, - _("Unable to remove bridge %s port %s"), brna= me, ifname); + _("Unable to remove bridge %1$s port %2$s"), = brname, ifname); return -1; } =20 @@ -692,14 +692,14 @@ int virNetDevBridgeRemovePort(const char *brname, memset(&req, 0, sizeof(req)); if (virStrcpyStatic(req.ifbr_ifsname, ifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too long"), + _("Network interface name '%1$s' is too long"= ), ifname); return -1; } =20 if (virNetDevBridgeCmd(brname, BRDGDEL, &req, sizeof(req)) < 0) { virReportSystemError(errno, - _("Unable to remove bridge %s port %s"), brna= me, ifname); + _("Unable to remove bridge %1$s port %2$s"), = brname, ifname); return -1; } =20 @@ -710,7 +710,7 @@ int virNetDevBridgeRemovePort(const char *brname, const char *ifname) { virReportSystemError(ENOSYS, - _("Unable to remove bridge %s port %s"), brname, = ifname); + _("Unable to remove bridge %1$s port %2$s"), brna= me, ifname); return -1; } #endif @@ -823,7 +823,7 @@ int virNetDevBridgeSetSTPDelay(const char *brname, =20 if (virNetDevBridgeCmd(brname, BRDGSFD, ¶m, sizeof(param)) < 0) { virReportSystemError(errno, - _("Unable to set STP delay on %s"), brname); + _("Unable to set STP delay on %1$s"), brname); return -1; } =20 @@ -833,7 +833,7 @@ int virNetDevBridgeGetSTPDelay(const char *brname, int *delay G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to get STP delay on %s on this platform= "), + _("Unable to get STP delay on %1$s on this platfo= rm"), brname); return -1; } @@ -850,7 +850,7 @@ int virNetDevBridgeGetSTP(const char *brname, bool *enable G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to get STP on %s on this platform"), + _("Unable to get STP on %1$s on this platform"), brname); return -1; } @@ -859,7 +859,7 @@ int virNetDevBridgeSetSTPDelay(const char *brname, int delay G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to set STP delay on %s on this platform= "), + _("Unable to set STP delay on %1$s on this platfo= rm"), brname); return -1; } @@ -867,7 +867,7 @@ int virNetDevBridgeGetSTPDelay(const char *brname, int *delay G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to get STP delay on %s on this platform= "), + _("Unable to get STP delay on %1$s on this platfo= rm"), brname); return -1; } @@ -877,7 +877,7 @@ int virNetDevBridgeSetSTP(const char *brname, =20 { virReportSystemError(ENOSYS, - _("Unable to set STP on %s on this platform"), + _("Unable to set STP on %1$s on this platform"), brname); return -1; } @@ -885,7 +885,7 @@ int virNetDevBridgeGetSTP(const char *brname, bool *enable G_GNUC_UNUSED) { virReportSystemError(ENOSYS, - _("Unable to get STP on %s on this platform"), + _("Unable to get STP on %1$s on this platform"), brname); return -1; } @@ -1047,7 +1047,7 @@ virNetDevBridgeFDBAddDel(const virMacAddr *mac, const= char *ifname, VIR_DEBUG("fdb entry for %s already exists", ifname); } else { virReportSystemError(-err->error, - _("error adding fdb entry for %s"), i= fname); + _("error adding fdb entry for %1$s"),= ifname); return -1; } } diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 034b392ee7..d1e717641c 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -181,7 +181,7 @@ virNetDevIPAddrAdd(const char *ifname, =20 if (virSocketAddrBroadcastByPrefix(addr, prefix, broadcast) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to determine broadcast address for '%= s/%d'"), + _("Failed to determine broadcast address for '%= 1$s/%2$d'"), ipStr, prefix); return -1; } @@ -206,7 +206,7 @@ virNetDevIPAddrAdd(const char *ifname, =20 if (virNetlinkGetErrorCode(resp, recvbuflen) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to add IP address %s/%d%s%s%s%s to %s"), + _("Failed to add IP address %1$s/%2$d%3$s%4$s%5$s%6= $s to %7$s"), ipStr, prefix, peerStr ? " peer " : "", peerStr ? peerStr : "", bcastStr ? " bcast " : "", bcastStr ? bcastStr : "", @@ -248,7 +248,7 @@ virNetDevIPAddrDel(const char *ifname, =20 if (virNetlinkGetErrorCode(resp, recvbuflen) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Error removing IP address from %s"), ifname); + _("Error removing IP address from %1$s"), ifname); return -1; } =20 @@ -352,7 +352,7 @@ virNetDevIPRouteAdd(const char *ifname, return -1; =20 if ((errCode =3D virNetlinkGetErrorCode(resp, recvbuflen)) < 0) { - virReportSystemError(errCode, _("Error adding route to %s"), ifnam= e); + virReportSystemError(errCode, _("Error adding route to %1$s"), ifn= ame); return -1; } =20 @@ -538,8 +538,8 @@ virNetDevIPCheckIPv6Forwarding(void) if ((len =3D virFileReadAll(PROC_NET_IPV6_ROUTE, MAX_ROUTE_SIZE, &buf)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to read %s " - "for ipv6 forwarding checks"), PROC_NET_IPV6_ROUT= E); + _("Unable to read %1$s for ipv6 forwarding checks"), + PROC_NET_IPV6_ROUTE); return false; } =20 @@ -592,10 +592,8 @@ virNetDevIPCheckIPv6Forwarding(void) */ if (ret =3D=3D 1 || (ret =3D=3D 0 && all_accept_ra =3D=3D 1)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Check the host setup: interface %s has k= ernel " - "autoconfigured IPv6 routes and enabling = forwarding " - " without accept_ra set to 2 will cause t= he kernel " - "to flush them, breaking networking."), i= face_val); + _("Check the host setup: interface %1$s has= kernel autoconfigured IPv6 routes and enabling forwarding without accept_r= a set to 2 will cause the kernel to flush them, breaking networking."), + iface_val); return false; } } @@ -638,7 +636,7 @@ virNetDevGetIPv4AddressIoctl(const char *ifname, =20 if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0) { virReportSystemError(errno, - _("Unable to get IPv4 address for interface %= s via ioctl"), + _("Unable to get IPv4 address for interface %= 1$s via ioctl"), ifname); goto cleanup; } @@ -684,7 +682,7 @@ virNetDevGetifaddrsAddress(const char *ifname, =20 if (getifaddrs(&ifap) < 0) { virReportSystemError(errno, - _("Could not get interface list for '%s'"), + _("Could not get interface list for '%1$s'"), ifname); return -1; } @@ -714,7 +712,7 @@ virNetDevGetifaddrsAddress(const char *ifname, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("no IP address found for interface '%s'"), + _("no IP address found for interface '%1$s'"), ifname); cleanup: freeifaddrs(ifap); @@ -875,7 +873,7 @@ virNetDevIPInfoAddToDev(const char *ifname, NULL, ip->prefix)) < 0) { ipStr =3D virSocketAddrFormat(&ip->address); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to determine prefix for IP address '%= s'"), + _("Failed to determine prefix for IP address '%= 1$s'"), NULLSTR(ipStr)); return -1; } @@ -890,7 +888,7 @@ virNetDevIPInfoAddToDev(const char *ifname, if ((prefix =3D virNetDevIPRouteGetPrefix(route)) < 0) { ipStr =3D virSocketAddrFormat(&route->address); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to determine prefix for route with de= stination '%s'"), + _("Failed to determine prefix for route with de= stination '%1$s'"), NULLSTR(ipStr)); return -1; } diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 94968a8b4d..db5f41bae8 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -113,7 +113,7 @@ virNetDevMacVLanCreate(const char *ifname, char macstr[VIR_MAC_STRING_BUFLEN]; =20 virReportSystemError(-error, - _("error creating %s interface %s@%s (%s)"), + _("error creating %1$s interface %2$s@%3$s (%= 4$s)"), type, ifname, srcdev, virMacAddrFormat(macaddress, macstr)); return -1; @@ -177,7 +177,7 @@ virNetDevMacVLanTapOpen(const char *ifname, } else { /* However, if haven't succeeded, quit. */ virReportSystemError(errno, - _("cannot open macvtap tap device %s"= ), + _("cannot open macvtap tap device %1$= s"), tapname); goto cleanup; } diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c index 202808ef0f..7a285d2bab 100644 --- a/src/util/virnetdevmidonet.c +++ b/src/util/virnetdevmidonet.c @@ -49,7 +49,7 @@ virNetDevMidonetBindPort(const char *ifname, =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to bind port %s to the virtual port %s"), + _("Unable to bind port %1$s to the virtual port %2$= s"), ifname, virtportuuid); return -1; } @@ -78,7 +78,7 @@ virNetDevMidonetUnbindPort(const virNetDevVPortProfile *v= irtualport) =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to unbind the virtual port %s from Midone= t"), + _("Unable to unbind the virtual port %1$s from Mido= net"), virtportuuid); return -1; } diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 7418716600..dbdd645f8e 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -185,7 +185,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, con= st char *ifname, =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to add port %s to OVS bridge %s"), + _("Unable to add port %1$s to OVS bridge %2$s"), ifname, brname); return -1; } @@ -209,7 +209,7 @@ int virNetDevOpenvswitchRemovePort(const char *brname G= _GNUC_UNUSED, const char =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to delete port %s from OVS"), ifname); + _("Unable to delete port %1$s from OVS"), ifname); return -1; } =20 @@ -238,8 +238,8 @@ int virNetDevOpenvswitchGetMigrateData(char **migrate, = const char *ifname) /* Run the command */ if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to run command to get OVS port data for " - "interface %s"), ifname); + _("Unable to run command to get OVS port data for i= nterface %1$s"), + ifname); return -1; } =20 @@ -276,8 +276,8 @@ int virNetDevOpenvswitchSetMigrateData(char *migrate, c= onst char *ifname) /* Run the command */ if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to run command to set OVS port data for " - "interface %s"), ifname); + _("Unable to run command to set OVS port data for i= nterface %1$s"), + ifname); return -1; } =20 @@ -443,8 +443,8 @@ virNetDevOpenvswitchInterfaceGetMaster(const char *ifna= me, char **master) =20 if (virCommandRun(cmd, &exitstatus) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to run command to get OVS master for " - "interface %s"), ifname); + _("Unable to run command to get OVS master for inte= rface %1$s"), + ifname); return -1; } =20 @@ -614,7 +614,7 @@ int virNetDevOpenvswitchUpdateVlan(const char *ifname, =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set vlan configuration on port %s"), i= fname); + _("Unable to set vlan configuration on port %1$s"),= ifname); return -1; } =20 @@ -730,7 +730,7 @@ virNetDevOpenvswitchInterfaceClearRxQos(const char *ifn= ame) =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to reset ingress on port %s"), ifname); + _("Unable to reset ingress on port %1$s"), ifname); return -1; } =20 @@ -806,10 +806,10 @@ virNetDevOpenvswitchInterfaceSetTxQos(const char *ifn= ame, if (virCommandRun(cmd, NULL) < 0) { if (queue_uuid && *queue_uuid) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set queue configuration on port %s= "), ifname); + _("Unable to set queue configuration on port %1= $s"), ifname); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create and set qos configuration o= n port %s"), ifname); + _("Unable to create and set qos configuration o= n port %1$s"), ifname); } return -1; } @@ -829,7 +829,7 @@ virNetDevOpenvswitchInterfaceSetTxQos(const char *ifnam= e, virCommandAddArgList(qoscmd, vmid_ex_id, ifname_ex_id, NULL); if (virCommandRun(qoscmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set qos configuration on port %s")= , ifname); + _("Unable to set qos configuration on port %1$s= "), ifname); return -1; } } @@ -853,7 +853,7 @@ virNetDevOpenvswitchInterfaceSetRxQos(const char *ifnam= e, =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set vlan configuration on port %s"), i= fname); + _("Unable to set vlan configuration on port %1$s"),= ifname); return -1; } =20 diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 2101d7847c..b85b753c96 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -105,7 +105,7 @@ virNetDevTapGetRealDeviceName(char *ifname G_GNUC_UNUSE= D) =20 if ((ifindex =3D if_nametoindex(ifname)) =3D=3D 0) { virReportSystemError(errno, - _("Unable to get interface index for '%s'"), + _("Unable to get interface index for '%1$s'"), ifname); return NULL; } @@ -119,7 +119,7 @@ virNetDevTapGetRealDeviceName(char *ifname G_GNUC_UNUSE= D) =20 if (sysctl(name, 6, NULL, &len, 0, 0) < 0) { virReportSystemError(errno, - _("Unable to get driver name for '%s'"), + _("Unable to get driver name for '%1$s'"), ifname); return NULL; } @@ -128,7 +128,7 @@ virNetDevTapGetRealDeviceName(char *ifname G_GNUC_UNUSE= D) =20 if (sysctl(name, 6, ret, &len, 0, 0) < 0) { virReportSystemError(errno, - _("Unable to get driver name for '%s'"), + _("Unable to get driver name for '%1$s'"), ifname); VIR_FREE(ret); return NULL; @@ -195,7 +195,7 @@ int virNetDevTapCreate(char **ifname, return -1; } else if (rc > 0) { virReportError(VIR_ERR_OPERATION_INVALID, - _("The %s interface already exists"), + _("The %1$s interface already exists"), *ifname); return -1; } @@ -208,7 +208,7 @@ int virNetDevTapCreate(char **ifname, for (i =3D 0; i < tapfdSize; i++) { if ((fd =3D open(tunpath, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s, is tun module loade= d?"), + _("Unable to open %1$s, is tun module loa= ded?"), tunpath); goto cleanup; } @@ -225,7 +225,7 @@ int virNetDevTapCreate(char **ifname, =20 if (virStrcpyStatic(ifr.ifr_name, *ifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too lon= g"), + _("Network interface name '%1$s' is too l= ong"), *ifname); goto cleanup; =20 @@ -233,7 +233,7 @@ int virNetDevTapCreate(char **ifname, =20 if (ioctl(fd, TUNSETIFF, &ifr) < 0) { virReportSystemError(errno, - _("Unable to create tap device %s"), + _("Unable to create tap device %1$s"), NULLSTR(*ifname)); goto cleanup; } @@ -248,7 +248,7 @@ int virNetDevTapCreate(char **ifname, if ((flags & VIR_NETDEV_TAP_CREATE_PERSIST) && ioctl(fd, TUNSETPERSIST, 1) < 0) { virReportSystemError(errno, - _("Unable to set tap device %s to persist= ent"), + _("Unable to set tap device %1$s to persi= stent"), NULLSTR(*ifname)); goto cleanup; } @@ -281,7 +281,7 @@ int virNetDevTapDelete(const char *ifname, =20 if ((fd =3D open(tunpath, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s, is tun module loaded?"), + _("Unable to open %1$s, is tun module loaded?= "), tunpath); return -1; } @@ -291,7 +291,7 @@ int virNetDevTapDelete(const char *ifname, =20 if (virStrcpyStatic(try.ifr_name, ifname) < 0) { virReportSystemError(ERANGE, - _("Network interface name '%s' is too long"), + _("Network interface name '%1$s' is too long"= ), ifname); goto cleanup; } @@ -357,7 +357,7 @@ int virNetDevTapCreate(char **ifname, =20 if ((*tapfd =3D open(dev_path, O_RDWR)) < 0) { virReportSystemError(errno, - _("Unable to open %s"), + _("Unable to open %1$s"), dev_path); goto cleanup; } @@ -386,7 +386,7 @@ int virNetDevTapDelete(const char *ifname, =20 if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) { virReportSystemError(errno, - _("Unable to remove tap device %s"), + _("Unable to remove tap device %1$s"), ifname); goto cleanup; } diff --git a/src/util/virnetdevveth.c b/src/util/virnetdevveth.c index ad1f517039..4365345664 100644 --- a/src/util/virnetdevveth.c +++ b/src/util/virnetdevveth.c @@ -42,7 +42,7 @@ virNetDevVethCreateInternal(const char *veth1, const char= *veth2) if (virNetlinkNewLink(veth1, "veth", &data, &error) < 0) { if (error !=3D 0) { virReportSystemError(-error, - _("unable to create %s <-> %s veth pair"), + _("unable to create %1$s <-> %2$s veth pa= ir"), veth1, veth2); } return -1; @@ -83,7 +83,7 @@ virNetDevVethDeleteInternal(const char *veth) return 0; } virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to delete veth device %s"), veth); + _("Failed to delete veth device %1$s"), veth); return -1; } =20 diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index ae23f795b2..cf92f1838b 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -205,7 +205,7 @@ virNetDevVPortProfileCheckComplete(virNetDevVPortProfil= e *virtport, =20 if (missing) { virReportError(VIR_ERR_XML_ERROR, - _("missing %s in "), missi= ng, + _("missing %1$s in "), m= issing, virNetDevVPortTypeToString(virtport->virtPortType)); return -1; } @@ -262,7 +262,7 @@ virNetDevVPortProfileCheckNoExtras(const virNetDevVPort= Profile *virtport) =20 if (extra) { virReportError(VIR_ERR_XML_ERROR, - _("extra %s unsupported in "), + _("extra %1$s unsupported in "), extra, virNetDevVPortTypeToString(virtport->virtPortType)); return -1; @@ -290,8 +290,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, if (otype !=3D VIR_NETDEV_VPORT_PROFILE_NONE && otype !=3D mods->virtPortType) { virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports " - "with mismatched types (%s and %s)"), + _("attempt to merge virtualports with mismatche= d types (%1$s and %2$s)"), virNetDevVPortTypeToString(otype), virNetDevVPortTypeToString(mods->virtPortType)); return -1; @@ -305,8 +304,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, if (orig->managerID_specified && (orig->managerID !=3D mods->managerID)) { virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports " - "with mismatched managerids (%d and %d)"), + _("attempt to merge virtualports with mismatche= d managerids (%1$d and %2$d)"), orig->managerID, mods->managerID); return -1; } @@ -320,8 +318,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, if (orig->typeID_specified && (orig->typeID !=3D mods->typeID)) { virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports " - "with mismatched typeids (%d and %d)"), + _("attempt to merge virtualports with mismatche= d typeids (%1$d and %2$d)"), orig->typeID, mods->typeID); return -1; } @@ -335,8 +332,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, if (orig->typeIDVersion_specified && (orig->typeIDVersion !=3D mods->typeIDVersion)) { virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports with " - "mismatched typeidversions (%d and %d)"), + _("attempt to merge virtualports with mismatche= d typeidversions (%1$d and %2$d)"), orig->typeIDVersion, mods->typeIDVersion); return -1; } @@ -354,8 +350,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, char modsuuid[VIR_UUID_STRING_BUFLEN]; =20 virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports with " - "mismatched instanceids ('%s' and '%s')"), + _("attempt to merge virtualports with mismatche= d instanceids ('%1$s' and '%2$s')"), virUUIDFormat(orig->instanceID, origuuid), virUUIDFormat(mods->instanceID, modsuuid)); return -1; @@ -374,8 +369,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, char modsuuid[VIR_UUID_STRING_BUFLEN]; =20 virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports with " - "mismatched interfaceids ('%s' and '%s')"), + _("attempt to merge virtualports with mismatche= d interfaceids ('%1$s' and '%2$s')"), virUUIDFormat(orig->interfaceID, origuuid), virUUIDFormat(mods->interfaceID, modsuuid)); return -1; @@ -391,8 +385,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfile *orig, if (orig->profileID[0] && STRNEQ(orig->profileID, mods->profileID)) { virReportError(VIR_ERR_XML_ERROR, - _("attempt to merge virtualports with " - "mismatched profileids ('%s' and '%s')"), + _("attempt to merge virtualports with mismatche= d profileids ('%1$s' and '%2$s')"), orig->profileID, mods->profileID); return -1; } @@ -485,7 +478,7 @@ virNetDevVPortProfileGetLldpadPid(void) } } else { virReportSystemError(errno, - _("Error opening file %s"), LLDPAD_PID_FILE); + _("Error opening file %1$s"), LLDPAD_PID_FILE= ); } =20 VIR_FORCE_CLOSE(fd); @@ -577,8 +570,7 @@ virNetDevVPortProfileGetStatus(struct nlattr **tb, int3= 2_t vf, virUUIDFormat(instanceId, instanceIdStr); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find vf/instanceId %u/%s " - " in netlink response"), + _("Could not find vf/instanceId %1$u/%2$s i= n netlink response"), vf, instanceIdStr); =20 /* go through all the entries again. This seems tedious, @@ -812,7 +804,7 @@ virNetDevVPortProfileOpSetLink(const char *ifname, int = ifindex, =20 if (err->error) { virReportSystemError(-err->error, - _("error during virtual port configuratio= n of ifindex %d"), + _("error during virtual port configuratio= n of ifindex %1$d"), ifindex); goto cleanup; } @@ -978,8 +970,7 @@ virNetDevVPortProfileOpCommon(const char *ifname, int i= findex, /* keep trying... */ } else { virReportSystemError(EINVAL, - _("error %d during port-profile setlink o= n " - "interface %s (%d)"), + _("error %1$d during port-profile setlink= on interface %2$s (%3$d)"), status, ifname, ifindex); rc =3D -1; break; @@ -1080,7 +1071,7 @@ virNetDevVPortProfileOp8021Qbg(const char *ifname, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("operation type %d not supported"), virtPortOp); + _("operation type %1$d not supported"), virtPortOp); return -1; } =20 @@ -1189,7 +1180,7 @@ virNetDevVPortProfileOp8021Qbh(const char *ifname, =20 case VIR_NETDEV_VPORT_PROFILE_LINK_OP_PREASSOCIATE: virReportError(VIR_ERR_INTERNAL_ERROR, - _("operation type %d not supported"), virtPortOp); + _("operation type %1$d not supported"), virtPortOp); rc =3D -1; break; default: diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 98f75652e9..f18a08c277 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -218,8 +218,8 @@ virNetlinkCreateSocket(int protocol) } if (nl_connect(nlhandle, protocol) < 0) { virReportSystemError(errno, - _("cannot connect to netlink socket " - "with protocol %d"), protocol); + _("cannot connect to netlink socket with prot= ocol %1$d"), + protocol); goto error; } =20 @@ -255,7 +255,7 @@ virNetlinkSendRequest(struct nl_msg *nl_msg, uint32_t s= rc_pid, =20 if (protocol >=3D MAX_LINKS) { virReportSystemError(EINVAL, - _("invalid protocol argument: %d"), protocol); + _("invalid protocol argument: %1$d"), protoco= l); goto error; } =20 @@ -541,7 +541,7 @@ virNetlinkDumpLink(const char *ifname, int ifindex, if (virNetlinkTalk(ifname, nl_msg, src_pid, dst_pid, &resp, &resp_len, &error, NULL) < 0) { virReportSystemError(-error, - _("error dumping %s (%d) interface"), + _("error dumping %1$s (%2$d) interface"), ifname, ifindex); return -1; } @@ -692,7 +692,7 @@ virNetlinkDelLink(const char *ifname, virNetlinkTalkFal= lback fallback) if (virNetlinkTalk(ifname, nl_msg, 0, 0, &resp, &resp_len, &error, fallback) < 0) { virReportSystemError(-error, - _("error destroying network device %s"), + _("error destroying network device %1$s"), ifname); return -1; } @@ -953,7 +953,7 @@ virNetlinkEventServiceIsRunning(unsigned int protocol) { if (protocol >=3D MAX_LINKS) { virReportSystemError(EINVAL, - _("invalid protocol argument: %d"), protocol); + _("invalid protocol argument: %1$d"), protoco= l); return false; } =20 @@ -1003,7 +1003,7 @@ virNetlinkEventServiceStart(unsigned int protocol, un= signed int groups) =20 if (protocol >=3D MAX_LINKS) { virReportSystemError(EINVAL, - _("invalid protocol argument: %d"), protocol); + _("invalid protocol argument: %1$d"), protoco= l); return -EINVAL; } =20 diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index 5feef79c43..01f387d6fa 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@ -66,7 +66,7 @@ static int virNodeSuspendSetNodeWakeup(unsigned long long= alarmTime) =20 if (alarmTime < MIN_TIME_REQ_FOR_SUSPEND) { virReportError(VIR_ERR_INVALID_ARG, - _("Suspend duration is too short, must be at least = %u seconds"), + _("Suspend duration is too short, must be at least = %1$u seconds"), MIN_TIME_REQ_FOR_SUSPEND); return -1; } diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 43e299f4bb..d78fc78ac1 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -112,7 +112,7 @@ virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode, while ((bit =3D virBitmapNextSetBit(nodeset, bit)) >=3D 0) { if (bit > maxnode) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("NUMA node %d is out of range"), bit); + _("NUMA node %1$d is out of range"), bit); return -1; } nodemask_set(&mask, bit); @@ -348,7 +348,7 @@ virNumaNodesetToCPUset(virBitmap *nodeset, /* Error is reported for cases other than non-existent NUMA no= de. */ if (rc =3D=3D -2) { virReportError(VIR_ERR_OPERATION_FAILED, - _("NUMA node %zu is not available"), + _("NUMA node %1$zu is not available"), i); } return -1; @@ -568,16 +568,16 @@ virNumaGetHugePageInfoPath(char **path, if (node !=3D -1) { if (!virNumaNodeIsAvailable(node)) { virReportError(VIR_ERR_OPERATION_FAILED, - _("NUMA node %d is not available"), + _("NUMA node %1$d is not available"), node); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("page size %u is not available on node %d= "), + _("page size %1$u is not available on node = %2$d"), page_size, node); } } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("page size %u is not available"), + _("page size %1$u is not available"), page_size); } return -1; @@ -638,7 +638,7 @@ virNumaGetHugePageInfo(int node, if (virStrToLong_ull(buf, &end, 10, page_avail) < 0 || *end !=3D '\n') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse: %s"), + _("unable to parse: %1$s"), buf); return -1; } @@ -657,7 +657,7 @@ virNumaGetHugePageInfo(int node, if (virStrToLong_ull(buf, &end, 10, page_free) < 0 || *end !=3D '\n') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse: %s"), + _("unable to parse: %1$s"), buf); return -1; } @@ -809,7 +809,7 @@ virNumaGetPages(int node, if (virStrToLong_ui(page_name, &end, 10, &page_size) < 0 || STRCASENEQ(end, "kB")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse %s"), + _("unable to parse %1$s"), entry->d_name); return -1; } @@ -902,7 +902,7 @@ virNumaSetPagePoolSize(int node, if (virStrToLong_ull(nr_buf, &end, 10, &nr_count) < 0 || *end !=3D '\n') { virReportError(VIR_ERR_OPERATION_FAILED, - _("invalid number '%s' in '%s'"), + _("invalid number '%1$s' in '%2$s'"), nr_buf, nr_path); return -1; } @@ -933,7 +933,7 @@ virNumaSetPagePoolSize(int node, =20 if (virFileWriteStr(nr_path, nr_buf, 0) < 0) { virReportSystemError(errno, - _("Unable to write to: %s"), nr_path); + _("Unable to write to: %1$s"), nr_path); return -1; } =20 @@ -946,14 +946,14 @@ virNumaSetPagePoolSize(int node, if (virStrToLong_ull(nr_buf, &end, 10, &nr_count) < 0 || *end !=3D '\n') { virReportError(VIR_ERR_OPERATION_FAILED, - _("invalid number '%s' in '%s'"), + _("invalid number '%1$s' in '%2$s'"), nr_buf, nr_path); return -1; } =20 if (nr_count !=3D page_count) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to allocate %llu pages. Allocated only %l= lu"), + _("Unable to allocate %1$llu pages. Allocated only = %2$llu"), page_count, nr_count); return -1; } @@ -1014,7 +1014,7 @@ virNumaNodesetIsAvailable(virBitmap *nodeset) continue; =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("NUMA node %zd is unavailable"), bit); + _("NUMA node %1$zd is unavailable"), bit); return false; } return true; diff --git a/src/util/virnvme.c b/src/util/virnvme.c index d0f0c04aba..f7f8dc5ea9 100644 --- a/src/util/virnvme.c +++ b/src/util/virnvme.c @@ -185,7 +185,7 @@ virNVMeDeviceListAdd(virNVMeDeviceList *list, if ((tmp =3D virNVMeDeviceListLookup(list, dev))) { g_autofree char *addrStr =3D virPCIDeviceAddressAsString(&tmp->add= ress); virReportError(VIR_ERR_INTERNAL_ERROR, - _("NVMe device %s namespace %u is already on the li= st"), + _("NVMe device %1$s namespace %2$u is already on th= e list"), NULLSTR(addrStr), tmp->namespace); return -1; } @@ -209,7 +209,7 @@ virNVMeDeviceListDel(virNVMeDeviceList *list, if ((idx =3D virNVMeDeviceListLookupIndex(list, dev)) < 0) { g_autofree char *addrStr =3D virPCIDeviceAddressAsString(&dev->add= ress); virReportError(VIR_ERR_INTERNAL_ERROR, - _("NVMe device %s namespace %u not found"), + _("NVMe device %1$s namespace %2$u not found"), NULLSTR(addrStr), dev->namespace); return -1; } @@ -420,7 +420,7 @@ virNVMeDeviceListCreateReAttachList(virNVMeDeviceList *= activeList, /* Shouldn't happen (TM) */ g_autofree char *addrStr =3D virPCIDeviceAddressAsString(&d->a= ddress); virReportError(VIR_ERR_INTERNAL_ERROR, - _("NVMe device %s namespace %u not found"), + _("NVMe device %1$s namespace %2$u not found"), NULLSTR(addrStr), d->namespace); return NULL; } else if (nused > 1) { diff --git a/src/util/virobject.c b/src/util/virobject.c index b74d74a545..92af4f9fd6 100644 --- a/src/util/virobject.c +++ b/src/util/virobject.c @@ -181,7 +181,7 @@ virClassNew(virClass *parent, } else if (objectSize <=3D parentSize || parentSize !=3D (parent ? parent->objectSize : 0)) { virReportInvalidArg(objectSize, - _("object size %zu of %s is not larger than pa= rent class %zu"), + _("object size %1$zu of %2$s is not larger tha= n parent class %3$zu"), objectSize, name, parent->objectSize); return NULL; } @@ -266,7 +266,7 @@ virObjectLockableNew(virClass *klass) =20 if (!virClassIsDerivedFrom(klass, virClassForObjectLockable())) { virReportInvalidArg(klass, - _("Class %s must derive from virObjectLockable= "), + _("Class %1$s must derive from virObjectLockab= le"), virClassName(klass)); return NULL; } @@ -292,7 +292,7 @@ virObjectRWLockableNew(virClass *klass) =20 if (!virClassIsDerivedFrom(klass, virClassForObjectRWLockable())) { virReportInvalidArg(klass, - _("Class %s must derive from virObjectRWLockab= le"), + _("Class %1$s must derive from virObjectRWLock= able"), virClassName(klass)); return NULL; } diff --git a/src/util/virpci.c b/src/util/virpci.c index 7800966963..9e564e4a4f 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -252,13 +252,13 @@ virPCIDeviceGetDriverPathAndName(virPCIDevice *dev, c= har **path, char **name) =20 if (virFileIsLink(drvlink) !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid device %s driver file %s is not a symlin= k"), + _("Invalid device %1$s driver file %2$s is not a sy= mlink"), dev->name, drvlink); goto cleanup; } if (virFileResolveLink(drvlink, path) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to resolve device %s driver symlink %s"), + _("Unable to resolve device %1$s driver symlink %2$= s"), dev->name, drvlink); goto cleanup; } @@ -287,7 +287,7 @@ virPCIDeviceConfigOpenInternal(virPCIDevice *dev, bool = readonly, bool fatal) if (fd < 0) { if (fatal) { virReportSystemError(errno, - _("Failed to open config space file '%s'"= ), + _("Failed to open config space file '%1$s= '"), dev->path); } else { VIR_WARN("Failed to open config space file '%s': %s", @@ -408,7 +408,7 @@ virPCIDeviceReadClass(virPCIDevice *dev, uint16_t *devi= ce_class) id_str[8] =3D '\0'; if (virStrToLong_ui(id_str, NULL, 16, &value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unusual value in %s/devices/%s/class: %s"), + _("Unusual value in %1$s/devices/%2$s/class: %3$s"), PCI_SYSFS, dev->name, id_str); return -1; } @@ -836,7 +836,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevice *dev, */ if ((conflict =3D virPCIDeviceBusContainsActiveDevices(dev, inactiveDe= vs))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Active %s devices on bus with %s, not doing bus = reset"), + _("Active %1$s devices on bus with %2$s, not doing = bus reset"), conflict->name, dev->name); return -1; } @@ -846,7 +846,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevice *dev, return -1; if (!parent) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find parent device for %s"), + _("Failed to find parent device for %1$s"), dev->name); return -1; } @@ -861,7 +861,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevice *dev, */ if (virPCIDeviceRead(dev, cfgfd, 0, config_space, PCI_CONF_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to read PCI config space for %s"), + _("Failed to read PCI config space for %1$s"), dev->name); goto out; } @@ -882,7 +882,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevice *dev, =20 if (virPCIDeviceWrite(dev, cfgfd, 0, config_space, PCI_CONF_LEN) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to restore PCI config space for %s"), + _("Failed to restore PCI config space for %1$s"), dev->name); goto out; } @@ -909,7 +909,7 @@ virPCIDeviceTryPowerManagementReset(virPCIDevice *dev, = int cfgfd) /* Save and restore the device's config space. */ if (virPCIDeviceRead(dev, cfgfd, 0, &config_space[0], PCI_CONF_LEN) < = 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to read PCI config space for %s"), + _("Failed to read PCI config space for %1$s"), dev->name); return -1; } @@ -931,7 +931,7 @@ virPCIDeviceTryPowerManagementReset(virPCIDevice *dev, = int cfgfd) =20 if (virPCIDeviceWrite(dev, cfgfd, 0, &config_space[0], PCI_CONF_LEN) <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to restore PCI config space for %s"), + _("Failed to restore PCI config space for %1$s"), dev->name); return -1; } @@ -1015,15 +1015,14 @@ virPCIDeviceReset(virPCIDevice *dev, =20 if (hdrType !=3D VIR_PCI_HEADER_ENDPOINT) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid attempt to reset PCI device %s. " - "Only PCI endpoint devices can be reset"), + _("Invalid attempt to reset PCI device %1$s. Only P= CI endpoint devices can be reset"), dev->name); return -1; } =20 if (activeDevs && virPCIDeviceListFind(activeDevs, &dev->address)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Not resetting active device %s"), dev->name); + _("Not resetting active device %1$s"), dev->name); return -1; } =20 @@ -1071,7 +1070,7 @@ virPCIDeviceReset(virPCIDevice *dev, if (ret < 0) { virErrorPtr err =3D virGetLastError(); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to reset PCI device %s: %s"), + _("Unable to reset PCI device %1$s: %2$s"), dev->name, err ? err->message : _("no FLR, PM reset or bus reset available")); @@ -1119,12 +1118,11 @@ virPCIProbeStubDriver(virPCIStubDriver driver) */ if (virKModIsProhibited(drvname)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to load PCI stub module %s: " - "administratively prohibited"), + _("Failed to load PCI stub module %1$s: administrat= ively prohibited"), drvname); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to load PCI stub module %s"), + _("Failed to load PCI stub module %1$s"), drvname); } =20 @@ -1150,7 +1148,7 @@ virPCIDeviceUnbind(virPCIDevice *dev) if (virFileExists(path)) { if (virFileWriteStr(path, dev->name, 0) < 0) { virReportSystemError(errno, - _("Failed to unbind PCI device '%s' from = %s"), + _("Failed to unbind PCI device '%1$s' fro= m %2$s"), dev->name, driver); return -1; } @@ -1175,7 +1173,7 @@ int virPCIDeviceRebind(virPCIDevice *dev) =20 if (virFileWriteStr(PCI_SYSFS "drivers_probe", dev->name, 0) < 0) { virReportSystemError(errno, - _("Failed to trigger a probe for PCI device '= %s'"), + _("Failed to trigger a probe for PCI device '= %1$s'"), dev->name); return -1; } @@ -1205,8 +1203,7 @@ virPCIDeviceBindWithDriverOverride(virPCIDevice *dev, =20 if (virFileWriteStr(path, driverName, 0) < 0) { virReportSystemError(errno, - _("Failed to add driver '%s' to driver_overri= de " - " interface of PCI device '%s'"), + _("Failed to add driver '%1$s' to driver_over= ride interface of PCI device '%2$s'"), driverName, dev->name); return -1; } @@ -1238,12 +1235,12 @@ virPCIDeviceBindToStub(virPCIDevice *dev) /* Check the device is configured to use one of the known stub drivers= */ if (dev->stubDriver =3D=3D VIR_PCI_STUB_DRIVER_NONE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No stub driver configured for PCI device %s"), + _("No stub driver configured for PCI device %1$s"), dev->name); return -1; } else if (!(stubDriverName =3D virPCIStubDriverTypeToString(dev->stub= Driver))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown stub driver configured for PCI device %s= "), + _("Unknown stub driver configured for PCI device %1= $s"), dev->name); return -1; } @@ -1295,7 +1292,7 @@ virPCIDeviceDetach(virPCIDevice *dev, =20 if (activeDevs && virPCIDeviceListFind(activeDevs, &dev->address)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Not detaching active device %s"), dev->name); + _("Not detaching active device %1$s"), dev->name); return -1; } =20 @@ -1325,7 +1322,7 @@ virPCIDeviceReattach(virPCIDevice *dev, { if (activeDevs && virPCIDeviceListFind(activeDevs, &dev->address)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Not reattaching active device %s"), dev->name); + _("Not reattaching active device %1$s"), dev->name); return -1; } =20 @@ -1370,24 +1367,21 @@ virPCIDeviceAddressIsValid(virPCIDeviceAddress *add= r, if (addr->bus > 0xFF) { if (report) virReportError(VIR_ERR_XML_ERROR, - _("Invalid PCI address bus=3D'0x%x', " - "must be <=3D 0xFF"), + _("Invalid PCI address bus=3D'0x%1$x', must be = <=3D 0xFF"), addr->bus); return false; } if (addr->slot > 0x1F) { if (report) virReportError(VIR_ERR_XML_ERROR, - _("Invalid PCI address slot=3D'0x%x', " - "must be <=3D 0x1F"), + _("Invalid PCI address slot=3D'0x%1$x', must be= <=3D 0x1F"), addr->slot); return false; } if (addr->function > 7) { if (report) virReportError(VIR_ERR_XML_ERROR, - _("Invalid PCI address function=3D0x%x, " - "must be <=3D 7"), + _("Invalid PCI address function=3D0x%1$x, must = be <=3D 7"), addr->function); return false; } @@ -1468,7 +1462,7 @@ virPCIDeviceNew(const virPCIDeviceAddress *address) =20 if (!virFileExists(dev->path)) { virReportSystemError(errno, - _("Device %s not found: could not access %s"), + _("Device %1$s not found: could not access %2= $s"), dev->name, dev->path); return NULL; } @@ -1478,7 +1472,7 @@ virPCIDeviceNew(const virPCIDeviceAddress *address) =20 if (!vendor || !product) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to read product/vendor ID for %s"), + _("Failed to read product/vendor ID for %1$s"), dev->name); return NULL; } @@ -1487,7 +1481,7 @@ virPCIDeviceNew(const virPCIDeviceAddress *address) if (g_snprintf(dev->id, sizeof(dev->id), "%s %s", &vendor[2], &product[2]) >=3D sizeof(dev->id)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("dev->id buffer overflow: %s %s"), + _("dev->id buffer overflow: %1$s %2$s"), &vendor[2], &product[2]); return NULL; } @@ -1678,7 +1672,7 @@ virPCIDeviceListAdd(virPCIDeviceList *list, { if (virPCIDeviceListFind(list, &dev->address)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device %s is already in use"), dev->name); + _("Device %1$s is already in use"), dev->name); return -1; } VIR_APPEND_ELEMENT(list->devs, list->count, dev); @@ -1868,7 +1862,7 @@ virPCIDeviceAddressIOMMUGroupIterate(virPCIDeviceAddr= ess *orig, =20 if (virPCIDeviceAddressParse(ent->d_name, &newDev) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Found invalid device link '%s' in '%s'"), + _("Found invalid device link '%1$s' in '%2$s'"), ent->d_name, groupPath); return -1; } @@ -1995,7 +1989,7 @@ virPCIDeviceAddressGetIOMMUGroupNum(virPCIDeviceAddre= ss *addr) return -2; if (virFileResolveLink(devPath, &groupPath) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to resolve device %s iommu_group symlink = %s"), + _("Unable to resolve device %1$s iommu_group symlin= k %2$s"), devName, devPath); return -1; } @@ -2003,8 +1997,7 @@ virPCIDeviceAddressGetIOMMUGroupNum(virPCIDeviceAddre= ss *addr) groupNumStr =3D g_path_get_basename(groupPath); if (virStrToLong_ui(groupNumStr, NULL, 10, &groupNum) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("device %s iommu_group symlink %s has " - "invalid group number %s"), + _("device %1$s iommu_group symlink %2$s has invalid= group number %3$s"), devName, groupPath, groupNumStr); return -1; } @@ -2039,13 +2032,13 @@ virPCIDeviceGetIOMMUGroupDev(virPCIDevice *dev) =20 if (virFileIsLink(devPath) !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid device %s iommu_group file %s is not a s= ymlink"), + _("Invalid device %1$s iommu_group file %2$s is not= a symlink"), dev->name, devPath); return NULL; } if (virFileResolveLink(devPath, &groupPath) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to resolve device %s iommu_group symlink = %s"), + _("Unable to resolve device %1$s iommu_group symlin= k %2$s"), dev->name, devPath); return NULL; } @@ -2119,7 +2112,7 @@ virPCIDeviceIsBehindSwitchLackingACS(virPCIDevice *de= v) return 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to find parent device for %s"), + _("Failed to find parent device for %1$s"), dev->name); return -1; } @@ -2172,8 +2165,7 @@ int virPCIDeviceIsAssignable(virPCIDevice *dev, dev->id, dev->name); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device %s is behind a switch lacking ACS and= " - "cannot be assigned"), + _("Device %1$s is behind a switch lacking ACS a= nd cannot be assigned"), dev->name); return 0; } @@ -2192,7 +2184,7 @@ logStrToLong_ui(char const *s, =20 ret =3D virStrToLong_ui(s, end_ptr, base, result); if (ret !=3D 0) - VIR_ERROR(_("Failed to convert '%s' to unsigned int"), s); + VIR_ERROR(_("Failed to convert '%1$s' to unsigned int"), s); return ret; } =20 @@ -2282,7 +2274,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *devic= e_link) device_path =3D virFileCanonicalizePath(device_link); if (device_path =3D=3D NULL) { virReportSystemError(errno, - _("Failed to resolve device link '%s'"), + _("Failed to resolve device link '%1$s'"), device_link); return NULL; } @@ -2292,7 +2284,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *devic= e_link) =20 if (virPCIDeviceAddressParse(config_address, bdf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse PCI config address '%s'"), + _("Failed to parse PCI config address '%1$s'"), config_address); return NULL; } @@ -2364,7 +2356,7 @@ virPCIGetVirtualFunctionsFull(const char *sysfs_path, return -1; if (virStrToLong_ull(totalvfs_str, &end, 10, &maxfunctions) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unrecognized value in %s: %s"), + _("Unrecognized value in %1$s: %2$s"), totalvfs_file, totalvfs_str); return -1; } @@ -2383,7 +2375,7 @@ virPCIGetVirtualFunctionsFull(const char *sysfs_path, =20 if (!(fnc.addr =3D virPCIGetDeviceAddressFromSysfsLink(device_link= ))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get SRIOV function from device lin= k '%s'"), + _("Failed to get SRIOV function from device lin= k '%1$s'"), device_link); return -1; } @@ -2434,8 +2426,8 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_de= vice_link, =20 if (virPCIGetVirtualFunctions(pf_sysfs_device_link, &virt_fns) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Error getting physical function's '%s' " - "virtual_functions"), pf_sysfs_device_link); + _("Error getting physical function's '%1$s' virtual= _functions"), + pf_sysfs_device_link); return -1; } =20 @@ -2582,7 +2574,7 @@ virPCIGetNetName(const char *device_link_sysfs_path, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not find any network device under PCI device a= t %s"), + _("Could not find any network device under PCI device a= t %1$s"), device_link_sysfs_path); return -1; } @@ -2635,7 +2627,7 @@ virPCIGetVirtualFunctionInfo(const char *vf_sysfs_dev= ice_path, * PF device is bound to a network driver */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("The PF device for VF %s has no network device na= me"), + _("The PF device for VF %1$s has no network device = name"), vf_sysfs_device_path); return -1; } @@ -2680,18 +2672,18 @@ virPCIDeviceGetVPD(virPCIDevice *dev) =20 vpdPath =3D virPCIFile(dev->name, "vpd"); if (!virPCIDeviceHasVPD(dev)) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Device %s does not have = a VPD"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Device %1$s does not hav= e a VPD"), virPCIDeviceGetName(dev)); return NULL; } if ((fd =3D open(vpdPath, O_RDONLY)) < 0) { - virReportSystemError(-fd, _("Failed to open a VPD file '%s'"), vpd= Path); + virReportSystemError(-fd, _("Failed to open a VPD file '%1$s'"), v= pdPath); return NULL; } res =3D virPCIVPDParse(fd); =20 if (VIR_CLOSE(fd) < 0) { - virReportSystemError(errno, _("Unable to close the VPD file, fd: %= d"), fd); + virReportSystemError(errno, _("Unable to close the VPD file, fd: %= 1$d"), fd); return NULL; } =20 @@ -2854,7 +2846,7 @@ virPCIDeviceGetLinkCapSta(virPCIDevice *dev, =20 if (!dev->pcie_cap_pos) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("pci device %s is not a PCI-Express device"), + _("pci device %1$s is not a PCI-Express device"), dev->name); goto cleanup; } @@ -2894,7 +2886,7 @@ int virPCIGetHeaderType(virPCIDevice *dev, int *hdrTy= pe) type &=3D PCI_HEADER_TYPE_MASK; if (type >=3D VIR_PCI_HEADER_LAST) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown PCI header type '%d' for device '%s'"), + _("Unknown PCI header type '%1$d' for device '%2$s'= "), type, dev->name); return -1; } diff --git a/src/util/virperf.c b/src/util/virperf.c index 434d1d99c4..03341e73e3 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -214,7 +214,7 @@ virPerfEventEnable(virPerf *perf, type =3D=3D VIR_PERF_EVENT_MBMT || type =3D=3D VIR_PERF_EVENT_MBML)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("unable to enable host cpu perf event for %s"), + _("unable to enable host cpu perf event for %1$s"), virPerfEventTypeToString(type)); return -1; } @@ -244,14 +244,14 @@ virPerfEventEnable(virPerf *perf, event->fd =3D syscall(__NR_perf_event_open, &attr, pid, -1, -1, 0); if (event->fd < 0) { virReportSystemError(errno, - _("unable to open host cpu perf event for %s"= ), + _("unable to open host cpu perf event for %1$= s"), virPerfEventTypeToString(type)); goto error; } =20 if (ioctl(event->fd, PERF_EVENT_IOC_ENABLE) < 0) { virReportSystemError(errno, - _("unable to enable host cpu perf event for %= s"), + _("unable to enable host cpu perf event for %= 1$s"), virPerfEventTypeToString(type)); goto error; } @@ -275,7 +275,7 @@ virPerfEventDisable(virPerf *perf, =20 if (ioctl(event->fd, PERF_EVENT_IOC_DISABLE) < 0) { virReportSystemError(errno, - _("unable to disable host cpu perf event for = %s"), + _("unable to disable host cpu perf event for = %1$s"), virPerfEventTypeToString(type)); return -1; } diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c index 4693aaaf78..f61caca2de 100644 --- a/src/util/virpidfile.c +++ b/src/util/virpidfile.c @@ -378,7 +378,7 @@ int virPidFileAcquirePathFull(const char *path, if ((fd =3D open(path, O_WRONLY|O_CREAT, 0644)) < 0) { if (!quiet) { virReportSystemError(errno, - _("Failed to open pid file '%s'"), + _("Failed to open pid file '%1$s'"), path); } return -1; @@ -387,7 +387,7 @@ int virPidFileAcquirePathFull(const char *path, if (virSetCloseExec(fd) < 0) { if (!quiet) { virReportSystemError(errno, - _("Failed to set close-on-exec flag '= %s'"), + _("Failed to set close-on-exec flag '= %1$s'"), path); } VIR_FORCE_CLOSE(fd); @@ -397,7 +397,7 @@ int virPidFileAcquirePathFull(const char *path, if (fstat(fd, &b) < 0) { if (!quiet) { virReportSystemError(errno, - _("Unable to check status of pid file= '%s'"), + _("Unable to check status of pid file= '%1$s'"), path); } VIR_FORCE_CLOSE(fd); @@ -407,7 +407,7 @@ int virPidFileAcquirePathFull(const char *path, if (virFileLock(fd, false, 0, 1, waitForLock) < 0) { if (!quiet) { virReportSystemError(errno, - _("Failed to acquire pid file '%s'"), + _("Failed to acquire pid file '%1$s'"= ), path); } VIR_FORCE_CLOSE(fd); @@ -438,7 +438,7 @@ int virPidFileAcquirePathFull(const char *path, if (ftruncate(fd, 0) < 0) { if (!quiet) { virReportSystemError(errno, - _("Failed to truncate pid file '%s'"), + _("Failed to truncate pid file '%1$s'"), path); } VIR_FORCE_CLOSE(fd); @@ -448,7 +448,7 @@ int virPidFileAcquirePathFull(const char *path, if (safewrite(fd, pidstr, strlen(pidstr)) < 0) { if (!quiet) { virReportSystemError(errno, - _("Failed to write to pid file '%s'"), + _("Failed to write to pid file '%1$s'"), path); } VIR_FORCE_CLOSE(fd); @@ -544,7 +544,7 @@ virPidFileConstructPath(bool privileged, =20 if (g_mkdir_with_parents(rundir, 0700) < 0) { virReportSystemError(errno, - _("Cannot create user runtime directory '= %s'"), + _("Cannot create user runtime directory '= %1$s'"), rundir); return -1; } diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c index 6c83eaf412..0a637db9ba 100644 --- a/src/util/virpolkit.c +++ b/src/util/virpolkit.c @@ -137,7 +137,7 @@ int virPolkitCheckAuth(const char *actionid, _("user cancelled authentication process")); } else if (is_challenge) { virReportError(VIR_ERR_AUTH_UNAVAILABLE, - _("no polkit agent available to authenticate action= '%s'"), + _("no polkit agent available to authenticate action= '%1$s'"), actionid); } else { virReportError(VIR_ERR_AUTH_FAILED, "%s", diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 87835a3ed7..6d6f99778e 100644 --- a/src/util/virportallocator.c +++ b/src/util/virportallocator.c @@ -147,7 +147,7 @@ virPortAllocatorBindToPort(bool *used, addr =3D (struct sockaddr*)&addr4; addrlen =3D sizeof(addr4); } else { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown family %d"), fam= ily); + virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown family %1$d"), f= amily); return -1; } =20 @@ -176,7 +176,7 @@ virPortAllocatorBindToPort(bool *used, *used =3D true; ret =3D 0; } else { - virReportSystemError(errno, _("Unable to bind to port %d"), po= rt); + virReportSystemError(errno, _("Unable to bind to port %1$d"), = port); } goto cleanup; } @@ -224,7 +224,7 @@ virPortAllocatorAcquire(const virPortAllocatorRange *ra= nge, /* Add port to bitmap of reserved ports */ if (virBitmapSetBit(pa->bitmap, i) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reserve port %zu"), i); + _("Failed to reserve port %1$zu"), i); return -1; } *port =3D i; @@ -234,7 +234,7 @@ virPortAllocatorAcquire(const virPortAllocatorRange *ra= nge, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find an unused port in range '%s' (%d-%d)"= ), + _("Unable to find an unused port in range '%1$s' (%2$d-= %3$d)"), range->name, range->start, range->end); return -1; } @@ -272,7 +272,7 @@ virPortAllocatorSetUsed(unsigned short port) if (virBitmapIsBitSet(pa->bitmap, port) || virBitmapSetBit(pa->bitmap, port) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to reserve port %d"), port); + _("Failed to reserve port %1$d"), port); return -1; } } diff --git a/src/util/virprocess.c b/src/util/virprocess.c index 39ca5de811..7f29f8be89 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -97,13 +97,13 @@ virProcessTranslateStatus(int status) { char *buf; if (WIFEXITED(status)) { - buf =3D g_strdup_printf(_("exit status %d"), + buf =3D g_strdup_printf(_("exit status %1$d"), WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { - buf =3D g_strdup_printf(_("fatal signal %d"), + buf =3D g_strdup_printf(_("fatal signal %1$d"), WTERMSIG(status)); } else { - buf =3D g_strdup_printf(_("invalid value %d"), status); + buf =3D g_strdup_printf(_("invalid value %1$d"), status); } return buf; } @@ -200,7 +200,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) =20 if (pid <=3D 0) { if (pid !=3D -1) - virReportSystemError(EINVAL, _("unable to wait for process %ll= d"), + virReportSystemError(EINVAL, _("unable to wait for process %1$= lld"), (long long) pid); return -1; } @@ -210,7 +210,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) errno =3D=3D EINTR); =20 if (ret =3D=3D -1) { - virReportSystemError(errno, _("unable to wait for process %lld"), + virReportSystemError(errno, _("unable to wait for process %1$lld"), (long long) pid); return -1; } @@ -231,7 +231,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) error: st =3D virProcessTranslateStatus(status); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Child process (%lld) unexpected %s"), + _("Child process (%1$lld) unexpected %2$s"), (long long) pid, NULLSTR(st)); return -1; } @@ -241,7 +241,7 @@ virProcessWait(pid_t pid, int *exitstatus, bool raw) char * virProcessTranslateStatus(int status) { - return g_strdup_printf(_("invalid value %d"), status); + return g_strdup_printf(_("invalid value %1$d"), status); } =20 =20 @@ -256,7 +256,7 @@ virProcessAbort(pid_t pid) int virProcessWait(pid_t pid, int *exitstatus G_GNUC_UNUSED, bool raw G_GNUC_U= NUSED) { - virReportSystemError(ENOSYS, _("unable to wait for process %lld"), + virReportSystemError(ENOSYS, _("unable to wait for process %1$lld"), (long long) pid); return -1; } @@ -417,7 +417,7 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, uns= igned int extradelay, boo if (rc < 0) { if (errno !=3D ESRCH) { virReportSystemError(errno, - _("Failed to terminate process %lld w= ith SIG%s"), + _("Failed to terminate process %1$lld= with SIG%2$s"), (long long)pid, signame); return -1; } @@ -428,7 +428,7 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, uns= igned int extradelay, boo } =20 virReportSystemError(EBUSY, - _("Failed to terminate process %lld with SIG%s"), + _("Failed to terminate process %1$lld with SIG%2$= s"), (long long)pid, signame); =20 return 0; @@ -486,7 +486,7 @@ int virProcessSetAffinity(pid_t pid, virBitmap *map, bo= ol quiet) pid, g_strerror(errno)); } else { virReportSystemError(errno, - _("cannot set CPU affinity on process %d"= ), pid); + _("cannot set CPU affinity on process %1$= d"), pid); return -1; } } @@ -515,7 +515,7 @@ virProcessGetAffinity(pid_t pid) =20 if (sched_getaffinity(pid, masklen, mask) < 0) { virReportSystemError(errno, - _("cannot get CPU affinity of process %d"), p= id); + _("cannot get CPU affinity of process %1$d"),= pid); goto cleanup; } =20 @@ -554,7 +554,7 @@ int virProcessSetAffinity(pid_t pid, pid, g_strerror(errno)); } else { virReportSystemError(errno, - _("cannot set CPU affinity on process %d"= ), pid); + _("cannot set CPU affinity on process %1$= d"), pid); return -1; } } @@ -573,7 +573,7 @@ virProcessGetAffinity(pid_t pid) if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, pid, sizeof(mask), &mask) !=3D 0) { virReportSystemError(errno, - _("cannot get CPU affinity of process %d"), p= id); + _("cannot get CPU affinity of process %1$d"),= pid); return NULL; } =20 @@ -927,8 +927,7 @@ virProcessSetMaxMemLock(pid_t pid, unsigned long long b= ytes) =20 if (virProcessSetLimit(pid, RLIMIT_MEMLOCK, &rlim) < 0) { virReportSystemError(errno, - _("cannot limit locked memory " - "of process %lld to %llu"), + _("cannot limit locked memory of process %1$l= ld to %2$llu"), (long long int)pid, bytes); return -1; } @@ -969,8 +968,7 @@ virProcessGetMaxMemLock(pid_t pid, =20 if (virProcessGetLimit(pid, RLIMIT_MEMLOCK, &rlim) < 0) { virReportSystemError(errno, - _("cannot get locked memory limit " - "of process %lld"), + _("cannot get locked memory limit of process = %1$lld"), (long long int) pid); return -1; } @@ -1017,8 +1015,7 @@ virProcessSetMaxProcesses(pid_t pid, unsigned int pro= cs) =20 if (virProcessSetLimit(pid, RLIMIT_NPROC, &rlim) < 0) { virReportSystemError(errno, - _("cannot limit number of subprocesses " - "of process %lld to %u"), + _("cannot limit number of subprocesses of process %1$lld t= o %2$u"), (long long int)pid, procs); return -1; } @@ -1061,8 +1058,7 @@ virProcessSetMaxFiles(pid_t pid, unsigned int files) =20 if (virProcessSetLimit(pid, RLIMIT_NOFILE, &rlim) < 0) { virReportSystemError(errno, - _("cannot limit number of open files " - "of process %lld to %u"), + _("cannot limit number of open files of proce= ss %1$lld to %2$u"), (long long int)pid, files); return -1; } @@ -1098,8 +1094,7 @@ virProcessSetMaxCoreSize(pid_t pid, unsigned long lon= g bytes) =20 if (virProcessSetLimit(pid, RLIMIT_CORE, &rlim) < 0) { virReportSystemError(errno, - _("cannot limit core file size " - "of process %lld to %llu"), + _("cannot limit core file size of process %1$lld to %2$llu= "), (long long int)pid, bytes); return -1; } @@ -1130,14 +1125,14 @@ int virProcessGetStartTime(pid_t pid, =20 if (!proc_stat || g_strv_length(proc_stat) < 22) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot find start time for pid %d"), (int)pid); + _("Cannot find start time for pid %1$d"), (int)pid); return -1; } =20 starttime_str =3D proc_stat[VIR_PROCESS_STAT_STARTTIME]; if (virStrToLong_ull(starttime_str, NULL, 10, timestamp) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse start time %s for pid %d"), + _("Cannot parse start time %1$s for pid %2$d"), starttime_str, (int)pid); return -1; } @@ -1363,7 +1358,7 @@ virProcessRunInFork(virProcessForkCallback cb, memcpy(bin->bindata, buf, sizeof(*bin)); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("child reported (status=3D%d): %s"), + _("child reported (status=3D%1$d): %2$s= "), status, NULLSTR(bin->data.message)); =20 virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, @@ -1378,7 +1373,7 @@ virProcessRunInFork(virProcessForkCallback cb, "%s", bin->data.message); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("child didn't write error (status=3D%= d)"), + _("child didn't write error (status=3D%= 1$d)"), status); } } @@ -1599,7 +1594,7 @@ virProcessSetScheduler(pid_t pid, =20 if (pol < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Scheduler '%s' is not supported on this platform= "), + _("Scheduler '%1$s' is not supported on this platfo= rm"), virProcessSchedPolicyTypeToString(policy)); return -1; } @@ -1624,7 +1619,7 @@ virProcessSetScheduler(pid_t pid, =20 if (priority < min || priority > max) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Scheduler priority %d out of range [%d, %d]"= ), + _("Scheduler priority %1$d out of range [%2$d, = %3$d]"), priority, min, max); return -1; } @@ -1634,7 +1629,7 @@ virProcessSetScheduler(pid_t pid, =20 if (sched_setscheduler(pid, pol, ¶m) < 0) { virReportSystemError(errno, - _("Cannot set scheduler parameters for pid %l= ld"), + _("Cannot set scheduler parameters for pid %1= $lld"), (long long) pid); return -1; } @@ -1827,7 +1822,7 @@ virProcessGetSchedInfo(unsigned long long *cpuWait, line =3D strchr(line, ':'); if (!line) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing separator in sched info '%s'"), + _("Missing separator in sched info '%1$s'"), lines[i]); return -1; } @@ -1837,7 +1832,7 @@ virProcessGetSchedInfo(unsigned long long *cpuWait, =20 if (virStrToDouble(line, NULL, &val) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse sched info value '%s'"), + _("Unable to parse sched info value '%1$s'"= ), line); return -1; } diff --git a/src/util/virrandom.c b/src/util/virrandom.c index e23ddf8e1d..73c5832a05 100644 --- a/src/util/virrandom.c +++ b/src/util/virrandom.c @@ -111,7 +111,7 @@ virRandomBytes(unsigned char *buf, =20 if ((rv =3D gnutls_rnd(GNUTLS_RND_RANDOM, buf, buflen)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to generate byte stream: %s"), + _("failed to generate byte stream: %1$s"), gnutls_strerror(rv)); return -1; } diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index c46a78f113..1e98b111f2 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -614,7 +614,7 @@ virResctrlGetCacheInfo(virResctrlInfo *resctrl, =20 if (i_level->types[type]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Duplicate cache type in resctrl for level %u= "), + _("Duplicate cache type in resctrl for level %1= $u"), level); return -1; } @@ -894,8 +894,7 @@ virResctrlInfoGetCache(virResctrlInfo *resctrl, } else { if (i_type->size !=3D size) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("level %u cache size %llu does not match " - "expected size %llu"), + _("level %1$u cache size %2$llu does not ma= tch expected size %3$llu"), level, i_type->size, size); goto error; } @@ -966,7 +965,7 @@ virResctrlInfoGetMonitorPrefix(virResctrlInfo *resctrl, =20 if (!mon) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Bad prefix name '%s' for resctrl monitor"), + _("Bad prefix name '%1$s' for resctrl monitor"), prefix); return -1; } @@ -1205,8 +1204,7 @@ virResctrlAllocSetCacheSize(virResctrlAlloc *alloc, { if (virResctrlAllocCheckCollision(alloc, level, type, cache)) { virReportError(VIR_ERR_XML_ERROR, - _("Colliding cache allocations for cache " - "level '%u' id '%u', type '%s'"), + _("Colliding cache allocations for cache level '%1$= u' id '%2$u', type '%3$s'"), level, cache, virCacheTypeToString(type)); return -1; } @@ -1290,7 +1288,7 @@ virResctrlAllocSetMemoryBandwidth(virResctrlAlloc *al= loc, =20 if (mem_bw->bandwidths[id]) { virReportError(VIR_ERR_XML_ERROR, - _("Memory Bandwidth already defined for node %u"), + _("Memory Bandwidth already defined for node %1$u"), id); return -1; } @@ -1346,7 +1344,7 @@ virResctrlSetID(char **resctrlid, =20 if (*resctrlid) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Attempt to overwrite resctrlid=3D'%s' with id=3D= '%s'"), + _("Attempt to overwrite resctrlid=3D'%1$s' with id= =3D'%2$s'"), *resctrlid, id); return -1; } @@ -1421,19 +1419,19 @@ virResctrlAllocParseProcessMemoryBandwidth(virResct= rlInfo *resctrl, =20 if (virStrToLong_uip(mem_bw, NULL, 10, &id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid node id %u "), id); + _("Invalid node id %1$u "), id); return -1; } if (virStrToLong_uip(tmp, NULL, 10, &bandwidth) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid bandwidth %u"), bandwidth); + _("Invalid bandwidth %1$u"), bandwidth); return -1; } if (bandwidth < resctrl->membw_info->min_bandwidth || id > resctrl->membw_info->max_id) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or inconsistent resctrl info for " - "memory bandwidth node '%u'"), id); + _("Missing or inconsistent resctrl info for memory = bandwidth node '%1$u'"), + id); return -1; } if (alloc->mem_bw->nbandwidths <=3D id) { @@ -1576,7 +1574,7 @@ virResctrlAllocParseProcessCache(virResctrlInfo *resc= trl, =20 if (virStrToLong_uip(cache, NULL, 10, &cache_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid cache id '%s'"), cache); + _("Invalid cache id '%1$s'"), cache); return -1; } =20 @@ -1589,8 +1587,7 @@ virResctrlAllocParseProcessCache(virResctrlInfo *resc= trl, !resctrl->levels[level] || !resctrl->levels[level]->types[type]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing or inconsistent resctrl info for " - "level '%u' type '%s'"), + _("Missing or inconsistent resctrl info for level '= %1$u' type '%2$s'"), level, virCacheTypeToString(type)); return -1; } @@ -1632,7 +1629,7 @@ virResctrlAllocParseCacheLine(virResctrlInfo *resctrl, =20 if (virStrToLong_uip(line + 1, &line, 10, &level) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse resctrl schema level '%s'"), + _("Cannot parse resctrl schema level '%1$s'"), line + 1); return -1; } @@ -1640,7 +1637,7 @@ virResctrlAllocParseCacheLine(virResctrlInfo *resctrl, type =3D virResctrlTypeFromString(line); if (type < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse resctrl schema level '%s'"), + _("Cannot parse resctrl schema level '%1$s'"), line + 1); return -1; } @@ -1866,7 +1863,7 @@ virResctrlAllocGetUnused(virResctrlInfo *resctrl) =20 if (rv < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not read schemata file for group %s"), + _("Could not read schemata file for group %1$s"= ), ent->d_name); return NULL; } @@ -1912,7 +1909,7 @@ virResctrlAllocFindUnused(virResctrlAlloc *alloc, =20 if (cache >=3D f_type->nmasks) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache with id %u does not exists for level %d"), + _("Cache with id %1$u does not exists for level %2$= d"), cache, level); return -1; } @@ -1920,16 +1917,14 @@ virResctrlAllocFindUnused(virResctrlAlloc *alloc, f_mask =3D f_type->masks[cache]; if (!f_mask) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache level %d id %u does not support tuning for= " - "scope type '%s'"), + _("Cache level %1$d id %2$u does not support tuning= for scope type '%3$s'"), level, cache, virCacheTypeToString(type)); return -1; } =20 if (*size =3D=3D i_type->size) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache allocation for the whole cache is not " - "possible, specify size smaller than %llu"), + _("Cache allocation for the whole cache is not poss= ible, specify size smaller than %1$llu"), i_type->size); return -1; } @@ -1938,16 +1933,14 @@ virResctrlAllocFindUnused(virResctrlAlloc *alloc, =20 if (*size % i_type->control.granularity) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache allocation of size %llu is not " - "divisible by granularity %llu"), + _("Cache allocation of size %1$llu is not divisible= by granularity %2$llu"), *size, i_type->control.granularity); return -1; } =20 if (need_bits < i_type->min_cbm_bits) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache allocation of size %llu is smaller " - "than the minimum allowed allocation %llu"), + _("Cache allocation of size %1$llu is smaller than = the minimum allowed allocation %2$llu"), *size, i_type->control.granularity * i_type->min_cbm_bits); return -1; @@ -1985,9 +1978,7 @@ virResctrlAllocFindUnused(virResctrlAlloc *alloc, =20 if (last_pos < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Not enough room for allocation of " - "%llu bytes for level %u cache %u " - "scope type '%s'"), + _("Not enough room for allocation of %1$llu bytes f= or level %2$u cache %3$u scope type '%4$s'"), *size, level, cache, virCacheTypeToString(type)); return -1; @@ -2028,25 +2019,21 @@ virResctrlAllocMemoryBandwidth(virResctrlInfo *resc= trl, =20 if (*(mem_bw_alloc->bandwidths[i]) % mem_bw_info->bandwidth_granul= arity) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Memory Bandwidth allocation of size " - "%u is not divisible by granularity %u"), + _("Memory Bandwidth allocation of size %1$u is = not divisible by granularity %2$u"), *(mem_bw_alloc->bandwidths[i]), mem_bw_info->bandwidth_granularity); return -1; } if (*(mem_bw_alloc->bandwidths[i]) < mem_bw_info->min_bandwidth) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Memory Bandwidth allocation of size " - "%u is smaller than the minimum " - "allowed allocation %u"), + _("Memory Bandwidth allocation of size %1$u is = smaller than the minimum allowed allocation %2$u"), *(mem_bw_alloc->bandwidths[i]), mem_bw_info->min_bandwidth); return -1; } if (i > mem_bw_info->max_id) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("bandwidth controller id %zd does not " - "exist, max controller id %u"), + _("bandwidth controller id %1$zd does not exist= , max controller id %2$u"), i, mem_bw_info->max_id); return -1; } @@ -2168,7 +2155,7 @@ virResctrlAllocAssign(virResctrlInfo *resctrl, =20 if (!f_level) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache level %d does not support tuning"), + _("Cache level %1$d does not support tuning"), level); return -1; } @@ -2183,8 +2170,7 @@ virResctrlAllocAssign(virResctrlInfo *resctrl, =20 if (!f_type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cache level %d does not support tuning f= or " - "scope type '%s'"), + _("Cache level %1$d does not support tuning= for scope type '%2$s'"), level, virCacheTypeToString(type)); return -1; } @@ -2210,8 +2196,8 @@ virResctrlDeterminePath(const char *parentpath, { if (!id) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resctrl ID must be set before determining resctr= l " - "parentpath=3D'%s' prefix=3D'%s'"), parentpath, p= refix); + _("Resctrl ID must be set before determining resctr= l parentpath=3D'%1$s' prefix=3D'%2$s'"), + parentpath, prefix); return NULL; } =20 @@ -2225,7 +2211,7 @@ virResctrlAllocDeterminePath(virResctrlAlloc *alloc, { if (alloc->path) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resctrl allocation path is already set to '%s'"), + _("Resctrl allocation path is already set to '%1$s'= "), alloc->path); return -1; } @@ -2258,7 +2244,7 @@ virResctrlCreateGroupPath(const char *path) =20 if (g_mkdir_with_parents(path, 0777) < 0) { virReportSystemError(errno, - _("Cannot create resctrl directory '%s'"), + _("Cannot create resctrl directory '%1$s'"), path); return -1; } @@ -2315,7 +2301,7 @@ virResctrlAllocCreate(virResctrlInfo *resctrl, if (virFileWriteStr(schemata_path, alloc_str, 0) < 0) { rmdir(alloc->path); virReportSystemError(errno, - _("Cannot write into schemata file '%s'"), + _("Cannot write into schemata file '%1$s'"), schemata_path); goto cleanup; } @@ -2346,7 +2332,7 @@ virResctrlAddPID(const char *path, =20 if (virFileWriteStr(tasks, pidstr, 0) < 0) { virReportSystemError(errno, - _("Cannot write pid in tasks file '%s'"), + _("Cannot write pid in tasks file '%1$s'"), tasks); return -1; } @@ -2383,7 +2369,7 @@ virResctrlAllocRemove(virResctrlAlloc *alloc) VIR_DEBUG("Removing resctrl allocation %s", alloc->path); if (rmdir(alloc->path) !=3D 0 && errno !=3D ENOENT) { ret =3D -errno; - VIR_ERROR(_("Unable to remove %s (%d)"), alloc->path, errno); + VIR_ERROR(_("Unable to remove %1$s (%2$d)"), alloc->path, errno); } =20 return ret; @@ -2438,7 +2424,7 @@ virResctrlMonitorDeterminePath(virResctrlMonitor *mon= itor, =20 if (monitor->path) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Resctrl monitor path is already set to '%s'"), + _("Resctrl monitor path is already set to '%1$s'"), monitor->path); return -1; } @@ -2530,7 +2516,7 @@ virResctrlMonitorRemove(virResctrlMonitor *monitor) VIR_DEBUG("Removing resctrl monitor path=3D%s", monitor->path); if (rmdir(monitor->path) !=3D 0 && errno !=3D ENOENT) { ret =3D -errno; - VIR_ERROR(_("Unable to remove %s (%d)"), monitor->path, errno); + VIR_ERROR(_("Unable to remove %1$s (%2$d)"), monitor->path, errno); } =20 return ret; @@ -2627,7 +2613,7 @@ virResctrlMonitorGetStats(virResctrlMonitor *monitor, ent->d_name, resources[i]); if (rv =3D=3D -2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File '%s/%s/%s' does not exist."), + _("File '%1$s/%2$s/%3$s' does not exist."), datapath, ent->d_name, resources[i]); } if (rv < 0) diff --git a/src/util/virrotatingfile.c b/src/util/virrotatingfile.c index d339e58e1c..b02a88c4b0 100644 --- a/src/util/virrotatingfile.c +++ b/src/util/virrotatingfile.c @@ -106,21 +106,21 @@ virRotatingFileWriterEntryNew(const char *path, =20 if ((entry->fd =3D open(path, O_CREAT|O_APPEND|O_WRONLY|O_CLOEXEC, mod= e)) < 0) { virReportSystemError(errno, - _("Unable to open file: %s"), path); + _("Unable to open file: %1$s"), path); goto error; } =20 entry->pos =3D lseek(entry->fd, 0, SEEK_END); if (entry->pos =3D=3D (off_t)-1) { virReportSystemError(errno, - _("Unable to determine current file offset: %= s"), + _("Unable to determine current file offset: %= 1$s"), path); goto error; } =20 if (fstat(entry->fd, &sb) < 0) { virReportSystemError(errno, - _("Unable to determine current file inode: %s= "), + _("Unable to determine current file inode: %1= $s"), path); goto error; } @@ -149,7 +149,7 @@ virRotatingFileReaderEntryNew(const char *path) if ((entry->fd =3D open(path, O_RDONLY|O_CLOEXEC)) < 0) { if (errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to open file: %s"), path); + _("Unable to open file: %1$s"), path); goto error; } } @@ -157,7 +157,7 @@ virRotatingFileReaderEntryNew(const char *path) if (entry->fd !=3D -1) { if (fstat(entry->fd, &sb) < 0) { virReportSystemError(errno, - _("Unable to determine current file inode= : %s"), + _("Unable to determine current file inode= : %1$s"), path); goto error; } @@ -183,7 +183,7 @@ virRotatingFileWriterDelete(virRotatingFileWriter *file) if (unlink(file->basepath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to delete file %s"), + _("Unable to delete file %1$s"), file->basepath); return -1; } @@ -195,7 +195,7 @@ virRotatingFileWriterDelete(virRotatingFileWriter *file) if (unlink(oldpath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to delete file %s"), + _("Unable to delete file %1$s"), oldpath); VIR_FREE(oldpath); return -1; @@ -240,7 +240,7 @@ virRotatingFileWriterNew(const char *path, =20 if (maxbackup > VIR_MAX_MAX_BACKUP) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Max backup %zu must be less than or equal to %d"= ), + _("Max backup %1$zu must be less than or equal to %= 2$d"), maxbackup, VIR_MAX_MAX_BACKUP); goto error; } @@ -287,7 +287,7 @@ virRotatingFileReaderNew(const char *path, =20 if (maxbackup > VIR_MAX_MAX_BACKUP) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Max backup %zu must be less than or equal to %d"= ), + _("Max backup %1$zu must be less than or equal to %= 2$d"), maxbackup, VIR_MAX_MAX_BACKUP); goto error; } @@ -368,7 +368,7 @@ virRotatingFileWriterRollover(virRotatingFileWriter *fi= le) if (unlink(file->basepath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to remove %s"), + _("Unable to remove %1$s"), file->basepath); goto cleanup; } @@ -386,7 +386,7 @@ virRotatingFileWriterRollover(virRotatingFileWriter *fi= le) if (rename(thispath, nextpath) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, - _("Unable to rename %s to %s"), + _("Unable to rename %1$s to %2$s"), thispath, nextpath); goto cleanup; } @@ -456,7 +456,7 @@ virRotatingFileWriterAppend(virRotatingFileWriter *file, if (towrite) { if (safewrite(file->entry->fd, buf, towrite) !=3D towrite) { virReportSystemError(errno, - _("Unable to write to file %s"), + _("Unable to write to file %1$s"), file->basepath); return -1; } @@ -520,7 +520,7 @@ virRotatingFileReaderSeek(virRotatingFileReader *file, ret =3D lseek(entry->fd, offset, SEEK_SET); if (ret =3D=3D (off_t)-1) { virReportSystemError(errno, - _("Unable to seek to inode %llu offset %l= lu"), + _("Unable to seek to inode %1$llu offset = %2$llu"), (unsigned long long)inode, (unsigned long= long)offset); return -1; } @@ -533,7 +533,7 @@ virRotatingFileReaderSeek(virRotatingFileReader *file, ret =3D lseek(file->entries[0]->fd, offset, SEEK_SET); if (ret =3D=3D (off_t)-1) { virReportSystemError(errno, - _("Unable to seek to inode %llu offset %llu"), + _("Unable to seek to inode %1$llu offset %2$l= lu"), (unsigned long long)inode, (unsigned long lon= g)offset); return -1; } @@ -576,7 +576,7 @@ virRotatingFileReaderConsume(virRotatingFileReader *fil= e, got =3D saferead(entry->fd, buf + ret, len); if (got < 0) { virReportSystemError(errno, - _("Unable to read from file %s"), + _("Unable to read from file %1$s"), entry->path); return -1; } diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 6a90d9002f..3d2c77e3b8 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -93,7 +93,7 @@ virSCSIDeviceGetAdapterId(const char *adapter, NULL, 0, adapter_id) =3D=3D 0) return 0; virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot parse adapter '%s'"), adapter); + _("Cannot parse adapter '%1$s'"), adapter); return -1; } =20 @@ -195,7 +195,7 @@ virSCSIDeviceNew(const char *sysfs_prefix, =20 if (!virFileExists(dev->sg_path)) { virReportSystemError(errno, - _("SCSI device '%s': could not access %s"), + _("SCSI device '%1$s': could not access %2$s"= ), dev->name, dev->sg_path); return NULL; } @@ -353,7 +353,7 @@ virSCSIDeviceListAdd(virSCSIDeviceList *list, { if (virSCSIDeviceListFind(list, dev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device %s already exists"), + _("Device %1$s already exists"), dev->name); return -1; } diff --git a/src/util/virscsihost.c b/src/util/virscsihost.c index 32d7f2312f..09023f5c83 100644 --- a/src/util/virscsihost.c +++ b/src/util/virscsihost.c @@ -176,14 +176,14 @@ virSCSIHostGetNumber(const char *adapter_name, adapter_name +=3D strlen("host"); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid adapter name '%s' for SCSI pool"), + _("Invalid adapter name '%1$s' for SCSI pool"), adapter_name); return -1; } =20 if (virStrToLong_ui(adapter_name, NULL, 10, result) =3D=3D -1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid adapter name '%s' for SCSI pool"), + _("Invalid adapter name '%1$s' for SCSI pool"), adapter_name); return -1; } @@ -218,8 +218,7 @@ virSCSIHostGetNameByParentaddr(unsigned int domain, function); if (!(name =3D virSCSIHostFindByPCI(NULL, parentaddr, unique_id))) { virReportError(VIR_ERR_XML_ERROR, - _("Failed to find scsi_host using PCI '%s' " - "and unique_id=3D'%u'"), + _("Failed to find scsi_host using PCI '%1$s' and un= ique_id=3D'%2$u'"), parentaddr, unique_id); return NULL; } diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index 1ea6a1ee2a..15024d7106 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -80,7 +80,7 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd) { if (!virFileExists(VHOST_SCSI_DEVICE)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vhost-scsi device file '%s' cannot be found"), + _("vhost-scsi device file '%1$s' cannot be found"), VHOST_SCSI_DEVICE); return -1; } @@ -88,7 +88,7 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd) *vhostfd =3D open(VHOST_SCSI_DEVICE, O_RDWR); =20 if (*vhostfd < 0) { - virReportSystemError(errno, _("Failed to open %s"), VHOST_SCSI_DEV= ICE); + virReportSystemError(errno, _("Failed to open %1$s"), VHOST_SCSI_D= EVICE); return -1; } =20 @@ -174,7 +174,7 @@ virSCSIVHostDeviceListAdd(virSCSIVHostDeviceList *list, { if (virSCSIVHostDeviceListFind(list, dev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device %s is already in use"), dev->name); + _("Device %1$s is already in use"), dev->name); return -1; } VIR_APPEND_ELEMENT(list->devs, list->count, dev); diff --git a/src/util/virsecret.c b/src/util/virsecret.c index f2c13e27c9..b558aa1d61 100644 --- a/src/util/virsecret.c +++ b/src/util/virsecret.c @@ -84,7 +84,7 @@ virSecretLookupParseSecret(xmlNodePtr secretnode, if (uuid) { if (virUUIDParse(uuid, def->u.uuid) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("invalid secret uuid '%s'"), uuid); + _("invalid secret uuid '%1$s'"), uuid); return -1; } def->type =3D VIR_SECRET_LOOKUP_TYPE_UUID; @@ -165,8 +165,7 @@ virSecretGetSecretString(virConnectPtr conn, =20 virUUIDFormat(seclookupdef->u.uuid, uuidstr); virReportError(VIR_ERR_INVALID_ARG, - _("secret with uuid %s is of type '%s' not " - "expected '%s' type"), + _("secret with uuid %1$s is of type '%2$s' not expe= cted '%3$s' type"), uuidstr, virSecretUsageTypeToString(sec->usageType), virSecretUsageTypeToString(secretUsageType)); return -1; diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index 0480485ab7..43511bdd69 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -107,7 +107,7 @@ virSocketAddrParseInternal(struct addrinfo **res, if ((err =3D getaddrinfo(val, NULL, &hints, res)) !=3D 0) { if (reportError) virReportError(VIR_ERR_SYSTEM_ERROR, - _("Cannot parse socket address '%s': %s"), + _("Cannot parse socket address '%1$s': %2$s"), val, gai_strerror(err)); =20 return -1; @@ -137,7 +137,7 @@ int virSocketAddrParse(virSocketAddr *addr, const char = *val, int family) =20 if (res =3D=3D NULL) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("No socket addresses found for '%s'"), + _("No socket addresses found for '%1$s'"), val); return -1; } @@ -182,7 +182,7 @@ int virSocketAddrParseAny(virSocketAddr *addr, if (res =3D=3D NULL) { if (reportError) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("No socket addresses found for '%s'"), + _("No socket addresses found for '%1$s'"), val); } return -1; @@ -248,7 +248,7 @@ int virSocketAddrResolveService(const char *service) =20 if ((err =3D getaddrinfo(NULL, service, &hints, &res)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Cannot parse socket service '%s': %s"), + _("Cannot parse socket service '%1$s': %2$s"), service, gai_strerror(err)); return -1; } @@ -270,7 +270,7 @@ int virSocketAddrResolveService(const char *service) } =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("No matches for socket service '%s': %s"), + _("No matches for socket service '%1$s': %2$s"), service, gai_strerror(err)); =20 cleanup: @@ -484,7 +484,7 @@ virSocketAddrFormatFull(const virSocketAddr *addr, port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Cannot convert socket address to string: %s"), + _("Cannot convert socket address to string: %1$s"), gai_strerror(err)); return NULL; } @@ -871,7 +871,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, =20 if (start =3D=3D NULL || end =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("NULL argument - %p %p"), start, end); + _("NULL argument - %1$p %2$p"), start, end); return -1; } =20 @@ -882,7 +882,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, =20 if (VIR_SOCKET_ADDR_FAMILY(start) !=3D VIR_SOCKET_ADDR_FAMILY(end)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("mismatch of address family in range %s - %s"), + _("mismatch of address family in range %1$s - %2$s"= ), startStr, endStr); return -1; } @@ -896,8 +896,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, =20 if (VIR_SOCKET_ADDR_FAMILY(start) !=3D VIR_SOCKET_ADDR_FAMILY(netw= ork)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("mismatch of address family in " - "range %s - %s for network %s"), + _("mismatch of address family in range %1$s - %= 2$s for network %3$s"), startStr, endStr, netStr); return -1; } @@ -906,8 +905,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, virSocketAddrPrefixToNetmask(prefix, &netmask, VIR_SOCKET_ADDR_FAMILY(network)) = < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bad prefix %d for network %s when " - " checking range %s - %s"), + _("bad prefix %1$d for network %2$s when checki= ng range %3$s - %4$s"), prefix, netStr, startStr, endStr); return -1; } @@ -916,8 +914,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, if (virSocketAddrCheckNetmask(start, network, &netmask) <=3D 0 || virSocketAddrCheckNetmask(end, network, &netmask) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("range %s - %s is not entirely within " - "network %s/%d"), + _("range %1$s - %2$s is not entirely within net= work %3$s/%4$d"), startStr, endStr, netStr, prefix); return -1; } @@ -928,8 +925,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, if (virSocketAddrBroadcast(network, &netmask, &broadcast) < 0 = || virSocketAddrMask(network, &netmask, &netaddr) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to construct broadcast or network= " - "address for network %s/%d"), + _("failed to construct broadcast or network= address for network %1$s/%2$d"), netStr, prefix); return -1; } @@ -943,16 +939,14 @@ virSocketAddrGetRange(virSocketAddr *start, virSocket= Addr *end, */ if (virSocketAddrEqual(start, &netaddr)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("start of range %s - %s in network %s/%d " - "is the network address"), + _("start of range %1$s - %2$s in network %3= $s/%4$d is the network address"), startStr, endStr, netStr, prefix); return -1; } =20 if (virSocketAddrEqual(end, &broadcast)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("end of range %s - %s in network %s/%d " - "is the broadcast address"), + _("end of range %1$s - %2$s in network %3$s= /%4$d is the broadcast address"), startStr, endStr, netStr, prefix); return -1; } @@ -965,8 +959,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, if (virSocketAddrGetIPv4Addr(start, &t1) < 0 || virSocketAddrGetIPv4Addr(end, &t2) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get IPv4 address " - "for start or end of range %s - %s"), + _("failed to get IPv4 address for start or end = of range %1$s - %2$s"), startStr, endStr); return -1; } @@ -977,7 +970,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, for (i =3D 0; i < 2; i++) { if (t1[i] !=3D t2[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("range %s - %s is too large (> 65535)"), + _("range %1$s - %2$s is too large (> 65535)= "), startStr, endStr); return -1; } @@ -985,7 +978,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, ret =3D (t2[2] - t1[2]) * 256 + (t2[3] - t1[3]); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("range %s - %s is reversed "), + _("range %1$s - %2$s is reversed "), startStr, endStr); return -1; } @@ -996,8 +989,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocketAd= dr *end, if (virSocketAddrGetIPv6Addr(start, &t1) < 0 || virSocketAddrGetIPv6Addr(end, &t2) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to get IPv6 address " - "for start or end of range %s - %s"), + _("failed to get IPv6 address for start or end = of range %1$s - %2$s"), startStr, endStr); return -1; } @@ -1008,7 +1000,7 @@ virSocketAddrGetRange(virSocketAddr *start, virSocket= Addr *end, for (i =3D 0; i < 7; i++) { if (t1[i] !=3D t2[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("range %s - %s is too large (> 65535)"), + _("range %1$s - %2$s is too large (> 65535)= "), startStr, endStr); return -1; } @@ -1016,15 +1008,14 @@ virSocketAddrGetRange(virSocketAddr *start, virSock= etAddr *end, ret =3D t2[7] - t1[7]; if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("range %s - %s start larger than end"), + _("range %1$s - %2$s start larger than end"), startStr, endStr); return -1; } ret++; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unsupported address family " - "for range %s - %s, must be ipv4 or ipv6"), + _("unsupported address family for range %1$s - %2$s= , must be ipv4 or ipv6"), startStr, endStr); return -1; } diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 873da65d42..031baa1407 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -90,7 +90,7 @@ int virStorageFileGetSCSIKey(const char *path, bool ignoreError) { if (!ignoreError) - virReportSystemError(ENOSYS, _("Unable to get SCSI key for %s"), p= ath); + virReportSystemError(ENOSYS, _("Unable to get SCSI key for %1$s"),= path); return -1; } #endif diff --git a/src/util/virstring.c b/src/util/virstring.c index 7b7aee6179..b49c0f86b6 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -598,13 +598,13 @@ virStringSearch(const char *str, regex =3D g_regex_new(regexp, 0, 0, &err); if (!regex) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to compile regex %s"), err->message); + _("Failed to compile regex %1$s"), err->message); return -1; } =20 if (g_regex_get_capture_count(regex) !=3D 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Regular expression '%s' must have exactly 1 matc= h group, not %d"), + _("Regular expression '%1$s' must have exactly 1 ma= tch group, not %2$d"), regexp, g_regex_get_capture_count(regex)); goto cleanup; } @@ -982,13 +982,13 @@ virStringParsePort(const char *str, =20 if (virStrToLong_uip(str, NULL, 10, &p) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("failed to parse port number '%s'"), str); + _("failed to parse port number '%1$s'"), str); return -1; } =20 if (p > UINT16_MAX) { virReportError(VIR_ERR_INVALID_ARG, - _("port '%s' out of range"), str); + _("port '%1$s' out of range"), str); return -1; } =20 diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 376d5d4816..36a861c53f 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -319,7 +319,7 @@ virSysinfoReadPPC(void) =20 if (virFileReadAll(CPUINFO, CPUINFO_FILE_LEN, &outbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open %s"), CPUINFO); + _("Failed to open %1$s"), CPUINFO); return NULL; } =20 @@ -445,7 +445,7 @@ virSysinfoReadARM(void) =20 if (virFileReadAll(CPUINFO, CPUINFO_FILE_LEN, &outbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open %s"), CPUINFO); + _("Failed to open %1$s"), CPUINFO); return NULL; } =20 @@ -600,7 +600,7 @@ virSysinfoReadS390(void) /* Gather info from /proc/cpuinfo */ if (virFileReadAll(CPUINFO, CPUINFO_FILE_LEN, &outbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open %s"), CPUINFO); + _("Failed to open %1$s"), CPUINFO); return NULL; } =20 @@ -613,7 +613,7 @@ virSysinfoReadS390(void) /* Gather info from /proc/sysinfo */ if (virFileReadAll(SYSINFO, 8192, &outbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open %s"), SYSINFO); + _("Failed to open %1$s"), SYSINFO); return NULL; } =20 @@ -1537,7 +1537,7 @@ virSysinfoFormat(virBuffer *buf, virSysinfoDef *def) =20 if (!type) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected sysinfo type model %d"), + _("unexpected sysinfo type model %1$d"), def->type); return -1; } @@ -1564,7 +1564,7 @@ virSysinfoFormat(virBuffer *buf, virSysinfoDef *def) do { \ if (STRNEQ_NULLABLE(src->name, dst->name)) { \ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, \ - _("Target sysinfo %s %s does not match source %= s"), \ + _("Target sysinfo %1$s %2$s does not match sour= ce %3$s"), \ desc, NULLSTR(dst->name), NULLSTR(src->name)); \ return false; \ } \ @@ -1680,7 +1680,7 @@ bool virSysinfoIsEqual(virSysinfoDef *src, =20 if (src->type !=3D dst->type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target sysinfo %s does not match source %s"), + _("Target sysinfo %1$s does not match source %2$s"), virSysinfoTypeToString(dst->type), virSysinfoTypeToString(src->type)); return false; @@ -1694,7 +1694,7 @@ bool virSysinfoIsEqual(virSysinfoDef *src, =20 if (src->nbaseBoard !=3D dst->nbaseBoard) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Target sysinfo base board count '%zu' does not m= atch source '%zu'"), + _("Target sysinfo base board count '%1$zu' does not= match source '%2$zu'"), dst->nbaseBoard, src->nbaseBoard); return false; } diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index 18bf2932a4..3112a1ba80 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -766,7 +766,7 @@ virSystemdActivationInitFromNames(virSystemdActivation = *act, =20 if (g_strv_length(fdnamelistptr) !=3D nfds) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting %d FD names but got %u"), + _("Expecting %1$d FD names but got %2$u"), nfds, g_strv_length(fdnamelistptr)); goto error; } diff --git a/src/util/virthreadjob.c b/src/util/virthreadjob.c index 2c6f45fd51..3666cf9fe2 100644 --- a/src/util/virthreadjob.c +++ b/src/util/virthreadjob.c @@ -69,7 +69,7 @@ virThreadJobSetWorker(const char *worker) =20 if (virThreadLocalSet(&virThreadJobWorker, (void *) worker) < 0) virReportSystemError(errno, - _("cannot set worker name to %s"), + _("cannot set worker name to %1$s"), worker); =20 VIR_DEBUG("Thread %llu is running worker %s", virThreadSelfID(), worke= r); @@ -86,7 +86,7 @@ virThreadJobSet(const char *caller) =20 if (virThreadLocalSet(&virThreadJobName, (void *) caller) < 0) virReportSystemError(errno, - _("cannot set current job to %s"), + _("cannot set current job to %1$s"), caller); =20 if ((worker =3D virThreadLocalGet(&virThreadJobWorker))) { diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 19850de1c8..81fd6166cf 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -72,7 +72,7 @@ virTPMCreateCancelPath(const char *devpath) =20 if (!(dev =3D strrchr(devpath, '/'))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("TPM device path %s is invalid"), devpath); + _("TPM device path %1$s is invalid"), devpath); return NULL; } =20 @@ -243,7 +243,7 @@ virTPMExecGetCaps(virCommand *cmd, =20 error_bad_json: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected JSON format: %s"), outbuf); + _("Unexpected JSON format: %1$s"), outbuf); return bitmap; } =20 @@ -296,21 +296,21 @@ virTPMEmulatorInit(bool quiet) if (!path) { if (!quiet) virReportSystemError(ENOENT, - _("Unable to find '%s' binary in = $PATH"), + _("Unable to find '%1$s' binary i= n $PATH"), virTPMBinaryTypeToString(i)); return -1; } if (!virFileIsExecutable(path)) { if (!quiet) virReportError(VIR_ERR_INTERNAL_ERROR, - _("%s is not an executable"), + _("%1$s is not an executable"), path); return -1; } if (stat(path, &swtpmBinaries[i].stat) < 0) { if (!quiet) virReportSystemError(errno, - _("Could not stat %s"), path); + _("Could not stat %1$s"), path); return -1; } swtpmBinaries[i].path =3D g_steal_pointer(&path); diff --git a/src/util/virtypedparam-public.c b/src/util/virtypedparam-publi= c.c index 5bd207d1e6..3486623a9c 100644 --- a/src/util/virtypedparam-public.c +++ b/src/util/virtypedparam-public.c @@ -35,13 +35,13 @@ virTypedParameterAssignFromStr(virTypedParameterPtr par= am, const char *val) { if (!val) { - virReportError(VIR_ERR_INVALID_ARG, _("NULL value for field '%s'"), + virReportError(VIR_ERR_INVALID_ARG, _("NULL value for field '%1$s'= "), name); return -1; } =20 if (virStrcpyStatic(param->field, name) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Field name '%s' too long= "), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Field name '%1$s' too lo= ng"), name); return -1; } @@ -51,7 +51,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, case VIR_TYPED_PARAM_INT: if (virStrToLong_i(val, NULL, 10, ¶m->value.i) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid value for field '%s': expected int"), + _("Invalid value for field '%1$s': expected int= "), name); return -1; } @@ -59,8 +59,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, case VIR_TYPED_PARAM_UINT: if (virStrToLong_ui(val, NULL, 10, ¶m->value.ui) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid value for field '%s': " - "expected unsigned int"), + _("Invalid value for field '%1$s': expected uns= igned int"), name); return -1; } @@ -68,8 +67,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, case VIR_TYPED_PARAM_LLONG: if (virStrToLong_ll(val, NULL, 10, ¶m->value.l) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid value for field '%s': " - "expected long long"), + _("Invalid value for field '%1$s': expected lon= g long"), name); return -1; } @@ -77,8 +75,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, case VIR_TYPED_PARAM_ULLONG: if (virStrToLong_ull(val, NULL, 10, ¶m->value.ul) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid value for field '%s': " - "expected unsigned long long"), + _("Invalid value for field '%1$s': expected uns= igned long long"), name); return -1; } @@ -86,8 +83,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, case VIR_TYPED_PARAM_DOUBLE: if (virStrToDouble(val, NULL, ¶m->value.d) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid value for field '%s': " - "expected double"), + _("Invalid value for field '%1$s': expected dou= ble"), name); return -1; } @@ -99,7 +95,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr param, param->value.b =3D false; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid boolean value for field '%s'"), name= ); + _("Invalid boolean value for field '%1$s'"), na= me); return -1; } break; @@ -108,7 +104,7 @@ virTypedParameterAssignFromStr(virTypedParameterPtr par= am, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected type %d for field %s"), type, name); + _("unexpected type %1$d for field %2$s"), type, nam= e); return -1; } =20 @@ -154,8 +150,7 @@ virTypedParamsGet(virTypedParameterPtr params, #define VIR_TYPED_PARAM_CHECK_TYPE(check_type) \ do { if (param->type !=3D check_type) { \ virReportError(VIR_ERR_INVALID_ARG, \ - _("Invalid type '%s' requested for parameter '%s', = " \ - "actual type is '%s'"), \ + _("Invalid type '%1$s' requested for parameter '%2$= s', actual type is '%3$s'"), \ virTypedParameterTypeToString(check_type), \ name, \ virTypedParameterTypeToString(param->type)); \ diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index ae676d02fe..e6ad9ec7a9 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -81,7 +81,7 @@ virTypedParamsValidate(virTypedParameterPtr params, int n= params, ...) =20 if (virStrcpyStatic(keys[nkeys].field, name) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Field name '%s' too long"), name); + _("Field name '%1$s' too long"), name); goto cleanup; } =20 @@ -102,7 +102,7 @@ virTypedParamsValidate(virTypedParameterPtr params, int= nparams, ...) if (STREQ_NULLABLE(last_name, sorted[i].field) && !(keys[j].value.i & VIR_TYPED_PARAM_MULTIPLE)) { virReportError(VIR_ERR_INVALID_ARG, - _("parameter '%s' occurs multiple times"), + _("parameter '%1$s' occurs multiple times"), sorted[i].field); goto cleanup; } @@ -113,8 +113,7 @@ virTypedParamsValidate(virTypedParameterPtr params, int= nparams, ...) if (!badtype) badtype =3D virTypedParameterTypeToString(0); virReportError(VIR_ERR_INVALID_ARG, - _("invalid type '%s' for parameter '%s', " - "expected '%s'"), + _("invalid type '%1$s' for parameter '%2$s'= , expected '%3$s'"), badtype, sorted[i].field, virTypedParameterTypeToString(keys[j].type)= ); goto cleanup; @@ -126,7 +125,7 @@ virTypedParamsValidate(virTypedParameterPtr params, int= nparams, ...) =20 if (j =3D=3D nkeys && i !=3D nparams) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("parameter '%s' not supported"), + _("parameter '%1$s' not supported"), sorted[i].field); goto cleanup; } @@ -195,7 +194,7 @@ virTypedParameterToString(virTypedParameterPtr param) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected type %d for field %s"), + _("unexpected type %1$d for field %2$s"), param->type, param->field); } =20 @@ -241,7 +240,7 @@ virTypedParameterAssignValueVArgs(virTypedParameterPtr = param, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected type %d for field %s"), type, + _("unexpected type %1$d for field %2$s"), type, NULLSTR(param->field)); return -1; } @@ -279,7 +278,7 @@ virTypedParameterAssign(virTypedParameterPtr param, con= st char *name, int ret =3D -1; =20 if (virStrcpyStatic(param->field, name) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("Field name '%s' too long= "), + virReportError(VIR_ERR_INTERNAL_ERROR, _("Field name '%1$s' too lo= ng"), name); return -1; } @@ -322,7 +321,7 @@ virTypedParamsReplaceString(virTypedParameterPtr *param= s, if (param) { if (param->type !=3D VIR_TYPED_PARAM_STRING) { virReportError(VIR_ERR_INVALID_ARG, - _("Parameter '%s' is not a string"), + _("Parameter '%1$s' is not a string"), param->field); return -1; } @@ -529,7 +528,7 @@ virTypedParamsDeserialize(struct _virTypedParameterRemo= te *remote_params, =20 if (limit && remote_params_len > limit) { virReportError(VIR_ERR_RPC, - _("too many parameters '%u' for limit '%d'"), + _("too many parameters '%1$u' for limit '%2$d'"), remote_params_len, limit); goto cleanup; } @@ -538,7 +537,7 @@ virTypedParamsDeserialize(struct _virTypedParameterRemo= te *remote_params, /* Check the length of the returned list carefully. */ if (remote_params_len > *nparams) { virReportError(VIR_ERR_RPC, - _("too many parameters '%u' for nparams '%d'"), + _("too many parameters '%1$u' for nparams '%2$d= '"), remote_params_len, *nparams); goto cleanup; } @@ -555,7 +554,7 @@ virTypedParamsDeserialize(struct _virTypedParameterRemo= te *remote_params, if (virStrcpyStatic(param->field, remote_param->field) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("parameter %s too big for destination"), + _("parameter %1$s too big for destination"), remote_param->field); goto cleanup; } @@ -590,7 +589,7 @@ virTypedParamsDeserialize(struct _virTypedParameterRemo= te *remote_params, param->value.s =3D g_strdup(remote_param->value.remote_typed_p= aram_value.s); break; default: - virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"), + virReportError(VIR_ERR_RPC, _("unknown parameter type: %1$d"), param->type); goto cleanup; } @@ -648,7 +647,7 @@ virTypedParamsSerialize(virTypedParameterPtr params, =20 if (nparams > limit) { virReportError(VIR_ERR_RPC, - _("too many parameters '%d' for limit '%d'"), + _("too many parameters '%1$d' for limit '%2$d'"), nparams, limit); goto cleanup; } @@ -695,7 +694,7 @@ virTypedParamsSerialize(virTypedParameterPtr params, val->value.remote_typed_param_value.s =3D g_strdup(param->valu= e.s); break; default: - virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"), + virReportError(VIR_ERR_RPC, _("unknown parameter type: %1$d"), param->type); goto cleanup; } diff --git a/src/util/viruri.c b/src/util/viruri.c index 3af2e54565..a824a983df 100644 --- a/src/util/viruri.c +++ b/src/util/viruri.c @@ -146,7 +146,7 @@ virURIParse(const char *uri) if (!xmluri) { /* libxml2 does not tell us what failed. Grr :-( */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse URI %s"), uri); + _("Unable to parse URI %1$s"), uri); return NULL; } =20 @@ -302,16 +302,15 @@ virURIFindAliasMatch(char *const*aliases, const char = *alias, =20 if (!(offset =3D strchr(*aliases, '=3D'))) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Malformed 'uri_aliases' config entry '%s', " - "expected 'alias=3Duri://host/path'"), *alias= es); + _("Malformed 'uri_aliases' config entry '%1$s',= expected 'alias=3Duri://host/path'"), + *aliases); return -1; } =20 safe =3D strspn(*aliases, URI_ALIAS_CHARS); if (safe < (offset - *aliases)) { virReportError(VIR_ERR_CONF_SYNTAX, - _("Malformed 'uri_aliases' config entry '%s', " - "aliases may only contain 'a-Z, 0-9, _, -'"), + _("Malformed 'uri_aliases' config entry '%1$s',= aliases may only contain 'a-Z, 0-9, _, -'"), *aliases); return -1; } @@ -387,7 +386,7 @@ virURIGetParam(virURI *uri, const char *name) } =20 virReportError(VIR_ERR_INVALID_ARG, - _("Missing URI parameter '%s'"), name); + _("Missing URI parameter '%1$s'"), name); return NULL; } =20 diff --git a/src/util/virusb.c b/src/util/virusb.c index 9e6ec9c9cf..cf3461f80a 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -95,7 +95,7 @@ static int virUSBSysReadFile(const char *f_name, const ch= ar *d_name, =20 if (virStrToLong_ui(buf, &ignore, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse usb file %s"), filename); + _("Could not parse usb file %1$s"), filename); return -1; } =20 @@ -145,7 +145,7 @@ virUSBDeviceSearch(unsigned int vendor, =20 if (virStrToLong_ui(tmpstr, &ignore, 10, &found_bus) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse dir name '%s'"), + _("Failed to parse dir name '%1$s'"), de->d_name); goto cleanup; } @@ -211,7 +211,7 @@ virUSBDeviceFindByVendor(unsigned int vendor, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Did not find USB device %04x:%04x"), vendor, pro= duct); + _("Did not find USB device %1$04x:%2$04x"), vendor,= product); return -1; } =20 @@ -249,7 +249,7 @@ virUSBDeviceFindByBus(unsigned int bus, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Did not find USB device bus:%u device:%u"), + _("Did not find USB device bus:%1$u device:%2$u"), bus, devno); return -1; } @@ -290,7 +290,7 @@ virUSBDeviceFind(unsigned int vendor, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Did not find USB device %04x:%04x bus:%u device:= %u"), + _("Did not find USB device %1$04x:%2$04x bus:%3$u d= evice:%4$u"), vendor, product, bus, devno); return -1; } @@ -319,7 +319,7 @@ virUSBDeviceNew(unsigned int bus, if (g_snprintf(dev->name, sizeof(dev->name), "%.3d:%.3d", dev->bus, dev->dev) >=3D sizeof(dev->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("dev->name buffer overflow: %.3d:%.3d"), + _("dev->name buffer overflow: %1$.3d:%2$.3d"), dev->bus, dev->dev); virUSBDeviceFree(dev); return NULL; @@ -337,7 +337,7 @@ virUSBDeviceNew(unsigned int bus, if (g_snprintf(dev->id, sizeof(dev->id), "%d %d", dev->bus, dev->dev) >=3D sizeof(dev->id)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("dev->id buffer overflow: %d %d"), + _("dev->id buffer overflow: %1$d %2$d"), dev->bus, dev->dev); virUSBDeviceFree(dev); return NULL; @@ -443,7 +443,7 @@ virUSBDeviceListAdd(virUSBDeviceList *list, { if (virUSBDeviceListFind(list, *dev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Device %s is already in use"), + _("Device %1$s is already in use"), (*dev)->name); return -1; } diff --git a/src/util/virutil.c b/src/util/virutil.c index ddc66001cb..40ca205595 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -173,7 +173,7 @@ virScaleInteger(unsigned long long *value, const char *= suffix, if (!suffix || !*suffix) { if (!scale) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid scale %llu"), scale); + _("invalid scale %1$llu"), scale); return -1; } suffix =3D ""; @@ -189,7 +189,7 @@ virScaleInteger(unsigned long long *value, const char *= suffix, base =3D 1000; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unknown suffix '%s'"), suffix); + _("unknown suffix '%1$s'"), suffix); return -1; } scale =3D 1; @@ -214,13 +214,13 @@ virScaleInteger(unsigned long long *value, const char= *suffix, break; default: virReportError(VIR_ERR_INVALID_ARG, - _("unknown suffix '%s'"), suffix); + _("unknown suffix '%1$s'"), suffix); return -1; } } =20 if (*value && *value > (limit / scale)) { - virReportError(VIR_ERR_OVERFLOW, _("value too large: %llu%s"), + virReportError(VIR_ERR_OVERFLOW, _("value too large: %1$llu%2$s"), *value, suffix); return -1; } @@ -575,7 +575,7 @@ virGetUserEnt(uid_t uid, char **name, gid_t *group, cha= r **dir, char **shell, bo goto cleanup; =20 virReportSystemError(rc, - _("Failed to find user record for uid '%u'"), + _("Failed to find user record for uid '%1$u'"= ), (unsigned int) uid); goto cleanup; } else if (pw =3D=3D NULL) { @@ -583,7 +583,7 @@ virGetUserEnt(uid_t uid, char **name, gid_t *group, cha= r **dir, char **shell, bo goto cleanup; =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to find user record for uid '%u'"), + _("Failed to find user record for uid '%1$u'"), (unsigned int) uid); goto cleanup; } @@ -640,11 +640,11 @@ static char *virGetGroupEnt(gid_t gid) if (rc !=3D 0 || gr =3D=3D NULL) { if (rc !=3D 0) { virReportSystemError(rc, - _("Failed to find group record for gid '%= u'"), + _("Failed to find group record for gid '%= 1$u'"), (unsigned int) gid); } else { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to find group record for gid '%u'"), + _("Failed to find group record for gid '%1$u'"), (unsigned int) gid); } =20 @@ -757,7 +757,7 @@ virGetUserID(const char *user, uid_t *uid) =20 if (virStrToLong_ui(user, NULL, 10, &uint_uid) < 0 || ((uid_t) uint_uid) !=3D uint_uid) { - virReportError(VIR_ERR_INVALID_ARG, _("Failed to parse user '%s'"), + virReportError(VIR_ERR_INVALID_ARG, _("Failed to parse user '%1$s'= "), user); return -1; } @@ -837,7 +837,7 @@ virGetGroupID(const char *group, gid_t *gid) =20 if (virStrToLong_ui(group, NULL, 10, &uint_gid) < 0 || ((gid_t) uint_gid) !=3D uint_gid) { - virReportError(VIR_ERR_INVALID_ARG, _("Failed to parse group '%s'"= ), + virReportError(VIR_ERR_INVALID_ARG, _("Failed to parse group '%1$s= '"), group); return -1; } @@ -950,7 +950,7 @@ virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups G_GNUC= _UNUSED, { if (gid !=3D (gid_t)-1 && setregid(gid, gid) < 0) { virReportSystemError(errno, - _("cannot change to '%u' group"), + _("cannot change to '%1$u' group"), (unsigned int) gid); return -1; } @@ -965,7 +965,7 @@ virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups G_GNUC= _UNUSED, =20 if (uid !=3D (uid_t)-1 && setreuid(uid, uid) < 0) { virReportSystemError(errno, - _("cannot change to uid to '%u'"), + _("cannot change to uid to '%1$u'"), (unsigned int) uid); return -1; } @@ -1161,7 +1161,7 @@ virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *gro= ups, int ngroups, capng_clear(CAPNG_SELECT_CAPS); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot apply process capabilities %d"), capn= g_ret); + _("cannot apply process capabilities %1$d"), ca= png_ret); return -1; } } @@ -1188,8 +1188,7 @@ virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *gro= ups, int ngroups, if (capBits & (1ULL << i)) { if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, i, 0, 0) < 0) { virReportSystemError(errno, - _("prctl failed to enable '%s' in the= " - "AMBIENT set"), + _("prctl failed to enable '%1$s' in t= he AMBIENT set"), capstr); return -1; } @@ -1215,7 +1214,7 @@ virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *gro= ups, int ngroups, =20 if ((capng_ret =3D capng_apply(CAPNG_SELECT_CAPS)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot apply process capabilities %d"), capng_re= t); + _("cannot apply process capabilities %1$d"), capng_= ret); return -1; } =20 @@ -1273,7 +1272,7 @@ virValidateWWN(const char *wwn) =20 if (i !=3D 16 || p[i]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Malformed wwn: %s"), wwn); + _("Malformed wwn: %1$s"), wwn); return false; } =20 @@ -1308,7 +1307,7 @@ virParseOwnershipIds(const char *label, uid_t *uidPtr= , gid_t *gidPtr) sep =3D strchr(tmp_label, ':'); if (sep =3D=3D NULL) { virReportError(VIR_ERR_INVALID_ARG, - _("Failed to parse uid and gid from '%s'"), + _("Failed to parse uid and gid from '%1$s'"), label); goto cleanup; } diff --git a/src/util/virvhba.c b/src/util/virvhba.c index 5ceedc8076..73129ddd1f 100644 --- a/src/util/virvhba.c +++ b/src/util/virvhba.c @@ -237,7 +237,7 @@ virVHBAManageVport(const int parent_host, break; default: virReportError(VIR_ERR_OPERATION_INVALID, - _("Invalid vport operation (%d)"), operation); + _("Invalid vport operation (%1$d)"), operation); return -1; } =20 @@ -251,8 +251,7 @@ virVHBAManageVport(const int parent_host, =20 if (!virFileExists(operation_path)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("vport operation '%s' is not supported " - "for host%d"), + _("vport operation '%1$s' is not supported for = host%2$d"), operation_file, parent_host); return -1; } @@ -268,7 +267,7 @@ virVHBAManageVport(const int parent_host, =20 if (virFileWriteStr(operation_path, vport_name, 0) < 0) { virReportSystemError(errno, - _("Write of '%s' to '%s' during vport create/= delete failed"), + _("Write of '%1$s' to '%2$s' during vport cre= ate/delete failed"), vport_name, operation_path); return -1; } diff --git a/src/util/virxml.c b/src/util/virxml.c index af4be4e443..1eaf81b6cc 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -276,7 +276,7 @@ virXMLCheckIllegalChars(const char *nodeName, char *c; if ((c =3D strpbrk(str, illegal))) { virReportError(VIR_ERR_XML_DETAIL, - _("invalid char in %s: %c"), nodeName, *c); + _("invalid char in %1$s: %2$c"), nodeName, *c); return -1; } return 0; @@ -322,7 +322,7 @@ virXMLPropStringRequired(xmlNodePtr node, =20 if (!ret) virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'= "), + _("Missing required attribute '%1$s' in element '%= 2$s'"), name, node->name); =20 return ret; @@ -345,7 +345,7 @@ virXMLNodeContentString(xmlNodePtr node) =20 if (node->type !=3D XML_ELEMENT_NODE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("node '%s' has unexpected type %d"), + _("node '%1$s' has unexpected type %2$d"), node->name, node->type); return NULL; } @@ -354,7 +354,7 @@ virXMLNodeContentString(xmlNodePtr node) =20 if (!ret) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("node '%s' has unexpected NULL content. This coul= d be caused by malformed input, or a memory allocation failure"), + _("node '%1$s' has unexpected NULL content. This co= uld be caused by malformed input, or a memory allocation failure"), node->name); return NULL; } @@ -382,7 +382,7 @@ virXMLPropEnumInternal(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } @@ -391,7 +391,7 @@ virXMLPropEnumInternal(xmlNodePtr node, if (ret < 0 || ((flags & VIR_XML_PROP_NONZERO) && (ret =3D=3D 0))) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'."), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'."), name, node->name, NULLSTR(tmp)); return -1; } @@ -508,28 +508,28 @@ virXMLPropInt(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } =20 if (virStrToLong_i(tmp, NULL, base, &val) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected integer value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected integer value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONNEGATIVE) && (val < 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected non-negative value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected non-negative value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONZERO) && (val =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : Zero is not permitted"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': Zero is not permitted"), name, node->name); return -1; } @@ -599,7 +599,7 @@ virXMLPropUIntDefault(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } @@ -608,14 +608,14 @@ virXMLPropUIntDefault(xmlNodePtr node, =20 if (ret < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected non-negative integer value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected non-negative integer value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONZERO) && (val =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : Zero is not permitted"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': Zero is not permitted"), name, node->name); return -1; } @@ -658,28 +658,28 @@ virXMLPropLongLong(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } =20 if (virStrToLong_ll(tmp, NULL, base, &val) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected long long integer value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected long long integer value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONNEGATIVE) && (val < 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected non-negative value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected non-negative value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONZERO) && (val =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : Zero is not permitted"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': Zero is not permitted"), name, node->name); return -1; } @@ -722,7 +722,7 @@ virXMLPropULongLong(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } @@ -731,14 +731,14 @@ virXMLPropULongLong(xmlNodePtr node, =20 if (ret < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected non-negative integer value"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected non-negative integer value"), name, node->name, tmp); return -1; } =20 if ((flags & VIR_XML_PROP_NONZERO) && (val =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : Zero is not permitted"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': Zero is not permitted"), name, node->name); return -1; } @@ -803,14 +803,14 @@ virXMLPropUUID(xmlNodePtr node, return 0; =20 virReportError(VIR_ERR_XML_ERROR, - _("Missing required attribute '%s' in element '%s'"= ), + _("Missing required attribute '%1$s' in element '%2= $s'"), name, node->name); return -1; } =20 if (virUUIDParse(tmp, val) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s'= : '%s'. Expected UUID"), + _("Invalid value for attribute '%1$s' in element '%= 2$s': '%3$s'. Expected UUID"), name, node->name, tmp); return -1; } @@ -965,7 +965,7 @@ virXPathNodeSet(const char *xpath, =20 if (obj->type !=3D XPATH_NODESET) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Incorrect xpath '%s'"), xpath); + _("Incorrect xpath '%1$s'"), xpath); return -1; } =20 @@ -1050,7 +1050,7 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSE= D, ...) =20 if (ctxt->lastError.file) { virGenericReportError(domcode, VIR_ERR_XML_DETAIL, - _("%s:%d: %s%s\n%s"), + _("%1$s:%2$d: %3$s%4$s\n%5$s"), ctxt->lastError.file, ctxt->lastError.line, ctxt->lastError.message, @@ -1058,7 +1058,7 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSE= D, ...) pointerstr); } else { virGenericReportError(domcode, VIR_ERR_XML_DETAIL, - _("at line %d: %s%s\n%s"), + _("at line %1$d: %2$s%3$s\n%4$s"), ctxt->lastError.line, ctxt->lastError.message, contextstr, @@ -1131,7 +1131,7 @@ virXMLParseHelper(int domcode, if (!xml) { if (virGetLastErrorCode() =3D=3D VIR_ERR_OK) { virGenericReportError(domcode, VIR_ERR_XML_ERROR, - _("failed to parse xml document '%s'"), + _("failed to parse xml document '%1$s'"), docname); } =20 @@ -1148,7 +1148,7 @@ virXMLParseHelper(int domcode, if (rootelement && !virXMLNodeNameEqual(rootnode, rootelement)) { virReportError(VIR_ERR_XML_ERROR, - _("expecting root element of '%s', not '%s'"), + _("expecting root element of '%1$s', not '%2$s'"), rootelement, rootnode->name); return NULL; } @@ -1250,14 +1250,14 @@ virXMLRewriteFile(int fd, if (data->warnCommand && virXMLEmitWarning(fd, data->warnName, data->warnCommand) < 0) { virReportSystemError(errno, - _("cannot write data to file '%s'"), + _("cannot write data to file '%1$s'"), path); return -1; } =20 if (safewrite(fd, data->xml, strlen(data->xml)) < 0) { virReportSystemError(errno, - _("cannot write data to file '%s'"), + _("cannot write data to file '%1$s'"), path); return -1; } @@ -1563,7 +1563,7 @@ virXMLValidatorInit(const char *schemafile) if (!(validator->rngParser =3D xmlRelaxNGNewParserCtxt(validator->schemafile))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create RNG parser for %s"), + _("Unable to create RNG parser for %1$s"), validator->schemafile); return NULL; } @@ -1575,7 +1575,7 @@ virXMLValidatorInit(const char *schemafile) =20 if (!(validator->rng =3D xmlRelaxNGParse(validator->rngParser))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to parse RNG %s: %s"), + _("Unable to parse RNG %1$s: %2$s"), validator->schemafile, virBufferCurrentContent(&validator->buf)); return NULL; @@ -1583,7 +1583,7 @@ virXMLValidatorInit(const char *schemafile) =20 if (!(validator->rngValid =3D xmlRelaxNGNewValidCtxt(validator->rng)))= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create RNG validation context %s"), + _("Unable to create RNG validation context %1$s"), validator->schemafile); return NULL; } @@ -1603,7 +1603,7 @@ virXMLValidatorValidate(virXMLValidator *validator, { if (xmlRelaxNGValidateDoc(validator->rngValid, doc) !=3D 0) { virReportError(VIR_ERR_XML_INVALID_SCHEMA, - _("Unable to validate doc against %s\n%s"), + _("Unable to validate doc against %1$s\n%2$s"), validator->schemafile, virBufferCurrentContent(&validator->buf)); return -1; @@ -1823,7 +1823,7 @@ virXMLNamespaceRegister(xmlXPathContextPtr ctxt, BAD_CAST ns->prefix, BAD_CAST ns->uri) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to register xml namespace '%s'"), + _("Failed to register xml namespace '%1$s'"), ns->uri); return -1; } @@ -1876,7 +1876,7 @@ virParseScaledValue(const char *xpath, if (!required) return 0; virReportError(VIR_ERR_XML_ERROR, - _("missing element or attribute '%s'"), + _("missing element or attribute '%1$s'"), xpath); return -1; } @@ -1884,7 +1884,7 @@ virParseScaledValue(const char *xpath, =20 if (virStrToLong_ullp(bytes_str, NULL, 10, &bytes) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value '%s' for element or attribute '%s'= "), + _("Invalid value '%1$s' for element or attribute '%= 2$s'"), bytes_str, xpath); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464776; cv=none; d=zohomail.com; s=zohoarc; b=TRnwX+5W5GTPlzbOwd5KuhV3x5uvMr0uqPari1CfpzUjddQ2u0nm8JfUn9tDdZBALK2YUtrwnYLLib9qDbvWPeH4QNvRF3pNF2ROV3GJi6ZWj9fmUded0auBqZ7f1iTR7kkXFNfyWlkAPnk1srdhAjcFtucuVEfVpmjw3+ouExg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464776; 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=JrPVoqiitdI/3eREwljTEAOylYpI4FESS+wdRi+QHc8=; b=nQZXnl69nwD46jijS6AVyggXqlaLurkh6UzDyQ+6p0SLyUq3g3wtTm7p2QYtt1Z5yEPm5M3HDqMzvbKpOwpgYkYLRPjv7MnqTImUrNr2ouEz0EJnHs+SCwozi5VqiqIS30xCgyNcdvzgiHUxgWWd93+W9mjDaZIrEqHqewo9mQs= 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 1678464776654543.7077459750427; Fri, 10 Mar 2023 08:12:56 -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-227-4nUZjW1JP0qHWAbD211MOg-1; Fri, 10 Mar 2023 11:11:40 -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 C8F73823DED; Fri, 10 Mar 2023 16:11:09 +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 AEFFD1121339; Fri, 10 Mar 2023 16:11:09 +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 7D5161946A76; Fri, 10 Mar 2023 16:11:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 27F761946587 for ; Fri, 10 Mar 2023 16:11:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0DFF72166B2A; Fri, 10 Mar 2023 16:11:09 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B8C52166B26 for ; Fri, 10 Mar 2023 16:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464775; 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=JrPVoqiitdI/3eREwljTEAOylYpI4FESS+wdRi+QHc8=; b=dAnvHFKKSkrfMhHXow4MEGjpP4cSAsoT2GvA6K49+6rruSiexdfnjZhEFcCkdpWBka7ddR N1yPqpdYWXXL+SxoA5oMwkIXC/f8shjjUdeoeUsLt6V95qOeJNvp0f3IsWu/p0Ww+JnCpR kaxdCf1D1kc4xVGrn2mOl9MY+YeebtE= X-MC-Unique: 4nUZjW1JP0qHWAbD211MOg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 43/51] vbox: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:59 +0100 Message-Id: <395044f75cb2eb2a124ccbe41cb82f7ca5c8e46d.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678464777634100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/vbox/vbox_XPCOMCGlue.c | 6 +- src/vbox/vbox_common.c | 157 +++++++++++++++++----------------- src/vbox/vbox_network.c | 2 +- src/vbox/vbox_snapshot_conf.c | 12 +-- src/vbox/vbox_storage.c | 20 ++--- src/vbox/vbox_tmpl.c | 16 ++-- 6 files changed, 106 insertions(+), 107 deletions(-) diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c index 77a3041612..688211d122 100644 --- a/src/vbox/vbox_XPCOMCGlue.c +++ b/src/vbox/vbox_XPCOMCGlue.c @@ -86,7 +86,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignoreM= issing, =20 if (!virFileExists(name)) { if (!ignoreMissing) - VIR_ERROR(_("Library '%s' doesn't exist"), name); + VIR_ERROR(_("Library '%1$s' doesn't exist"), name); =20 VIR_FREE(name); return -1; @@ -124,7 +124,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignor= eMissing, dlsym(hVBoxXPCOMC, VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME); =20 if (pfnGetFunctions =3D=3D NULL) { - VIR_ERROR(_("Could not dlsym %s from '%s': %s"), + VIR_ERROR(_("Could not dlsym %1$s from '%2$s': %3$s"), VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, name, dlerror()); goto cleanup; } @@ -132,7 +132,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignor= eMissing, pVBoxFuncs_v2_2 =3D pfnGetFunctions(VBOX_XPCOMC_VERSION); =20 if (pVBoxFuncs_v2_2 =3D=3D NULL) { - VIR_ERROR(_("Calling %s from '%s' failed"), + VIR_ERROR(_("Calling %1$s from '%2$s' failed"), VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, name); goto cleanup; } diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 7aed421390..34ca0cc28c 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -493,7 +493,7 @@ vboxSetStorageController(virDomainControllerDef *contro= ller, case VIR_DOMAIN_CONTROLLER_TYPE_ISA: case VIR_DOMAIN_CONTROLLER_TYPE_LAST: vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The vbox driver does not support %s controller = type"), + _("The vbox driver does not support %1$s controlle= r type"), virDomainControllerTypeToString(controller->type)); return -1; } @@ -527,13 +527,13 @@ vboxSetStorageController(virDomainControllerDef *cont= roller, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DC390: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AM53C974: vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The vbox driver does not support %s SCSI co= ntroller model"), + _("The vbox driver does not support %1$s SCSI = controller model"), virDomainControllerModelSCSITypeToString(contr= oller->model)); goto cleanup; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST: vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected SCSI controller model %d"), + _("Unexpected SCSI controller model %1$d"), controller->model); goto cleanup; } @@ -555,7 +555,7 @@ vboxSetStorageController(virDomainControllerDef *contro= ller, case VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST: case VIR_DOMAIN_CONTROLLER_MODEL_IDE_DEFAULT: vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unexpected IDE controller model %d"), + _("Unexpected IDE controller model %1$d"), controller->model); goto cleanup; } @@ -570,7 +570,7 @@ vboxSetStorageController(virDomainControllerDef *contro= ller, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to add storage controller (name: %s, bus= Type: %d)"), + _("Failed to add storage controller (name: %1$s, b= usType: %2$d)"), debugName, vboxBusType); goto cleanup; } @@ -883,7 +883,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr = conn, int id) * starts from 1, so refuse id =3D=3D 0, and adjust the rest */ if (id =3D=3D 0) { vboxReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id %d"), id); + _("no domain with matching id %1$d"), id); return NULL; } id =3D id - 1; @@ -1163,7 +1163,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) =20 if (type !=3D VIR_STORAGE_TYPE_FILE) { vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported storage type %s, the only suppo= rted type is %s"), + _("Unsupported storage type %1$s, the only sup= ported type is %2$s"), virStorageTypeToString(type), virStorageTypeToString(VIR_STORAGE_TYPE_FILE)); ret =3D -1; @@ -1197,7 +1197,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) case VIR_DOMAIN_DISK_DEVICE_LUN: case VIR_DOMAIN_DISK_DEVICE_LAST: vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The vbox driver does not support %s disk de= vice"), + _("The vbox driver does not support %1$s disk = device"), virDomainDiskDeviceTypeToString(disk->device)); ret =3D -1; goto cleanup; @@ -1238,7 +1238,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) case VIR_DOMAIN_DISK_BUS_NONE: case VIR_DOMAIN_DISK_BUS_LAST: vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("The vbox driver does not support %s bus typ= e"), + _("The vbox driver does not support %1$s bus t= ype"), virDomainDiskBusTypeToString(disk->bus)); ret =3D -1; goto cleanup; @@ -1269,7 +1269,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) =20 if (!medium) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to open the following disk/dvd/f= loppy to the machine: %s"), + _("Failed to open the following disk/dvd/f= loppy to the machine: %1$s"), src); ret =3D -1; goto cleanup; @@ -1278,7 +1278,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) rc =3D gVBoxAPI.UIMedium.GetId(medium, &mediumUUID); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Can't get the UUID of the file to be at= tached as harddisk/dvd/floppy: %s"), + _("Can't get the UUID of the file to be at= tached as harddisk/dvd/floppy: %1$s"), src); ret =3D -1; goto cleanup; @@ -1313,7 +1313,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDrive= r *data, IMachine *machine) =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not attach the file as harddisk/dvd/f= loppy: %s"), + _("Could not attach the file as harddisk/dvd/f= loppy: %1$s"), src); ret =3D -1; goto cleanup; @@ -1983,7 +1983,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int flags VIR_DIV_UP(def->mem.cur_balloon,= 1024)); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not set the memory size of the domain to:= %llu Kb"), + _("could not set the memory size of the domain to:= %1$llu Kb"), def->mem.cur_balloon); } =20 @@ -1994,7 +1994,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int flags rc =3D gVBoxAPI.UIMachine.SetCPUCount(machine, virDomainDefGetVcpusMax= (def)); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not set the number of virtual CPUs to: %u= "), + _("could not set the number of virtual CPUs to: %1= $u"), virDomainDefGetVcpusMax(def)); } =20 @@ -2003,7 +2003,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int flags VIR_TRISTATE_SWITCH_ON); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not change PAE status to: %s"), + _("could not change PAE status to: %1$s"), (def->features[VIR_DOMAIN_FEATURE_PAE] =3D=3D VIR_= TRISTATE_SWITCH_ON) ? _("Enabled") : _("Disabled")); } @@ -2015,7 +2015,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int flags VIR_TRISTATE_SWITCH_ON= ); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not change ACPI status to: %s"), + _("could not change ACPI status to: %1$s"), (def->features[VIR_DOMAIN_FEATURE_ACPI] =3D=3D= VIR_TRISTATE_SWITCH_ON) ? _("Enabled") : _("Disabled")); } @@ -2024,7 +2024,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int flags VIR_TRISTATE_SWITCH_= ON); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not change APIC status to: %s"), + _("could not change APIC status to: %1$s"), (def->features[VIR_DOMAIN_FEATURE_APIC] =3D=3D= VIR_TRISTATE_SWITCH_ON) ? _("Enabled") : _("Disabled")); } @@ -2829,7 +2829,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsi= gned long memory) ret =3D 0; } else { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not set the memory size of the domain= to: %lu Kb"), + _("could not set the memory size of the domain= to: %1$lu Kb"), memory); } } @@ -2967,7 +2967,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, = unsigned int nvcpus, return ret; =20 if (flags !=3D VIR_DOMAIN_AFFECT_LIVE) { - vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"= ), flags); + vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%1$x= )"), flags); return -1; } =20 @@ -2984,17 +2984,17 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom= , unsigned int nvcpus, ret =3D 0; } else { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not set the number of cpus of the= domain to: %u"), + _("could not set the number of cpus of the= domain to: %1$u"), CPUCount); } VBOX_RELEASE(machine); } else { vboxReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id %d"), dom->id); + _("no domain with matching id %1$d"), dom->id); } } else { vboxReportError(VIR_ERR_NO_DOMAIN, - _("can't open session to the domain with id %d"), = dom->id); + _("can't open session to the domain with id %1$d")= , dom->id); } gVBoxAPI.UISession.Close(data->vboxSession); =20 @@ -3018,7 +3018,7 @@ static int vboxDomainGetVcpusFlags(virDomainPtr dom, = unsigned int flags) return ret; =20 if (flags !=3D (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) { - vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"= ), flags); + vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%1$x= )"), flags); return -1; } =20 @@ -3233,7 +3233,7 @@ vboxDumpStorageControllers(virDomainDef *def, IMachin= e *machine) cont =3D virDomainDefAddController(def, type, -1, model); if (!cont) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to add %s controller type definit= ion"), + _("Failed to add %1$s controller type defin= ition"), virDomainControllerTypeToString(type)); goto cleanup; } @@ -3391,7 +3391,7 @@ vboxDumpDisks(virDomainDef *def, struct _vboxDriver *= data, IMachine *machine) =20 if (!disk->dst) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not generate medium name for the disk= at: port:%d, slot:%d"), + _("Could not generate medium name for the disk= at: port:%1$d, slot:%2$d"), devicePort, deviceSlot); goto cleanup; } @@ -3469,7 +3469,7 @@ vboxDumpDisks(virDomainDef *def, struct _vboxDriver *= data, IMachine *machine) case DeviceType_SharedFolder: case DeviceType_Null: vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unsupported vbox device type: %d"), deviceT= ype); + _("Unsupported vbox device type: %1$d"), devic= eType); goto cleanup; } =20 @@ -4351,7 +4351,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not attach shared folder '%s'"), + _("could not attach shared folder '%1$s'"), dev->data.fs->dst); ret =3D -1; } else { @@ -4365,7 +4365,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom, VBOX_RELEASE(machine); =20 if (ret =3D=3D -VIR_ERR_ARGUMENT_UNSUPPORTED) { - vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported d= evice type %d"), dev->type); + vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported d= evice type %1$d"), dev->type); ret =3D -1; } } @@ -4469,7 +4469,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, c= onst char *xml) =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not detach shared folder '%s'"), + _("could not detach shared folder '%1$s'"), dev->data.fs->dst); } else { ret =3D 0; @@ -4481,7 +4481,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, c= onst char *xml) VBOX_RELEASE(machine); =20 if (ret =3D=3D -VIR_ERR_ARGUMENT_UNSUPPORTED) { - vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported d= evice type %d"), dev->type); + vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported d= evice type %1$d"), dev->type); ret =3D -1; } } @@ -4786,7 +4786,7 @@ vboxSnapshotRedefine(virDomainPtr dom, */ if (unlink(currentSnapshotXmlFilePath) < 0) { virReportSystemError(errno, - _("Unable to delete file %s"), currentSna= pshotXmlFilePath); + _("Unable to delete file %1$s"), currentS= napshotXmlFilePath); goto cleanup; } } @@ -4942,7 +4942,7 @@ vboxSnapshotRedefine(virDomainPtr dom, gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while closing medium, rc=3D%0= 8x"), + _("Error while closing medium, rc=3D%1= $08x"), resultCode.uResultCode); VIR_FREE(locationUtf8); goto cleanup; @@ -5160,7 +5160,7 @@ vboxSnapshotRedefine(virDomainPtr dom, &searchResultTab); if (resultSize !=3D it + 1) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID %s"), searchRes= ultTab[it]); + _("Unable to find UUID %1$s"), searchR= esultTab[it]); goto cleanup; } =20 @@ -5249,7 +5249,7 @@ vboxSnapshotRedefine(virDomainPtr dom, gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while creating diff storage, rc= =3D%08x"), + _("Error while creating diff storage, rc= =3D%1$08x"), resultCode.uResultCode); goto cleanup; } @@ -5294,7 +5294,7 @@ vboxSnapshotRedefine(virDomainPtr dom, &searchResultTab); if (resultSize !=3D it + 1) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID %s"), searchResultT= ab[it]); + _("Unable to find UUID %1$s"), searchResul= tTab[it]); goto cleanup; } =20 @@ -5480,7 +5480,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom, rc =3D gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not open VirtualBox session with domain %= s"), + _("could not open VirtualBox session with domain %= 1$s"), dom->name); goto cleanup; } @@ -5494,7 +5494,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom, rc =3D gVBoxAPI.UIConsole.TakeSnapshot(console, name, description, &pr= ogress); if (NS_FAILED(rc) || !progress) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not take snapshot of domain %s"), dom->na= me); + _("could not take snapshot of domain %1$s"), dom->= name); goto cleanup; } =20 @@ -5502,14 +5502,14 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom, gVBoxAPI.UIProgress.GetResultCode(progress, &result); if (RC_FAILED(result)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not take snapshot of domain %s"), dom->na= me); + _("could not take snapshot of domain %1$s"), dom->= name); goto cleanup; } =20 rc =3D gVBoxAPI.UIMachine.GetCurrentSnapshot(machine, &snapshot); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get current snapshot of domain %s"), + _("could not get current snapshot of domain %1$s"), dom->name); goto cleanup; } @@ -5544,7 +5544,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom, rc =3D gVBoxAPI.UIMachine.GetSnapshotCount(machine, &count); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get snapshot count for domain %s"), + _("could not get snapshot count for domain %1$s"), dom->name); goto error; } @@ -5557,7 +5557,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom, rc =3D gVBoxAPI.UIMachine.FindSnapshot(machine, &empty, list); if (NS_FAILED(rc) || !list[0]) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get root snapshot for domain %s"), + _("could not get root snapshot for domain %1$s"), dom->name); goto error; } @@ -5570,7 +5570,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom, =20 if (!list[next]) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected number of snapshots < %u"), coun= t); + _("unexpected number of snapshots < %1$u"), co= unt); goto error; } =20 @@ -5587,7 +5587,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom, continue; if (top =3D=3D count) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected number of snapshots > %u"), = count); + _("unexpected number of snapshots > %1$u")= , count); gVBoxAPI.UArray.vboxArrayRelease(&children); goto error; } @@ -5647,7 +5647,7 @@ vboxDomainSnapshotGet(struct _vboxDriver *data, =20 if (!snapshot) { vboxReportError(VIR_ERR_OPERATION_INVALID, - _("domain %s has no snapshots with name %s"), + _("domain %1$s has no snapshots with name %2$s"), dom->name, name); goto cleanup; } @@ -6066,7 +6066,7 @@ vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDef *de= f, sdCount); if (!defdom->disks[diskCount]->dst) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not generate medium name for the disk= at: port:%d, slot:%d"), devicePort, deviceSlot); + _("Could not generate medium name for the disk= at: port:%1$d, slot:%2$d"), devicePort, deviceSlot); ret =3D -1; goto cleanup; } @@ -6188,7 +6188,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSn= apshotPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetDescription(snap, &str16); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get description of snapshot %s"), + _("could not get description of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6202,7 +6202,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSn= apshotPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetTimeStamp(snap, ×tamp); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get creation time of snapshot %s"), + _("could not get creation time of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6212,7 +6212,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSn= apshotPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetParent(snap, &parent); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get parent of snapshot %s"), + _("could not get parent of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6220,7 +6220,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSn= apshotPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetName(parent, &str16); if (NS_FAILED(rc) || !str16) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get name of parent of snapshot %s= "), + _("could not get name of parent of snapshot %1= $s"), snapshot->name); goto cleanup; } @@ -6233,7 +6233,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSn= apshotPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetOnline(snap, &online); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get online state of snapshot %s"), + _("could not get online state of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6281,7 +6281,7 @@ static int vboxDomainSnapshotNum(virDomainPtr dom, un= signed int flags) rc =3D gVBoxAPI.UIMachine.GetSnapshotCount(machine, &snapshotCount); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get snapshot count for domain %s"), + _("could not get snapshot count for domain %1$s"), dom->name); goto cleanup; } @@ -6331,7 +6331,7 @@ static int vboxDomainSnapshotListNames(virDomainPtr d= om, char **names, rc =3D gVBoxAPI.UIMachine.FindSnapshot(machine, &empty, snapshots); if (NS_FAILED(rc) || !snapshots[0]) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get root snapshot for domain %s"), + _("could not get root snapshot for domain %1$s= "), dom->name); goto cleanup; } @@ -6469,13 +6469,13 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr sn= apshot, rc =3D gVBoxAPI.UISnapshot.GetParent(snap, &parent); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get parent of snapshot %s"), + _("could not get parent of snapshot %1$s"), snapshot->name); goto cleanup; } if (!parent) { vboxReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("snapshot '%s' does not have a parent"), + _("snapshot '%1$s' does not have a parent"), snapshot->name); goto cleanup; } @@ -6483,7 +6483,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snap= shot, rc =3D gVBoxAPI.UISnapshot.GetName(parent, &nameUtf16); if (NS_FAILED(rc) || !nameUtf16) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get name of parent of snapshot %s"), + _("could not get name of parent of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6671,7 +6671,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapsh= otPtr snapshot, rc =3D gVBoxAPI.UISnapshot.GetOnline(newSnapshot, &online); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get online state of snapshot %s"), + _("could not get online state of snapshot %1$s"), snapshot->name); goto cleanup; } @@ -6679,7 +6679,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapsh= otPtr snapshot, rc =3D gVBoxAPI.UIMachine.GetCurrentSnapshot(machine, &prevSnapshot); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get current snapshot of domain %s"), + _("could not get current snapshot of domain %1$s"), dom->name); goto cleanup; } @@ -6976,7 +6976,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while creating diff storage, = rc=3D%08x"), + _("Error while creating diff storage, = rc=3D%1$08x"), resultCode.uResultCode); goto cleanup; } @@ -7021,7 +7021,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) &searchResultTab); if (resultSize !=3D it + 1) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID %s"), searchRes= ultTab[it]); + _("Unable to find UUID %1$s"), searchR= esultTab[it]); goto cleanup; } =20 @@ -7050,7 +7050,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) def->parent.dom->dis= ks[it]->src->path); if (!uuidRO) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("No such disk in media registry %s"), + _("No such disk in media registry %1$s= "), def->parent.dom->disks[it]->src->path); goto cleanup; } @@ -7061,7 +7061,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) &searchResultTab); if (resultSize !=3D it + 1) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID %s"), + _("Unable to find UUID %1$s"), searchResultTab[it]); goto cleanup; } @@ -7085,12 +7085,12 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnaps= hotPtr snapshot) def->disks[it].src->= path); if (!uuidRW) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID for location %s"), def-= >disks[it].src->path); + _("Unable to find UUID for location %1$s"), de= f->disks[it].src->path); goto cleanup; } if (virVBoxSnapshotConfRemoveHardDisk(snapshotMachineDesc->mediaRe= gistry, uuidRW) < 0) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to remove disk from media registry. = uuid =3D %s"), uuidRW); + _("Unable to remove disk from media registry. = uuid =3D %1$s"), uuidRW); goto cleanup; } } @@ -7102,12 +7102,12 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnaps= hotPtr snapshot) def->parent.dom-= >disks[it]->src->path); if (!uuidRO) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find UUID for location %s"), = def->parent.dom->disks[it]->src->path); + _("Unable to find UUID for location %1$s")= , def->parent.dom->disks[it]->src->path); goto cleanup; } if (virVBoxSnapshotConfRemoveHardDisk(snapshotMachineDesc->med= iaRegistry, uuidRO) < 0) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to remove disk from media regist= ry. uuid =3D %s"), uuidRO); + _("Unable to remove disk from media regist= ry. uuid =3D %1$s"), uuidRO); goto cleanup; } } @@ -7146,7 +7146,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while closing medium, rc=3D%08x"), + _("Error while closing medium, rc=3D%1$08x= "), resultCode.uResultCode); goto cleanup; } @@ -7167,7 +7167,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapsho= tPtr snapshot) /* removing the snapshot */ if (virVBoxSnapshotConfRemoveSnapshot(snapshotMachineDesc, def->parent= .name) < 0) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to remove snapshot %s"), def->parent.nam= e); + _("Unable to remove snapshot %1$s"), def->parent.n= ame); goto cleanup; } =20 @@ -7288,7 +7288,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshot= Ptr snapshot, rc =3D gVBoxAPI.UISession.GetConsole(data->vboxSession, &console); if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("could not open VirtualBox session with domain %= s"), + _("could not open VirtualBox session with domain %= 1$s"), dom->name); goto cleanup; } @@ -7342,7 +7342,7 @@ vboxDomainScreenshot(virDomainPtr dom, =20 if (screen >=3D max_screen) { vboxReportError(VIR_ERR_INVALID_ARG, - _("screen ID higher than monitor count (%d)"), max= _screen); + _("screen ID higher than monitor count (%1$d)"), m= ax_screen); VBOX_RELEASE(machine); return NULL; } @@ -7356,7 +7356,7 @@ vboxDomainScreenshot(virDomainPtr dom, tmp =3D g_strdup_printf("%s/vbox.screendump.XXXXXX", cacheDir); =20 if ((tmp_fd =3D g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IW= USR)) =3D=3D -1) { - virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"), tmp); + virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"), tmp); VBOX_RELEASE(machine); return NULL; } @@ -7399,13 +7399,12 @@ vboxDomainScreenshot(virDomainPtr dom, =20 if (safewrite(tmp_fd, (char *) screenData, screenDataSize) < 0) { - virReportSystemError(errno, _("unable to write data " - "to '%s'"), tmp); + virReportSystemError(errno, _("unable to write data to= '%1$s'"), tmp); goto endjob; } =20 if (VIR_CLOSE(tmp_fd) < 0) { - virReportSystemError(errno, _("unable to close %s"), t= mp); + virReportSystemError(errno, _("unable to close %1$s"),= tmp); goto endjob; } =20 @@ -7764,7 +7763,7 @@ vboxDomainSendKey(virDomainPtr dom, keyDownCodes[i]); if (keycode < 0) { vboxReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot translate keycode %u of %s codes= et to xt keycode"), + _("cannot translate keycode %1$u of %2$s c= odeset to xt keycode"), keyDownCodes[i], virKeycodeSetTypeToString(codeset)); goto cleanup; @@ -7782,7 +7781,7 @@ vboxDomainSendKey(virDomainPtr dom, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to open VirtualBox session with domain %= s"), + _("Unable to open VirtualBox session with domain %= 1$s"), dom->name); goto cleanup; } @@ -7791,7 +7790,7 @@ vboxDomainSendKey(virDomainPtr dom, =20 if (NS_FAILED(rc) || !console) { vboxReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to get Console object for domain %s"), + _("Unable to get Console object for domain %1$s"), dom->name); goto cleanup; } @@ -7800,7 +7799,7 @@ vboxDomainSendKey(virDomainPtr dom, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to get Keyboard object for domain %s"), + _("Unable to get Keyboard object for domain %1$s"), dom->name); goto cleanup; } @@ -7810,7 +7809,7 @@ vboxDomainSendKey(virDomainPtr dom, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to send keyboard scancodes for domain %s= "), + _("Unable to send keyboard scancodes for domain %1= $s"), dom->name); goto cleanup; } @@ -7825,7 +7824,7 @@ vboxDomainSendKey(virDomainPtr dom, =20 if (NS_FAILED(rc)) { vboxReportError(VIR_ERR_OPERATION_FAILED, - _("Unable to send keyboard scan codes to domain %s= "), + _("Unable to send keyboard scan codes to domain %1= $s"), dom->name); goto cleanup; } diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c index 111bb7144a..31ab51f5e1 100644 --- a/src/vbox/vbox_network.c +++ b/src/vbox/vbox_network.c @@ -643,7 +643,7 @@ vboxNetworkUndefineDestroy(virNetworkPtr network, bool = removeinterface) gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Error while removing hostonly network interf= ace, rc=3D%08x"), + _("Error while removing hostonly network interf= ace, rc=3D%1$08x"), resultCode.uResultCode); goto cleanup; } diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index 2f3f48d688..d761676db0 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -594,7 +594,7 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath, BAD_CAST "vbox", BAD_CAST VBOX_SETTINGS_NS) < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Failed to register xml namespace '%s'"), + _("Failed to register xml namespace '%1$s'"), VBOX_SETTINGS_NS); goto cleanup; } @@ -757,7 +757,7 @@ virVBoxSnapshotConfAddSnapshotToXmlMachine(virVBoxSnaps= hotConfSnapshot *snapshot parentSnapshot =3D virVBoxSnapshotConfSnapshotByName(machine->snap= shot, snapshotParentName); if (parentSnapshot =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find the snapshot %s"), snapshotPa= rentName); + _("Unable to find the snapshot %1$s"), snapshot= ParentName); return -1; } VIR_EXPAND_N(parentSnapshot->children, parentSnapshot->nchildren, = 1); @@ -841,7 +841,7 @@ virVBoxSnapshotConfRemoveSnapshot(virVBoxSnapshotConfMa= chine *machine, snapshot =3D virVBoxSnapshotConfSnapshotByName(machine->snapshot, snap= shotName); if (snapshot =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find the snapshot with name %s"), snap= shotName); + _("Unable to find the snapshot with name %1$s"), sn= apshotName); return -1; } if (snapshot->nchildren > 0) { @@ -902,7 +902,7 @@ virVBoxSnapshotConfRemoveHardDisk(virVBoxSnapshotConfMe= diaRegistry *mediaRegistr } if (hardDisk =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find the hard disk with uuid %s"), uui= d); + _("Unable to find the hard disk with uuid %1$s"), u= uid); return -1; } if (hardDisk->parent =3D=3D NULL) { @@ -1181,7 +1181,7 @@ virVBoxSnapshotConfIsCurrentSnapshot(virVBoxSnapshotC= onfMachine *machine, snapshot =3D virVBoxSnapshotConfSnapshotByName(machine->snapshot, snap= shotName); if (snapshot =3D=3D NULL) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("Unable to find the snapshot %s"), snapshotName); + _("Unable to find the snapshot %1$s"), snapshotName= ); return 0; } return STREQ(snapshot->uuid, machine->currentSnapshot); @@ -1337,7 +1337,7 @@ virVBoxSnapshotConfRemoveFakeDisks(virVBoxSnapshotCon= fMachine *machine) if (strstr(diskList[i]->location, "fake") !=3D NULL) { if (virVBoxSnapshotConfRemoveHardDisk(machine->mediaRegistry, = diskList[i]->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to remove hard disk %s from media= registry"), + _("Unable to remove hard disk %1$s from med= ia registry"), diskList[i]->location); goto cleanup; } diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c index 27d8a474f2..41b19a9c62 100644 --- a/src/vbox/vbox_storage.c +++ b/src/vbox/vbox_storage.c @@ -97,7 +97,7 @@ static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr = pool) gVBoxAPI.UArray.handleGetHardDisks(d= ata->vboxObj)); if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get number of volumes in the pool: %s,= rc=3D%08x"), + _("could not get number of volumes in the pool: %1$= s, rc=3D%2$08x"), pool->name, (unsigned)rc); return -1; } @@ -135,7 +135,7 @@ vboxStoragePoolListVolumes(virStoragePoolPtr pool, char= **const names, int nname gVBoxAPI.UArray.handleGetHardDisks(d= ata->vboxObj)); if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not get the volume list in the pool: %s, r= c=3D%08x"), + _("could not get the volume list in the pool: %1$s,= rc=3D%2$08x"), pool->name, (unsigned)rc); return -1; } @@ -267,7 +267,7 @@ vboxStorageVolLookupByKey(virConnectPtr conn, const cha= r *key) =20 if (virUUIDParse(key, uuid) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse UUID from '%s'"), key); + _("Could not parse UUID from '%1$s'"), key); return NULL; } =20 @@ -457,7 +457,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool, rc =3D gVBoxAPI.UIVirtualBox.CreateHardDisk(data->vboxObj, hddFormatUt= f16, hddNameUtf16, &hardDisk); if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not create harddisk, rc=3D%08x"), + _("Could not create harddisk, rc=3D%1$08x"), (unsigned)rc); goto cleanup; } @@ -470,7 +470,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool, rc =3D gVBoxAPI.UIMedium.CreateBaseStorage(hardDisk, logicalSize, vari= ant, &progress); if (NS_FAILED(rc) || !progress) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not create base storage, rc=3D%08x"), + _("Could not create base storage, rc=3D%1$08x"), (unsigned)rc); goto cleanup; } @@ -479,7 +479,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool, gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode); if (RC_FAILED(resultCode)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not create base storage, rc=3D%08x"), + _("Could not create base storage, rc=3D%1$08x"), (unsigned)resultCode.uResultCode); goto cleanup; } @@ -525,7 +525,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, u= nsigned int flags) =20 if (virUUIDParse(vol->key, uuid) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse UUID from '%s'"), vol->key); + _("Could not parse UUID from '%1$s'"), vol->key); return -1; } =20 @@ -676,7 +676,7 @@ static int vboxStorageVolGetInfo(virStorageVolPtr vol, = virStorageVolInfoPtr info =20 if (virUUIDParse(vol->key, uuid) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse UUID from '%s'"), vol->key); + _("Could not parse UUID from '%1$s'"), vol->key); return ret; } =20 @@ -737,7 +737,7 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr = vol, unsigned int flags) =20 if (virUUIDParse(vol->key, uuid) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse UUID from '%s'"), vol->key); + _("Could not parse UUID from '%1$s'"), vol->key); return ret; } =20 @@ -818,7 +818,7 @@ static char *vboxStorageVolGetPath(virStorageVolPtr vol) =20 if (virUUIDParse(vol->key, uuid) < 0) { virReportError(VIR_ERR_INVALID_ARG, - _("Could not parse UUID from '%s'"), vol->key); + _("Could not parse UUID from '%1$s'"), vol->key); return ret; } =20 diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 3db8557c53..908625e702 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -317,14 +317,14 @@ _vboxDomainSnapshotRestore(virDomainPtr dom, if (state >=3D MachineState_FirstOnline && state <=3D MachineState_LastOnline) { virReportError(VIR_ERR_OPERATION_INVALID, - _("domain %s is already running"), dom->name); + _("domain %1$s is already running"), dom->name); goto cleanup; } =20 rc =3D machine->vtbl->LockMachine(machine, data->vboxSession, LockType= _Write); if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not open VirtualBox session with domain %s= "), + _("could not open VirtualBox session with domain %1= $s"), dom->name); goto cleanup; } @@ -337,7 +337,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom, _("cannot restore domain snapshot for running d= omain")); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not restore snapshot for domain %s"), + _("could not restore snapshot for domain %1$s"), dom->name); } goto cleanup; @@ -347,7 +347,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom, progress->vtbl->GetResultCode(progress, &result); if (NS_FAILED(result)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("could not restore snapshot for domain %s"), dom-= >name); + _("could not restore snapshot for domain %1$s"), do= m->name); goto cleanup; } =20 @@ -1118,7 +1118,7 @@ _consoleSaveState(IConsole *console, IProgress **prog= ress) rc =3D machine->vtbl->SaveState(machine, progress); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to get machine from console. (error %d)")= , rc); + _("unable to get machine from console. (error %1$d)= "), rc); =20 return rc; } @@ -1176,7 +1176,7 @@ _consoleTakeSnapshot(IConsole *console, PRUnichar *na= me, rc =3D machine->vtbl->TakeSnapshot(machine, name, description, bpa= use, &id, progress); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to get machine from console. (error %d)")= , rc); + _("unable to get machine from console. (error %1$d)= "), rc); =20 VBOX_RELEASE(machine); return rc; @@ -1194,7 +1194,7 @@ _consoleDeleteSnapshot(IConsole *console, vboxIID *ii= d, IProgress **progress) rc =3D machine->vtbl->DeleteSnapshot(machine, iid->value, progress= ); else virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to get machine from console. (error %d)")= , rc); + _("unable to get machine from console. (error %1$d)= "), rc); =20 VBOX_RELEASE(machine); =20 @@ -1584,7 +1584,7 @@ _vrdeServerGetPorts(struct _vboxDriver *data, IVRDESe= rver *VRDEServer, =20 if (NS_FAILED(rc)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to read RDP port value, rc=3D%08x"), + _("Failed to read RDP port value, rc=3D%1$08x"), (unsigned) rc); goto cleanup; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464705; cv=none; d=zohomail.com; s=zohoarc; b=lHXlSu6H/NKO4evm0NmeCfkxqUHQv2BMs4zRdS9B4UgOd0W/OtB/Qcj9qSmykWDTdT3hjzbyedYSAFTpHKqlnBj8IokKDmPmXxX1QeBjSDibyQk7dQwmf921SzST0loRFnx5rBREwDowiTzxyPLuWMfu80ZqSBKxw6RqZ+194Tg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464705; 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=yB8HMPZ5VdRhmnVrWyJV6SQQ5APIr74LPryWUaRdcAU=; b=m7zGJMwrHmDkQptGpmnQ5Zz34ezs+AZPryIlAnnU75nJYqXtDKLIW9iWTvZcwswC4SzwW/AjanYyH70fTT9HmZpYwTecZ5j8mKITU6rJFs6QclpSvf/LhR62+Jyj9nDv+eq/7muIB6fTmPD9rtgfP3UfsDIKJ2Z9rqpBvrvNHyk= 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 1678464705356371.66845214500495; Fri, 10 Mar 2023 08:11:45 -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-497-spXdl9VEOCadxh2EiJ1wPA-1; Fri, 10 Mar 2023 11:11:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 26370100F919; Fri, 10 Mar 2023 16:11:11 +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 105EB2166B26; Fri, 10 Mar 2023 16:11:11 +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 01AF51946A4A; Fri, 10 Mar 2023 16:11:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0CC2E1946A69 for ; Fri, 10 Mar 2023 16:11:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 02878492B05; Fri, 10 Mar 2023 16:11:10 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8ECF492B04 for ; Fri, 10 Mar 2023 16:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464704; 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=yB8HMPZ5VdRhmnVrWyJV6SQQ5APIr74LPryWUaRdcAU=; b=hiAaU3aIoZYkbrpHkSNJIrhcSOIIJ+NrXUR9dRh1mOCT/fzoDe26tyTPATAmbhvT/F+WoS EegkweFlduQBVCuBdy+gBOgmtBtIcxavMbkh/GJ6syzMWU6ziAXuSLfLRm9HYbG7zoyqio 51sYzStCJP0oX4ijbDiD5WC384ntNjQ= X-MC-Unique: spXdl9VEOCadxh2EiJ1wPA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 44/51] vmware: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:10:00 +0100 Message-Id: <7095bf47853f1f5e74b6214b7ec2d65cc4a66314.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.6 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: 1678464707227100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/vmware/vmware_conf.c | 16 ++++++++-------- src/vmware/vmware_driver.c | 26 ++++++++++++++------------ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 5703ce717e..8303591a9b 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -212,19 +212,19 @@ vmwareParseVersionStr(int type, const char *verbuf, u= nsigned long *version) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid driver type: %d"), type); + _("Invalid driver type: %1$d"), type); return -1; } =20 if ((tmp =3D strstr(verbuf, pattern)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find version pattern \"%s\""), pattern); + _("cannot find version pattern \"%1$s\""), pattern); return -1; } =20 if ((tmp =3D STRSKIP(tmp, pattern)) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse %sversion"), pattern); + _("failed to parse %1$sversion"), pattern); return -1; } =20 @@ -311,7 +311,7 @@ vmwareParsePath(const char *path, char **directory, cha= r **filename) =20 if (*separator =3D=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("path '%s' doesn't reference a file"), path); + _("path '%1$s' doesn't reference a file"), path= ); return -1; } =20 @@ -385,8 +385,8 @@ vmwareVmxPath(virDomainDef *vmdef, char **vmxPath) =20 if (!virStringHasCaseSuffix(fileName, ".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); return -1; } =20 @@ -401,7 +401,7 @@ vmwareMoveFile(char *srcFile, char *dstFile) g_autoptr(virCommand) cmd =3D NULL; =20 if (!virFileExists(srcFile)) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("file %s does not exist"), + virReportError(VIR_ERR_INTERNAL_ERROR, _("file %1$s does not exist= "), srcFile); return -1; } @@ -413,7 +413,7 @@ vmwareMoveFile(char *srcFile, char *dstFile) =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to move file to %s "), dstFile); + _("failed to move file to %1$s "), dstFile); return -1; } =20 diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 3c578434f3..259d00cacd 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -57,7 +57,7 @@ vmwareDomObjFromDomainLocked(struct vmware_driver *driver, virUUIDFormat(uuid, uuidstr); =20 virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); return NULL; } =20 @@ -158,7 +158,7 @@ vmwareConnectOpen(virConnectPtr conn, /* If path isn't /session, then they typoed, so tell them correct path= */ if (STRNEQ(conn->uri->path, "/session")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected VMware URI path '%s', try vmwareplaye= r:///session, vmwarews:///session or vmwarefusion:///session"), + _("unexpected VMware URI path '%1$s', try vmwarepla= yer:///session, vmwarews:///session or vmwarefusion:///session"), NULLSTR(conn->uri->path)); return VIR_DRV_OPEN_ERROR; } @@ -177,7 +177,7 @@ vmwareConnectOpen(virConnectPtr conn, if (vmrun =3D=3D NULL) continue; if (virFileResolveLink(vmrun, &driver->vmrun) < 0) { - virReportSystemError(errno, _("unable to resolve symlink '%s'"= ), vmrun); + virReportSystemError(errno, _("unable to resolve symlink '%1$s= '"), vmrun); goto cleanup; } VIR_FREE(vmrun); @@ -196,8 +196,9 @@ vmwareConnectOpen(virConnectPtr conn, goto cleanup; =20 if ((tmp =3D STRSKIP(conn->uri->scheme, "vmware")) =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to parse URI " - "scheme '%s'"), conn->uri->scheme); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unable to parse URI scheme '%1$s'"), + conn->uri->scheme); goto cleanup; } =20 @@ -205,8 +206,9 @@ vmwareConnectOpen(virConnectPtr conn, driver->type =3D vmwareDriverTypeFromString(tmp); =20 if (driver->type =3D=3D -1) { - virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to find valid " - "requested VMware backend '%s'"), tmp); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unable to find valid requested VMware backend '%= 1$s'"), + tmp); goto cleanup; } =20 @@ -407,7 +409,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const ch= ar *xml, unsigned int fla /* create vmx file */ if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to write vmx file '%s'"), vmxPath); + _("Failed to write vmx file '%1$s'"), vmxPath); goto cleanup; } =20 @@ -652,7 +654,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *x= ml, /* create vmx file */ if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to write vmx file '%s'"), vmxPath); + _("Failed to write vmx file '%1$s'"), vmxPath); goto cleanup; } =20 @@ -775,7 +777,7 @@ vmwareDomainLookupByID(virConnectPtr conn, int id) =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching id '%d'"), id); + _("no domain with matching id '%1$d'"), id); goto cleanup; } =20 @@ -832,7 +834,7 @@ vmwareDomainLookupByName(virConnectPtr conn, const char= *name) =20 if (!vm) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); goto cleanup; } =20 @@ -910,7 +912,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, co= nst 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 --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464788; cv=none; d=zohomail.com; s=zohoarc; b=cv3BYeUcNkC+CA1tCBKMXCAeZO+rxt61/JALyxqyH1A1lGTaEG+WAgrsyc2O6LWKRwphjvDJaZSYZXBgPyYvwQE8rto96rP+v17emICj+QmDGpSg4WpmImy7Tp12lcUp3gszY+4Zhwz+/kxHzj3jm1+hawZgWT6IEHV0ZPsu72g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464788; 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=ACrwWP4q6YMSIYKU3dx6J4PDy6qwvPrVvXcIbPs0lBU=; b=TpcI9LZZvkQKMUh0BAWtn/BcU0xuYQnU4j6zCIc3JgqnWfVPCbtYHjgX7Kauzlih24ceo2s55ZGBXJxqtZMZYBgnWkwmYbYWfupLBanFlaoT1F5snwuo0gSWmlm4ip+4QsM+h5qCKPa+Xkolyc6E5gCJxDCRY5/B5dJhyqYtYt0= 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 1678464788683422.4635698425168; Fri, 10 Mar 2023 08:13:08 -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-583-4zxCC0cHMgmy4D1jcC0lmg-1; Fri, 10 Mar 2023 11:11:40 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 610F7382C98C; Fri, 10 Mar 2023 16:11:12 +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 49503492B04; Fri, 10 Mar 2023 16:11:12 +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 3B3951946A54; Fri, 10 Mar 2023 16:11:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 39BB21946A73 for ; Fri, 10 Mar 2023 16:11:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2D11C1121318; Fri, 10 Mar 2023 16:11:11 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB9F01121315 for ; Fri, 10 Mar 2023 16:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464787; 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=ACrwWP4q6YMSIYKU3dx6J4PDy6qwvPrVvXcIbPs0lBU=; b=NnGzmT9Xdh8cgL5sbZTxheG+SriIsuCFFq9Lbzs+WrEVUQks3E1htjuTZXe2YXiyRRgZhl BYvyVoCufnSGXNsVMzrTykiAixgPSQ8IYyhUfmnWd5KiqZStvbGxqGUn2/Fi9oLoHbLKMu UynMI/Auj6qZyH30w8YRfdEJlUx1Ojk= X-MC-Unique: 4zxCC0cHMgmy4D1jcC0lmg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 45/51] vmx: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:10:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.9 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: 1678464789679100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/vmx/vmx.c | 264 +++++++++++++++++++++++--------------------------- 1 file changed, 122 insertions(+), 142 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index c2c9095062..5e0f1b6b3e 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -782,14 +782,14 @@ virVMXConvertToUTF8(const char *encoding, const char = *string) =20 if (handler =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("libxml2 doesn't handle %s encoding"), encoding); + _("libxml2 doesn't handle %1$s encoding"), encoding= ); return NULL; } =20 if (!(input =3D xmlBufferCreateStatic((char *)string, strlen(string)))= || xmlCharEncInFunc(handler, utf8, input) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not convert from %s to UTF-8 encoding"), e= ncoding); + _("Could not convert from %1$s to UTF-8 encoding"),= encoding); goto cleanup; } =20 @@ -817,7 +817,7 @@ virVMXGetConfigStringHelper(virConf *conf, const char *= name, char **string, return 0; =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing essential config entry '%s'"), name); + _("Missing essential config entry '%1$s'"), name); return -1; } =20 @@ -852,7 +852,7 @@ virVMXGetConfigUUID(virConf *conf, const char *name, un= signed char *uuid, rc =3D virUUIDParse(string, uuid); if (rc < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), string); + _("Could not parse UUID from string '%1$s'"), strin= g); goto cleanup; } =20 @@ -883,7 +883,7 @@ virVMXGetConfigLong(virConf *conf, const char *name, lo= ng long *number, *number =3D -1; } else if (virStrToLong_ll(string, NULL, 10, number) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Config entry '%s' must represent an integer value"), + _("Config entry '%1$s' must represent an integer value"), name); goto cleanup; } @@ -917,8 +917,8 @@ virVMXGetConfigBoolean(virConf *conf, const char *name,= bool *boolean_, *boolean_ =3D false; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Config entry '%s' must represent a boolean value= " - "(true|false)"), name); + _("Config entry '%1$s' must represent a boolean val= ue (true|false)"), + name); goto cleanup; } =20 @@ -947,14 +947,14 @@ virVMXSCSIDiskNameToControllerAndUnit(const char *nam= e, int *controller, int *un =20 if (idx < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse valid disk index from '%s'"), na= me); + _("Could not parse valid disk index from '%1$s'"), = name); return -1; } =20 /* Each of the 4 SCSI controllers has 1 bus with 15 units each for dev= ices */ if (idx >=3D (4 * 15)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI disk index (parsed from '%s') is too large"= ), name); + _("SCSI disk index (parsed from '%1$s') is too larg= e"), name); return -1; } =20 @@ -986,14 +986,14 @@ virVMXIDEDiskNameToBusAndUnit(const char *name, int *= bus, int *unit) =20 if (idx < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse valid disk index from '%s'"), na= me); + _("Could not parse valid disk index from '%1$s'"), = name); return -1; } =20 /* The IDE controller has 2 buses with 2 units each for devices */ if (idx >=3D (2 * 2)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE disk index (parsed from '%s') is too large")= , name); + _("IDE disk index (parsed from '%1$s') is too large= "), name); return -1; } =20 @@ -1021,14 +1021,14 @@ virVMXFloppyDiskNameToUnit(const char *name, int *u= nit) =20 if (idx < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse valid disk index from '%s'"), na= me); + _("Could not parse valid disk index from '%1$s'"), = name); return -1; } =20 /* The FDC controller has 1 bus with 2 units for devices */ if (idx >=3D 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Floppy disk index (parsed from '%s') is too larg= e"), name); + _("Floppy disk index (parsed from '%1$s') is too la= rge"), name); return -1; } =20 @@ -1051,7 +1051,7 @@ virVMXVerifyDiskAddress(virDomainXMLOption *xmlopt, =20 if (disk->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported disk address type '%s'"), + _("Unsupported disk address type '%1$s'"), virDomainDeviceAddressTypeToString(disk->info.type)= ); return -1; } @@ -1071,7 +1071,7 @@ virVMXVerifyDiskAddress(virDomainXMLOption *xmlopt, def.info.addr.drive.bus !=3D drive->bus || def.info.addr.drive.unit !=3D drive->unit) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Disk address %d:%d:%d doesn't match target devic= e '%s'"), + _("Disk address %1$d:%2$d:%3$d doesn't match target= device '%4$s'"), drive->controller, drive->bus, drive->unit, disk->d= st); return -1; } @@ -1080,69 +1080,69 @@ virVMXVerifyDiskAddress(virDomainXMLOption *xmlopt, if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_SCSI) { if (drive->controller > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI controller index %d out of [0..3] range= "), + _("SCSI controller index %1$d out of [0..3] ran= ge"), drive->controller); return -1; } =20 if (drive->bus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI bus index %d out of [0] range"), + _("SCSI bus index %1$d out of [0] range"), drive->bus); return -1; } =20 if (drive->unit > 15 || drive->unit =3D=3D 7) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI unit index %d out of [0..6,8..15] range= "), + _("SCSI unit index %1$d out of [0..6,8..15] ran= ge"), drive->unit); return -1; } } else if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_IDE) { if (drive->controller !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE controller index %d out of [0] range"), + _("IDE controller index %1$d out of [0] range"), drive->controller); return -1; } =20 if (drive->bus > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE bus index %d out of [0..1] range"), + _("IDE bus index %1$d out of [0..1] range"), drive->bus); return -1; } =20 if (drive->unit > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE unit index %d out of [0..1] range"), + _("IDE unit index %1$d out of [0..1] range"), drive->unit); return -1; } } else if (disk->bus =3D=3D VIR_DOMAIN_DISK_BUS_FDC) { if (drive->controller !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("FDC controller index %d out of [0] range"), + _("FDC controller index %1$d out of [0] range"), drive->controller); return -1; } =20 if (drive->bus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("FDC bus index %d out of [0] range"), + _("FDC bus index %1$d out of [0] range"), drive->bus); return -1; } =20 if (drive->unit > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("FDC unit index %d out of [0..1] range"), + _("FDC unit index %1$d out of [0..1] range"), drive->unit); return -1; } } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported bus type '%s'"), + _("Unsupported bus type '%1$s'"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -1177,7 +1177,7 @@ virVMXHandleLegacySCSIDiskDriverName(virDomainDef *de= f, =20 if (model < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown driver name '%s'"), driver); + _("Unknown driver name '%1$s'"), driver); return -1; } =20 @@ -1190,7 +1190,7 @@ virVMXHandleLegacySCSIDiskDriverName(virDomainDef *de= f, =20 if (controller =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing SCSI controller for index %d"), + _("Missing SCSI controller for index %1$d"), disk->info.addr.drive.controller); return -1; } @@ -1199,8 +1199,7 @@ virVMXHandleLegacySCSIDiskDriverName(virDomainDef *de= f, controller->model =3D model; } else if (controller->model !=3D model) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Inconsistent SCSI controller model ('%s' is not = '%s') " - "for SCSI controller index %d"), driver, + _("Inconsistent SCSI controller model ('%1$s' is no= t '%2$s') for SCSI controller index %3$d"), driver, virDomainControllerModelSCSITypeToString(controller= ->model), controller->idx); return -1; @@ -1276,8 +1275,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDo= mainDef *def, for (k =3D 0; k < count; ++k) { if (autodetectedModels[k] !=3D autodetectedModels[0]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Disks on SCSI controller %d have inc= onsistent " - "controller models, cannot autodetect= model"), + _("Disks on SCSI controller %1$d have i= nconsistent controller models, cannot autodetect model"), controller->idx); goto cleanup; } @@ -1292,9 +1290,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDo= mainDef *def, controller->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS= 1068 && controller->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSC= SI) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML attribute 'model' of en= try " - "'controller' to be 'buslogic' or 'lsilogic' = or " - "'lsisas1068' or 'vmpvscsi' but found '%s'"), + _("Expecting domain XML attribute 'model' of en= try 'controller' to be 'buslogic' or 'lsilogic' or 'lsisas1068' or 'vmpvscs= i' but found '%1$s'"), virDomainControllerModelSCSITypeToString(contro= ller->model)); goto cleanup; } @@ -1330,7 +1326,7 @@ virVMXConfigScanResultsCollector(const char* name, if (virStrToLong_i(suffix, &p, 10, &idx) < 0 || *p !=3D '.' || idx < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the index of the VMX key '%s= '"), + _("failed to parse the index of the VMX key '%1= $s'"), name); return -1; } @@ -1360,7 +1356,7 @@ virVMXParseGenID(virConf *conf, uuidstr =3D g_strdup_printf("%.16llx%.16llx", vmid[0], vmid[1]); if (virUUIDParse(uuidstr, def->genid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), uuidstr= ); + _("Could not parse UUID from string '%1$s'"), uuids= tr); return -1; } def->genidRequested =3D true; @@ -1460,8 +1456,8 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (config_version !=3D 8) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'config.version' to be 8 but= found " - "%lld"), config_version); + _("Expecting VMX entry 'config.version' to be 8 but= found %1$lld"), + config_version); goto cleanup; } =20 @@ -1473,8 +1469,7 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (virtualHW_version < 4) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'virtualHW.version' to be " - "4 or higher but found %lld"), + _("Expecting VMX entry 'virtualHW.version' to be 4 = or higher but found %1$lld"), virtualHW_version); goto cleanup; } else if (virtualHW_version >=3D 13) { @@ -1524,8 +1519,8 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (memsize <=3D 0 || memsize % 4 !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'memsize' to be an unsigned " - "integer (multiple of 4) but found %lld"), memsiz= e); + _("Expecting VMX entry 'memsize' to be an unsigned = integer (multiple of 4) but found %1$lld"), + memsize); goto cleanup; } =20 @@ -1565,8 +1560,8 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (numvcpus <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'numvcpus' to be an unsigned= " - "integer greater than 0 but found %lld"), numvcpu= s); + _("Expecting VMX entry 'numvcpus' to be an unsigned= integer greater than 0 but found %1$lld"), + numvcpus); goto cleanup; } =20 @@ -1619,9 +1614,8 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (g_strv_length(afflist) < numvcpus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'sched.cpu.affinity' to = contain " - "at least as many values as 'numvcpus' (%lld)= but " - "found only %u value(s)"), numvcpus, g_strv_l= ength(afflist)); + _("Expecting VMX entry 'sched.cpu.affinity' to = contain at least as many values as 'numvcpus' (%1$lld) but found only %2$u = value(s)"), + numvcpus, g_strv_length(afflist)); goto cleanup; } =20 @@ -1636,16 +1630,15 @@ virVMXParseConfig(virVMXContext *ctx, =20 if (rc < 0 || *current !=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'sched.cpu.affinity'= to be " - "a comma separated list of unsigned integ= ers but " - "found '%s'"), sched_cpu_affinity); + _("Expecting VMX entry 'sched.cpu.affinity'= to be a comma separated list of unsigned integers but found '%1$s'"), + sched_cpu_affinity); goto cleanup; } =20 if (number >=3D VIR_DOMAIN_CPUMASK_LEN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VMX entry 'sched.cpu.affinity' contains = a %d, " - "this value is too large"), number); + _("VMX entry 'sched.cpu.affinity' contains = a %1$d, this value is too large"), + number); goto cleanup; } =20 @@ -1671,9 +1664,8 @@ virVMXParseConfig(virVMXContext *ctx, } else if (virStrToLong_ull(sched_cpu_shares, NULL, 10, &def->cputune.shares) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry 'sched.cpu.shares' to be= an " - "unsigned integer or 'low', 'normal' or 'high= ' but " - "found '%s'"), sched_cpu_shares); + _("Expecting VMX entry 'sched.cpu.shares' to be= an unsigned integer or 'low', 'normal' or 'high' but found '%1$s'"), + sched_cpu_shares); goto cleanup; } def->cputune.sharesSpecified =3D true; @@ -1970,7 +1962,7 @@ virVMXParseConfig(virVMXContext *ctx, def->os.firmware =3D VIR_DOMAIN_OS_DEF_FIRMWARE_EFI; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VMX entry 'firmware' has unknown value '%s'"= ), + _("VMX entry 'firmware' has unknown value '%1$s= '"), firmware); goto cleanup; } @@ -2078,7 +2070,7 @@ virVMXParseSCSIController(virConf *conf, int controll= er, bool *present, =20 if (controller < 0 || controller > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI controller index %d out of [0..3] range"), + _("SCSI controller index %1$d out of [0..3] range"), controller); return -1; } @@ -2114,8 +2106,7 @@ virVMXParseSCSIController(virConf *conf, int controll= er, bool *present, *virtualDev !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1068 = && *virtualDev !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'buslogic' or= 'lsilogic' " - "or 'lsisas1068' or 'pvscsi' but found '%s'"), + _("Expecting VMX entry '%1$s' to be 'buslogic' = or 'lsilogic' or 'lsisas1068' or 'pvscsi' but found '%2$s'"), virtualDev_name, virtualDev_string); goto cleanup; } @@ -2138,7 +2129,7 @@ virVMXParseSATAController(virConf *conf, int controll= er, bool *present) =20 if (controller < 0 || controller > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SATA controller index %d out of [0..3] range"), + _("SATA controller index %1$d out of [0..3] range"), controller); return -1; } @@ -2226,14 +2217,14 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, if (busType =3D=3D VIR_DOMAIN_DISK_BUS_SCSI) { if (controllerOrBus < 0 || controllerOrBus > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI controller index %d out of [0..3] r= ange"), + _("SCSI controller index %1$d out of [0..3]= range"), controllerOrBus); goto cleanup; } =20 if (unit < 0 || unit > vmdef->scsiBusMaxUnit || unit =3D=3D 7)= { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SCSI unit index %d out of [0..6,8..%u] r= ange"), + _("SCSI unit index %1$d out of [0..6,8..%2$= u] range"), unit, vmdef->scsiBusMaxUnit); goto cleanup; } @@ -2246,14 +2237,14 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, } else if (busType =3D=3D VIR_DOMAIN_DISK_BUS_SATA) { if (controllerOrBus < 0 || controllerOrBus > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SATA controller index %d out of [0..3] r= ange"), + _("SATA controller index %1$d out of [0..3]= range"), controllerOrBus); goto cleanup; } =20 if (unit < 0 || unit >=3D 30) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("SATA unit index %d out of [0..29] range"= ), + _("SATA unit index %1$d out of [0..29] rang= e"), unit); goto cleanup; } @@ -2264,14 +2255,14 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, } else if (busType =3D=3D VIR_DOMAIN_DISK_BUS_IDE) { if (controllerOrBus < 0 || controllerOrBus > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE bus index %d out of [0..1] range"), + _("IDE bus index %1$d out of [0..1] range"), controllerOrBus); goto cleanup; } =20 if (unit < 0 || unit > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IDE unit index %d out of [0..1] range"),= unit); + _("IDE unit index %1$d out of [0..1] range"= ), unit); goto cleanup; } =20 @@ -2280,7 +2271,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= n *xmlopt, virConf *conf, (*def)->dst =3D virIndexToDiskName(controllerOrBus * 2 + unit,= "hd"); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported bus type '%s' for device type '%= s'"), + _("Unsupported bus type '%1$s' for device type = '%2$s'"), virDomainDiskBusTypeToString(busType), virDomainDiskDeviceTypeToString(device)); goto cleanup; @@ -2289,14 +2280,14 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, if (busType =3D=3D VIR_DOMAIN_DISK_BUS_FDC) { if (controllerOrBus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("FDC controller index %d out of [0] range= "), + _("FDC controller index %1$d out of [0] ran= ge"), controllerOrBus); goto cleanup; } =20 if (unit < 0 || unit > 1) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("FDC unit index %d out of [0..1] range"), + _("FDC unit index %1$d out of [0..1] range"= ), unit); goto cleanup; } @@ -2306,14 +2297,14 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, (*def)->dst =3D virIndexToDiskName(unit, "fd"); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported bus type '%s' for device type '%= s'"), + _("Unsupported bus type '%1$s' for device type = '%2$s'"), virDomainDiskBusTypeToString(busType), virDomainDiskDeviceTypeToString(device)); goto cleanup; } } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported device type '%s'"), + _("Unsupported device type '%1$s'"), virDomainDiskDeviceTypeToString(device)); goto cleanup; } @@ -2404,16 +2395,16 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, STRCASENEQ(deviceType, "scsi-hardDisk") && STRCASENEQ(deviceType, "disk")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'scsi= -hardDisk' " - "or 'disk' but found '%s'"), deviceTy= pe_name, + _("Expecting VMX entry '%1$s' to be 'sc= si-hardDisk' or 'disk' but found '%2$s'"), + deviceType_name, deviceType); goto cleanup; } else if (busType =3D=3D VIR_DOMAIN_DISK_BUS_IDE && STRCASENEQ(deviceType, "ata-hardDisk") && STRCASENEQ(deviceType, "disk")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'ata-= hardDisk' " - "or 'disk' but found '%s'"), deviceTy= pe_name, + _("Expecting VMX entry '%1$s' to be 'at= a-hardDisk' or 'disk' but found '%2$s'"), + deviceType_name, deviceType); goto cleanup; } @@ -2431,8 +2422,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= n *xmlopt, virConf *conf, "independent-nonpersistent"); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid or not yet handled value '%s' " - "for VMX entry '%s' for device type '%s'"), + _("Invalid or not yet handled value '%1$s' for = VMX entry '%2$s' for device type '%3$s'"), fileName, fileName_name, deviceType ? deviceType : "unknown"); goto cleanup; @@ -2454,8 +2444,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= n *xmlopt, virConf *conf, =20 if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'cdrom-im= age' " - "but found '%s'"), deviceType_name, devic= eType); + _("Expecting VMX entry '%1$s' to be 'cdrom-= image' but found '%2$s'"), + deviceType_name, deviceType); goto cleanup; } =20 @@ -2503,8 +2493,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= n *xmlopt, virConf *conf, } else if (fileName && STREQ(fileName, "emptyBackingString")) { if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'cdrom-im= age' " - "but found '%s'"), deviceType_name, devic= eType); + _("Expecting VMX entry '%1$s' to be 'cdrom-= image' but found '%2$s'"), + deviceType_name, deviceType); goto cleanup; } =20 @@ -2512,8 +2502,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= n *xmlopt, virConf *conf, virDomainDiskSetSource(*def, NULL); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid or not yet handled value '%s' " - "for VMX entry '%s' for device type '%s'"), + _("Invalid or not yet handled value '%1$s' for = VMX entry '%2$s' for device type '%3$s'"), NULLSTR(fileName), fileName_name, deviceType ? deviceType : "unknown"); goto cleanup; @@ -2533,21 +2522,20 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpt= ion *xmlopt, virConf *conf, VIR_FREE(tmp); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid or not yet handled value '%s' " - "for VMX entry '%s' for device type '%s'"), + _("Invalid or not yet handled value '%1$s' for = VMX entry '%2$s' for device type '%3$s'"), NULLSTR(fileName), fileName_name, deviceType ? deviceType : "unknown"); goto cleanup; } } else { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported device t= ype '%s'"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported device t= ype '%1$s'"), virDomainDiskDeviceTypeToString(device)); goto cleanup; } =20 if (virDomainDiskDefAssignAddress(xmlopt, *def, vmdef) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not assign address to disk '%s'"), + _("Could not assign address to disk '%1$s'"), virDomainDiskGetSource(*def)); goto cleanup; } @@ -2774,8 +2762,8 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) if (generatedAddress !=3D NULL) { if (virMacAddrParse(generatedAddress, &(*def)->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be MAC addre= ss but " - "found '%s'"), generatedAddress_name, + _("Expecting VMX entry '%1$s' to be MAC add= ress but found '%2$s'"), + generatedAddress_name, generatedAddress); goto cleanup; } @@ -2786,16 +2774,16 @@ virVMXParseEthernet(virConf *conf, int controller, = virDomainNetDef **def) if (address !=3D NULL) { if (virMacAddrParse(address, &(*def)->mac) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be MAC addre= ss but " - "found '%s'"), address_name, address); + _("Expecting VMX entry '%1$s' to be MAC add= ress but found '%2$s'"), + address_name, address); goto cleanup; } } (*def)->mac_type =3D VIR_DOMAIN_NET_MAC_TYPE_STATIC; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'generated' or 's= tatic' or " - "'vpx' but found '%s'"), addressType_name, addres= sType); + _("Expecting VMX entry '%1$s' to be 'generated' or = 'static' or 'vpx' but found '%2$s'"), + addressType_name, addressType); goto cleanup; } =20 @@ -2826,8 +2814,7 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) netmodel =3D VIR_DOMAIN_NET_MODEL_E1000E; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'vlance' or '= vmxnet' or " - "'vmxnet3' or 'e1000' or 'e1000e' but found '= %s'"), + _("Expecting VMX entry '%1$s' to be 'vlance' or= 'vmxnet' or 'vmxnet3' or 'e1000' or 'e1000e' but found '%2$s'"), virtualDev_name, virtualDev); goto cleanup; } @@ -2860,7 +2847,7 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) =20 if (virUUIDParse(switchId, (*def)->data.vds.switch_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not parse UUID from string '%s'"), + _("Could not parse UUID from string '%1$s'"), switchId); goto cleanup; } @@ -2888,7 +2875,7 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) } else if (STRCASEEQ(connectionType, "hostonly")) { /* FIXME */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("No yet handled value '%s' for VMX entry '%s'"), + _("No yet handled value '%1$s' for VMX entry '%2$s'= "), connectionType, connectionType_name); goto cleanup; } else if (STRCASEEQ(connectionType, "nat")) { @@ -2900,7 +2887,7 @@ virVMXParseEthernet(virConf *conf, int controller, vi= rDomainNetDef **def) (*def)->ifname =3D g_steal_pointer(&vnet); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid value '%s' for VMX entry '%s'"), connect= ionType, + _("Invalid value '%1$s' for VMX entry '%2$s'"), con= nectionType, connectionType_name); goto cleanup; } @@ -2959,7 +2946,7 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, = int port, =20 if (port < 0 || port > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Serial port index %d out of [0..3] range"), port= ); + _("Serial port index %1$d out of [0..3] range"), po= rt); return -1; } =20 @@ -3038,7 +3025,7 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, = int port, =20 if (parsedUri->port =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VMX entry '%s' doesn't contain a port part"), + _("VMX entry '%1$s' doesn't contain a port part= "), fileName_name); goto cleanup; } @@ -3066,7 +3053,7 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, = int port, (*def)->source->data.tcp.protocol =3D VIR_DOMAIN_CHR_TCP_PROTO= COL_TLS; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("VMX entry '%s' contains unsupported scheme '= %s'"), + _("VMX entry '%1$s' contains unsupported scheme= '%2$s'"), fileName_name, parsedUri->scheme); goto cleanup; } @@ -3077,14 +3064,14 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf= , int port, (*def)->source->data.tcp.listen =3D false; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'server' or '= client' " - "but found '%s'"), network_endPoint_name, net= work_endPoint); + _("Expecting VMX entry '%1$s' to be 'server' or= 'client' but found '%2$s'"), + network_endPoint_name, network_endPoint); goto cleanup; } } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'device', 'file' = or 'pipe' " - "or 'network' but found '%s'"), fileType_name, fi= leType); + _("Expecting VMX entry '%1$s' to be 'device', 'file= ' or 'pipe' or 'network' but found '%2$s'"), + fileType_name, fileType); goto cleanup; } =20 @@ -3126,7 +3113,7 @@ virVMXParseParallel(virVMXContext *ctx, virConf *conf= , int port, =20 if (port < 0 || port > 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parallel port index %d out of [0..2] range"), po= rt); + _("Parallel port index %1$d out of [0..2] range"), = port); return -1; } =20 @@ -3179,8 +3166,8 @@ virVMXParseParallel(virVMXContext *ctx, virConf *conf= , int port, goto cleanup; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting VMX entry '%s' to be 'device' or 'file= ' but " - "found '%s'"), fileType_name, fileType); + _("Expecting VMX entry '%1$s' to be 'device' or 'fi= le' but found '%2$s'"), + fileType_name, fileType); goto cleanup; } =20 @@ -3266,7 +3253,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef =20 if (def->virtType !=3D VIR_DOMAIN_VIRT_VMWARE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting virt type to be '%s' but found '%s'"), + _("Expecting virt type to be '%1$s' but found '%2$s= '"), virDomainVirtTypeToString(VIR_DOMAIN_VIRT_VMWARE), virDomainVirtTypeToString(def->virtType)); return NULL; @@ -3289,8 +3276,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef virBufferAddLit(&buffer, "guestOS =3D \"other-64\"\n"); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML attribute 'arch' of entry '= os/type' " - "to be 'i686' or 'x86_64' but found '%s'"), + _("Expecting domain XML attribute 'arch' of entry '= os/type' to be 'i686' or 'x86_64' but found '%1$s'"), virArchToString(def->os.arch)); goto cleanup; } @@ -3303,7 +3289,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef virBufferAddLit(&buffer, "smbios.reflecthost =3D \"true\"\n"); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported SMBIOS mode '%s'"), + _("Unsupported SMBIOS mode '%1$s'"), virDomainSmbiosModeTypeToString(def->os.smbios_mode= )); goto cleanup; } @@ -3385,8 +3371,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef =20 if (def->cpu->mode !=3D VIR_CPU_MODE_CUSTOM) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML CPU mode 'custom' but " - "found '%s'"), + _("Expecting domain XML CPU mode 'custom' but f= ound '%1$s'"), virCPUModeTypeToString(def->cpu->mode)); goto cleanup; } @@ -3406,8 +3391,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef calculated_vcpus =3D def->cpu->sockets * def->cpu->cores; if (calculated_vcpus !=3D maxvcpus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML CPU sockets per core as= %d " - "but found %d"), + _("Expecting domain XML CPU sockets per core as= %1$d but found %2$d"), maxvcpus, calculated_vcpus); goto cleanup; } @@ -3428,8 +3412,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef =20 if (sched_cpu_affinity_length < maxvcpus) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML attribute 'cpuset' of e= ntry " - "'vcpu' to contain at least %d CPU(s)"), + _("Expecting domain XML attribute 'cpuset' of e= ntry 'vcpu' to contain at least %1$d CPU(s)"), maxvcpus); goto cleanup; } @@ -3479,7 +3462,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_DBUS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported graphics type '%s'"), + _("Unsupported graphics type '%1$s'"), virDomainGraphicsTypeToString(def->graphics[i]-= >type)); goto cleanup; =20 @@ -3538,7 +3521,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tion *xmlopt, virDomainDef case VIR_DOMAIN_DISK_DEVICE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported disk device type '%s'"), + _("Unsupported disk device type '%1$s'"), virDomainDiskDeviceTypeToString(def->disks[i]->= device)); goto cleanup; } @@ -3710,7 +3693,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, def->device !=3D VIR_DOMAIN_DISK_DEVICE_CDROM && def->device !=3D VIR_DOMAIN_DISK_DEVICE_LUN) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid device type supplied: %s"), deviceType); + _("Invalid device type supplied: %1$s"), deviceType= ); return -1; } =20 @@ -3718,8 +3701,8 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, if (type !=3D VIR_STORAGE_TYPE_FILE && type !=3D VIR_STORAGE_TYPE_BLOCK) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s %s '%s' has unsupported type '%s', expecting " - "'%s' or '%s'"), busType, deviceType, def->dst, + _("%1$s %2$s '%3$s' has unsupported type '%4$s', ex= pecting '%5$s' or '%6$s'"), + busType, deviceType, def->dst, diskType, virStorageTypeToString(VIR_STORAGE_TYPE_FILE), virStorageTypeToString(VIR_STORAGE_TYPE_BLOCK)); @@ -3738,7 +3721,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, } } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported bus type '%s' for %s"), + _("Unsupported bus type '%1$s' for %2$s"), busType, deviceType); return -1; } @@ -3762,7 +3745,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, vmxDeviceType =3D "cdrom-raw"; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s %s '%s' has an unsupported type '%s'"), + _("%1$s %2$s '%3$s' has an unsupported type '%4$s'"= ), busType, deviceType, def->dst, diskType); return -1; } @@ -3778,8 +3761,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, if (src) { if (!virStringHasCaseSuffix(src, fileExt)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Image file for %s %s '%s' has " - "unsupported suffix, expecting '%s'"), + _("Image file for %1$s %2$s '%3$s' has unsu= pported suffix, expecting '%4$s'"), busType, deviceType, def->dst, fileExt); return -1; } @@ -3817,7 +3799,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDef= *def, busType, controllerOrBus, unit); } else if (def->cachemode !=3D VIR_DOMAIN_DISK_CACHE_DEFAULT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s harddisk '%s' has unsupported cache mode = '%s'"), + _("%1$s harddisk '%2$s' has unsupported cache m= ode '%3$s'"), busType, def->dst, virDomainDiskCacheTypeToString(def->cachemode)); return -1; @@ -3876,8 +3858,8 @@ virVMXFormatFloppy(virVMXContext *ctx, virDomainDiskD= ef *def, } } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Floppy '%s' has unsupported type '%s', expecting= '%s' " - "or '%s'"), def->dst, + _("Floppy '%1$s' has unsupported type '%2$s', expec= ting '%3$s' or '%4$s'"), + def->dst, virStorageTypeToString(type), virStorageTypeToString(VIR_STORAGE_TYPE_FILE), virStorageTypeToString(VIR_STORAGE_TYPE_BLOCK)); @@ -3894,7 +3876,7 @@ virVMXFormatFileSystem(virDomainFSDef *def, int numbe= r, virBuffer *buffer) { if (def->type !=3D VIR_DOMAIN_FS_TYPE_MOUNT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Only '%s' filesystem type is supported"), + _("Only '%1$s' filesystem type is supported"), virDomainFSTypeToString(VIR_DOMAIN_FS_TYPE_MOUNT)); return -1; } @@ -3934,7 +3916,7 @@ virVMXFormatEthernet(virDomainNetDef *def, int contro= ller, =20 if (controller < 0 || controller > controller_limit) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Ethernet controller index %d out of [0..%d] rang= e"), + _("Ethernet controller index %1$d out of [0..%2$d] = range"), controller, controller_limit); return -1; } @@ -3950,9 +3932,7 @@ virVMXFormatEthernet(virDomainNetDef *def, int contro= ller, def->model !=3D VIR_DOMAIN_NET_MODEL_E1000 && def->model !=3D VIR_DOMAIN_NET_MODEL_E1000E) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML entry 'devices/interfac= e/model' " - "to be 'vlance' or 'vmxnet' or 'vmxnet2' or '= vmxnet3' " - "or 'e1000' or 'e1000e' but found '%s'"), + _("Expecting domain XML entry 'devices/interfac= e/model' to be 'vlance' or 'vmxnet' or 'vmxnet2' or 'vmxnet3' or 'e1000' or= 'e1000e' but found '%1$s'"), virDomainNetModelTypeToString(def->model)); return -1; } @@ -4026,7 +4006,7 @@ virVMXFormatEthernet(virDomainNetDef *def, int contro= ller, case VIR_DOMAIN_NET_TYPE_HOSTDEV: case VIR_DOMAIN_NET_TYPE_UDP: case VIR_DOMAIN_NET_TYPE_VDPA: - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%s'"), + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type= '%1$s'"), virDomainNetTypeToString(def->type)); return -1; =20 @@ -4102,7 +4082,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDe= f *def, =20 if (def->target.port < 0 || def->target.port > 3) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Serial port index %d out of [0..3] range"), + _("Serial port index %1$d out of [0..3] range"), def->target.port); return -1; } @@ -4166,7 +4146,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDe= f *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported character device TCP protocol '%= s'"), + _("Unsupported character device TCP protocol '%= 1$s'"), virDomainChrTcpProtocolTypeToString( def->source->data.tcp.protocol)); return -1; @@ -4184,7 +4164,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDe= f *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported character device type '%s'"), + _("Unsupported character device type '%1$s'"), virDomainChrTypeToString(def->source->type)); return -1; } @@ -4207,7 +4187,7 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChr= Def *def, =20 if (def->target.port < 0 || def->target.port > 2) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Parallel port index %d out of [0..2] range"), + _("Parallel port index %1$d out of [0..2] range"), def->target.port); return -1; } @@ -4241,7 +4221,7 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChr= Def *def, =20 default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported character device type '%s'"), + _("Unsupported character device type '%1$s'"), virDomainChrTypeToString(def->source->type)); return -1; } @@ -4258,7 +4238,7 @@ virVMXFormatSVGA(virDomainVideoDef *def, virBuffer *b= uffer) =20 if (def->type !=3D VIR_DOMAIN_VIDEO_TYPE_VMVGA) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported video device type '%s'"), + _("Unsupported video device type '%1$s'"), virDomainVideoTypeToString(def->type)); return -1; } --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464853; cv=none; d=zohomail.com; s=zohoarc; b=H2/nbhThY6mI08zxqxFoO6RAlNAS5MMTGL7jep464KcO+6/1xDLQeuF9L3Xx56Uxec8A4Yw0BSrCW9IMFUqEMkzHElwPjkCWUm49ulgGPFQ2MOlOQDxhA5E54HF2ntt4XoOfpCK+mvI6ZqMDZZSMWHYVh8ms1hNKYh1HBXySBpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464853; 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=jlQewjEWnH2XDW/f+oF5I7AhQLSzASfDgp3LjFEgzXM=; b=dXCSinGniXIzyDl2XbBCwXwOXlyabS1kc8wW7bHLAz6PLCudCvsz5+DDfYnkRQ53YEP5noYQQVMgPzPUvb86AoHjP7G5PBTqNLa5392NogauafA6PTFDToU/+OaGW5lzOoDMxkANvDAYWXkfNDFOW0MKKs5Zyl98nbPl3FAku54= 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 1678464853311565.1326400127872; Fri, 10 Mar 2023 08:14:13 -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-329-p_59pp7NOWGuUvQvGb1RlQ-1; Fri, 10 Mar 2023 11:11:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 77390823D6C; Fri, 10 Mar 2023 16:11:14 +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 27F312026D4B; Fri, 10 Mar 2023 16:11:14 +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 173021946A5E; Fri, 10 Mar 2023 16:11:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 97C851946A66 for ; Fri, 10 Mar 2023 16:11:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7AC721121319; Fri, 10 Mar 2023 16:11:12 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04AF71121315 for ; Fri, 10 Mar 2023 16:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464852; 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=jlQewjEWnH2XDW/f+oF5I7AhQLSzASfDgp3LjFEgzXM=; b=HUcGNlAznh4Jwx9Y40eBzBtq68001ceuSbVOXW8B3lPWVm02JLkQapfoJKr3WudGFQ4fxE HGwUqMAbbbXHA9uMLp7gmsEEFohvFkqLlklg9H4pLzdpR6MQYcXk59vR9J7/gB4tIJqfdg U09NNL3xQb1jZTdDUCkHiqD0pKtnKUA= X-MC-Unique: p_59pp7NOWGuUvQvGb1RlQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 46/51] vz: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:10:02 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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.4 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: 1678464854100100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/vz/vz_driver.c | 32 ++++++++++---------- src/vz/vz_sdk.c | 74 ++++++++++++++++++++++------------------------ src/vz/vz_utils.c | 31 +++++++++---------- src/vz/vz_utils.h | 2 +- 4 files changed, 67 insertions(+), 72 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 4a7b14997f..56dc236233 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -364,7 +364,7 @@ vzConnectOpen(virConnectPtr conn, /* From this point on, the connection is for us. */ if (STRNEQ(conn->uri->path, "/system")) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected Virtuozzo URI path '%s', try vz:///sy= stem"), + _("Unexpected Virtuozzo URI path '%1$s', try vz:///= system"), conn->uri->path); return VIR_DRV_OPEN_ERROR; } @@ -575,7 +575,7 @@ vzDomainLookupByUUID(virConnectPtr conn, const unsigned= char *uuid) char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); return NULL; } =20 @@ -600,7 +600,7 @@ vzDomainLookupByName(virConnectPtr conn, const char *na= me) =20 if (dom =3D=3D NULL) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); return NULL; } =20 @@ -773,7 +773,7 @@ vzEnsureDomainExists(virDomainObj *dom) =20 virUUIDFormat(dom->def->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, dom->def->name); =20 return -1; @@ -816,7 +816,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *= xml, unsigned int flags) goto cleanup; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Unsupported OS type: %s"), + _("Unsupported OS type: %1$s"), virDomainOSTypeToString(def->os.type)); goto cleanup; } @@ -1705,7 +1705,7 @@ vzDomainBlockStatsImpl(virDomainObj *dom, =20 if (*path) { if ((idx =3D virDomainDiskIndexByName(dom->def, path, false)) < 0)= { - virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %s"), pat= h); + virReportError(VIR_ERR_INVALID_ARG, _("invalid path: %1$s"), p= ath); return -1; } if (prlsdkGetBlockStats(privdom->stats, @@ -1956,7 +1956,7 @@ static int vzConnectGetMaxVcpus(virConnectPtr conn, return 1028; =20 virReportError(VIR_ERR_INVALID_ARG, - _("unknown type '%s'"), type); + _("unknown type '%1$s'"), type); return -1; } =20 @@ -2129,7 +2129,7 @@ vzSnapObjFromName(virDomainSnapshotObjList *snapshots= , const char *name) snap =3D virDomainSnapshotFindByName(snapshots, name); if (!snap) virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("no domain snapshot with matching name '%s'"), na= me); + _("no domain snapshot with matching name '%1$s'"), = name); =20 return snap; } @@ -2452,7 +2452,7 @@ vzDomainSnapshotGetParent(virDomainSnapshotPtr snapsh= ot, unsigned int flags) =20 if (!snap->def->parent_name) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, - _("snapshot '%s' does not have a parent"), + _("snapshot '%1$s' does not have a parent"), snap->def->name); goto cleanup; } @@ -3037,21 +3037,21 @@ vzParseVzURI(const char *uri_str) =20 if (!uri->scheme || !uri->server) { virReportError(VIR_ERR_INVALID_ARG, - _("scheme and host are mandatory vz migration URI: = %s"), + _("scheme and host are mandatory vz migration URI: = %1$s"), uri_str); goto error; } =20 if (uri->user || uri->path || uri->query || uri->fragment) { virReportError(VIR_ERR_INVALID_ARG, - _("only scheme, host and port are supported in " - "vz migration URI: %s"), uri_str); + _("only scheme, host and port are supported in vz m= igration URI: %1$s"), + uri_str); goto error; } =20 if (STRNEQ(uri->scheme, "vzmigr")) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("unsupported scheme %s in migration URI %s"), + _("unsupported scheme %1$s in migration URI %2$s"), uri->scheme, uri_str); goto error; } @@ -3760,7 +3760,7 @@ vzConnectGetAllDomainStats(virConnectPtr conn, } else if ((flags & VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS) && (stats & ~supported)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, - _("Stats types bits 0x%x are not supported by this = daemon"), + _("Stats types bits 0x%1$x are not supported by thi= s daemon"), stats & ~supported); return -1; } @@ -3937,7 +3937,7 @@ vzDomainBlockResize(virDomainPtr domain, =20 if (!(disk =3D virDomainDiskByName(dom->def, path, false))) { virReportError(VIR_ERR_INVALID_ARG, - _("invalid path: %s"), path); + _("invalid path: %1$s"), path); goto cleanup; } =20 @@ -4091,7 +4091,7 @@ vzStateInitialize(bool privileged, vz_driver_privileged =3D privileged; =20 if (g_mkdir_with_parents(VZ_STATEDIR, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create state directory '%s'"= ), + virReportSystemError(errno, _("cannot create state directory '%1$s= '"), VZ_STATEDIR); return VIR_DRV_STATE_INIT_ERROR; } diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 269dc3bb9e..286b52a29e 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -84,7 +84,7 @@ logPrlErrorHelper(PRL_RESULT err, const char *filename, =20 virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INTERNAL_ERROR, filename, funcname, linenr, - _("%s %s"), msg1, msg2); + _("%1$s %2$s"), msg1, msg2); =20 VIR_FREE(msg1); VIR_FREE(msg2); @@ -131,7 +131,7 @@ logPrlEventErrorHelper(PRL_HANDLE event, const char *fi= lename, =20 virReportErrorHelper(VIR_FROM_THIS, VIR_ERR_INTERNAL_ERROR, filename, funcname, linenr, - _("%s %s"), msg1, msg2); + _("%1$s %2$s"), msg1, msg2); VIR_FREE(msg1); VIR_FREE(msg2); } @@ -463,7 +463,7 @@ prlsdkSdkDomainLookupByUUID(struct _vzDriver *driver, c= onst unsigned char *uuid) PGVC_SEARCH_BY_UUID, &sdkdom) < 0) { virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s'"), uuidstr); + _("no domain with matching uuid '%1$s'"), uuidstr); return PRL_INVALID_HANDLE; } =20 @@ -478,7 +478,7 @@ prlsdkSdkDomainLookupByName(struct _vzDriver *driver, c= onst char *name) if (prlsdkSdkDomainLookup(driver, name, PGVC_SEARCH_BY_NAME, &sdkdom) < 0) { virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching name '%s'"), name); + _("no domain with matching name '%1$s'"), name); return PRL_INVALID_HANDLE; } =20 @@ -609,7 +609,7 @@ prlsdkGetDiskId(PRL_HANDLE disk, virDomainDiskBus *bus,= char **dst) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown disk bus: %X"), ifType); + _("Unknown disk bus: %1$X"), ifType); return -1; } =20 @@ -724,7 +724,7 @@ prlsdkGetFSInfo(PRL_HANDLE prldisk, goto cleanup; if (STRNEQ("libvirt", uri->scheme)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown uri scheme: '%s'"), + _("Unknown uri scheme: '%1$s'"), uri->scheme); goto cleanup; } @@ -732,17 +732,17 @@ prlsdkGetFSInfo(PRL_HANDLE prldisk, if (!(matches =3D g_strsplit(uri->path, "/", 0)) || !matches[0]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("splitting StorageUrl failed %s"), uri->path); + _("splitting StorageUrl failed %1$s"), uri->pat= h); goto cleanup; } if (!matches[1]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("can't identify pool in uri %s "), uri->path); + _("can't identify pool in uri %1$s "), uri->pat= h); goto cleanup; } if (!matches[2]) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("can't identify volume in uri %s"), uri->path= ); + _("can't identify volume in uri %1$s"), uri->pa= th); goto cleanup; } fs->type =3D VIR_DOMAIN_FS_TYPE_VOLUME; @@ -1068,7 +1068,7 @@ prlsdkGetNetInfo(PRL_HANDLE netAdapter, virDomainNetD= ef *net, bool isCt) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown adapter type: %X"), type); + _("Unknown adapter type: %1$X"), type); return -1; } } @@ -1185,7 +1185,7 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainC= hrDef *chr) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown serial type: %X"), emulatedType); + _("Unknown serial type: %1$X"), emulatedType); return -1; } =20 @@ -1450,7 +1450,7 @@ prlsdkConvertDomainType(PRL_HANDLE sdkdom, virDomainD= ef *def) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown domain type: %X"), domainType); + _("Unknown domain type: %1$X"), domainType); return -1; } =20 @@ -1475,7 +1475,7 @@ prlsdkConvertCpuMode(PRL_HANDLE sdkdom, virDomainDef = *def) break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU mode: %X"), cpuMode); + _("Unknown CPU mode: %1$X"), cpuMode); return -1; } =20 @@ -1600,7 +1600,7 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TY= PE sdkType, int sdkIndex, dev =3D prlsdkGetDevByDevIndex(sdkdom, sdkType, sdkIndex); if (dev =3D=3D PRL_INVALID_HANDLE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can't find boot device of type: %d, device index= : %d"), + _("Can't find boot device of type: %1$d, device ind= ex: %2$d"), sdkType, sdkIndex); return -1; } @@ -1617,13 +1617,13 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_= TYPE sdkType, int sdkIndex, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported disk type %d"), sdkType); + _("Unsupported disk type %1$d"), sdkType); goto cleanup; } =20 if (!(disk =3D virFindDiskBootIndex(def, device, bootIndex))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can't find boot device of type: %s, index: %= d"), + _("Can't find boot device of type: %1$s, index:= %2$d"), virDomainDiskDeviceTypeToString(device), bootIn= dex); goto cleanup; } @@ -1642,7 +1642,7 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TY= PE sdkType, int sdkIndex, =20 if (bootIndex >=3D def->nnets) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Can't find network boot device for index: %d= "), + _("Can't find network boot device for index: %1= $d"), bootIndex); goto cleanup; } @@ -1653,7 +1653,7 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TY= PE sdkType, int sdkIndex, break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unexpected device type %d"), sdkType); + _("Unexpected device type %1$d"), sdkType); goto cleanup; } =20 @@ -1732,7 +1732,7 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomain= Def *def) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unexpected boot device type %i"), sdkType); + _("Unexpected boot device type %1$i"), sdkType); goto cleanup; } =20 @@ -1835,7 +1835,7 @@ prlsdkLoadDomain(struct _vzDriver *driver, if (autostart !=3D PAO_VM_START_ON_LOAD && autostart !=3D PAO_VM_START_MANUAL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown autostart mode: %X"), autostart); + _("Unknown autostart mode: %1$X"), autostart); return NULL; } =20 @@ -2801,8 +2801,7 @@ static int prlsdkCheckSerialUnsupportedParams(virDoma= inChrDef *chr) if (chr->source->type =3D=3D VIR_DOMAIN_CHR_TYPE_TCP && chr->source->data.tcp.protocol !=3D VIR_DOMAIN_CHR_TCP_PROTOCOL_RA= W) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Protocol '%s' is not supported for " - "tcp character device."), + _("Protocol '%1$s' is not supported for tcp charact= er device."), virDomainChrTcpProtocolTypeToString(chr->source->da= ta.tcp.protocol)); return -1; } @@ -3151,8 +3150,7 @@ static int prlsdkConfigureGateways(PRL_HANDLE sdknet,= virDomainNetDef *net) break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported address family %d " - "Only IPv4 or IPv6 default gateway"), + _("Unsupported address family %1$d Only IPv4 or= IPv6 default gateway"), VIR_SOCKET_ADDR_FAMILY(gateway)); =20 return -1; @@ -3354,7 +3352,7 @@ prlsdkFindNetByMAC(PRL_HANDLE sdkdom, virMacAddr *mac) } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("No net with mac '%s'"), virMacAddrFormat(mac, virMac= )); + _("No net with mac '%1$s'"), virMacAddrFormat(mac, virM= ac)); =20 cleanup: PrlHandle_Free(adapter); @@ -3502,7 +3500,7 @@ prlsdkGetDisk(PRL_HANDLE sdkdom, virDomainDiskDef *di= sk) } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("No disk with bus '%s' and target '%s'"), + _("No disk with bus '%1$s' and target '%2$s'"), virDomainDiskBusTypeToString(disk->bus), disk->dst); return PRL_INVALID_HANDLE; =20 @@ -3581,7 +3579,7 @@ prlsdkAttachDevice(struct _vzDriver *driver, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("attaching device type '%s' is unsupported"), + _("attaching device type '%1$s' is unsupported"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -3671,7 +3669,7 @@ prlsdkDetachDevice(struct _vzDriver *driver G_GNUC_UN= USED, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("detaching device type '%s' is unsupported"), + _("detaching device type '%1$s' is unsupported"), virDomainDeviceTypeToString(dev->type)); goto cleanup; } @@ -3751,7 +3749,7 @@ prlsdkUpdateDevice(struct _vzDriver *driver, case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_CRYPTO: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("updating device type '%s' is unsupported"), + _("updating device type '%1$s' is unsupported"), virDomainDeviceTypeToString(dev->type)); return -1; } @@ -3878,7 +3876,7 @@ prlsdkSetBootOrderVm(PRL_HANDLE sdkdom, virDomainDef = *def) case VIR_DOMAIN_BOOT_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported boot device type: '%s'"), + _("Unsupported boot device type: '%1$s'"), virDomainBootTypeToString(virType)); return -1; } @@ -3965,7 +3963,7 @@ prlsdkDoApplyConfig(struct _vzDriver *driver, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown CPU mode: %s"), + _("Unknown CPU mode: %1$s"), virArchToString(def->os.arch)); goto error; } @@ -4111,8 +4109,8 @@ virStorageTranslatePoolLocal(virConnectPtr conn, virS= torageSource *src) return -1; if (virStoragePoolIsActive(pool) !=3D 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("storage pool '%s' containing volume '%s' " - "is not active"), src->srcpool->pool, + _("storage pool '%1$s' containing volume '%2$s' is = not active"), + src->srcpool->pool, src->srcpool->volume); goto cleanup; } @@ -4125,7 +4123,7 @@ virStorageTranslatePoolLocal(virConnectPtr conn, virS= torageSource *src) =20 if (info.type !=3D VIR_STORAGE_VOL_PLOOP) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported volume format '%s'"), + _("Unsupported volume format '%1$s'"), virStorageVolTypeToString(info.type)); goto cleanup; } @@ -4398,7 +4396,7 @@ prlsdkGetBlockStats(PRL_HANDLE sdkstats, case VIR_DOMAIN_DISK_BUS_LAST: default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown disk bus: %X"), disk->bus); + _("Unknown disk bus: %1$X"), disk->bus); goto cleanup; } } @@ -4453,7 +4451,7 @@ prlsdkFindNetByPath(PRL_HANDLE sdkdom, const char *pa= th) =20 if (net =3D=3D PRL_INVALID_HANDLE) virReportError(VIR_ERR_INVALID_ARG, - _("invalid path, '%s' is not a known interface"), p= ath); + _("invalid path, '%1$s' is not a known interface"),= path); return net; =20 error: @@ -4627,7 +4625,7 @@ prlsdkParseDateTime(const char *str) /* second */ virStrToLong_i(tmp+1, &tmp, 10, &sec) < 0 || *tmp !=3D '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected DateTime format: '%s'"), str); + _("unexpected DateTime format: '%1$s'"), str); return -1; } =20 @@ -4712,7 +4710,7 @@ prlsdkParseSnapshotTree(const char *treexml) def->state =3D VIR_DOMAIN_SHUTOFF; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected snapshot state: %s"), xmlstr); + _("unexpected snapshot state: %1$s"), xmlstr); } VIR_FREE(xmlstr); =20 diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index 219d13823b..239d0db277 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -81,7 +81,7 @@ vzDomObjFromDomain(virDomainPtr domain) if (!vm) { virUUIDFormat(domain->uuid, uuidstr); virReportError(VIR_ERR_NO_DOMAIN, - _("no domain with matching uuid '%s' (%s)"), + _("no domain with matching uuid '%1$s' (%2$s)"), uuidstr, domain->name); return NULL; } @@ -202,15 +202,15 @@ vzCheckDiskAddressDriveUnsupportedParams(virDomainDis= kDef *disk) if (drive->controller > 0) { /* We have only one controller of each type */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid drive address of disk %s, vz driver " - "supports only one controller."), disk->dst); + _("Invalid drive address of disk %1$s, vz driver su= pports only one controller."), + disk->dst); return -1; } =20 if (drive->target > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid drive address of disk %s, vz driver " - "supports only target 0."), disk->dst); + _("Invalid drive address of disk %1$s, vz driver su= pports only target 0."), + disk->dst); return -1; } =20 @@ -218,8 +218,7 @@ vzCheckDiskAddressDriveUnsupportedParams(virDomainDiskD= ef *disk) case VIR_DOMAIN_DISK_BUS_IDE: if (drive->unit > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid drive address of disk %s, vz driver " - "supports only units 0-1 for IDE bus."), + _("Invalid drive address of disk %1$s, vz drive= r supports only units 0-1 for IDE bus."), disk->dst); return -1; } @@ -228,8 +227,7 @@ vzCheckDiskAddressDriveUnsupportedParams(virDomainDiskD= ef *disk) case VIR_DOMAIN_DISK_BUS_SATA: if (drive->bus > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid drive address of disk %s, vz driver " - "supports only bus 0 for SATA and SCSI bus."), + _("Invalid drive address of disk %1$s, vz drive= r supports only bus 0 for SATA and SCSI bus."), disk->dst); return -1; } @@ -250,15 +248,14 @@ vzCheckDiskAddressDriveUnsupportedParams(virDomainDis= kDef *disk) =20 if (virDiskNameToBusDeviceIndex(disk, &busIdx, &devIdx) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot convert disk '%s' to bus/device index"), + _("cannot convert disk '%1$s' to bus/device index"), disk->dst); return -1; } =20 if (busIdx !=3D drive->bus || devIdx !=3D drive->unit) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid drive address of disk %s, vz driver " - "does not support non default name mappings."), + _("Invalid drive address of disk %1$s, vz driver do= es not support non default name mappings."), disk->dst); return -1; } @@ -418,7 +415,7 @@ vzCheckUnsupportedDisk(const virDomainDef *def, if (virDomainDiskGetFormat(disk) !=3D VIR_STORAGE_FILE_NONE && virDomainDiskGetFormat(disk) !=3D diskFormat) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported format of disk %s"), + _("Unsupported format of disk %1$s"), disk->src->path); return -1; } @@ -430,7 +427,7 @@ vzCheckUnsupportedDisk(const virDomainDef *def, =20 if (vzCaps->diskBuses[i] =3D=3D VIR_DOMAIN_DISK_BUS_LAST) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported disk bus type %s"), + _("Unsupported disk bus type %1$s"), virDomainDiskBusTypeToString(disk->bus)); return -1; } @@ -454,7 +451,7 @@ vzCheckUnsupportedControllers(const virDomainDef *def, = struct _vzCapabilities *v =20 if (vzCaps->controllerTypes[j] =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_L= AST) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported controller type %s"), + _("Unsupported controller type %1$s"), virDomainControllerTypeToString(controller->typ= e)); return -1; } @@ -465,7 +462,7 @@ vzCheckUnsupportedControllers(const virDomainDef *def, = struct _vzCapabilities *v controller->model !=3D vzCaps->scsiControllerModel) { =20 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported SCSI controller model %s"), + _("Unsupported SCSI controller model %1$s"), virDomainControllerModelSCSITypeToString(co= ntroller->model)); return -1; } @@ -485,7 +482,7 @@ int vzGetDefaultSCSIModel(struct _vzDriver *driver, break; default: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown SCSI controller model %s"), + _("Unknown SCSI controller model %1$s"), virDomainControllerModelSCSITypeToString( driver->vzCaps.scsiControllerModel)); return -1; diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h index 9cb3c806e4..7a797953a5 100644 --- a/src/vz/vz_utils.h +++ b/src/vz/vz_utils.h @@ -44,7 +44,7 @@ char uuidstr[VIR_UUID_STRING_BUFLEN]; \ virUUIDFormat(domain->uuid, uuidstr); \ virReportError(VIR_ERR_NO_DOMAIN, \ - _("no domain with matching uuid '%s'"), uuidstr); \ + _("no domain with matching uuid '%1$s'"), uuidstr);= \ } while (0) =20 #define PARALLELS_DOMAIN_ROUTED_NETWORK_NAME "host-routed" --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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 From nobody Fri Apr 19 05:30:58 2024 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=1678464745; cv=none; d=zohomail.com; s=zohoarc; b=e+J+VPI12kZD2LRy6nuZ9dmvnHrJvjrPdt7/eOiDAFxzNEPIcNi0ZvcQNy8yqSTt/Vt9zoz7VaM2HJ+hNxVbOKcDlEvWhdvKLp9/8kueElkX7oqSG1TWPoSL53T8I70pcFDljSL8MGvlHF+Va96fEJLlGjD0XXzykfL7EQ4WDmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464745; 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=Bl28RTt43rfrvBZeg/ndToYjrm67ej9a0WoquW4eMGU=; b=PGH61BqRzxQ9CDTa5BKajsPUZhSsxTUu4iJZL3DzsVBRs2EcTpAsXlZNfvRN6RUkQMOdYoQ1Zoug7W9/z0Y+5fCfLbS5pNp9fqKd6F62vbS9LPGtlOHFYokWa+ulduNJNjbhNiRVG2J4cgarqsOqOuHvr2bAf9PFDYmAvJXcRdk= 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 1678464745324675.7315829647623; Fri, 10 Mar 2023 08:12:25 -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-633-IScDPBkbOv2tamYJ2rF1zg-1; Fri, 10 Mar 2023 11:11:42 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE14F1813E82; Fri, 10 Mar 2023 16:11:15 +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 B13BE2166B26; Fri, 10 Mar 2023 16:11:15 +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 A28C61946A4A; Fri, 10 Mar 2023 16:11:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 118691946587 for ; Fri, 10 Mar 2023 16:11:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 074FD2166B26; Fri, 10 Mar 2023 16:11:15 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 686E72166B2A for ; Fri, 10 Mar 2023 16:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464744; 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=Bl28RTt43rfrvBZeg/ndToYjrm67ej9a0WoquW4eMGU=; b=hOWjIv6G3Fv35jf9m1wJfLs5FWiuVtEGQbwiMkvnr5zUxFs46TyCendl+zr60D2jmGLLCQ QJGxfdKf/He+NAN6Nc05jvdMNMOmqtoOYxlYRy3hFtrlkYDqvA4mZRRnEtvU9zW0paZd4r hIQHi6hcKVdXnjAPkGq5FpeHPWfZ/BM= X-MC-Unique: IScDPBkbOv2tamYJ2rF1zg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 48/51] tools: Update format strings in translated messages (part 1) Date: Fri, 10 Mar 2023 17:10:04 +0100 Message-Id: <9315de8598f082a867ae1cb8b287248f02a6b8f5.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.6 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: 1678464747460100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- tools/virsh-checkpoint.c | 28 ++-- tools/virsh-domain-event.c | 65 ++++---- tools/virsh-domain-monitor.c | 24 +-- tools/virsh-domain.c | 312 +++++++++++++++++------------------ tools/virsh-edit.c | 2 +- tools/virsh-host.c | 46 +++--- tools/virsh-interface.c | 84 +++++----- tools/virsh-network.c | 71 ++++---- 8 files changed, 310 insertions(+), 322 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 9605c893af..727de34abb 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -59,10 +59,10 @@ virshCheckpointCreate(vshControl *ctl, } =20 if (from) - vshPrintExtra(ctl, _("Domain checkpoint %s created from '%s'"), + vshPrintExtra(ctl, _("Domain checkpoint %1$s created from '%2$s'"), name, from); else - vshPrintExtra(ctl, _("Domain checkpoint %s created"), name); + vshPrintExtra(ctl, _("Domain checkpoint %1$s created"), name); =20 return true; } @@ -179,7 +179,7 @@ virshParseCheckpointDiskspec(vshControl *ctl, ret =3D 0; cleanup: if (ret < 0) - vshError(ctl, _("unable to parse diskspec: %s"), str); + vshError(ctl, _("unable to parse diskspec: %1$s"), str); return ret; } =20 @@ -293,7 +293,7 @@ virshLookupCheckpoint(vshControl *ctl, if (chkname) { *chk =3D virDomainCheckpointLookupByName(dom, chkname, 0); } else { - vshError(ctl, _("--%s is required"), arg); + vshError(ctl, _("--%1$s is required"), arg); return -1; } if (!*chk) { @@ -354,7 +354,7 @@ cmdCheckpointEdit(vshControl *ctl, #define EDIT_NOT_CHANGED \ do { \ vshPrintExtra(ctl, \ - _("Checkpoint %s XML configuration not changed.\n"),= \ + _("Checkpoint %1$s XML configuration not changed.\n"= ), \ name); \ ret =3D true; \ goto edit_cleanup; \ @@ -365,16 +365,16 @@ cmdCheckpointEdit(vshControl *ctl, =20 edited_name =3D virDomainCheckpointGetName(edited); if (STREQ(name, edited_name)) { - vshPrintExtra(ctl, _("Checkpoint %s edited.\n"), name); + vshPrintExtra(ctl, _("Checkpoint %1$s edited.\n"), name); } else { unsigned int delete_flags =3D VIR_DOMAIN_CHECKPOINT_DELETE_METADAT= A_ONLY; =20 if (virDomainCheckpointDelete(edited, delete_flags) < 0) { vshReportError(ctl); - vshError(ctl, _("Failed to clean up %s"), edited_name); + vshError(ctl, _("Failed to clean up %1$s"), edited_name); goto cleanup; } - vshError(ctl, _("Cannot rename checkpoint %s to %s"), + vshError(ctl, _("Cannot rename checkpoint %1$s to %2$s"), name, edited_name); goto cleanup; } @@ -383,7 +383,7 @@ cmdCheckpointEdit(vshControl *ctl, =20 cleanup: if (!ret && name) - vshError(ctl, _("Failed to update %s"), name); + vshError(ctl, _("Failed to update %1$s"), name); return ret; } =20 @@ -705,7 +705,7 @@ cmdCheckpointList(vshControl *ctl, if (vshCommandOptBool(cmd, option)) { \ if (tree) { \ vshError(ctl, \ - _("--%s and --tree are mutually exclusive"), \ + _("--%1$s and --tree are mutually exclusive"), \ option); \ return false; \ } \ @@ -944,7 +944,7 @@ cmdCheckpointParent(vshControl *ctl, if (virshGetCheckpointParent(ctl, checkpoint, &parent) < 0) return false; if (!parent) { - vshError(ctl, _("checkpoint '%s' has no parent"), name); + vshError(ctl, _("checkpoint '%1$s' has no parent"), name); return false; } =20 @@ -1016,11 +1016,11 @@ cmdCheckpointDelete(vshControl *ctl, =20 if (virDomainCheckpointDelete(checkpoint, flags) =3D=3D 0) { if (flags & VIR_DOMAIN_CHECKPOINT_DELETE_CHILDREN_ONLY) - vshPrintExtra(ctl, _("Domain checkpoint %s children deleted\n"= ), name); + vshPrintExtra(ctl, _("Domain checkpoint %1$s children deleted\= n"), name); else - vshPrintExtra(ctl, _("Domain checkpoint %s deleted\n"), name); + vshPrintExtra(ctl, _("Domain checkpoint %1$s deleted\n"), name= ); } else { - vshError(ctl, _("Failed to delete checkpoint %s"), name); + vshError(ctl, _("Failed to delete checkpoint %1$s"), name); return false; } =20 diff --git a/tools/virsh-domain-event.c b/tools/virsh-domain-event.c index 9531a5435c..2ad4573ee9 100644 --- a/tools/virsh-domain-event.c +++ b/tools/virsh-domain-event.c @@ -327,7 +327,7 @@ virshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event '%s' for domain '%s'\n"), + virBufferAsprintf(&buf, _("event '%1$s' for domain '%2$s'\n"), ((virshDomEventData *) opaque)->cb->name, virDomainGetName(dom)); virshEventPrint(opaque, &buf); @@ -342,7 +342,7 @@ virshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUS= ED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'lifecycle' for domain '%s': %s %s\n"= ), + virBufferAsprintf(&buf, _("event 'lifecycle' for domain '%1$s': %2$s %= 3$s\n"), virDomainGetName(dom), virshDomainEventToString(event), virshDomainEventDetailToString(event, detail)); @@ -357,7 +357,7 @@ virshEventRTCChangePrint(virConnectPtr conn G_GNUC_UNUS= ED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'rtc-change' for domain '%s': %lld\n"= ), + virBufferAsprintf(&buf, _("event 'rtc-change' for domain '%1$s': %2$ll= d\n"), virDomainGetName(dom), utcoffset); virshEventPrint(opaque, &buf); @@ -371,7 +371,7 @@ virshEventWatchdogPrint(virConnectPtr conn G_GNUC_UNUSE= D, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'watchdog' for domain '%s': %s\n"), + virBufferAsprintf(&buf, _("event 'watchdog' for domain '%1$s': %2$s\n"= ), virDomainGetName(dom), virshDomainEventWatchdogToString(action)); virshEventPrint(opaque, &buf); @@ -387,7 +387,7 @@ virshEventIOErrorPrint(virConnectPtr conn G_GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'io-error' for domain '%s': %s (%s) %= s\n"), + virBufferAsprintf(&buf, _("event 'io-error' for domain '%1$s': %2$s (%= 3$s) %4$s\n"), virDomainGetName(dom), srcPath, devAlias, @@ -408,8 +408,8 @@ virshEventGraphicsPrint(virConnectPtr conn G_GNUC_UNUSE= D, g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; size_t i; =20 - virBufferAsprintf(&buf, _("event 'graphics' for domain '%s': " - "%s local[%s %s %s] remote[%s %s %s] %s\n"), + virBufferAsprintf(&buf, _("event 'graphics' for domain '%1$s': " + "%2$s local[%3$s %4$s %5$s] remote[%6$s %7$s= %8$s] %9$s\n"), virDomainGetName(dom), virshGraphicsPhaseToString(phase), virshGraphicsAddressToString(local->family), @@ -438,8 +438,8 @@ virshEventIOErrorReasonPrint(virConnectPtr conn G_GNUC_= UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'io-error-reason' for domain '%s': " - "%s (%s) %s due to %s\n"), + virBufferAsprintf(&buf, _("event 'io-error-reason' for domain '%1$s': " + "%2$s (%3$s) %4$s due to %5$s\n"), virDomainGetName(dom), srcPath, devAlias, @@ -458,7 +458,7 @@ virshEventBlockJobPrint(virConnectPtr conn G_GNUC_UNUSE= D, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event '%s' for domain '%s': %s for %s %s\n"= ), + virBufferAsprintf(&buf, _("event '%1$s' for domain '%2$s': %3$s for %4= $s %5$s\n"), ((virshDomEventData *) opaque)->cb->name, virDomainGetName(dom), virshDomainBlockJobToString(type), @@ -478,8 +478,8 @@ virshEventDiskChangePrint(virConnectPtr conn G_GNUC_UNU= SED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'disk-change' for domain '%s' disk %s= : " - "%s -> %s: %s\n"), + virBufferAsprintf(&buf, _("event 'disk-change' for domain '%1$s' disk = %2$s: " + "%3$s -> %4$s: %5$s\n"), virDomainGetName(dom), alias, NULLSTR(oldSrc), @@ -497,7 +497,7 @@ virshEventTrayChangePrint(virConnectPtr conn G_GNUC_UNU= SED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'tray-change' for domain '%s' disk %s= : %s\n"), + virBufferAsprintf(&buf, _("event 'tray-change' for domain '%1$s' disk = %2$s: %3$s\n"), virDomainGetName(dom), alias, virshDomainEventTrayChangeToString(reason)); @@ -523,7 +523,7 @@ virshEventBalloonChangePrint(virConnectPtr conn G_GNUC_= UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'balloon-change' for domain '%s': %ll= uKiB\n"), + virBufferAsprintf(&buf, _("event 'balloon-change' for domain '%1$s': %= 2$lluKiB\n"), virDomainGetName(dom), actual); virshEventPrint(opaque, &buf); @@ -537,7 +537,7 @@ virshEventDeviceRemovedPrint(virConnectPtr conn G_GNUC_= UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'device-removed' for domain '%s': %s\= n"), + virBufferAsprintf(&buf, _("event 'device-removed' for domain '%1$s': %= 2$s\n"), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -551,7 +551,7 @@ virshEventDeviceAddedPrint(virConnectPtr conn G_GNUC_UN= USED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'device-added' for domain '%s': %s\n"= ), + virBufferAsprintf(&buf, _("event 'device-added' for domain '%1$s': %2$= s\n"), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -568,7 +568,7 @@ virshEventTunablePrint(virConnectPtr conn G_GNUC_UNUSED, size_t i; char *value; =20 - virBufferAsprintf(&buf, _("event 'tunable' for domain '%s':\n"), + virBufferAsprintf(&buf, _("event 'tunable' for domain '%1$s':\n"), virDomainGetName(dom)); for (i =3D 0; i < nparams; i++) { value =3D virTypedParameterToString(¶ms[i]); @@ -604,8 +604,8 @@ virshEventAgentLifecyclePrint(virConnectPtr conn G_GNUC= _UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain '%s': st= ate: " - "'%s' reason: '%s'\n"), + virBufferAsprintf(&buf, _("event 'agent-lifecycle' for domain '%1$s': = state: " + "'%2$s' reason: '%3$s'\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventAgentLifecycleStateTypeToString= (state)), UNKNOWNSTR(virshEventAgentLifecycleReasonTypeToStrin= g(reason))); @@ -620,8 +620,8 @@ virshEventMigrationIterationPrint(virConnectPtr conn G_= GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'migration-iteration' for domain '%s'= : " - "iteration: '%d'\n"), + virBufferAsprintf(&buf, _("event 'migration-iteration' for domain '%1$= s': " + "iteration: '%2$d'\n"), virDomainGetName(dom), iteration); =20 @@ -638,7 +638,7 @@ virshEventJobCompletedPrint(virConnectPtr conn G_GNUC_U= NUSED, g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; size_t i; =20 - virBufferAsprintf(&buf, _("event 'job-completed' for domain '%s':\n"), + virBufferAsprintf(&buf, _("event 'job-completed' for domain '%1$s':\n"= ), virDomainGetName(dom)); for (i =3D 0; i < nparams; i++) { g_autofree char *value =3D virTypedParameterToString(¶ms[i]); @@ -657,7 +657,7 @@ virshEventDeviceRemovalFailedPrint(virConnectPtr conn G= _GNUC_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'device-removal-failed' for domain '%= s': %s\n"), + virBufferAsprintf(&buf, _("event 'device-removal-failed' for domain '%= 1$s': %2$s\n"), virDomainGetName(dom), alias); virshEventPrint(opaque, &buf); @@ -679,7 +679,7 @@ virshEventMetadataChangePrint(virConnectPtr conn G_GNUC= _UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'metadata-change' for domain '%s': ty= pe %s, uri %s\n"), + virBufferAsprintf(&buf, _("event 'metadata-change' for domain '%1$s': = type %2$s, uri %3$s\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventMetadataChangeTypeTypeToString(= type)), NULLSTR(nsuri)); @@ -698,8 +698,8 @@ virshEventBlockThresholdPrint(virConnectPtr conn G_GNUC= _UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'block-threshold' for domain '%s': " - "dev: %s(%s) %llu %llu\n"), + virBufferAsprintf(&buf, _("event 'block-threshold' for domain '%1$s': " + "dev: %2$s(%3$s) %4$llu %5$llu\n"), virDomainGetName(dom), dev, NULLSTR(path), threshold, excess); virshEventPrint(opaque, &buf); @@ -730,13 +730,11 @@ virshEventMemoryFailurePrint(virConnectPtr conn G_GNU= C_UNUSED, { g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 - virBufferAsprintf(&buf, _("event 'memory-failure' for domain '%s':\n" - "recipient: %s\naction: %s\n"), + virBufferAsprintf(&buf, _("event 'memory-failure' for domain '%1$s':\n= recipient: %2$s\naction: %3$s\n"), virDomainGetName(dom), UNKNOWNSTR(virshEventMemoryFailureRecipientTypeTypeT= oString(recipient)), UNKNOWNSTR(virshEventMemoryFailureActionTypeTypeToSt= ring(action))); - virBufferAsprintf(&buf, _("flags:\n" - "\taction required: %d\n\trecursive: %d\n"), + virBufferAsprintf(&buf, _("flags:\n\taction required: %1$d\n\trecursiv= e: %2$d\n"), !!(flags & VIR_DOMAIN_MEMORY_FAILURE_ACTION_REQUIRED= ), !!(flags & VIR_DOMAIN_MEMORY_FAILURE_RECURSIVE)); =20 @@ -754,8 +752,7 @@ virshEventMemoryDeviceSizeChangePrint(virConnectPtr con= n G_GNUC_UNUSED, g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 virBufferAsprintf(&buf, - _("event 'memory-device-size-change' for domain '%s'= :\n" - "alias: %s\nsize: %llu\n"), + _("event 'memory-device-size-change' for domain '%1$= s':\nalias: %2$s\nsize: %3$llu\n"), virDomainGetName(dom), alias, size); =20 virshEventPrint(opaque, &buf); @@ -932,7 +929,7 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd) } =20 if (ndata =3D=3D 0) { - vshError(ctl, _("unknown event type %s"), eventName); + vshError(ctl, _("unknown event type %1$s"), eventName); return false; } =20 @@ -975,7 +972,7 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), count); + vshPrint(ctl, _("events received: %1$d\n"), count); if (count) ret =3D true; =20 diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index c2134faba1..ed426431a1 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -327,7 +327,7 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd) return false; if (rv > 0) { if (period < 0) { - vshError(ctl, _("Invalid collection period value '%d'"), perio= d); + vshError(ctl, _("Invalid collection period value '%1$d'"), per= iod); return false; } =20 @@ -341,7 +341,7 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd) =20 nr_stats =3D virDomainMemoryStats(dom, stats, VIR_DOMAIN_MEMORY_STAT_N= R, 0); if (nr_stats =3D=3D -1) { - vshError(ctl, _("Failed to get memory statistics for domain %s"), = name); + vshError(ctl, _("Failed to get memory statistics for domain %1$s")= , name); return false; } =20 @@ -811,9 +811,9 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd) =20 if (ninterfaces < 1) { if (macstr[0]) - vshError(ctl, _("Interface (mac: %s) not found."), macstr); + vshError(ctl, _("Interface (mac: %1$s) not found."), macstr); else - vshError(ctl, _("Interface (dev: %s) not found."), iface); + vshError(ctl, _("Interface (dev: %1$s) not found."), iface); =20 return false; } else if (ninterfaces > 1) { @@ -986,14 +986,14 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd) =20 if (virDomainBlockStats(dom, device, &stats, sizeof(stats)) =3D=3D -1) { - vshError(ctl, _("Failed to get block stats %s %s"), + vshError(ctl, _("Failed to get block stats %1$s %2$s"), name, device); return false; } =20 /* human friendly output */ if (human) { - vshPrint(ctl, N_("Device: %s\n"), device); + vshPrint(ctl, N_("Device: %1$s\n"), device); device =3D ""; } =20 @@ -1005,13 +1005,13 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd) } else { params =3D g_new0(virTypedParameter, nparams); if (virDomainBlockStatsFlags(dom, device, params, &nparams, 0) < 0= ) { - vshError(ctl, _("Failed to get block stats for domain '%s' dev= ice '%s'"), name, device); + vshError(ctl, _("Failed to get block stats for domain '%1$s' d= evice '%2$s'"), name, device); return false; } =20 /* set for prettier output */ if (human) { - vshPrint(ctl, N_("Device: %s\n"), device); + vshPrint(ctl, N_("Device: %1$s\n"), device); device =3D ""; } =20 @@ -1097,7 +1097,7 @@ cmdDomIfstat(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainInterfaceStats(dom, device, &stats, sizeof(stats)) =3D=3D= -1) { - vshError(ctl, _("Failed to get interface stats %s %s"), name, devi= ce); + vshError(ctl, _("Failed to get interface stats %1$s %2$s"), name, = device); return false; } =20 @@ -1462,9 +1462,9 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd) then =3D g_date_time_new_from_unix_utc(seconds); thenstr =3D g_date_time_format(then, "%Y-%m-%d %H:%M:%S"); =20 - vshPrint(ctl, _("Time: %s"), thenstr); + vshPrint(ctl, _("Time: %1$s"), thenstr); } else { - vshPrint(ctl, _("Time: %lld"), seconds); + vshPrint(ctl, _("Time: %1$lld"), seconds); } } =20 @@ -2320,7 +2320,7 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd) =20 if (sourcestr && (source =3D virshDomainInterfaceAddressesSourceTypeFromString(sour= cestr)) < 0) { - vshError(ctl, _("Unknown data source '%s'"), sourcestr); + vshError(ctl, _("Unknown data source '%1$s'"), sourcestr); return false; } =20 diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a4abcb1b03..6850843a25 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -248,7 +248,7 @@ virshFetchPassFdsList(vshControl *ctl, return 0; =20 if (!(fdlist =3D g_strsplit(fdopt, ",", -1))) { - vshError(ctl, _("Unable to split FD list '%s'"), fdopt); + vshError(ctl, _("Unable to split FD list '%1$s'"), fdopt); return -1; } =20 @@ -257,7 +257,7 @@ virshFetchPassFdsList(vshControl *ctl, =20 for (i =3D 0; i < nfds; i++) { if (virStrToLong_i(fdlist[i], NULL, 10, fds + i) < 0) { - vshError(ctl, _("Unable to parse FD number '%s'"), fdlist[i]); + vshError(ctl, _("Unable to parse FD number '%1$s'"), fdlist[i]= ); return -1; } } @@ -405,7 +405,7 @@ cmdAttachDevice(vshControl *ctl, const vshCmd *cmd) rv =3D virDomainAttachDevice(dom, buffer); =20 if (rv < 0) { - vshError(ctl, _("Failed to attach device from %s"), from); + vshError(ctl, _("Failed to attach device from %1$s"), from); return false; } =20 @@ -677,7 +677,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) =20 if (stype && (type =3D virshAttachDiskSourceTypeFromString(stype)) < 0) { - vshError(ctl, _("Unknown source type: '%s'"), stype); + vshError(ctl, _("Unknown source type: '%1$s'"), stype); return false; } =20 @@ -701,7 +701,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) } =20 if (mode && STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) { - vshError(ctl, _("No support for %s in command 'attach-disk'"), mod= e); + vshError(ctl, _("No support for %1$s in command 'attach-disk'"), m= ode); return false; } =20 @@ -902,7 +902,7 @@ VIR_ENUM_IMPL(virshDomainInterfaceSourceMode, if (index < ntok && \ *tok[index] !=3D '\0' && \ virStrToLong_ullp(tok[index], NULL, 10, &rate->name) < 0) { \ - vshError(ctl, _("field '%s' is malformed"), #name); \ + vshError(ctl, _("field '%1$s' is malformed"), #name); \ return -1; \ } \ } while (0) @@ -919,7 +919,7 @@ virshParseRateStr(vshControl *ctl, return -1; =20 if ((ntok =3D g_strv_length(tok)) > 4) { - vshError(ctl, _("Rate string '%s' has too many fields"), rateStr); + vshError(ctl, _("Rate string '%1$s' has too many fields"), rateStr= ); return -1; } =20 @@ -978,14 +978,14 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd) =20 /* check interface type */ if ((int)(typ =3D virDomainNetTypeFromString(type)) < 0) { - vshError(ctl, _("No support for %s in command 'attach-interface'"), + vshError(ctl, _("No support for %1$s in command 'attach-interface'= "), type); return false; } =20 if (sourceModeStr && (sourceMode =3D virshDomainInterfaceSourceModeTypeFromString(sourc= eModeStr)) < 0) { - vshError(ctl, _("Invalid source mode: %s"), sourceModeStr); + vshError(ctl, _("Invalid source mode: %1$s"), sourceModeStr); return false; } =20 @@ -1036,7 +1036,7 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd) struct virshAddress addr =3D { 0 }; =20 if (virshAddressParse(pciaddrstr, false, &addr) < 0) { - vshError(ctl, _("cannot parse pci address '%s' for network int= erface"), + vshError(ctl, _("cannot parse pci address '%1$s' for network i= nterface"), source); return false; } @@ -1070,7 +1070,7 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd) case VIR_DOMAIN_NET_TYPE_NULL: case VIR_DOMAIN_NET_TYPE_VDS: case VIR_DOMAIN_NET_TYPE_LAST: - vshError(ctl, _("No support for %s in command 'attach-interface'"), + vshError(ctl, _("No support for %1$s in command 'attach-interface'= "), type); return false; break; @@ -1183,16 +1183,16 @@ cmdAutostart(vshControl *ctl, const vshCmd *cmd) =20 if (virDomainSetAutostart(dom, autostart) < 0) { if (autostart) - vshError(ctl, _("Failed to mark domain '%s' as autostarted"), = name); + vshError(ctl, _("Failed to mark domain '%1$s' as autostarted")= , name); else - vshError(ctl, _("Failed to unmark domain '%s' as autostarted")= , name); + vshError(ctl, _("Failed to unmark domain '%1$s' as autostarted= "), name); return false; } =20 if (autostart) - vshPrintExtra(ctl, _("Domain '%s' marked as autostarted\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' marked as autostarted\n"), nam= e); else - vshPrintExtra(ctl, _("Domain '%s' unmarked as autostarted\n"), nam= e); + vshPrintExtra(ctl, _("Domain '%1$s' unmarked as autostarted\n"), n= ame); =20 return true; } @@ -1610,7 +1610,7 @@ cmdBlkiotune(vshControl * ctl, const vshCmd * cmd) goto cleanup; } else if (rv > 0) { if (weight <=3D 0) { - vshError(ctl, _("Invalid value of %d for I/O weight"), weight); + vshError(ctl, _("Invalid value of %1$d for I/O weight"), weigh= t); goto cleanup; } if (virTypedParamsAddUInt(¶ms, &nparams, &maxparams, @@ -1936,7 +1936,7 @@ virshBlockJobWait(virshBlockJobWaitData *data) #endif /* !WIN32 */ =20 if (result < 0) { - vshError(data->ctl, _("failed to query job for disk %s"), data= ->dev); + vshError(data->ctl, _("failed to query job for disk %1$s"), da= ta->dev); goto cleanup; } =20 @@ -1978,7 +1978,7 @@ virshBlockJobWait(virshBlockJobWaitData *data) =20 if (intCaught || (data->timeout && (curr - start > data->timeout))= ) { if (virDomainBlockJobAbort(data->dom, data->dev, abort_flags) = < 0) { - vshError(data->ctl, _("failed to abort job for disk '%s'"), + vshError(data->ctl, _("failed to abort job for disk '%1$s'= "), data->dev); goto cleanup; } @@ -2205,14 +2205,14 @@ cmdBlockcommit(vshControl *ctl, const vshCmd *cmd) if (pivot) { abort_flags |=3D VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT; if (virDomainBlockJobAbort(dom, path, abort_flags) < 0) { - vshError(ctl, _("failed to pivot job for disk %s"), path); + vshError(ctl, _("failed to pivot job for disk %1$s"), path= ); goto cleanup; } =20 vshPrintExtra(ctl, "\n%s", _("Successfully pivoted")); } else if (finish) { if (virDomainBlockJobAbort(dom, path, abort_flags) < 0) { - vshError(ctl, _("failed to finish job for disk %s"), path); + vshError(ctl, _("failed to finish job for disk %1$s"), pat= h); goto cleanup; } =20 @@ -2451,7 +2451,7 @@ cmdBlockcopy(vshControl *ctl, const vshCmd *cmd) * ullong bytes/s; make sure we don't overflow */ unsigned long long limit =3D MIN(ULONG_MAX, ULLONG_MAX= >> 20); if (bandwidth > limit) { - vshError(ctl, _("bandwidth must be less than %llu"= ), limit); + vshError(ctl, _("bandwidth must be less than %1$ll= u"), limit); goto cleanup; } =20 @@ -2546,14 +2546,14 @@ cmdBlockcopy(vshControl *ctl, const vshCmd *cmd) if (pivot) { abort_flags |=3D VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT; if (virDomainBlockJobAbort(dom, path, abort_flags) < 0) { - vshError(ctl, _("failed to pivot job for disk %s"), path); + vshError(ctl, _("failed to pivot job for disk %1$s"), path); goto cleanup; } =20 vshPrintExtra(ctl, "\n%s", _("Successfully pivoted")); } else if (finish) { if (virDomainBlockJobAbort(dom, path, abort_flags) < 0) { - vshError(ctl, _("failed to finish job for disk %s"), path); + vshError(ctl, _("failed to finish job for disk %1$s"), path); goto cleanup; } =20 @@ -2669,7 +2669,7 @@ virshBlockJobInfo(vshControl *ctl, if (!raw) { speed <<=3D 20; if (speed >> 20 !=3D info.bandwidth) { - vshError(ctl, _("overflow in converting %ld MiB/s to bytes= \n"), + vshError(ctl, _("overflow in converting %1$ld MiB/s to byt= es\n"), info.bandwidth); return false; } @@ -2678,12 +2678,12 @@ virshBlockJobInfo(vshControl *ctl, =20 if (rc =3D=3D 0) { if (!raw) - vshPrintExtra(ctl, _("No current block job for %s"), path); + vshPrintExtra(ctl, _("No current block job for %1$s"), path); return true; } =20 if (raw) { - vshPrint(ctl, _(" type=3D%s\n bandwidth=3D%lu\n cur=3D%llu\n end= =3D%llu\n"), + vshPrint(ctl, _(" type=3D%1$s\n bandwidth=3D%2$lu\n cur=3D%3$llu\n= end=3D%4$llu\n"), virshDomainBlockJobTypeToString(info.type), info.bandwidth, info.cur, info.end); } else { @@ -2692,7 +2692,7 @@ virshBlockJobInfo(vshControl *ctl, if (speed) { const char *unit; double val =3D vshPrettyCapacity(speed, &unit); - vshPrint(ctl, _(" Bandwidth limit: %llu bytes/s (%-.3lf %s/= s)"), + vshPrint(ctl, _(" Bandwidth limit: %1$llu bytes/s (%2$-.3lf= %3$s/s)"), speed, val, unit); } vshPrint(ctl, "\n"); @@ -2986,11 +2986,11 @@ cmdBlockresize(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainBlockResize(dom, path, size, flags) < 0) { - vshError(ctl, _("Failed to resize block device '%s'"), path); + vshError(ctl, _("Failed to resize block device '%1$s'"), path); return false; } =20 - vshPrintExtra(ctl, _("Block device '%s' is resized"), path); + vshPrintExtra(ctl, _("Block device '%1$s' is resized"), path); return true; } =20 @@ -3049,8 +3049,8 @@ cmdRunConsole(vshControl *ctl, virDomainPtr dom, return false; } =20 - vshPrintExtra(ctl, _("Connected to domain '%s'\n"), virDomainGetName(d= om)); - vshPrintExtra(ctl, _("Escape character is %s"), priv->escapeChar); + vshPrintExtra(ctl, _("Connected to domain '%1$s'\n"), virDomainGetName= (dom)); + vshPrintExtra(ctl, _("Escape character is %1$s"), priv->escapeChar); if (priv->escapeChar[0] =3D=3D '^') vshPrintExtra(ctl, " (Ctrl + %c)", priv->escapeChar[1]); vshPrintExtra(ctl, "\n"); @@ -3150,7 +3150,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) return false; =20 if (STRNEQ(state, "up") && STRNEQ(state, "down")) { - vshError(ctl, _("invalid link state '%s'"), state); + vshError(ctl, _("invalid link state '%1$s'"), state); return false; } =20 @@ -3192,7 +3192,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd) } =20 if (!ifaceNode) { - vshError(ctl, _("interface '%s' not found"), iface); + vshError(ctl, _("interface '%1$s' not found"), iface); return false; } =20 @@ -3318,7 +3318,7 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd) * only accepts UINT */ if (inbound.average > UINT_MAX || inbound.peak > UINT_MAX || inbound.burst > UINT_MAX) { - vshError(ctl, _("inbound rate larger than maximum %u"), + vshError(ctl, _("inbound rate larger than maximum %1$u"), UINT_MAX); goto cleanup; } @@ -3358,7 +3358,7 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd) goto cleanup; if (outbound.average > UINT_MAX || outbound.peak > UINT_MAX || outbound.burst > UINT_MAX) { - vshError(ctl, _("outbound rate larger than maximum %u"), + vshError(ctl, _("outbound rate larger than maximum %1$u"), UINT_MAX); goto cleanup; } @@ -3462,11 +3462,11 @@ cmdSuspend(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainSuspend(dom) !=3D 0) { - vshError(ctl, _("Failed to suspend domain '%s'"), name); + vshError(ctl, _("Failed to suspend domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' suspended\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' suspended\n"), name); return true; } =20 @@ -3528,12 +3528,12 @@ cmdDomPMSuspend(vshControl *ctl, const vshCmd *cmd) } =20 if (virDomainPMSuspendForDuration(dom, suspendTarget, duration, 0) < 0= ) { - vshError(ctl, _("Domain '%s' could not be suspended"), + vshError(ctl, _("Domain '%1$s' could not be suspended"), virDomainGetName(dom)); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' successfully suspended"), + vshPrintExtra(ctl, _("Domain '%1$s' successfully suspended"), virDomainGetName(dom)); =20 return true; @@ -3570,12 +3570,12 @@ cmdDomPMWakeup(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainPMWakeup(dom, flags) < 0) { - vshError(ctl, _("Domain '%s' could not be woken up"), + vshError(ctl, _("Domain '%1$s' could not be woken up"), virDomainGetName(dom)); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' successfully woken up"), + vshPrintExtra(ctl, _("Domain '%1$s' successfully woken up"), virDomainGetName(dom)); =20 return true; @@ -3858,7 +3858,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) =20 if (!source) { vshError(ctl, - _("Missing storage volume name for disk '%s'"= ), + _("Missing storage volume name for disk '%1$s= '"), target); continue; } @@ -3866,7 +3866,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) if (!(storagepool =3D virStoragePoolLookupByName(priv->con= n, pool))) { vshError(ctl, - _("Storage pool '%s' for volume '%s' not foun= d."), + _("Storage pool '%1$s' for volume '%2$s' not = found."), pool, target); vshResetLibvirtError(); continue; @@ -3880,8 +3880,8 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) =20 if (!vol.vol) { vshError(ctl, - _("Storage volume '%s'(%s) is not managed by libv= irt. " - "Remove it manually.\n"), target, source); + _("Storage volume '%1$s'(%2$s) is not managed by = libvirt. Remove it manually.\n"), + target, source); vshResetLibvirtError(); continue; } @@ -3897,8 +3897,8 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) for (i =3D 0; i < nvol_list; i++) { if (vol_list[i]) { vshError(ctl, - _("Volume '%s' was not found in domain's " - "definition.\n"), vol_list[i]); + _("Volume '%1$s' was not found in domain's de= finition.\n"), + vol_list[i]); found =3D true; } } @@ -3945,10 +3945,10 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) * without support for the newer flags. Oh well. */ if (has_snapshots_metadata) { if (snapshots_metadata) - vshError(ctl, _("Unable to remove metadata of %d snapshots"), + vshError(ctl, _("Unable to remove metadata of %1$d snapshots"), has_snapshots_metadata); else - vshError(ctl, _("Refusing to undefine while %d snapshots exist= "), + vshError(ctl, _("Refusing to undefine while %1$d snapshots exi= st"), has_snapshots_metadata); =20 goto cleanup; @@ -3958,10 +3958,10 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) =20 out: if (rc =3D=3D 0) { - vshPrintExtra(ctl, _("Domain '%s' has been undefined\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' has been undefined\n"), name); ret =3D true; } else { - vshError(ctl, _("Failed to undefine domain '%s'"), name); + vshError(ctl, _("Failed to undefine domain '%1$s'"), name); goto cleanup; } =20 @@ -3969,7 +3969,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) if (nvols) { for (i =3D 0; i < nvols; i++) { if (wipe_storage) { - vshPrintExtra(ctl, _("Wiping volume '%s'(%s) ... "), + vshPrintExtra(ctl, _("Wiping volume '%1$s'(%2$s) ... "), vols[i].target, vols[i].source); fflush(stdout); if (virStorageVolWipe(vols[i].vol, 0) < 0) { @@ -3983,11 +3983,11 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd) =20 /* delete the volume */ if (virStorageVolDelete(vols[i].vol, vol_flags) < 0) { - vshError(ctl, _("Failed to remove storage volume '%s'(%s)"= ), + vshError(ctl, _("Failed to remove storage volume '%1$s'(%2= $s)"), vols[i].target, vols[i].source); ret =3D false; } else { - vshPrintExtra(ctl, _("Volume '%s'(%s) removed.\n"), + vshPrintExtra(ctl, _("Volume '%1$s'(%2$s) removed.\n"), vols[i].target, vols[i].source); } } @@ -4140,12 +4140,12 @@ cmdStart(vshControl *ctl, const vshCmd *cmd) } =20 if (rc < 0) { - vshError(ctl, _("Failed to start domain '%s'"), virDomainGetName(d= om)); + vshError(ctl, _("Failed to start domain '%1$s'"), virDomainGetName= (dom)); return false; } =20 started: - vshPrintExtra(ctl, _("Domain '%s' started\n"), + vshPrintExtra(ctl, _("Domain '%1$s' started\n"), virDomainGetName(dom)); #ifndef WIN32 if (console && !cmdRunConsole(ctl, dom, NULL, 0)) @@ -4250,7 +4250,7 @@ doSave(void *opaque) } =20 if (rc < 0) { - vshError(ctl, _("Failed to save domain '%s' to %s"), name, to); + vshError(ctl, _("Failed to save domain '%1$s' to %2$s"), name, to); goto out; } =20 @@ -4505,7 +4505,7 @@ cmdSave(vshControl *ctl, const vshCmd *cmd) virThreadJoin(&workerThread); =20 if (!data.ret) - vshPrintExtra(ctl, _("\nDomain '%s' saved to %s\n"), name, to); + vshPrintExtra(ctl, _("\nDomain '%1$s' saved to %2$s\n"), name, to); =20 return !data.ret; } @@ -4632,11 +4632,11 @@ cmdSaveImageDefine(vshControl *ctl, const vshCmd *c= md) return false; =20 if (virDomainSaveImageDefineXML(priv->conn, file, xml, flags) < 0) { - vshError(ctl, _("Failed to update %s"), file); + vshError(ctl, _("Failed to update %1$s"), file); return false; } =20 - vshPrintExtra(ctl, _("State file %s updated.\n"), file); + vshPrintExtra(ctl, _("State file %1$s updated.\n"), file); return true; } =20 @@ -4697,8 +4697,8 @@ cmdSaveImageEdit(vshControl *ctl, const vshCmd *cmd) virDomainSaveImageGetXMLDesc(priv->conn, file, getxml_flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Saved image %s XML configuration " \ - "not changed.\n"), file); \ + vshPrintExtra(ctl, _("Saved image %1$s XML configuration not chang= ed.\n"), \ + file); \ ret =3D true; \ goto edit_cleanup; \ } while (0) @@ -4706,7 +4706,7 @@ cmdSaveImageEdit(vshControl *ctl, const vshCmd *cmd) (virDomainSaveImageDefineXML(priv->conn, file, doc_edited, define_flag= s) =3D=3D 0) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("State file %s edited.\n"), file); + vshPrintExtra(ctl, _("State file %1$s edited.\n"), file); ret =3D true; =20 cleanup: @@ -4779,7 +4779,7 @@ doManagedsave(void *opaque) goto out; =20 if (virDomainManagedSave(dom, flags) < 0) { - vshError(ctl, _("Failed to save domain '%s' state"), name); + vshError(ctl, _("Failed to save domain '%1$s' state"), name); goto out; } =20 @@ -4826,7 +4826,7 @@ cmdManagedSave(vshControl *ctl, const vshCmd *cmd) virThreadJoin(&workerThread); =20 if (!data.ret) - vshPrintExtra(ctl, _("\nDomain '%s' state saved by libvirt\n"), na= me); + vshPrintExtra(ctl, _("\nDomain '%1$s' state saved by libvirt\n"), = name); =20 return !data.ret; } @@ -4866,18 +4866,18 @@ cmdManagedSaveRemove(vshControl *ctl, const vshCmd = *cmd) } =20 if (hassave =3D=3D 0) { - vshPrintExtra(ctl, _("Domain '%s' has no manage save image; remova= l skipped"), + vshPrintExtra(ctl, _("Domain '%1$s' has no manage save image; remo= val skipped"), name); return true; } =20 if (virDomainManagedSaveRemove(dom, 0) < 0) { - vshError(ctl, _("Failed to remove managed save image for domain '%= s'"), + vshError(ctl, _("Failed to remove managed save image for domain '%= 1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Removed managedsave image for domain '%s'"), nam= e); + vshPrintExtra(ctl, _("Removed managedsave image for domain '%1$s'"), n= ame); =20 return true; } @@ -4930,8 +4930,8 @@ cmdManagedSaveEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virDomainManagedSaveGetXMLDesc(dom, getxml_flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Managed save image of domain '%s' XML config= uration " \ - "not changed.\n"), virDomainGetName(dom)); \ + vshPrintExtra(ctl, _("Managed save image of domain '%1$s' XML conf= iguration not changed.\n"), \ + virDomainGetName(dom)); \ ret =3D true; \ goto edit_cleanup; \ } while (0) @@ -4939,7 +4939,7 @@ cmdManagedSaveEdit(vshControl *ctl, const vshCmd *cmd) (virDomainManagedSaveDefineXML(dom, doc_edited, define_flags) =3D=3D 0) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("Managed save image of Domain '%s' XML configurat= ion edited.\n"), + vshPrintExtra(ctl, _("Managed save image of Domain '%1$s' XML configur= ation edited.\n"), virDomainGetName(dom)); ret =3D true; =20 @@ -5060,12 +5060,12 @@ cmdManagedSaveDefine(vshControl *ctl, const vshCmd = *cmd) return false; =20 if (virDomainManagedSaveDefineXML(dom, xml, flags) < 0) { - vshError(ctl, _("Failed to update %s XML configuration"), + vshError(ctl, _("Failed to update %1$s XML configuration"), virDomainGetName(dom)); return false; } =20 - vshPrintExtra(ctl, _("Managed save state file of domain '%s' updated.\= n"), + vshPrintExtra(ctl, _("Managed save state file of domain '%1$s' updated= .\n"), virDomainGetName(dom)); return true; } @@ -5131,7 +5131,7 @@ cmdSchedInfoUpdateOne(vshControl *ctl, return 0; } =20 - vshError(ctl, _("invalid scheduler option: %s"), field); + vshError(ctl, _("invalid scheduler option: %1$s"), field); return -1; } =20 @@ -5370,11 +5370,11 @@ cmdRestore(vshControl *ctl, const vshCmd *cmd) } =20 if (rc < 0) { - vshError(ctl, _("Failed to restore domain from %s"), from); + vshError(ctl, _("Failed to restore domain from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Domain restored from %s\n"), from); + vshPrintExtra(ctl, _("Domain restored from %1$s\n"), from); return true; } =20 @@ -5482,9 +5482,8 @@ doDump(void *opaque) =20 if (vshCommandOptStringQuiet(ctl, cmd, "format", &format) > 0) { if ((dumpformat =3D virshDomainCoreDumpFormatTypeFromString(fo= rmat)) < 0) { - vshError(ctl, _("format '%s' is not supported, expecting " - "'kdump-zlib', 'kdump-lzo', 'kdump-snappy'= , " - "'win-dmp' or 'elf'"), format); + vshError(ctl, _("format '%1$s' is not supported, expecting= 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' or 'elf'"), + format); goto out; } } @@ -5492,12 +5491,12 @@ doDump(void *opaque) =20 if (dumpformat !=3D VIR_DOMAIN_CORE_DUMP_FORMAT_RAW) { if (virDomainCoreDumpWithFormat(dom, to, dumpformat, flags) < 0) { - vshError(ctl, _("Failed to core dump domain '%s' to %s"), name= , to); + vshError(ctl, _("Failed to core dump domain '%1$s' to %2$s"), = name, to); goto out; } } else { if (virDomainCoreDump(dom, to, flags) < 0) { - vshError(ctl, _("Failed to core dump domain '%s' to %s"), name= , to); + vshError(ctl, _("Failed to core dump domain '%1$s' to %2$s"), = name, to); goto out; } } @@ -5551,7 +5550,7 @@ cmdDump(vshControl *ctl, const vshCmd *cmd) if (data.ret) return false; =20 - vshPrintExtra(ctl, _("\nDomain '%s' dumped to %s\n"), name, to); + vshPrintExtra(ctl, _("\nDomain '%1$s' dumped to %2$s\n"), name, to); =20 return true; } @@ -5639,7 +5638,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) =20 mime =3D virDomainScreenshot(dom, st, screen, flags); if (!mime) { - vshError(ctl, _("could not take a screenshot of %s"), name); + vshError(ctl, _("could not take a screenshot of %1$s"), name); goto cleanup; } =20 @@ -5652,7 +5651,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) if ((fd =3D open(file, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0) { if (errno !=3D EEXIST || (fd =3D open(file, O_WRONLY|O_TRUNC, 0666)) < 0) { - vshError(ctl, _("cannot create file %s"), file); + vshError(ctl, _("cannot create file %1$s"), file); goto cleanup; } } else { @@ -5663,21 +5662,21 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) cbdata.fd =3D fd; =20 if (virStreamRecvAll(st, virshStreamSink, &cbdata) < 0) { - vshError(ctl, _("could not receive data from domain '%s'"), name); + vshError(ctl, _("could not receive data from domain '%1$s'"), name= ); goto cleanup; } =20 if (VIR_CLOSE(fd) < 0) { - vshError(ctl, _("cannot close file %s"), file); + vshError(ctl, _("cannot close file %1$s"), file); goto cleanup; } =20 if (virStreamFinish(st) < 0) { - vshError(ctl, _("cannot close stream on domain '%s'"), name); + vshError(ctl, _("cannot close stream on domain '%1$s'"), name); goto cleanup; } =20 - vshPrintExtra(ctl, _("Screenshot saved to %s, with type of %s"), file,= mime); + vshPrintExtra(ctl, _("Screenshot saved to %1$s, with type of %2$s"), f= ile, mime); ret =3D true; =20 cleanup: @@ -5764,13 +5763,13 @@ cmdSetLifecycleAction(vshControl *ctl, const vshCmd= *cmd) } =20 if ((tmpVal =3D virshDomainLifecycleTypeFromString(typeStr)) < 0) { - vshError(ctl, _("Invalid lifecycle type '%s'."), typeStr); + vshError(ctl, _("Invalid lifecycle type '%1$s'."), typeStr); return false; } type =3D tmpVal; =20 if ((tmpVal =3D virshDomainLifecycleActionTypeFromString(actionStr)) <= 0) { - vshError(ctl, _("Invalid lifecycle action '%s'."), actionStr); + vshError(ctl, _("Invalid lifecycle action '%1$s'."), actionStr); return false; } action =3D tmpVal; @@ -5842,7 +5841,7 @@ cmdSetUserPassword(vshControl *ctl, const vshCmd *cmd) if (virDomainSetUserPassword(dom, user, password, flags) < 0) return false; =20 - vshPrintExtra(ctl, _("Password set successfully for %s in %s"), user, = name); + vshPrintExtra(ctl, _("Password set successfully for %1$s in %2$s"), us= er, name); return true; } /* @@ -5873,11 +5872,11 @@ cmdResume(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainResume(dom) !=3D 0) { - vshError(ctl, _("Failed to resume domain '%s'"), name); + vshError(ctl, _("Failed to resume domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' resumed\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' resumed\n"), name); return true; } =20 @@ -5937,9 +5936,8 @@ cmdShutdown(vshControl *ctl, const vshCmd *cmd) } else if (STREQ(mode, "paravirt")) { flags |=3D VIR_DOMAIN_SHUTDOWN_PARAVIRT; } else { - vshError(ctl, _("Unknown mode %s value, expecting " - "'acpi', 'agent', 'initctl', 'signal', " - "or 'paravirt'"), mode); + vshError(ctl, _("Unknown mode %1$s value, expecting 'acpi', 'a= gent', 'initctl', 'signal', or 'paravirt'"), + mode); return false; } tmp++; @@ -5954,11 +5952,11 @@ cmdShutdown(vshControl *ctl, const vshCmd *cmd) rv =3D virDomainShutdown(dom); =20 if (rv !=3D 0) { - vshError(ctl, _("Failed to shutdown domain '%s'"), name); + vshError(ctl, _("Failed to shutdown domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' is being shutdown\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' is being shutdown\n"), name); return true; } =20 @@ -6017,9 +6015,8 @@ cmdReboot(vshControl *ctl, const vshCmd *cmd) } else if (STREQ(mode, "paravirt")) { flags |=3D VIR_DOMAIN_REBOOT_PARAVIRT; } else { - vshError(ctl, _("Unknown mode %s value, expecting " - "'acpi', 'agent', 'initctl', 'signal' " - "or 'paravirt'"), mode); + vshError(ctl, _("Unknown mode %1$s value, expecting 'acpi', 'a= gent', 'initctl', 'signal' or 'paravirt'"), + mode); return false; } tmp++; @@ -6029,11 +6026,11 @@ cmdReboot(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainReboot(dom, flags) !=3D 0) { - vshError(ctl, _("Failed to reboot domain '%s'"), name); + vshError(ctl, _("Failed to reboot domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' is being rebooted\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' is being rebooted\n"), name); return true; } =20 @@ -6065,11 +6062,11 @@ cmdReset(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virDomainReset(dom, 0) !=3D 0) { - vshError(ctl, _("Failed to reset domain '%s'"), name); + vshError(ctl, _("Failed to reset domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' was reset\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' was reset\n"), name); return true; } =20 @@ -6762,7 +6759,7 @@ virshVcpuinfoPrintAffinity(vshControl *ctl, if (pretty) { if (!(str =3D virBitmapDataFormat(cpumap, VIR_CPU_MAPLEN(maxcpu)))) return -1; - vshPrint(ctl, _("%s (out of %d)"), str, maxcpu); + vshPrint(ctl, _("%1$s (out of %2$d)"), str, maxcpu); } else { for (i =3D 0; i < maxcpu; i++) { if (VIR_CPU_USED(cpumap, i)) @@ -7026,11 +7023,11 @@ virshVcpuPinQuery(vshControl *ctl, (!(flags & VIR_DOMAIN_AFFECT_CONFIG) && virDomainIsActive(dom) =3D=3D 1)) vshError(ctl, - _("vcpu %d is out of range of live cpu count %d"), + _("vcpu %1$d is out of range of live cpu count %2$d"), vcpu, ncpus); else vshError(ctl, - _("vcpu %d is out of range of persistent cpu count %d= "), + _("vcpu %1$d is out of range of persistent cpu count = %2$d"), vcpu, ncpus); return false; } @@ -7081,12 +7078,12 @@ virshParseCPUList(vshControl *ctl, int *cpumaplen, =20 if (virBitmapParse(cpulist, &map, 1024) < 0 || virBitmapIsAllClear(map)) { - vshError(ctl, _("Invalid cpulist '%s'"), cpulist); + vshError(ctl, _("Invalid cpulist '%1$s'"), cpulist); return NULL; } lastcpu =3D virBitmapLastSetBit(map); if (lastcpu >=3D maxcpu) { - vshError(ctl, _("CPU %d in cpulist '%s' exceed the maxcpu %d"), + vshError(ctl, _("CPU %1$d in cpulist '%2$s' exceed the maxcpu = %3$d"), lastcpu, cpulist, maxcpu); return NULL; } @@ -7786,7 +7783,7 @@ cmdIOThreadAdd(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptInt(ctl, cmd, "id", &iothread_id) < 0) return false; if (iothread_id <=3D 0) { - vshError(ctl, _("Invalid IOThread id value: '%d'"), iothread_id); + vshError(ctl, _("Invalid IOThread id value: '%1$d'"), iothread_id); return false; } =20 @@ -7876,7 +7873,7 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptInt(ctl, cmd, "id", &id) < 0) goto cleanup; if (id <=3D 0) { - vshError(ctl, _("Invalid IOThread id value: '%d'"), id); + vshError(ctl, _("Invalid IOThread id value: '%1$d'"), id); goto cleanup; } =20 @@ -7986,7 +7983,7 @@ cmdIOThreadDel(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptInt(ctl, cmd, "id", &iothread_id) < 0) return false; if (iothread_id <=3D 0) { - vshError(ctl, _("Invalid IOThread id value: '%d'"), iothread_id); + vshError(ctl, _("Invalid IOThread id value: '%1$d'"), iothread_id); return false; } =20 @@ -8102,7 +8099,7 @@ cmdCPUStats(vshControl *ctl, const vshCmd *cmd) =20 if (show_count < 0 || show_count > max_id) { if (show_count > max_id) - vshPrint(ctl, _("Only %d CPUs available to show\n"), max_id); + vshPrint(ctl, _("Only %1$d CPUs available to show\n"), max_id); show_count =3D max_id - cpu; } =20 @@ -8172,7 +8169,7 @@ cmdCPUStats(vshControl *ctl, const vshCmd *cmd) return ret; =20 failed_stats: - vshError(ctl, _("Failed to retrieve CPU statistics for domain '%s'"), + vshError(ctl, _("Failed to retrieve CPU statistics for domain '%1$s'"), virDomainGetName(dom)); goto cleanup; } @@ -8260,11 +8257,11 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd) dom =3D virDomainCreateXML(priv->conn, buffer, flags); =20 if (!dom) { - vshError(ctl, _("Failed to create domain from %s"), from); + vshError(ctl, _("Failed to create domain from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' created from %s\n"), + vshPrintExtra(ctl, _("Domain '%1$s' created from %2$s\n"), virDomainGetName(dom), from); #ifndef WIN32 if (console) @@ -8319,11 +8316,11 @@ cmdDefine(vshControl *ctl, const vshCmd *cmd) dom =3D virDomainDefineXML(priv->conn, buffer); =20 if (!dom) { - vshError(ctl, _("Failed to define domain from %s"), from); + vshError(ctl, _("Failed to define domain from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' defined from %s\n"), + vshPrintExtra(ctl, _("Domain '%1$s' defined from %2$s\n"), virDomainGetName(dom), from); return true; } @@ -8376,11 +8373,11 @@ cmdDestroy(vshControl *ctl, const vshCmd *cmd) result =3D virDomainDestroy(dom); =20 if (result < 0) { - vshError(ctl, _("Failed to destroy domain '%s'"), name); + vshError(ctl, _("Failed to destroy domain '%1$s'"), name); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' destroyed\n"), name); + vshPrintExtra(ctl, _("Domain '%1$s' destroyed\n"), name); return true; } =20 @@ -8538,9 +8535,9 @@ cmdDesc(vshControl *ctl, const vshCmd *cmd) vshPrint(ctl, "%s", desc); } else { if (title) - vshPrintExtra(ctl, _("No title for domain: %s"), virDomain= GetName(dom)); + vshPrintExtra(ctl, _("No title for domain: %1$s"), virDoma= inGetName(dom)); else - vshPrintExtra(ctl, _("No description for domain: %s"), vir= DomainGetName(dom)); + vshPrintExtra(ctl, _("No description for domain: %1$s"), v= irDomainGetName(dom)); } } =20 @@ -8795,7 +8792,7 @@ cmdSendKey(vshControl *ctl, const vshCmd *cmd) =20 codeset =3D virKeycodeSetTypeFromString(codeset_option); if (codeset < 0) { - vshError(ctl, _("unknown codeset: '%s'"), codeset_option); + vshError(ctl, _("unknown codeset: '%1$s'"), codeset_option); return false; } =20 @@ -8807,7 +8804,7 @@ cmdSendKey(vshControl *ctl, const vshCmd *cmd) =20 if ((keycode =3D virshKeyCodeGetInt(opt->data)) < 0) { if ((keycode =3D virKeycodeValueFromString(codeset, opt->data)= ) < 0) { - vshError(ctl, _("invalid keycode: '%s'"), opt->data); + vshError(ctl, _("invalid keycode: '%1$s'"), opt->data); return false; } } @@ -8907,7 +8904,7 @@ cmdSendProcessSignal(vshControl *ctl, const vshCmd *c= md) return false; =20 if ((signum =3D getSignalNumber(signame)) < 0) { - vshError(ctl, _("malformed signal name: %s"), signame); + vshError(ctl, _("malformed signal name: %1$s"), signame); return false; } =20 @@ -9327,7 +9324,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd) =20 #define PARSE_MEMTUNE_PARAM(NAME, FIELD) \ if ((rc =3D virshMemtuneGetSize(ctl, cmd, NAME, &tmpVal)) < 0) { \ - vshError(ctl, _("Unable to parse integer parameter %s"), NAME); \ + vshError(ctl, _("Unable to parse integer parameter %1$s"), NAME); \ goto cleanup; \ } \ if (rc =3D=3D 1) { \ @@ -9603,7 +9600,7 @@ cmdNumatune(vshControl * ctl, const vshCmd * cmd) */ if ((m =3D virDomainNumatuneMemModeTypeFromString(mode)) < 0 && virStrToLong_i(mode, NULL, 0, &m) < 0) { - vshError(ctl, _("Invalid mode: %s"), mode); + vshError(ctl, _("Invalid mode: %1$s"), mode); goto cleanup; } =20 @@ -9992,7 +9989,7 @@ cmdQemuMonitorCommandQMPWrap(vshControl *ctl, virBufferAddLit(&buf, "}"); =20 if (!(arguments =3D virJSONValueFromString(virBufferCurrentContent= (&buf)))) { - vshError(ctl, _("failed to wrap arguments '%s' into a QMP comm= and wrapper"), + vshError(ctl, _("failed to wrap arguments '%1$s' into a QMP co= mmand wrapper"), fullargs); return NULL; } @@ -10232,7 +10229,7 @@ cmdQemuMonitorEvent(vshControl *ctl, const vshCmd *= cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), data.count); + vshPrint(ctl, _("events received: %1$d\n"), data.count); if (data.count) ret =3D true; =20 @@ -10280,11 +10277,11 @@ cmdQemuAttach(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(dom =3D virDomainQemuAttach(priv->conn, pid_value, flags))) { - vshError(ctl, _("Failed to attach to pid %u"), pid_value); + vshError(ctl, _("Failed to attach to pid %1$u"), pid_value); return false; } =20 - vshPrintExtra(ctl, _("Domain '%s' attached to pid %u\n"), + vshPrintExtra(ctl, _("Domain '%1$s' attached to pid %2$u\n"), virDomainGetName(dom), pid_value); return true; } @@ -11247,7 +11244,7 @@ doMigrate(void *opaque) g_autofree char *xml =3D NULL; =20 if (virFileReadAll(opt, VSH_MAX_XML_FILE, &xml) < 0) { - vshError(ctl, _("cannot read file '%s'"), opt); + vshError(ctl, _("cannot read file '%1$s'"), opt); goto save_error; } =20 @@ -11263,7 +11260,7 @@ doMigrate(void *opaque) g_autofree char *xml =3D NULL; =20 if (virFileReadAll(opt, VSH_MAX_XML_FILE, &xml) < 0) { - vshError(ctl, _("cannot read file '%s'"), opt); + vshError(ctl, _("cannot read file '%1$s'"), opt); goto save_error; } =20 @@ -11697,7 +11694,7 @@ cmdMigrateCompCache(vshControl *ctl, const vshCmd *= cmd) return false; =20 value =3D vshPrettyCapacity(size, &unit); - vshPrint(ctl, _("Compression cache: %.3lf %s"), value, unit); + vshPrint(ctl, _("Compression cache: %1$.3lf %2$s"), value, unit); =20 return true; } @@ -11874,7 +11871,7 @@ virshGetDBusDisplay(vshControl *ctl, xmlXPathContex= t *ctxt) return g_strdup_printf("dbus+unix://%s", addr + 10); } =20 - vshError(ctl, _("'%s' D-Bus address is not handled"), addr); + vshError(ctl, _("'%1$s' D-Bus address is not handled"), addr); return NULL; } =20 @@ -12073,7 +12070,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) =20 if (!ret) { if (type) - vshError(ctl, _("No graphical display with type '%s' found"), = type); + vshError(ctl, _("No graphical display with type '%1$s' found")= , type); else vshError(ctl, _("No graphical display found")); } @@ -12230,7 +12227,7 @@ cmdDomHostname(vshControl *ctl, const vshCmd *cmd) int source =3D virshDomainHostnameSourceTypeFromString(sourcestr); =20 if (source < 0) { - vshError(ctl, _("Unknown data source '%s'"), sourcestr); + vshError(ctl, _("Unknown data source '%1$s'"), sourcestr); return false; } =20 @@ -12323,7 +12320,7 @@ cmdDetachDevice(vshControl *ctl, const vshCmd *cmd) ret =3D virDomainDetachDevice(dom, buffer); =20 if (ret < 0) { - vshError(ctl, _("Failed to detach device from %s"), from); + vshError(ctl, _("Failed to detach device from %1$s"), from); return false; } =20 @@ -12384,7 +12381,7 @@ cmdDetachDeviceAlias(vshControl *ctl, const vshCmd = *cmd) return false; =20 if (virDomainDetachDeviceAlias(dom, alias, flags) < 0) { - vshError(ctl, _("Failed to detach device with alias %s"), alias); + vshError(ctl, _("Failed to detach device with alias %1$s"), alias); return false; } =20 @@ -12461,7 +12458,7 @@ cmdUpdateDevice(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_DOMAIN_DEVICE_MODIFY_FORCE; =20 if (virDomainUpdateDeviceFlags(dom, buffer, flags) < 0) { - vshError(ctl, _("Failed to update device from %s"), from); + vshError(ctl, _("Failed to update device from %1$s"), from); return false; } =20 @@ -12532,7 +12529,7 @@ virshDomainDetachInterface(char *doc, } =20 if ((nnodes =3D virXPathNodeSet(xpath, ctxt, &nodes)) <=3D 0) { - vshError(ctl, _("No interface found whose type is %s"), type); + vshError(ctl, _("No interface found whose type is %1$s"), type); return false; } =20 @@ -12547,9 +12544,8 @@ virshDomainDetachInterface(char *doc, if (virMacAddrCompare(tmp_mac, mac) =3D=3D 0) { if (matchNode) { /* this is the 2nd match, so it's ambiguous */ - vshError(ctl, _("Domain has multiple interfaces ma= tching " - "MAC address %s. You must use deta= ch-device and " - "specify the device pci address to= remove it."), + vshError(ctl, _("Domain has multiple interfaces ma= tching MAC address %1$s. " + "You must use detach-device and sp= ecify the device pci address to remove it."), mac); return false; } @@ -12560,7 +12556,7 @@ virshDomainDetachInterface(char *doc, } } else { if (nnodes > 1) { - vshError(ctl, _("Domain has %zd interfaces. Please specify whi= ch one to detach using --mac"), + vshError(ctl, _("Domain has %1$zd interfaces. Please specify w= hich one to detach using --mac"), nnodes); return false; } @@ -12569,7 +12565,7 @@ virshDomainDetachInterface(char *doc, } =20 if (!matchNode) { - vshError(ctl, _("No interface with MAC address %s was found"), mac= ); + vshError(ctl, _("No interface with MAC address %1$s was found"), m= ac); return false; } =20 @@ -12750,7 +12746,7 @@ virshFindDisk(const char *doc, } } =20 - vshError(NULL, _("No disk found whose source path or target is %s"), p= ath); + vshError(NULL, _("No disk found whose source path or target is %1$s"),= path); =20 return NULL; } @@ -12789,7 +12785,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, =20 if (!(STREQ_NULLABLE(device_type, "cdrom") || STREQ_NULLABLE(device_type, "floppy"))) { - vshError(NULL, _("The disk device '%s' is not removable"), target); + vshError(NULL, _("The disk device '%1$s' is not removable"), targe= t); return NULL; } =20 @@ -12823,7 +12819,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, =20 if (type =3D=3D VIRSH_UPDATE_DISK_XML_EJECT) { if (!source) { - vshError(NULL, _("The disk device '%s' doesn't have media"), t= arget); + vshError(NULL, _("The disk device '%1$s' doesn't have media"),= target); return NULL; } =20 @@ -12843,7 +12839,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, source_path =3D virXMLPropString(source, "name"); =20 if (source_path && type =3D=3D VIRSH_UPDATE_DISK_XML_INSERT) { - vshError(NULL, _("The disk device '%s' already has media"), ta= rget); + vshError(NULL, _("The disk device '%1$s' already has media"), = target); return NULL; } =20 @@ -13042,7 +13038,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virDomainGetXMLDesc(dom, query_flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Domain '%s' XML configuration not changed.\n= "), \ + vshPrintExtra(ctl, _("Domain '%1$s' XML configuration not changed.= \n"), \ virDomainGetName(dom)); \ ret =3D true; \ goto edit_cleanup; \ @@ -13057,7 +13053,7 @@ cmdEdit(vshControl *ctl, const vshCmd *cmd) #include "virsh-edit.c" #undef EDIT_RELAX =20 - vshPrintExtra(ctl, _("Domain '%s' XML configuration edited.\n"), + vshPrintExtra(ctl, _("Domain '%1$s' XML configuration edited.\n"), virDomainGetName(dom_edited)); =20 ret =3D true; @@ -13217,7 +13213,7 @@ cmdChangeMedia(vshControl *ctl, const vshCmd *cmd) } =20 if (virDomainUpdateDeviceFlags(dom, disk_xml, flags) !=3D 0) { - vshError(ctl, _("Failed to complete action %s on media"), action); + vshError(ctl, _("Failed to complete action %1$s on media"), action= ); return false; } =20 @@ -13315,7 +13311,7 @@ cmdDomFSFreeze(vshControl *ctl, const vshCmd *cmd) return false; } =20 - vshPrintExtra(ctl, _("Froze %d filesystem(s)\n"), count); + vshPrintExtra(ctl, _("Froze %1$d filesystem(s)\n"), count); return true; } =20 @@ -13360,7 +13356,7 @@ cmdDomFSThaw(vshControl *ctl, const vshCmd *cmd) return false; } =20 - vshPrintExtra(ctl, _("Thawed %d filesystem(s)\n"), count); + vshPrintExtra(ctl, _("Thawed %1$d filesystem(s)\n"), count); return true; } =20 @@ -13712,7 +13708,7 @@ cmdSetUserSSHKeys(vshControl *ctl, const vshCmd *cm= d) =20 nkeys =3D g_strv_length(keys); if (nkeys =3D=3D 0) { - vshError(ctl, _("File %s contains no keys"), from); + vshError(ctl, _("File %1$s contains no keys"), from); return false; } } @@ -13785,7 +13781,7 @@ cmdDomDirtyRateCalc(vshControl *ctl, const vshCmd *= cmd) int mode =3D virshDomainDirtyRateCalcModeTypeFromString(modestr); =20 if (mode < 0) { - vshError(ctl, _("Unknown calculation mode '%s'"), modestr); + vshError(ctl, _("Unknown calculation mode '%1$s'"), modestr); return false; } =20 diff --git a/tools/virsh-edit.c b/tools/virsh-edit.c index 5dc1a1fe5a..990dd97516 100644 --- a/tools/virsh-edit.c +++ b/tools/virsh-edit.c @@ -25,7 +25,7 @@ * EDIT_NOT_CHANGED - this action is taken if the XML wasn't changed. * Note, that you don't want to jump to cleanup but edit_cleanup label * where temporary variables are free()-d and temporary file is delet= ed: - * #define EDIT_NOT_CHANGED vshPrintExtra (ctl, _("Domain %s XML not = changed"), \ + * #define EDIT_NOT_CHANGED vshPrintExtra (ctl, _("Domain %1$s XML no= t changed"), \ * virDomainGetName(dom)); \ * ret =3D true; goto edit_cleanup; * Note that this is a statement. diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 21d479fd01..4df599afdf 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -219,8 +219,8 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd) nodes_id[i] =3D id; if (virNodeGetCellsFreeMemory(priv->conn, &(nodes_free[i]), id, 1) !=3D 1) { - vshError(ctl, _("failed to get free memory for NUMA node " - "number: %lu"), id); + vshError(ctl, _("failed to get free memory for NUMA node numbe= r: %1$lu"), + id); return false; } } @@ -337,7 +337,7 @@ cmdFreepages(vshControl *ctl, const vshCmd *cmd) g_autofree char *val =3D virXMLPropString(nodes[i], "size"= ); =20 if (virStrToLong_uip(val, NULL, 10, &pagesize[i]) < 0) { - vshError(ctl, _("unable to parse page size: %s"), val); + vshError(ctl, _("unable to parse page size: %1$s"), va= l); goto cleanup; } } @@ -374,7 +374,7 @@ cmdFreepages(vshControl *ctl, const vshCmd *cmd) g_autofree char *val =3D virXMLPropString(nodes[i], "id"); =20 if (virStrToLong_i(val, NULL, 10, &cell) < 0) { - vshError(ctl, _("unable to parse numa node id: %s"), val); + vshError(ctl, _("unable to parse numa node id: %1$s"), val= ); goto cleanup; } =20 @@ -382,7 +382,7 @@ cmdFreepages(vshControl *ctl, const vshCmd *cmd) cell, 1, counts, 0) < 0) goto cleanup; =20 - vshPrint(ctl, _("Node %d:\n"), cell); + vshPrint(ctl, _("Node %1$d:\n"), cell); for (j =3D 0; j < npages; j++) vshPrint(ctl, "%uKiB: %lld\n", pagesize[j], counts[j]); vshPrint(ctl, "%c", '\n'); @@ -1135,9 +1135,8 @@ vshExtractCPUDefXMLs(vshControl *ctl, return NULL; =20 if (n =3D=3D 0) { - vshError(ctl, _("File '%s' does not contain any element or " - "valid domain XML, host capabilities XML, or " - "domain capabilities XML"), xmlFile); + vshError(ctl, _("File '%1$s' does not contain any element or= valid domain XML, host capabilities XML, or domain capabilities XML"), + xmlFile); return NULL; } =20 @@ -1219,24 +1218,24 @@ cmdCPUCompare(vshControl *ctl, const vshCmd *cmd) =20 switch (result) { case VIR_CPU_COMPARE_INCOMPATIBLE: - vshPrint(ctl, _("CPU described in %s is incompatible with host CPU= \n"), + vshPrint(ctl, _("CPU described in %1$s is incompatible with host C= PU\n"), from); return false; break; =20 case VIR_CPU_COMPARE_IDENTICAL: - vshPrint(ctl, _("CPU described in %s is identical to host CPU\n"), + vshPrint(ctl, _("CPU described in %1$s is identical to host CPU\n"= ), from); break; =20 case VIR_CPU_COMPARE_SUPERSET: - vshPrint(ctl, _("Host CPU is a superset of CPU described in %s\n"), + vshPrint(ctl, _("Host CPU is a superset of CPU described in %1$s\n= "), from); break; =20 case VIR_CPU_COMPARE_ERROR: default: - vshError(ctl, _("Failed to compare host CPU with %s"), from); + vshError(ctl, _("Failed to compare host CPU with %1$s"), from); return false; } =20 @@ -1397,7 +1396,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_= UNUSED) includeVersion %=3D 1000000; minor =3D includeVersion / 1000; rel =3D includeVersion % 1000; - vshPrint(ctl, _("Compiled against library: libvirt %d.%d.%d\n"), + vshPrint(ctl, _("Compiled against library: libvirt %1$d.%2$d.%3$d\n"), major, minor, rel); =20 if (virGetVersion(&libVersion, hvType, &apiVersion) < 0) { @@ -1408,14 +1407,14 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNU= C_UNUSED) libVersion %=3D 1000000; minor =3D libVersion / 1000; rel =3D libVersion % 1000; - vshPrint(ctl, _("Using library: libvirt %d.%d.%d\n"), + vshPrint(ctl, _("Using library: libvirt %1$d.%2$d.%3$d\n"), major, minor, rel); =20 major =3D apiVersion / 1000000; apiVersion %=3D 1000000; minor =3D apiVersion / 1000; rel =3D apiVersion % 1000; - vshPrint(ctl, _("Using API: %s %d.%d.%d\n"), hvType, + vshPrint(ctl, _("Using API: %1$s %2$d.%3$d.%4$d\n"), hvType, major, minor, rel); =20 if (virConnectGetVersion(priv->conn, &hvVersion) < 0) { @@ -1424,14 +1423,14 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNU= C_UNUSED) } if (hvVersion =3D=3D 0) { vshPrint(ctl, - _("Cannot extract running %s hypervisor version\n"), hvTy= pe); + _("Cannot extract running %1$s hypervisor version\n"), hv= Type); } else { major =3D hvVersion / 1000000; hvVersion %=3D 1000000; minor =3D hvVersion / 1000; rel =3D hvVersion % 1000; =20 - vshPrint(ctl, _("Running hypervisor: %s %d.%d.%d\n"), + vshPrint(ctl, _("Running hypervisor: %1$s %2$d.%3$d.%4$d\n"), hvType, major, minor, rel); } =20 @@ -1443,7 +1442,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_= UNUSED) daemonVersion %=3D 1000000; minor =3D daemonVersion / 1000; rel =3D daemonVersion % 1000; - vshPrint(ctl, _("Running against daemon: %d.%d.%d\n"), + vshPrint(ctl, _("Running against daemon: %1$d.%2$d.%3$d\n"), major, minor, rel); } } @@ -1644,29 +1643,26 @@ cmdHypervisorCPUCompare(vshControl *ctl, switch (result) { case VIR_CPU_COMPARE_INCOMPATIBLE: vshPrint(ctl, - _("CPU described in %s is incompatible with the CPU provi= ded " - "by hypervisor on the host\n"), + _("CPU described in %1$s is incompatible with the CPU pro= vided by hypervisor on the host\n"), from); return false; break; =20 case VIR_CPU_COMPARE_IDENTICAL: vshPrint(ctl, - _("CPU described in %s is identical to the CPU provided b= y " - "hypervisor on the host\n"), + _("CPU described in %1$s is identical to the CPU provided= by hypervisor on the host\n"), from); break; =20 case VIR_CPU_COMPARE_SUPERSET: vshPrint(ctl, - _("The CPU provided by hypervisor on the host is a supers= et " - "of CPU described in %s\n"), + _("The CPU provided by hypervisor on the host is a supers= et of CPU described in %1$s\n"), from); break; =20 case VIR_CPU_COMPARE_ERROR: default: - vshError(ctl, _("Failed to compare hypervisor CPU with %s"), from); + vshError(ctl, _("Failed to compare hypervisor CPU with %1$s"), fro= m); return false; } =20 diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 39ea53ec9d..77c0fff847 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -83,7 +83,7 @@ virshCommandOptInterfaceBy(vshControl *ctl, const vshCmd = *cmd, } =20 if (!iface) - vshError(ctl, _("failed to get interface '%s'"), n); + vshError(ctl, _("failed to get interface '%1$s'"), n); =20 return iface; } @@ -122,7 +122,7 @@ cmdInterfaceEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virInterfaceGetXMLDesc(iface, flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Interface %s XML configuration not changed.\= n"), \ + vshPrintExtra(ctl, _("Interface %1$s XML configuration not changed= .\n"), \ virInterfaceGetName(iface)); \ ret =3D true; \ goto edit_cleanup; \ @@ -131,7 +131,7 @@ cmdInterfaceEdit(vshControl *ctl, const vshCmd *cmd) (iface_edited =3D virInterfaceDefineXML(priv->conn, doc_edited, 0)) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("Interface %s XML configuration edited.\n"), + vshPrintExtra(ctl, _("Interface %1$s XML configuration edited.\n"), virInterfaceGetName(iface_edited)); =20 ret =3D true; @@ -550,11 +550,11 @@ cmdInterfaceDefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(iface =3D virInterfaceDefineXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to define interface from %s"), from); + vshError(ctl, _("Failed to define interface from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Interface %s defined from %s\n"), + vshPrintExtra(ctl, _("Interface %1$s defined from %2$s\n"), virInterfaceGetName(iface), from); return true; } @@ -587,11 +587,11 @@ cmdInterfaceUndefine(vshControl *ctl, const vshCmd *c= md) return false; =20 if (virInterfaceUndefine(iface) < 0) { - vshError(ctl, _("Failed to undefine interface %s"), name); + vshError(ctl, _("Failed to undefine interface %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Interface %s undefined\n"), name); + vshPrintExtra(ctl, _("Interface %1$s undefined\n"), name); return true; } =20 @@ -623,11 +623,11 @@ cmdInterfaceStart(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virInterfaceCreate(iface, 0) < 0) { - vshError(ctl, _("Failed to start interface %s"), name); + vshError(ctl, _("Failed to start interface %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Interface %s started\n"), name); + vshPrintExtra(ctl, _("Interface %1$s started\n"), name); return true; } =20 @@ -659,11 +659,11 @@ cmdInterfaceDestroy(vshControl *ctl, const vshCmd *cm= d) return false; =20 if (virInterfaceDestroy(iface, 0) < 0) { - vshError(ctl, _("Failed to destroy interface %s"), name); + vshError(ctl, _("Failed to destroy interface %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Interface %s destroyed\n"), name); + vshPrintExtra(ctl, _("Interface %1$s destroyed\n"), name); return false; } =20 @@ -832,7 +832,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) =20 /* make sure "new" device doesn't already exist */ if ((br_handle =3D virInterfaceLookupByName(priv->conn, br_name))) { - vshError(ctl, _("Network device %s already exists"), br_name); + vshError(ctl, _("Network device %1$s already exists"), br_name); goto cleanup; } =20 @@ -849,26 +849,26 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) goto cleanup; if (!(xml_doc =3D virXMLParseStringCtxt(if_xml, _("(interface definition)"), &ct= xt))) { - vshError(ctl, _("Failed to parse configuration of %s"), if_name); + vshError(ctl, _("Failed to parse configuration of %1$s"), if_name); goto cleanup; } top_node =3D ctxt->node; =20 /* Verify that the original device isn't already a bridge. */ if (!(if_type =3D virXMLPropString(top_node, "type"))) { - vshError(ctl, _("Existing device %s has no type"), if_name); + vshError(ctl, _("Existing device %1$s has no type"), if_name); goto cleanup; } =20 if (STREQ(if_type, "bridge")) { - vshError(ctl, _("Existing device %s is already a bridge"), if_name= ); + vshError(ctl, _("Existing device %1$s is already a bridge"), if_na= me); goto cleanup; } =20 /* verify the name in the XML matches the device name */ if (!(if2_name =3D virXMLPropString(top_node, "name")) || STRNEQ(if2_name, if_name)) { - vshError(ctl, _("Interface name from config %s doesn't match given= supplied name %s"), + vshError(ctl, _("Interface name from config %1$s doesn't match giv= en supplied name %2$s"), if2_name, if_name); goto cleanup; } @@ -890,7 +890,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) if (stp) { delay_str =3D g_strdup_printf("%d", delay); if (!xmlSetProp(br_node, BAD_CAST "delay", BAD_CAST delay_str)) { - vshError(ctl, _("Failed to set bridge delay %d in xml document= "), delay); + vshError(ctl, _("Failed to set bridge delay %1$d in xml docume= nt"), delay); goto cleanup; } } @@ -904,7 +904,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) } =20 if (!xmlSetProp(top_node, BAD_CAST "name", BAD_CAST br_name)) { - vshError(ctl, _("Failed to set master bridge interface name to '%s= ' in xml document"), + vshError(ctl, _("Failed to set master bridge interface name to '%1= $s' in xml document"), br_name); goto cleanup; } @@ -921,13 +921,13 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) * if_type, and the name to the original if_name. */ if (!xmlSetProp(if_node, BAD_CAST "type", BAD_CAST if_type)) { - vshError(ctl, _("Failed to set new attached interface type to '%s'= in xml document"), + vshError(ctl, _("Failed to set new attached interface type to '%1$= s' in xml document"), if_type); goto cleanup; } =20 if (!xmlSetProp(if_node, BAD_CAST "name", BAD_CAST if_name)) { - vshError(ctl, _("Failed to set new attached interface name to '%s'= in xml document"), + vshError(ctl, _("Failed to set new attached interface name to '%1$= s' in xml document"), if_name); goto cleanup; } @@ -947,7 +947,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) virXMLNodeNameEqual(old, "vlan"))) { /* vlan stuff to move do= wn */ xmlUnlinkNode(old); if (!xmlAddChild(if_node, old)) { - vshError(ctl, _("Failed to move '%s' element in xml docume= nt"), old->name); + vshError(ctl, _("Failed to move '%1$s' element in xml docu= ment"), old->name); xmlFreeNode(old); goto cleanup; } @@ -958,7 +958,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) xmlDocDumpMemory(xml_doc, &br_xml, &br_xml_size); =20 if (!br_xml || br_xml_size <=3D 0) { - vshError(ctl, _("Failed to format new xml document for bridge %s")= , br_name); + vshError(ctl, _("Failed to format new xml document for bridge %1$s= "), br_name); goto cleanup; } =20 @@ -967,21 +967,21 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) * independent original interface. */ if (!(br_handle =3D virInterfaceDefineXML(priv->conn, (char *) br_xml,= 0))) { - vshError(ctl, _("Failed to define new bridge interface %s"), + vshError(ctl, _("Failed to define new bridge interface %1$s"), br_name); goto cleanup; } =20 - vshPrintExtra(ctl, _("Created bridge %s with attached device %s\n"), + vshPrintExtra(ctl, _("Created bridge %1$s with attached device %2$s\n"= ), br_name, if_name); =20 /* start it up unless requested not to */ if (!nostart) { if (virInterfaceCreate(br_handle, 0) < 0) { - vshError(ctl, _("Failed to start bridge interface %s"), br_nam= e); + vshError(ctl, _("Failed to start bridge interface %1$s"), br_n= ame); goto cleanup; } - vshPrintExtra(ctl, _("Bridge interface %s started\n"), br_name); + vshPrintExtra(ctl, _("Bridge interface %1$s started\n"), br_name); } =20 ret =3D true; @@ -1051,19 +1051,19 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd = *cmd) if (!(xml_doc =3D virXMLParseStringCtxt(br_xml, _("(bridge interface definition)= "), &ctxt))) { - vshError(ctl, _("Failed to parse configuration of %s"), br_name); + vshError(ctl, _("Failed to parse configuration of %1$s"), br_name); goto cleanup; } top_node =3D ctxt->node; =20 /* Verify that the device really is a bridge. */ if (!(if_type =3D virXMLPropString(top_node, "type"))) { - vshError(ctl, _("Existing device %s has no type"), br_name); + vshError(ctl, _("Existing device %1$s has no type"), br_name); goto cleanup; } =20 if (STRNEQ(if_type, "bridge")) { - vshError(ctl, _("Device %s is not a bridge"), br_name); + vshError(ctl, _("Device %1$s is not a bridge"), br_name); goto cleanup; } VIR_FREE(if_type); @@ -1071,7 +1071,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *c= md) /* verify the name in the XML matches the device name */ if (!(if_name =3D virXMLPropString(top_node, "name")) || STRNEQ(if_name, br_name)) { - vshError(ctl, _("Interface name from config %s doesn't match given= supplied name %s"), + vshError(ctl, _("Interface name from config %1$s doesn't match giv= en supplied name %2$s"), if_name, br_name); goto cleanup; } @@ -1097,23 +1097,23 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd = *cmd) * the type/name of the attached interface. */ if (!(if_name =3D virXMLPropString(if_node, "name"))) { - vshError(ctl, _("Device attached to bridge %s has no name"), br_na= me); + vshError(ctl, _("Device attached to bridge %1$s has no name"), br_= name); goto cleanup; } =20 if (!(if_type =3D virXMLPropString(if_node, "type"))) { - vshError(ctl, _("Attached device %s has no type"), if_name); + vshError(ctl, _("Attached device %1$s has no type"), if_name); goto cleanup; } =20 if (!xmlSetProp(top_node, BAD_CAST "type", BAD_CAST if_type)) { - vshError(ctl, _("Failed to set interface type to '%s' in xml docum= ent"), + vshError(ctl, _("Failed to set interface type to '%1$s' in xml doc= ument"), if_type); goto cleanup; } =20 if (!xmlSetProp(top_node, BAD_CAST "name", BAD_CAST if_name)) { - vshError(ctl, _("Failed to set interface name to '%s' in xml docum= ent"), + vshError(ctl, _("Failed to set interface name to '%1$s' in xml doc= ument"), if_name); goto cleanup; } @@ -1133,7 +1133,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *c= md) virXMLNodeNameEqual(old, "vlan"))) { /* vlan stuff to move do= wn */ xmlUnlinkNode(old); if (!xmlAddChild(top_node, old)) { - vshError(ctl, _("Failed to move '%s' element in xml docume= nt"), old->name); + vshError(ctl, _("Failed to move '%1$s' element in xml docu= ment"), old->name); xmlFreeNode(old); goto cleanup; } @@ -1144,7 +1144,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *c= md) xmlDocDumpMemory(xml_doc, &if_xml, &if_xml_size); =20 if (!if_xml || if_xml_size <=3D 0) { - vshError(ctl, _("Failed to format new xml document for detached in= terface %s"), + vshError(ctl, _("Failed to format new xml document for detached in= terface %1$s"), if_name); goto cleanup; } @@ -1153,31 +1153,31 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd = *cmd) * can't safely define the unattached device. */ if (virInterfaceDestroy(br_handle, 0) < 0) { - vshError(ctl, _("Failed to destroy bridge interface %s"), br_name); + vshError(ctl, _("Failed to destroy bridge interface %1$s"), br_nam= e); goto cleanup; } if (virInterfaceUndefine(br_handle) < 0) { - vshError(ctl, _("Failed to undefine bridge interface %s"), br_name= ); + vshError(ctl, _("Failed to undefine bridge interface %1$s"), br_na= me); goto cleanup; } =20 /* if_xml is the new interface to define. */ if (!(if_handle =3D virInterfaceDefineXML(priv->conn, (char *) if_xml,= 0))) { - vshError(ctl, _("Failed to define new interface %s"), if_name); + vshError(ctl, _("Failed to define new interface %1$s"), if_name); goto cleanup; } =20 - vshPrintExtra(ctl, _("Device %s un-attached from bridge %s\n"), + vshPrintExtra(ctl, _("Device %1$s un-attached from bridge %2$s\n"), if_name, br_name); =20 /* unless requested otherwise, undefine the bridge device */ if (!nostart) { if (virInterfaceCreate(if_handle, 0) < 0) { - vshError(ctl, _("Failed to start interface %s"), if_name); + vshError(ctl, _("Failed to start interface %1$s"), if_name); goto cleanup; } - vshPrintExtra(ctl, _("Interface %s started\n"), if_name); + vshPrintExtra(ctl, _("Interface %1$s started\n"), if_name); } =20 ret =3D true; diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 13f2e729eb..42b7dba761 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -97,7 +97,7 @@ virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *c= md, } =20 if (!network) - vshError(ctl, _("failed to get network '%s'"), n); + vshError(ctl, _("failed to get network '%1$s'"), n); =20 return network; } @@ -126,7 +126,7 @@ virshCommandOptNetworkPort(vshControl *ctl, const vshCm= d *cmd, port =3D virNetworkPortLookupByUUIDString(net, n); =20 if (!port) - vshError(ctl, _("failed to get network port '%s'"), n); + vshError(ctl, _("failed to get network port '%1$s'"), n); =20 return port; } @@ -167,16 +167,16 @@ cmdNetworkAutostart(vshControl *ctl, const vshCmd *cm= d) =20 if (virNetworkSetAutostart(network, autostart) < 0) { if (autostart) - vshError(ctl, _("failed to mark network %s as autostarted"), n= ame); + vshError(ctl, _("failed to mark network %1$s as autostarted"),= name); else - vshError(ctl, _("failed to unmark network %s as autostarted"),= name); + vshError(ctl, _("failed to unmark network %1$s as autostarted"= ), name); return false; } =20 if (autostart) - vshPrintExtra(ctl, _("Network %s marked as autostarted\n"), name); + vshPrintExtra(ctl, _("Network %1$s marked as autostarted\n"), name= ); else - vshPrintExtra(ctl, _("Network %s unmarked as autostarted\n"), name= ); + vshPrintExtra(ctl, _("Network %1$s unmarked as autostarted\n"), na= me); =20 return true; } @@ -227,11 +227,11 @@ cmdNetworkCreate(vshControl *ctl, const vshCmd *cmd) network =3D virNetworkCreateXML(priv->conn, buffer); =20 if (!network) { - vshError(ctl, _("Failed to create network from %s"), from); + vshError(ctl, _("Failed to create network from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Network %s created from %s\n"), + vshPrintExtra(ctl, _("Network %1$s created from %2$s\n"), virNetworkGetName(network), from); return true; } @@ -283,11 +283,11 @@ cmdNetworkDefine(vshControl *ctl, const vshCmd *cmd) network =3D virNetworkDefineXML(priv->conn, buffer); =20 if (!network) { - vshError(ctl, _("Failed to define network from %s"), from); + vshError(ctl, _("Failed to define network from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Network %s defined from %s\n"), + vshPrintExtra(ctl, _("Network %1$s defined from %2$s\n"), virNetworkGetName(network), from); return true; } @@ -321,9 +321,9 @@ cmdNetworkDestroy(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virNetworkDestroy(network) =3D=3D 0) { - vshPrintExtra(ctl, _("Network %s destroyed\n"), name); + vshPrintExtra(ctl, _("Network %1$s destroyed\n"), name); } else { - vshError(ctl, _("Failed to destroy network %s"), name); + vshError(ctl, _("Failed to destroy network %1$s"), name); ret =3D false; } =20 @@ -866,9 +866,9 @@ cmdNetworkStart(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virNetworkCreate(network) =3D=3D 0) { - vshPrintExtra(ctl, _("Network %s started\n"), name); + vshPrintExtra(ctl, _("Network %1$s started\n"), name); } else { - vshError(ctl, _("Failed to start network %s"), name); + vshError(ctl, _("Failed to start network %1$s"), name); ret =3D false; } return ret; @@ -903,9 +903,9 @@ cmdNetworkUndefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virNetworkUndefine(network) =3D=3D 0) { - vshPrintExtra(ctl, _("Network %s has been undefined\n"), name); + vshPrintExtra(ctl, _("Network %1$s has been undefined\n"), name); } else { - vshError(ctl, _("Failed to undefine network %s"), name); + vshError(ctl, _("Failed to undefine network %1$s"), name); ret =3D false; } =20 @@ -996,7 +996,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) } else { command =3D virshNetworkUpdateCommandTypeFromString(commandStr); if (command <=3D 0) { - vshError(ctl, _("unrecognized command name '%s'"), commandStr); + vshError(ctl, _("unrecognized command name '%1$s'"), commandSt= r); goto cleanup; } } @@ -1006,7 +1006,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) =20 section =3D virshNetworkSectionTypeFromString(sectionStr); if (section <=3D 0) { - vshError(ctl, _("unrecognized section name '%s'"), sectionStr); + vshError(ctl, _("unrecognized section name '%1$s'"), sectionStr); goto cleanup; } =20 @@ -1043,27 +1043,26 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) =20 if (virNetworkUpdate(network, command, section, parentIndex, xml, flags) < 0) { - vshError(ctl, _("Failed to update network %s"), + vshError(ctl, _("Failed to update network %1$s"), virNetworkGetName(network)); goto cleanup; } =20 if (config) { if (live) - vshPrintExtra(ctl, _("Updated network %s persistent config and= " - "live state"), + vshPrintExtra(ctl, _("Updated network %1$s persistent config a= nd live state"), virNetworkGetName(network)); else - vshPrintExtra(ctl, _("Updated network %s persistent config"), + vshPrintExtra(ctl, _("Updated network %1$s persistent config"), virNetworkGetName(network)); } else if (live) { - vshPrintExtra(ctl, _("Updated network %s live state"), + vshPrintExtra(ctl, _("Updated network %1$s live state"), virNetworkGetName(network)); } else if (virNetworkIsActive(network)) { - vshPrintExtra(ctl, _("Updated network %s live state"), + vshPrintExtra(ctl, _("Updated network %1$s live state"), virNetworkGetName(network)); } else { - vshPrintExtra(ctl, _("Updated network %s persistent config"), + vshPrintExtra(ctl, _("Updated network %1$s persistent config"), virNetworkGetName(network)); } =20 @@ -1158,7 +1157,7 @@ cmdNetworkEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virshNetworkGetXMLDesc(network) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Network %s XML configuration not changed.\n"= ), \ + vshPrintExtra(ctl, _("Network %1$s XML configuration not changed.\= n"), \ virNetworkGetName(network)); \ ret =3D true; \ goto edit_cleanup; \ @@ -1167,7 +1166,7 @@ cmdNetworkEdit(vshControl *ctl, const vshCmd *cmd) (network_edited =3D virNetworkDefineXML(priv->conn, doc_edited)) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("Network %s XML configuration edited.\n"), + vshPrintExtra(ctl, _("Network %1$s XML configuration edited.\n"), virNetworkGetName(network_edited)); =20 ret =3D true; @@ -1227,11 +1226,11 @@ vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UN= USED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event 'lifecycle' for network %s: %s\n"= ), + vshPrint(data->ctl, _("%1$s: event 'lifecycle' for network %2$s: %= 3$s\n"), timestamp, virNetworkGetName(net), virshNetworkEventToString(event)); } else { - vshPrint(data->ctl, _("event 'lifecycle' for network %s: %s\n"), + vshPrint(data->ctl, _("event 'lifecycle' for network %1$s: %2$s\n"= ), virNetworkGetName(net), virshNetworkEventToString(event)); } =20 @@ -1312,7 +1311,7 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd) if (STREQ(eventName, virshNetworkEventCallbacks[event].name)) break; if (event =3D=3D VIR_NETWORK_EVENT_ID_LAST) { - vshError(ctl, _("unknown event type %s"), eventName); + vshError(ctl, _("unknown event type %1$s"), eventName); return false; } =20 @@ -1345,7 +1344,7 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), data.count); + vshPrint(ctl, _("events received: %1$d\n"), data.count); if (data.count) ret =3D true; =20 @@ -1417,7 +1416,7 @@ cmdNetworkDHCPLeases(vshControl *ctl, const vshCmd *c= md) return false; =20 if ((nleases =3D virNetworkGetDHCPLeases(network, mac, &leases, flags)= ) < 0) { - vshError(ctl, _("Failed to get leases info for %s"), name); + vshError(ctl, _("Failed to get leases info for %1$s"), name); goto cleanup; } =20 @@ -1523,10 +1522,10 @@ cmdNetworkPortCreate(vshControl *ctl, const vshCmd = *cmd) if (port !=3D NULL) { char uuidstr[VIR_UUID_STRING_BUFLEN]; virNetworkPortGetUUIDString(port, uuidstr); - vshPrintExtra(ctl, _("Network port %s created from %s\n"), + vshPrintExtra(ctl, _("Network port %1$s created from %2$s\n"), uuidstr, from); } else { - vshError(ctl, _("Failed to create network from %s"), from); + vshError(ctl, _("Failed to create network from %1$s"), from); goto cleanup; } =20 @@ -1635,10 +1634,10 @@ cmdNetworkPortDelete(vshControl *ctl, const vshCmd = *cmd) goto cleanup; =20 if (virNetworkPortDelete(port, 0) < 0) { - vshError(ctl, _("Failed to delete network port %s"), uuidstr); + vshError(ctl, _("Failed to delete network port %1$s"), uuidstr); goto cleanup; } else { - vshPrintExtra(ctl, _("Network port %s deleted\n"), uuidstr); + vshPrintExtra(ctl, _("Network port %1$s deleted\n"), uuidstr); } =20 ret =3D true; --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464704; cv=none; d=zohomail.com; s=zohoarc; b=koBaDCWvivap3ksy2LFjFbdFN7LBUh+ToHU8QCU4ahc5vU/y8joV+6w1HfBixzVT3uI42UK+hRUr+19AcJO2mcZ78QyLiNKV/QCAVIhicg9PAU+3/59vfIsCtCp7PtaNzhLwqV29RArIaTQCsBtE0m3VzOOvG84XcBf5CgKpSo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464704; 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=DsnikwvLcPcXzl+xYee07PLU4Ci+IMrPAPhBlDchjaA=; b=f/IaSuPupWChbQ8I9mXBAYLmGCPRYJoz4NVsbxPHpjZ0LV3Q9RV4i8O17BH80FCDT07ool8y1Ojv0XUxKmmGGiaMClqggBETovT/xOoERcY55dckqxu+xZbMynfAmwMoGrT5to1Z2CykvINGrUJqCWUJEVOelXJQbIynWQjBh+8= 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 1678464704679395.12279333245556; Fri, 10 Mar 2023 08:11:44 -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-202-6pJSd3y5MJ2RWwyFdzmaRg-1; Fri, 10 Mar 2023 11:11:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E12C03C58C51; Fri, 10 Mar 2023 16:11:17 +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 921582166B26; Fri, 10 Mar 2023 16:11:17 +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 823421946A4A; Fri, 10 Mar 2023 16:11:17 +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 6065B1946A54 for ; Fri, 10 Mar 2023 16:11:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 54079492B00; Fri, 10 Mar 2023 16:11:16 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id B31CF492C3E for ; Fri, 10 Mar 2023 16:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464703; 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=DsnikwvLcPcXzl+xYee07PLU4Ci+IMrPAPhBlDchjaA=; b=dY+GX3/oqUDQ2rNpC8uPlQB80S3gJhrt3a+7xvYZk2wAfFOviwCVi1/3MJvOG9NTtGPGmP lSLp4X1SsQHVZCixra6eanqqNlNStTzyZxGU+bKY4SvXQ2Pb3bRv2hcQh4P3P9oGc24oBo 03VVn4L5RV2WsdAU9Rot6FOXwEVDk1A= X-MC-Unique: 6pJSd3y5MJ2RWwyFdzmaRg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 49/51] tools: Update format strings in translated messages (part 2) Date: Fri, 10 Mar 2023 17:10:05 +0100 Message-Id: <8f3d99c1602a765162670f2109ae0fd9e8b7a1a3.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.6 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: 1678464705241100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- tools/virsh-nodedev.c | 62 +++++++------- tools/virsh-nwfilter.c | 27 +++--- tools/virsh-pool.c | 72 ++++++++-------- tools/virsh-secret.c | 22 ++--- tools/virsh-snapshot.c | 46 +++++----- tools/virsh-util.c | 2 +- tools/virsh-volume.c | 78 ++++++++--------- tools/virsh.c | 40 ++++----- tools/virt-admin.c | 54 ++++++------ tools/virt-host-validate-bhyve.c | 4 +- tools/virt-host-validate-common.c | 4 +- tools/virt-host-validate.c | 8 +- tools/virt-login-shell-helper.c | 22 ++--- tools/virt-pki-query-dn.c | 12 +-- tools/vsh.c | 138 +++++++++++++++--------------- tools/vsh.h | 6 +- 16 files changed, 296 insertions(+), 301 deletions(-) diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 5dbec65367..a079c8063b 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -76,11 +76,11 @@ cmdNodeDeviceCreate(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_NODE_DEVICE_CREATE_XML_VALIDATE; =20 if (!(dev =3D virNodeDeviceCreateXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to create node device from %s"), from); + vshError(ctl, _("Failed to create node device from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Node device %s created from %s\n"), + vshPrintExtra(ctl, _("Node device %1$s created from %2$s\n"), virNodeDeviceGetName(dev), from); return true; } @@ -125,7 +125,7 @@ vshFindNodeDevice(vshControl *ctl, const char *value) if (strchr(value, ',')) { narr =3D vshStringToArray(value, &arr); if (narr !=3D 2) { - vshError(ctl, _("Malformed device value '%s'"), value); + vshError(ctl, _("Malformed device value '%1$s'"), value); return NULL; } =20 @@ -159,9 +159,9 @@ cmdNodeDeviceDestroy(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virNodeDeviceDestroy(dev) =3D=3D 0) { - vshPrintExtra(ctl, _("Destroyed node device '%s'\n"), device_value= ); + vshPrintExtra(ctl, _("Destroyed node device '%1$s'\n"), device_val= ue); } else { - vshError(ctl, _("Failed to destroy node device '%s'"), device_valu= e); + vshError(ctl, _("Failed to destroy node device '%1$s'"), device_va= lue); return false; } =20 @@ -656,7 +656,7 @@ cmdNodeDeviceDetach(vshControl *ctl, const vshCmd *cmd) ignore_value(vshCommandOptStringQuiet(ctl, cmd, "driver", &driverName)= ); =20 if (!(device =3D virNodeDeviceLookupByName(priv->conn, name))) { - vshError(ctl, _("Could not find matching device '%s'"), name); + vshError(ctl, _("Could not find matching device '%1$s'"), name); return false; } =20 @@ -672,9 +672,9 @@ cmdNodeDeviceDetach(vshControl *ctl, const vshCmd *cmd) } =20 if (ret) - vshPrintExtra(ctl, _("Device %s detached\n"), name); + vshPrintExtra(ctl, _("Device %1$s detached\n"), name); else - vshError(ctl, _("Failed to detach device %s"), name); + vshError(ctl, _("Failed to detach device %1$s"), name); =20 return ret; } @@ -715,14 +715,14 @@ cmdNodeDeviceReAttach(vshControl *ctl, const vshCmd *= cmd) return false; =20 if (!(device =3D virNodeDeviceLookupByName(priv->conn, name))) { - vshError(ctl, _("Could not find matching device '%s'"), name); + vshError(ctl, _("Could not find matching device '%1$s'"), name); return false; } =20 if (virNodeDeviceReAttach(device) =3D=3D 0) { - vshPrintExtra(ctl, _("Device %s re-attached\n"), name); + vshPrintExtra(ctl, _("Device %1$s re-attached\n"), name); } else { - vshError(ctl, _("Failed to re-attach device %s"), name); + vshError(ctl, _("Failed to re-attach device %1$s"), name); ret =3D false; } =20 @@ -765,14 +765,14 @@ cmdNodeDeviceReset(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(device =3D virNodeDeviceLookupByName(priv->conn, name))) { - vshError(ctl, _("Could not find matching device '%s'"), name); + vshError(ctl, _("Could not find matching device '%1$s'"), name); return false; } =20 if (virNodeDeviceReset(device) =3D=3D 0) { - vshPrintExtra(ctl, _("Device %s reset\n"), name); + vshPrintExtra(ctl, _("Device %1$s reset\n"), name); } else { - vshError(ctl, _("Failed to reset device %s"), name); + vshError(ctl, _("Failed to reset device %1$s"), name); ret =3D false; } =20 @@ -824,11 +824,11 @@ vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUS= ED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event 'lifecycle' for node device %s: %= s\n"), + vshPrint(data->ctl, _("%1$s: event 'lifecycle' for node device %2$= s: %3$s\n"), timestamp, virNodeDeviceGetName(dev), virshNodeDeviceEventToString(e= vent)); } else { - vshPrint(data->ctl, _("event 'lifecycle' for node device %s: %s\n"= ), + vshPrint(data->ctl, _("event 'lifecycle' for node device %1$s: %2$= s\n"), virNodeDeviceGetName(dev), virshNodeDeviceEventToString(e= vent)); } =20 @@ -853,12 +853,12 @@ vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event '%s' for node device %s\n"), + vshPrint(data->ctl, _("%1$s: event '%2$s' for node device %3$s\n"), timestamp, data->cb->name, virNodeDeviceGetName(dev)); } else { - vshPrint(data->ctl, _("event '%s' for node device %s\n"), + vshPrint(data->ctl, _("event '%1$s' for node device %2$s\n"), data->cb->name, virNodeDeviceGetName(dev)); } @@ -948,7 +948,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd) if (STREQ(eventName, virshNodeDeviceEventCallbacks[event].name)) break; if (event =3D=3D VIR_NODE_DEVICE_EVENT_ID_LAST) { - vshError(ctl, _("unknown event type %s"), eventName); + vshError(ctl, _("unknown event type %1$s"), eventName); return false; } =20 @@ -988,7 +988,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), data.count); + vshPrint(ctl, _("events received: %1$d\n"), data.count); if (data.count) ret =3D true; =20 @@ -1039,11 +1039,11 @@ cmdNodeDeviceUndefine(vshControl *ctl, const vshCmd= *cmd G_GNUC_UNUSED) return false; =20 if (virNodeDeviceUndefine(dev, 0) < 0) { - vshError(ctl, _("Failed to undefine node device '%s'"), device_val= ue); + vshError(ctl, _("Failed to undefine node device '%1$s'"), device_v= alue); return false; } =20 - vshPrintExtra(ctl, _("Undefined node device '%s'\n"), device_value); + vshPrintExtra(ctl, _("Undefined node device '%1$s'\n"), device_value); return true; } =20 @@ -1092,11 +1092,11 @@ cmdNodeDeviceDefine(vshControl *ctl, const vshCmd *= cmd G_GNUC_UNUSED) flags |=3D VIR_NODE_DEVICE_DEFINE_XML_VALIDATE; =20 if (!(dev =3D virNodeDeviceDefineXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to define node device from '%s'"), from); + vshError(ctl, _("Failed to define node device from '%1$s'"), from); return false; } =20 - vshPrintExtra(ctl, _("Node device '%s' defined from '%s'\n"), + vshPrintExtra(ctl, _("Node device '%1$s' defined from '%2$s'\n"), virNodeDeviceGetName(dev), from); return true; } @@ -1137,14 +1137,14 @@ cmdNodeDeviceStart(vshControl *ctl, const vshCmd *c= md) return false; =20 if (!(device =3D virNodeDeviceLookupByName(priv->conn, name))) { - vshError(ctl, _("Could not find matching device '%s'"), name); + vshError(ctl, _("Could not find matching device '%1$s'"), name); return false; } =20 if (virNodeDeviceCreate(device, 0) =3D=3D 0) { - vshPrintExtra(ctl, _("Device %s started\n"), name); + vshPrintExtra(ctl, _("Device %1$s started\n"), name); } else { - vshError(ctl, _("Failed to start device %s"), name); + vshError(ctl, _("Failed to start device %1$s"), name); ret =3D false; } =20 @@ -1198,16 +1198,16 @@ cmdNodeDeviceAutostart(vshControl *ctl, const vshCm= d *cmd) =20 if (virNodeDeviceSetAutostart(dev, autostart) < 0) { if (autostart) - vshError(ctl, _("failed to mark device %s as autostarted"), na= me); + vshError(ctl, _("failed to mark device %1$s as autostarted"), = name); else - vshError(ctl, _("failed to unmark device %s as autostarted"), = name); + vshError(ctl, _("failed to unmark device %1$s as autostarted")= , name); return false; } =20 if (autostart) - vshPrintExtra(ctl, _("Device %s marked as autostarted\n"), name); + vshPrintExtra(ctl, _("Device %1$s marked as autostarted\n"), name); else - vshPrintExtra(ctl, _("Device %s unmarked as autostarted\n"), name); + vshPrintExtra(ctl, _("Device %1$s unmarked as autostarted\n"), nam= e); =20 return true; } diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c index 98380b452d..92b2b7b3bc 100644 --- a/tools/virsh-nwfilter.c +++ b/tools/virsh-nwfilter.c @@ -61,7 +61,7 @@ virshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *= cmd, } =20 if (!nwfilter) - vshError(ctl, _("failed to get nwfilter '%s'"), n); + vshError(ctl, _("failed to get nwfilter '%1$s'"), n); =20 return nwfilter; } @@ -114,10 +114,10 @@ cmdNWFilterDefine(vshControl *ctl, const vshCmd *cmd) nwfilter =3D virNWFilterDefineXML(priv->conn, buffer); =20 if (nwfilter !=3D NULL) { - vshPrintExtra(ctl, _("Network filter %s defined from %s\n"), + vshPrintExtra(ctl, _("Network filter %1$s defined from %2$s\n"), virNWFilterGetName(nwfilter), from); } else { - vshError(ctl, _("Failed to define network filter from %s"), from); + vshError(ctl, _("Failed to define network filter from %1$s"), from= ); ret =3D false; } return ret; @@ -157,9 +157,9 @@ cmdNWFilterUndefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virNWFilterUndefine(nwfilter) =3D=3D 0) { - vshPrintExtra(ctl, _("Network filter %s undefined\n"), name); + vshPrintExtra(ctl, _("Network filter %1$s undefined\n"), name); } else { - vshError(ctl, _("Failed to undefine network filter %s"), name); + vshError(ctl, _("Failed to undefine network filter %1$s"), name); ret =3D false; } =20 @@ -435,9 +435,8 @@ cmdNWFilterEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virNWFilterGetXMLDesc(nwfilter, 0) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Network filter %s XML " \ - "configuration not changed.\n"), \ - virNWFilterGetName(nwfilter)); \ + vshPrintExtra(ctl, _("Network filter %1$s XML configuration not ch= anged.\n"), \ + virNWFilterGetName(nwfilter)); \ ret =3D true; \ goto edit_cleanup; \ } while (0) @@ -445,7 +444,7 @@ cmdNWFilterEdit(vshControl *ctl, const vshCmd *cmd) (nwfilter_edited =3D virNWFilterDefineXML(priv->conn, doc_edited)) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("Network filter %s XML configuration edited.\n"), + vshPrintExtra(ctl, _("Network filter %1$s XML configuration edited.\n"= ), virNWFilterGetName(nwfilter_edited)); =20 ret =3D true; @@ -482,7 +481,7 @@ virshCommandOptNWFilterBindingBy(vshControl *ctl, binding =3D virNWFilterBindingLookupByPortDev(priv->conn, n); =20 if (!binding) - vshError(ctl, _("failed to get nwfilter binding '%s'"), n); + vshError(ctl, _("failed to get nwfilter binding '%1$s'"), n); =20 return binding; } @@ -532,11 +531,11 @@ cmdNWFilterBindingCreate(vshControl *ctl, const vshCm= d *cmd) binding =3D virNWFilterBindingCreateXML(priv->conn, buffer, flags); =20 if (!binding) { - vshError(ctl, _("Failed to create network filter from %s"), from); + vshError(ctl, _("Failed to create network filter from %1$s"), from= ); return false; } =20 - vshPrintExtra(ctl, _("Network filter binding on %s created from %s\n"), + vshPrintExtra(ctl, _("Network filter binding on %1$s created from %2$s= \n"), virNWFilterBindingGetPortDev(binding), from); virNWFilterBindingFree(binding); return true; @@ -577,9 +576,9 @@ cmdNWFilterBindingDelete(vshControl *ctl, const vshCmd = *cmd) return false; =20 if (virNWFilterBindingDelete(binding) =3D=3D 0) { - vshPrintExtra(ctl, _("Network filter binding on %s deleted\n"), po= rtdev); + vshPrintExtra(ctl, _("Network filter binding on %1$s deleted\n"), = portdev); } else { - vshError(ctl, _("Failed to delete network filter binding on %s"), = portdev); + vshError(ctl, _("Failed to delete network filter binding on %1$s")= , portdev); ret =3D false; } =20 diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 8a98c6ae40..56bd414dc9 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -188,7 +188,7 @@ virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cm= d, const char *optname, } =20 if (!pool) - vshError(ctl, _("failed to get pool '%s'"), n); + vshError(ctl, _("failed to get pool '%1$s'"), n); =20 return pool; } @@ -230,16 +230,16 @@ cmdPoolAutostart(vshControl *ctl, const vshCmd *cmd) =20 if (virStoragePoolSetAutostart(pool, autostart) < 0) { if (autostart) - vshError(ctl, _("failed to mark pool %s as autostarted"), name= ); + vshError(ctl, _("failed to mark pool %1$s as autostarted"), na= me); else - vshError(ctl, _("failed to unmark pool %s as autostarted"), na= me); + vshError(ctl, _("failed to unmark pool %1$s as autostarted"), = name); return false; } =20 if (autostart) - vshPrintExtra(ctl, _("Pool %s marked as autostarted\n"), name); + vshPrintExtra(ctl, _("Pool %1$s marked as autostarted\n"), name); else - vshPrintExtra(ctl, _("Pool %s unmarked as autostarted\n"), name); + vshPrintExtra(ctl, _("Pool %1$s unmarked as autostarted\n"), name); =20 return true; } @@ -299,11 +299,11 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(pool =3D virStoragePoolCreateXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to create pool from %s"), from); + vshError(ctl, _("Failed to create pool from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Pool %s created from %s\n"), + vshPrintExtra(ctl, _("Pool %1$s created from %2$s\n"), virStoragePoolGetName(pool), from); return true; } @@ -492,11 +492,11 @@ cmdPoolCreateAs(vshControl *ctl, const vshCmd *cmd) } =20 if (!(pool =3D virStoragePoolCreateXML(priv->conn, xml, flags))) { - vshError(ctl, _("Failed to create pool %s"), name); + vshError(ctl, _("Failed to create pool %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Pool %s created\n"), name); + vshPrintExtra(ctl, _("Pool %1$s created\n"), name); return true; } =20 @@ -542,11 +542,11 @@ cmdPoolDefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(pool =3D virStoragePoolDefineXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to define pool from %s"), from); + vshError(ctl, _("Failed to define pool from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Pool %s defined from %s\n"), + vshPrintExtra(ctl, _("Pool %1$s defined from %2$s\n"), virStoragePoolGetName(pool), from); return true; } @@ -582,11 +582,11 @@ cmdPoolDefineAs(vshControl *ctl, const vshCmd *cmd) } =20 if (!(pool =3D virStoragePoolDefineXML(priv->conn, xml, 0))) { - vshError(ctl, _("Failed to define pool %s"), name); + vshError(ctl, _("Failed to define pool %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Pool %s defined\n"), name); + vshPrintExtra(ctl, _("Pool %1$s defined\n"), name); return true; } =20 @@ -629,9 +629,9 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_STORAGE_POOL_BUILD_OVERWRITE; =20 if (virStoragePoolBuild(pool, flags) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s built\n"), name); + vshPrintExtra(ctl, _("Pool %1$s built\n"), name); } else { - vshError(ctl, _("Failed to build pool %s"), name); + vshError(ctl, _("Failed to build pool %1$s"), name); ret =3D false; } =20 @@ -668,9 +668,9 @@ cmdPoolDestroy(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virStoragePoolDestroy(pool) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s destroyed\n"), name); + vshPrintExtra(ctl, _("Pool %1$s destroyed\n"), name); } else { - vshError(ctl, _("Failed to destroy pool %s"), name); + vshError(ctl, _("Failed to destroy pool %1$s"), name); ret =3D false; } =20 @@ -707,9 +707,9 @@ cmdPoolDelete(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virStoragePoolDelete(pool, 0) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s deleted\n"), name); + vshPrintExtra(ctl, _("Pool %1$s deleted\n"), name); } else { - vshError(ctl, _("Failed to delete pool %s"), name); + vshError(ctl, _("Failed to delete pool %1$s"), name); ret =3D false; } =20 @@ -746,9 +746,9 @@ cmdPoolRefresh(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virStoragePoolRefresh(pool, 0) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s refreshed\n"), name); + vshPrintExtra(ctl, _("Pool %1$s refreshed\n"), name); } else { - vshError(ctl, _("Failed to refresh pool %s"), name); + vshError(ctl, _("Failed to refresh pool %1$s"), name); ret =3D false; } =20 @@ -1174,7 +1174,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd G_GNUC= _UNUSED) =20 for (i =3D 0; i < npoolTypes; i++) { if ((poolType =3D virStoragePoolTypeFromString(poolTypes[i])) = < 0) { - vshError(ctl, _("Invalid pool type '%s'"), poolTypes[i]); + vshError(ctl, _("Invalid pool type '%1$s'"), poolTypes[i]); return false; } =20 @@ -1474,7 +1474,7 @@ cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshC= md * cmd G_GNUC_UNUSED) =20 srcList =3D virConnectFindStoragePoolSources(priv->conn, type, srcSpec= , 0); if (srcList =3D=3D NULL) { - vshError(ctl, _("Failed to find any %s pool sources"), type); + vshError(ctl, _("Failed to find any %1$s pool sources"), type); return false; } vshPrint(ctl, "%s", srcList); @@ -1529,7 +1529,7 @@ cmdPoolDiscoverSources(vshControl * ctl, const vshCmd= * cmd G_GNUC_UNUSED) srcList =3D virConnectFindStoragePoolSources(priv->conn, type, srcSpec= , 0); VIR_FREE(srcSpec); if (srcList =3D=3D NULL) { - vshError(ctl, _("Failed to find any %s pool sources"), type); + vshError(ctl, _("Failed to find any %1$s pool sources"), type); return false; } vshPrint(ctl, "%s", srcList); @@ -1710,9 +1710,9 @@ cmdPoolStart(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE; =20 if (virStoragePoolCreate(pool, flags) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s started\n"), name); + vshPrintExtra(ctl, _("Pool %1$s started\n"), name); } else { - vshError(ctl, _("Failed to start pool %s"), name); + vshError(ctl, _("Failed to start pool %1$s"), name); ret =3D false; } =20 @@ -1749,9 +1749,9 @@ cmdPoolUndefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virStoragePoolUndefine(pool) =3D=3D 0) { - vshPrintExtra(ctl, _("Pool %s has been undefined\n"), name); + vshPrintExtra(ctl, _("Pool %1$s has been undefined\n"), name); } else { - vshError(ctl, _("Failed to undefine pool %s"), name); + vshError(ctl, _("Failed to undefine pool %1$s"), name); ret =3D false; } =20 @@ -1840,7 +1840,7 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd) #define EDIT_GET_XML virStoragePoolGetXMLDesc(pool, flags) #define EDIT_NOT_CHANGED \ do { \ - vshPrintExtra(ctl, _("Pool %s XML configuration not changed.\n"), \ + vshPrintExtra(ctl, _("Pool %1$s XML configuration not changed.\n")= , \ virStoragePoolGetName(pool)); \ ret =3D true; \ goto edit_cleanup; \ @@ -1849,7 +1849,7 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd) (pool_edited =3D virStoragePoolDefineXML(priv->conn, doc_edited, 0)) #include "virsh-edit.c" =20 - vshPrintExtra(ctl, _("Pool %s XML configuration edited.\n"), + vshPrintExtra(ctl, _("Pool %1$s XML configuration edited.\n"), virStoragePoolGetName(pool_edited)); =20 ret =3D true; @@ -1906,12 +1906,12 @@ vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UN= USED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event 'lifecycle' for storage pool %s: = %s\n"), + vshPrint(data->ctl, _("%1$s: event 'lifecycle' for storage pool %2= $s: %3$s\n"), timestamp, virStoragePoolGetName(pool), virshPoolEventToString(event)); } else { - vshPrint(data->ctl, _("event 'lifecycle' for storage pool %s: %s\n= "), + vshPrint(data->ctl, _("event 'lifecycle' for storage pool %1$s: %2= $s\n"), virStoragePoolGetName(pool), virshPoolEventToString(event)); } @@ -1937,12 +1937,12 @@ vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUS= ED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event '%s' for storage pool %s\n"), + vshPrint(data->ctl, _("%1$s: event '%2$s' for storage pool %3$s\n"= ), timestamp, data->cb->name, virStoragePoolGetName(pool)); } else { - vshPrint(data->ctl, _("event '%s' for storage pool %s\n"), + vshPrint(data->ctl, _("event '%1$s' for storage pool %2$s\n"), data->cb->name, virStoragePoolGetName(pool)); } @@ -2031,7 +2031,7 @@ cmdPoolEvent(vshControl *ctl, const vshCmd *cmd) if (STREQ(eventName, virshPoolEventCallbacks[event].name)) break; if (event =3D=3D VIR_STORAGE_POOL_EVENT_ID_LAST) { - vshError(ctl, _("unknown event type %s"), eventName); + vshError(ctl, _("unknown event type %1$s"), eventName); return false; } =20 @@ -2064,7 +2064,7 @@ cmdPoolEvent(vshControl *ctl, const vshCmd *cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), data.count); + vshPrint(ctl, _("events received: %1$d\n"), data.count); if (data.count) ret =3D true; =20 diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index 17d2bbd88d..694e16c5cb 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -53,7 +53,7 @@ virshCommandOptSecret(vshControl *ctl, const vshCmd *cmd,= const char **name) secret =3D virSecretLookupByUUIDString(priv->conn, n); =20 if (secret =3D=3D NULL) - vshError(ctl, _("failed to get secret '%s'"), n); + vshError(ctl, _("failed to get secret '%1$s'"), n); =20 return secret; } @@ -101,7 +101,7 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (!(res =3D virSecretDefineXML(priv->conn, buffer, flags))) { - vshError(ctl, _("Failed to set attributes from %s"), from); + vshError(ctl, _("Failed to set attributes from %1$s"), from); goto cleanup; } =20 @@ -110,7 +110,7 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd) goto cleanup; } =20 - vshPrintExtra(ctl, _("Secret %s created\n"), uuid); + vshPrintExtra(ctl, _("Secret %1$s created\n"), uuid); ret =3D true; =20 cleanup: @@ -387,10 +387,10 @@ cmdSecretUndefine(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virSecretUndefine(secret) < 0) { - vshError(ctl, _("Failed to delete secret %s"), uuid); + vshError(ctl, _("Failed to delete secret %1$s"), uuid); goto cleanup; } - vshPrintExtra(ctl, _("Secret %s deleted\n"), uuid); + vshPrintExtra(ctl, _("Secret %1$s deleted\n"), uuid); ret =3D true; =20 cleanup: @@ -676,10 +676,10 @@ vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUS= ED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event 'lifecycle' for secret %s: %s\n"), + vshPrint(data->ctl, _("%1$s: event 'lifecycle' for secret %2$s: %3= $s\n"), timestamp, uuid, virshSecretEventToString(event)); } else { - vshPrint(data->ctl, _("event 'lifecycle' for secret %s: %s\n"), + vshPrint(data->ctl, _("event 'lifecycle' for secret %1$s: %2$s\n"), uuid, virshSecretEventToString(event)); } =20 @@ -707,12 +707,12 @@ vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED, if (virTimeStringNowRaw(timestamp) < 0) timestamp[0] =3D '\0'; =20 - vshPrint(data->ctl, _("%s: event '%s' for secret %s\n"), + vshPrint(data->ctl, _("%1$s: event '%2$s' for secret %3$s\n"), timestamp, data->cb->name, uuid); } else { - vshPrint(data->ctl, _("event '%s' for secret %s\n"), + vshPrint(data->ctl, _("event '%1$s' for secret %2$s\n"), data->cb->name, uuid); } @@ -799,7 +799,7 @@ cmdSecretEvent(vshControl *ctl, const vshCmd *cmd) if (STREQ(eventName, virshSecretEventCallbacks[event].name)) break; if (event =3D=3D VIR_SECRET_EVENT_ID_LAST) { - vshError(ctl, _("unknown event type %s"), eventName); + vshError(ctl, _("unknown event type %1$s"), eventName); return false; } =20 @@ -832,7 +832,7 @@ cmdSecretEvent(vshControl *ctl, const vshCmd *cmd) default: goto cleanup; } - vshPrint(ctl, _("events received: %d\n"), data.count); + vshPrint(ctl, _("events received: %1$d\n"), data.count); if (data.count) ret =3D true; =20 diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 68908cd10a..d7889a38e4 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -90,9 +90,9 @@ virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, co= nst char *buffer, } =20 if (from) - vshPrintExtra(ctl, _("Domain snapshot %s created from '%s'"), name= , from); + vshPrintExtra(ctl, _("Domain snapshot %1$s created from '%2$s'"), = name, from); else - vshPrintExtra(ctl, _("Domain snapshot %s created"), name); + vshPrintExtra(ctl, _("Domain snapshot %1$s created"), name); =20 return true; } @@ -238,7 +238,7 @@ virshParseSnapshotMemspec(vshControl *ctl, virBuffer *b= uf, const char *str) ret =3D 0; cleanup: if (ret < 0) - vshError(ctl, _("unable to parse memspec: %s"), str); + vshError(ctl, _("unable to parse memspec: %1$s"), str); return ret; } =20 @@ -281,7 +281,7 @@ virshParseSnapshotDiskspec(vshControl *ctl, virBuffer *= buf, const char *str) if (STREQ(stype, "block")) { isFile =3D false; } else if (STRNEQ(stype, "file")) { - vshError(ctl, _("Unknown storage type: '%s'"), stype); + vshError(ctl, _("Unknown storage type: '%1$s'"), stype); goto cleanup; } virBufferAsprintf(buf, " type=3D'%s'", stype); @@ -305,7 +305,7 @@ virshParseSnapshotDiskspec(vshControl *ctl, virBuffer *= buf, const char *str) ret =3D 0; cleanup: if (ret < 0) - vshError(ctl, _("unable to parse diskspec: %s"), str); + vshError(ctl, _("unable to parse diskspec: %1$s"), str); return ret; } =20 @@ -462,7 +462,7 @@ virshLookupSnapshot(vshControl *ctl, const vshCmd *cmd, return -1; =20 if (exclusive && current && snapname) { - vshError(ctl, _("--%s and --current are mutually exclusive"), arg); + vshError(ctl, _("--%1$s and --current are mutually exclusive"), ar= g); return -1; } =20 @@ -471,7 +471,7 @@ virshLookupSnapshot(vshControl *ctl, const vshCmd *cmd, } else if (current) { *snap =3D virDomainSnapshotCurrent(dom, 0); } else { - vshError(ctl, _("--%s or --current is required"), arg); + vshError(ctl, _("--%1$s or --current is required"), arg); return -1; } if (!*snap) { @@ -549,7 +549,7 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd) /* Depending on flags, we re-edit even if XML is unchanged. */ \ if (!(define_flags & VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT)) { \ vshPrintExtra(ctl, \ - _("Snapshot %s XML configuration not changed.\n"= ), \ + _("Snapshot %1$s XML configuration not changed.\= n"), \ name); \ ret =3D true; \ goto edit_cleanup; \ @@ -563,9 +563,9 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd) =20 edited_name =3D virDomainSnapshotGetName(edited); if (STREQ(name, edited_name)) { - vshPrintExtra(ctl, _("Snapshot %s edited.\n"), name); + vshPrintExtra(ctl, _("Snapshot %1$s edited.\n"), name); } else if (clone_okay) { - vshPrintExtra(ctl, _("Snapshot %s cloned to %s.\n"), name, + vshPrintExtra(ctl, _("Snapshot %1$s cloned to %2$s.\n"), name, edited_name); } else { unsigned int delete_flags; @@ -574,12 +574,12 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd) if (virDomainSnapshotDelete(rename_okay ? snapshot : edited, delete_flags) < 0) { vshReportError(ctl); - vshError(ctl, _("Failed to clean up %s"), + vshError(ctl, _("Failed to clean up %1$s"), rename_okay ? name : edited_name); goto cleanup; } if (!rename_okay) { - vshError(ctl, _("Must use --rename or --clone to change %s to = %s"), + vshError(ctl, _("Must use --rename or --clone to change %1$s t= o %2$s"), name, edited_name); goto cleanup; } @@ -589,7 +589,7 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd) =20 cleanup: if (!ret && name) - vshError(ctl, _("Failed to update %s"), name); + vshError(ctl, _("Failed to update %1$s"), name); return ret; } =20 @@ -666,7 +666,7 @@ cmdSnapshotCurrent(vshControl *ctl, const vshCmd *cmd) if (!(snapshot2 =3D virDomainSnapshotCreateXML(dom, xml, flags))) goto cleanup; =20 - vshPrintExtra(ctl, _("Snapshot %s set as current"), snapshotname); + vshPrintExtra(ctl, _("Snapshot %1$s set as current"), snapshotname= ); ret =3D true; goto cleanup; } @@ -675,7 +675,7 @@ cmdSnapshotCurrent(vshControl *ctl, const vshCmd *cmd) goto cleanup; =20 if (!current) { - vshError(ctl, _("domain '%s' has no current snapshot"), domname); + vshError(ctl, _("domain '%1$s' has no current snapshot"), domname); goto cleanup; } else { if (!(snapshot =3D virDomainSnapshotCurrent(dom, 0))) @@ -1234,7 +1234,7 @@ virshSnapshotListCollect(vshControl *ctl, virDomainPt= r dom, * hierarchy isn't huge. XXX Is it worth making O(n^2 log n) * by using qsort and bsearch? */ if (start_index < 0) { - vshError(ctl, _("snapshot %s disappeared from list"), fromname= ); + vshError(ctl, _("snapshot %1$s disappeared from list"), fromna= me); goto cleanup; } for (i =3D 0; i < count; i++) { @@ -1452,7 +1452,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptBool(cmd, option)) { \ if (tree) { \ vshError(ctl, \ - _("--%s and --tree are mutually exclusive"), \ + _("--%1$s and --tree are mutually exclusive"), \ option); \ return false; \ } \ @@ -1695,7 +1695,7 @@ cmdSnapshotParent(vshControl *ctl, const vshCmd *cmd) if (virshGetSnapshotParent(ctl, snapshot, &parent) < 0) return false; if (!parent) { - vshError(ctl, _("snapshot '%s' has no parent"), name); + vshError(ctl, _("snapshot '%1$s' has no parent"), name); return false; } =20 @@ -1784,9 +1784,9 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd= *cmd) } =20 if (result < 0) - vshError(ctl, _("Failed to revert snapshot %s"), name); + vshError(ctl, _("Failed to revert snapshot %1$s"), name); else - vshPrintExtra(ctl, _("Domain snapshot %s reverted\n"), name); + vshPrintExtra(ctl, _("Domain snapshot %1$s reverted\n"), name); return result >=3D 0; } =20 @@ -1853,14 +1853,14 @@ cmdSnapshotDelete(vshControl *ctl, const vshCmd *cm= d) * older servers that reject the flag, by manually computing the * list of descendants. But that's a lot of code to maintain. */ if (virDomainSnapshotDelete(snapshot, flags) < 0) { - vshError(ctl, _("Failed to delete snapshot %s"), name); + vshError(ctl, _("Failed to delete snapshot %1$s"), name); return false; } =20 if (flags & VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY) - vshPrintExtra(ctl, _("Domain snapshot %s children deleted\n"), nam= e); + vshPrintExtra(ctl, _("Domain snapshot %1$s children deleted\n"), n= ame); else - vshPrintExtra(ctl, _("Domain snapshot %s deleted\n"), name); + vshPrintExtra(ctl, _("Domain snapshot %1$s deleted\n"), name); return true; } =20 diff --git a/tools/virsh-util.c b/tools/virsh-util.c index 3c4a084441..61e403a636 100644 --- a/tools/virsh-util.c +++ b/tools/virsh-util.c @@ -63,7 +63,7 @@ virshLookupDomainInternal(vshControl *ctl, vshResetLibvirtError(); =20 if (!dom) - vshError(ctl, _("failed to get domain '%s'"), name); + vshError(ctl, _("failed to get domain '%1$s'"), name); =20 return dom; } diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 83e97df2dc..9a2b21d3f3 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -101,7 +101,7 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, return NULL; =20 if (virStoragePoolIsActive(pool) !=3D 1) { - vshError(ctl, _("pool '%s' is not active"), p); + vshError(ctl, _("pool '%1$s' is not active"), p); return NULL; } } @@ -133,10 +133,10 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *c= md, =20 if (!vol) { if (pool || !pooloptname) - vshError(ctl, _("failed to get vol '%s'"), n); + vshError(ctl, _("failed to get vol '%1$s'"), n); else - vshError(ctl, _("failed to get vol '%s', specifying --%s " - "might help"), n, pooloptname); + vshError(ctl, _("failed to get vol '%1$s', specifying --%2$s m= ight help"), + n, pooloptname); } else { vshResetLibvirtError(); } @@ -151,7 +151,7 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, virStoragePoolGetName(pool))) { vshResetLibvirtError(); vshError(ctl, - _("Requested volume '%s' is not in pool '%s'"), + _("Requested volume '%1$s' is not in pool '%2$s'"= ), n, virStoragePoolGetName(pool)); g_clear_pointer(&vol, virshStorageVolFree); } @@ -252,13 +252,13 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd) return false; =20 if (virshVolSize(capacityStr, &capacity) < 0) { - vshError(ctl, _("Malformed size %s"), capacityStr); + vshError(ctl, _("Malformed size %1$s"), capacityStr); return false; } =20 if (vshCommandOptStringQuiet(ctl, cmd, "allocation", &allocationStr) >= 0 && virshVolSize(allocationStr, &allocation) < 0) { - vshError(ctl, _("Malformed size %s"), allocationStr); + vshError(ctl, _("Malformed size %1$s"), allocationStr); return false; } =20 @@ -323,7 +323,7 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd) cmd->def->name, snapshotStrVol); } if (snapVol =3D=3D NULL) { - vshError(ctl, _("failed to get vol '%s'"), snapshotStrVol); + vshError(ctl, _("failed to get vol '%1$s'"), snapshotStrVol); return false; } =20 @@ -351,10 +351,10 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd) vshPrint(ctl, "%s", xml); } else { if (!(vol =3D virStorageVolCreateXML(pool, xml, flags))) { - vshError(ctl, _("Failed to create vol %s"), name); + vshError(ctl, _("Failed to create vol %1$s"), name); return false; } - vshPrintExtra(ctl, _("Vol %s created\n"), name); + vshPrintExtra(ctl, _("Vol %1$s created\n"), name); } =20 return true; @@ -414,11 +414,11 @@ cmdVolCreate(vshControl *ctl, const vshCmd *cmd) } =20 if (!(vol =3D virStorageVolCreateXML(pool, buffer, flags))) { - vshError(ctl, _("Failed to create vol from %s"), from); + vshError(ctl, _("Failed to create vol from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Vol %s created from %s\n"), + vshPrintExtra(ctl, _("Vol %1$s created from %2$s\n"), virStorageVolGetName(vol), from); return true; } @@ -496,11 +496,11 @@ cmdVolCreateFrom(vshControl *ctl, const vshCmd *cmd) newvol =3D virStorageVolCreateXMLFrom(pool, buffer, inputvol, flags); =20 if (!newvol) { - vshError(ctl, _("Failed to create vol from %s"), from); + vshError(ctl, _("Failed to create vol from %1$s"), from); return false; } =20 - vshPrintExtra(ctl, _("Vol %s created from input vol %s\n"), + vshPrintExtra(ctl, _("Vol %1$s created from input vol %2$s\n"), virStorageVolGetName(newvol), virStorageVolGetName(input= vol)); return true; } @@ -603,12 +603,12 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd) } =20 if (!(newvol =3D virStorageVolCreateXMLFrom(origpool, newxml, origvol,= flags))) { - vshError(ctl, _("Failed to clone vol from %s"), + vshError(ctl, _("Failed to clone vol from %1$s"), virStorageVolGetName(origvol)); return false; } =20 - vshPrintExtra(ctl, _("Vol %s cloned from %s\n"), + vshPrintExtra(ctl, _("Vol %1$s cloned from %2$s\n"), virStorageVolGetName(newvol), virStorageVolGetName(origv= ol)); return true; } @@ -672,12 +672,12 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd) return false; =20 if ((fd =3D open(file, O_RDONLY)) < 0) { - vshError(ctl, _("cannot read %s"), file); + vshError(ctl, _("cannot read %1$s"), file); return false; } =20 if (fstat(fd, &sb) < 0) { - vshError(ctl, _("unable to stat %s"), file); + vshError(ctl, _("unable to stat %1$s"), file); return false; } =20 @@ -694,7 +694,7 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd) } =20 if (virStorageVolUpload(vol, st, offset, length, flags) < 0) { - vshError(ctl, _("cannot upload to volume %s"), name); + vshError(ctl, _("cannot upload to volume %1$s"), name); return false; } =20 @@ -702,24 +702,24 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd) if (virStreamSparseSendAll(st, virshStreamSource, virshStreamInData, virshStreamSourceSkip, &cbData) < 0) { - vshError(ctl, _("cannot send data to volume %s"), name); + vshError(ctl, _("cannot send data to volume %1$s"), name); return false; } } else { if (virStreamSendAll(st, virshStreamSource, &cbData) < 0) { - vshError(ctl, _("cannot send data to volume %s"), name); + vshError(ctl, _("cannot send data to volume %1$s"), name); return false; } } =20 if (VIR_CLOSE(fd) < 0) { - vshError(ctl, _("cannot close file %s"), file); + vshError(ctl, _("cannot close file %1$s"), file); virStreamAbort(st); return false; } =20 if (virStreamFinish(st) < 0) { - vshError(ctl, _("cannot close volume %s"), name); + vshError(ctl, _("cannot close volume %1$s"), name); return false; } =20 @@ -792,7 +792,7 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd) if ((fd =3D open(file, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0) { if (errno !=3D EEXIST || (fd =3D open(file, O_WRONLY|O_TRUNC, 0666)) < 0) { - vshError(ctl, _("cannot create %s"), file); + vshError(ctl, _("cannot create %1$s"), file); goto cleanup; } } else { @@ -800,7 +800,7 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd) } =20 if (fstat(fd, &sb) < 0) { - vshError(ctl, _("unable to stat %s"), file); + vshError(ctl, _("unable to stat %1$s"), file); goto cleanup; } =20 @@ -814,23 +814,23 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd) } =20 if (virStorageVolDownload(vol, st, offset, length, flags) < 0) { - vshError(ctl, _("cannot download from volume %s"), name); + vshError(ctl, _("cannot download from volume %1$s"), name); goto cleanup; } =20 if (virStreamSparseRecvAll(st, virshStreamSink, virshStreamSkip, &cbDa= ta) < 0) { - vshError(ctl, _("cannot receive data from volume %s"), name); + vshError(ctl, _("cannot receive data from volume %1$s"), name); goto cleanup; } =20 if (VIR_CLOSE(fd) < 0) { - vshError(ctl, _("cannot close file %s"), file); + vshError(ctl, _("cannot close file %1$s"), file); virStreamAbort(st); goto cleanup; } =20 if (virStreamFinish(st) < 0) { - vshError(ctl, _("cannot close volume %s"), name); + vshError(ctl, _("cannot close volume %1$s"), name); goto cleanup; } =20 @@ -882,9 +882,9 @@ cmdVolDelete(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS; =20 if (virStorageVolDelete(vol, flags) =3D=3D 0) { - vshPrintExtra(ctl, _("Vol %s deleted\n"), name); + vshPrintExtra(ctl, _("Vol %1$s deleted\n"), name); } else { - vshError(ctl, _("Failed to delete vol %s"), name); + vshError(ctl, _("Failed to delete vol %1$s"), name); ret =3D false; } =20 @@ -937,7 +937,7 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd) =20 if (algorithm_str && (algorithm =3D virshStorageVolWipeAlgorithmTypeFromString(algorith= m_str)) < 0) { - vshError(ctl, _("Unsupported algorithm '%s'"), algorithm_str); + vshError(ctl, _("Unsupported algorithm '%1$s'"), algorithm_str); return false; } =20 @@ -948,11 +948,11 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd) } =20 if (funcRet < 0) { - vshError(ctl, _("Failed to wipe vol %s"), name); + vshError(ctl, _("Failed to wipe vol %1$s"), name); return false; } =20 - vshPrintExtra(ctl, _("Vol %s wiped\n"), name); + vshPrintExtra(ctl, _("Vol %1$s wiped\n"), name); return true; } =20 @@ -1131,21 +1131,21 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd) flags |=3D VIR_STORAGE_VOL_RESIZE_DELTA; =20 if (virshVolSize(capacityStr, &capacity) < 0) { - vshError(ctl, _("Malformed size %s"), capacityStr); + vshError(ctl, _("Malformed size %1$s"), capacityStr); return false; } =20 if (virStorageVolResize(vol, capacity, flags) < 0) { vshError(ctl, - delta ? _("Failed to change size of volume '%s' by %s") - : _("Failed to change size of volume '%s' to %s"), + delta ? _("Failed to change size of volume '%1$s' by %2$s= ") + : _("Failed to change size of volume '%1$s' to %2$s"), virStorageVolGetName(vol), capacityStr); return false; } =20 vshPrintExtra(ctl, - delta ? _("Size of volume '%s' successfully changed by %= s\n") - : _("Size of volume '%s' successfully changed to %s\n"), + delta ? _("Size of volume '%1$s' successfully changed by= %2$s\n") + : _("Size of volume '%1$s' successfully changed to %2$s\= n"), virStorageVolGetName(vol), capacityStr); return true; } diff --git a/tools/virsh.c b/tools/virsh.c index 8de85f2516..963e886860 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -82,13 +82,13 @@ virshCatchDisconnect(virConnectPtr conn, =20 switch ((virConnectCloseReason) reason) { case VIR_CONNECT_CLOSE_REASON_ERROR: - str =3D N_("Disconnected from %s due to I/O error"); + str =3D N_("Disconnected from %1$s due to I/O error"); break; case VIR_CONNECT_CLOSE_REASON_EOF: - str =3D N_("Disconnected from %s due to end of file"); + str =3D N_("Disconnected from %1$s due to end of file"); break; case VIR_CONNECT_CLOSE_REASON_KEEPALIVE: - str =3D N_("Disconnected from %s due to keepalive timeout"); + str =3D N_("Disconnected from %1$s due to keepalive timeout"); break; case VIR_CONNECT_CLOSE_REASON_CLIENT: case VIR_CONNECT_CLOSE_REASON_LAST: @@ -439,8 +439,8 @@ virshUsage(void) const vshCmdGrp *grp; const vshCmdDef *cmd; =20 - fprintf(stdout, _("\n%s [options]... []" - "\n%s [options]... [args...]\n\n" + fprintf(stdout, _("\n%1$s [options]... []" + "\n%2$s [options]... [args...]\n\n" " options:\n" " -c | --connect=3DURI hypervisor connection= URI\n" " -d | --debug=3DNUM debug level [0-4]\n" @@ -461,7 +461,7 @@ virshUsage(void) progname); =20 for (grp =3D cmdGroups; grp->name; grp++) { - fprintf(stdout, _(" %s (help keyword '%s')\n"), + fprintf(stdout, _(" %1$s (help keyword '%2$s')\n"), grp->name, grp->keyword); for (cmd =3D grp->commands; cmd->name; cmd++) { if (cmd->flags & VSH_CMD_FLAG_ALIAS || @@ -488,8 +488,8 @@ static void virshShowVersion(vshControl *ctl G_GNUC_UNUSED) { /* FIXME - list a copyright blurb, as in GNU programs? */ - vshPrint(ctl, _("Virsh command line tool of libvirt %s\n"), VERSION); - vshPrint(ctl, _("See web site at %s\n\n"), "https://libvirt.org/"); + vshPrint(ctl, _("Virsh command line tool of libvirt %1$s\n"), VERSION); + vshPrint(ctl, _("See web site at %1$s\n\n"), "https://libvirt.org/"); =20 vshPrint(ctl, "%s", _("Compiled with support for:\n")); vshPrint(ctl, "%s", _(" Hypervisors:")); @@ -666,12 +666,12 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) break; case 'd': if (virStrToLong_i(optarg, NULL, 10, &debug) < 0) { - vshError(ctl, _("option %s takes a numeric argument"), + vshError(ctl, _("option %1$s takes a numeric argument"), longindex =3D=3D -1 ? "-d" : "--debug"); exit(EXIT_FAILURE); } if (debug < VSH_ERR_DEBUG || debug > VSH_ERR_ERROR) - vshError(ctl, _("ignoring debug level %d out of range [%d-= %d]"), + vshError(ctl, _("ignoring debug level %1$d out of range [%= 2$d-%3$d]"), debug, VSH_ERR_DEBUG, VSH_ERR_ERROR); else ctl->debug =3D debug; @@ -684,7 +684,7 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) (len =3D=3D 1 && *optarg !=3D '^')) { priv->escapeChar =3D optarg; } else { - vshError(ctl, _("Invalid string '%s' for escape sequence"), + vshError(ctl, _("Invalid string '%1$s' for escape sequence= "), optarg); exit(EXIT_FAILURE); } @@ -696,14 +696,14 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) case 'k': if (virStrToLong_i(optarg, NULL, 0, &keepalive) < 0) { vshError(ctl, - _("Invalid value for option %s"), + _("Invalid value for option %1$s"), longindex =3D=3D -1 ? "-k" : "--keepalive-interva= l"); exit(EXIT_FAILURE); } =20 if (keepalive < 0) { vshError(ctl, - _("option %s requires a positive integer argument= "), + _("option %1$s requires a positive integer argume= nt"), longindex =3D=3D -1 ? "-k" : "--keepalive-interva= l"); exit(EXIT_FAILURE); } @@ -712,14 +712,14 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) case 'K': if (virStrToLong_i(optarg, NULL, 0, &keepalive) < 0) { vshError(ctl, - _("Invalid value for option %s"), + _("Invalid value for option %1$s"), longindex =3D=3D -1 ? "-K" : "--keepalive-count"); exit(EXIT_FAILURE); } =20 if (keepalive < 0) { vshError(ctl, - _("option %s requires a positive integer argument= "), + _("option %1$s requires a positive integer argume= nt"), longindex =3D=3D -1 ? "-K" : "--keepalive-count"); exit(EXIT_FAILURE); } @@ -754,16 +754,16 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) break; } if (opt[i].name) - vshError(ctl, _("option '-%c'/'--%s' requires an argument"= ), + vshError(ctl, _("option '-%1$c'/'--%2$s' requires an argum= ent"), optopt, opt[i].name); else - vshError(ctl, _("option '-%c' requires an argument"), opto= pt); + vshError(ctl, _("option '-%1$c' requires an argument"), op= topt); exit(EXIT_FAILURE); case '?': if (optopt) - vshError(ctl, _("unsupported option '-%c'. See --help."), = optopt); + vshError(ctl, _("unsupported option '-%1$c'. See --help.")= , optopt); else - vshError(ctl, _("unsupported option '%s'. See --help."), a= rgv[optind - 1]); + vshError(ctl, _("unsupported option '%1$s'. See --help."),= argv[optind - 1]); exit(EXIT_FAILURE); default: vshError(ctl, _("unknown option")); @@ -901,7 +901,7 @@ main(int argc, char **argv) /* interactive mode */ if (!ctl->quiet) { vshPrint(ctl, - _("Welcome to %s, the virtualization interactive term= inal.\n\n"), + _("Welcome to %1$s, the virtualization interactive te= rminal.\n\n"), progname); vshPrint(ctl, "%s", _("Type: 'help' for help with commands\n" diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 8baf9636d3..43c91097a3 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -83,13 +83,13 @@ vshAdmCatchDisconnect(virAdmConnectPtr conn G_GNUC_UNUS= ED, =20 switch ((virConnectCloseReason) reason) { case VIR_CONNECT_CLOSE_REASON_ERROR: - str =3D N_("Disconnected from %s due to I/O error"); + str =3D N_("Disconnected from %1$s due to I/O error"); break; case VIR_CONNECT_CLOSE_REASON_EOF: - str =3D N_("Disconnected from %s due to end of file"); + str =3D N_("Disconnected from %1$s due to end of file"); break; case VIR_CONNECT_CLOSE_REASON_KEEPALIVE: - str =3D N_("Disconnected from %s due to keepalive timeout"); + str =3D N_("Disconnected from %1$s due to keepalive timeout"); break; case VIR_CONNECT_CLOSE_REASON_CLIENT: case VIR_CONNECT_CLOSE_REASON_LAST: @@ -226,7 +226,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UN= USED) includeVersion %=3D 1000000; minor =3D includeVersion / 1000; rel =3D includeVersion % 1000; - vshPrint(ctl, _("Compiled against library: libvirt %d.%d.%d\n"), + vshPrint(ctl, _("Compiled against library: libvirt %1$d.%2$d.%3$d\n"), major, minor, rel); =20 ret =3D virGetVersion(&libVersion, NULL, NULL); @@ -238,7 +238,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UN= USED) libVersion %=3D 1000000; minor =3D libVersion / 1000; rel =3D libVersion % 1000; - vshPrint(ctl, _("Using library: libvirt %d.%d.%d\n"), + vshPrint(ctl, _("Using library: libvirt %1$d.%2$d.%3$d\n"), major, minor, rel); =20 ret =3D virAdmConnectGetLibVersion(priv->conn, &daemonVersion); @@ -249,7 +249,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UN= USED) daemonVersion %=3D 1000000; minor =3D daemonVersion / 1000; rel =3D daemonVersion % 1000; - vshPrint(ctl, _("Running against daemon: %d.%d.%d\n"), + vshPrint(ctl, _("Running against daemon: %1$d.%2$d.%3$d\n"), major, minor, rel); } =20 @@ -333,7 +333,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd G_GNUC_UN= USED) /* Obtain a list of available servers on the daemon */ if ((nsrvs =3D virAdmConnectListServers(priv->conn, &srvs, 0)) < 0) { uri =3D virAdmConnectGetURI(priv->conn); - vshError(ctl, _("failed to obtain list of available servers from %= s"), + vshError(ctl, _("failed to obtain list of available servers from %= 1$s"), NULLSTR(uri)); goto cleanup; } @@ -484,7 +484,7 @@ cmdSrvThreadpoolSet(vshControl *ctl, const vshCmd *cmd) =20 #define PARSE_CMD_TYPED_PARAM(NAME, FIELD) \ if ((rv =3D vshCommandOptUInt(ctl, cmd, NAME, &val)) < 0) { \ - vshError(ctl, _("Unable to parse integer parameter '%s'"), NAME); \ + vshError(ctl, _("Unable to parse integer parameter '%1$s'"), NAME)= ; \ goto cleanup; \ } else if (rv > 0) { \ if (virTypedParamsAddUInt(¶ms, &nparams, &maxparams, \ @@ -584,8 +584,8 @@ cmdSrvClientsList(vshControl *ctl, const vshCmd *cmd) =20 /* Obtain a list of clients connected to server @srv */ if ((nclts =3D virAdmServerListClients(srv, &clts, 0)) < 0) { - vshError(ctl, _("failed to obtain list of connected clients " - "from server '%s'"), virAdmServerGetName(srv)); + vshError(ctl, _("failed to obtain list of connected clients from s= erver '%1$s'"), + virAdmServerGetName(srv)); goto cleanup; } =20 @@ -681,8 +681,7 @@ cmdClientInfo(vshControl *ctl, const vshCmd *cmd) =20 /* Retrieve client identity info */ if (virAdmClientGetInfo(clnt, ¶ms, &nparams, 0) < 0) { - vshError(ctl, _("failed to retrieve client identity information fo= r " - "client '%llu' connected to server '%s'"), + vshError(ctl, _("failed to retrieve client identity information fo= r client '%1$llu' connected to server '%2$s'"), id, virAdmServerGetName(srv)); goto cleanup; } @@ -765,12 +764,12 @@ cmdClientDisconnect(vshControl *ctl, const vshCmd *cm= d) goto cleanup; =20 if (virAdmClientClose(client, 0) < 0) { - vshError(ctl, _("Failed to disconnect client '%llu' from server %s= "), + vshError(ctl, _("Failed to disconnect client '%1$llu' from server = %2$s"), id, virAdmServerGetName(srv)); goto cleanup; } =20 - vshPrint(ctl, _("Client '%llu' disconnected"), id); + vshPrint(ctl, _("Client '%1$llu' disconnected"), id); ret =3D true; cleanup: virAdmClientFree(client); @@ -891,7 +890,7 @@ cmdSrvClientsSet(vshControl *ctl, const vshCmd *cmd) =20 #define PARSE_CMD_TYPED_PARAM(NAME, FIELD) \ if ((rv =3D vshCommandOptUInt(ctl, cmd, NAME, &val)) < 0) { \ - vshError(ctl, _("Unable to parse integer parameter '%s'"), NAME); \ + vshError(ctl, _("Unable to parse integer parameter '%1$s'"), NAME)= ; \ goto cleanup; \ } else if (rv > 0) { \ if (virTypedParamsAddUInt(¶ms, &nparams, &maxparams, \ @@ -1250,8 +1249,8 @@ vshAdmUsage(void) const vshCmdGrp *grp; const vshCmdDef *cmd; =20 - fprintf(stdout, _("\n%s [options]... []" - "\n%s [options]... [args...]\n\n" + fprintf(stdout, _("\n%1$s [options]... []" + "\n%2$s [options]... [args...]\n\n" " options:\n" " -c | --connect=3DURI daemon admin connecti= on URI\n" " -d | --debug=3DNUM debug level [0-4]\n" @@ -1265,7 +1264,7 @@ vshAdmUsage(void) progname); =20 for (grp =3D cmdGroups; grp->name; grp++) { - fprintf(stdout, _(" %s (help keyword '%s')\n"), + fprintf(stdout, _(" %1$s (help keyword '%2$s')\n"), grp->name, grp->keyword); for (cmd =3D grp->commands; cmd->name; cmd++) { if (cmd->flags & VSH_CMD_FLAG_ALIAS || @@ -1292,8 +1291,8 @@ static void vshAdmShowVersion(vshControl *ctl G_GNUC_UNUSED) { /* FIXME - list a copyright blurb, as in GNU programs? */ - vshPrint(ctl, _("Virt-admin command line tool of libvirt %s\n"), VERSI= ON); - vshPrint(ctl, _("See web site at %s\n\n"), "https://libvirt.org/"); + vshPrint(ctl, _("Virt-admin command line tool of libvirt %1$s\n"), VER= SION); + vshPrint(ctl, _("See web site at %1$s\n\n"), "https://libvirt.org/"); =20 vshPrint(ctl, "%s", _("Compiled with support for:")); #ifdef WITH_LIBVIRTD @@ -1333,12 +1332,12 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **a= rgv) break; case 'd': if (virStrToLong_i(optarg, NULL, 10, &debug) < 0) { - vshError(ctl, _("option %s takes a numeric argument"), + vshError(ctl, _("option %1$s takes a numeric argument"), longindex =3D=3D -1 ? "-d" : "--debug"); exit(EXIT_FAILURE); } if (debug < VSH_ERR_DEBUG || debug > VSH_ERR_ERROR) - vshError(ctl, _("ignoring debug level %d out of range [%d-= %d]"), + vshError(ctl, _("ignoring debug level %1$d out of range [%= 2$d-%3$d]"), debug, VSH_ERR_DEBUG, VSH_ERR_ERROR); else ctl->debug =3D debug; @@ -1370,16 +1369,16 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **a= rgv) break; } if (opt[i].name) - vshError(ctl, _("option '-%c'/'--%s' requires an argument"= ), + vshError(ctl, _("option '-%1$c'/'--%2$s' requires an argum= ent"), optopt, opt[i].name); else - vshError(ctl, _("option '-%c' requires an argument"), opto= pt); + vshError(ctl, _("option '-%1$c' requires an argument"), op= topt); exit(EXIT_FAILURE); case '?': if (optopt) - vshError(ctl, _("unsupported option '-%c'. See --help."), = optopt); + vshError(ctl, _("unsupported option '-%1$c'. See --help.")= , optopt); else - vshError(ctl, _("unsupported option '%s'. See --help."), a= rgv[optind - 1]); + vshError(ctl, _("unsupported option '%1$s'. See --help."),= argv[optind - 1]); exit(EXIT_FAILURE); default: vshError(ctl, _("unknown option")); @@ -1616,8 +1615,7 @@ main(int argc, char **argv) /* interactive mode */ if (!ctl->quiet) { vshPrint(ctl, - _("Welcome to %s, the administrating virtualization " - "interactive terminal.\n\n"), + _("Welcome to %1$s, the administrating virtualization= interactive terminal.\n\n"), progname); vshPrint(ctl, "%s", _("Type: 'help' for help with commands\n" diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bh= yve.c index 2f0ec1e36c..a39225016d 100644 --- a/tools/virt-host-validate-bhyve.c +++ b/tools/virt-host-validate-bhyve.c @@ -28,12 +28,12 @@ #include "virt-host-validate-common.h" =20 #define MODULE_STATUS(mod, err_msg, err_code) \ - virHostMsgCheck("BHYVE", _("for %s module"), #mod); \ + virHostMsgCheck("BHYVE", _("for %1$s module"), #mod); \ if (mod ## _loaded) { \ virHostMsgPass(); \ } else { \ virHostMsgFail(err_code, \ - _("%s module is not loaded, " err_msg), \ + _("%1$s module is not loaded, " err_msg), \ #mod); \ ret =3D -1; \ } diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-c= ommon.c index a41bb346d2..64a5786e0b 100644 --- a/tools/virt-host-validate-common.c +++ b/tools/virt-host-validate-common.c @@ -65,7 +65,7 @@ void virHostMsgCheck(const char *prefix, msg =3D g_strdup_vprintf(format, args); va_end(args); =20 - fprintf(stdout, _("%6s: Checking %-60s: "), prefix, msg); + fprintf(stdout, _("%1$6s: Checking %2$-60s: "), prefix, msg); } =20 static bool virHostMsgWantEscape(void) @@ -255,7 +255,7 @@ int virHostValidateLinuxKernel(const char *hvname, =20 uname(&uts); =20 - virHostMsgCheck(hvname, _("for Linux >=3D %d.%d.%d"), + virHostMsgCheck(hvname, _("for Linux >=3D %1$d.%2$d.%3$d"), ((version >> 16) & 0xff), ((version >> 8) & 0xff), (version & 0xff)); diff --git a/tools/virt-host-validate.c b/tools/virt-host-validate.c index 52ca729f85..d9fa52c310 100644 --- a/tools/virt-host-validate.c +++ b/tools/virt-host-validate.c @@ -49,7 +49,7 @@ show_help(FILE *out, const char *argv0) { fprintf(out, _("\n" - "syntax: %s [OPTIONS] [HVTYPE]\n" + "syntax: %1$s [OPTIONS] [HVTYPE]\n" "\n" " Hypervisor types:\n" "\n" @@ -90,7 +90,7 @@ main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); return EXIT_FAILURE; } =20 @@ -116,7 +116,7 @@ main(int argc, char **argv) } =20 if ((argc-optind) > 2) { - fprintf(stderr, _("%s: too many command line arguments\n"), argv[0= ]); + fprintf(stderr, _("%1$s: too many command line arguments\n"), argv= [0]); show_help(stderr, argv[0]); return EXIT_FAILURE; } @@ -159,7 +159,7 @@ main(int argc, char **argv) #endif =20 if (hvname && !usedHvname) { - fprintf(stderr, _("%s: unsupported hypervisor name %s\n"), + fprintf(stderr, _("%1$s: unsupported hypervisor name %2$s\n"), argv[0], hvname); return EXIT_FAILURE; } diff --git a/tools/virt-login-shell-helper.c b/tools/virt-login-shell-helpe= r.c index 8feeb8f0fe..cb94c49720 100644 --- a/tools/virt-login-shell-helper.c +++ b/tools/virt-login-shell-helper.c @@ -80,7 +80,7 @@ static int virLoginShellAllowedUser(virConf *conf, } } virReportSystemError(EPERM, - _("%s not matched against 'allowed_users' in %s"), + _("%1$s not matched against 'allowed_users' in %2= $s"), name, conf_file); cleanup: VIR_FREE(gname); @@ -118,7 +118,7 @@ usage(void) fprintf(stdout, _("\n" "Usage:\n" - " %s [option]\n\n" + " %1$s [option]\n\n" "Options:\n" " -h | --help Display program help\n" " -V | --version Display program version\n" @@ -196,12 +196,12 @@ main(int argc, char **argv) return ret; =20 if (geteuid() !=3D 0) { - fprintf(stderr, _("%s: must be run as root\n"), argv[0]); + fprintf(stderr, _("%1$s: must be run as root\n"), argv[0]); return ret; } =20 if (getuid() !=3D 0) { - fprintf(stderr, _("%s: must not be run setuid root\n"), argv[0]); + fprintf(stderr, _("%1$s: must not be run setuid root\n"), argv[0]); return ret; } =20 @@ -227,13 +227,13 @@ main(int argc, char **argv) } =20 if (optind !=3D (argc - 2)) { - virReportSystemError(EINVAL, _("%s expects UID and GID parameters"= ), progname); + virReportSystemError(EINVAL, _("%1$s expects UID and GID parameter= s"), progname); goto cleanup; } =20 if (virStrToLong_ull(argv[optind], NULL, 10, &uidval) < 0 || ((uid_t)uidval) !=3D uidval) { - virReportSystemError(EINVAL, _("%s cannot parse UID '%s'"), + virReportSystemError(EINVAL, _("%1$s cannot parse UID '%2$s'"), progname, argv[optind]); goto cleanup; } @@ -241,7 +241,7 @@ main(int argc, char **argv) optind++; if (virStrToLong_ull(argv[optind], NULL, 10, &gidval) < 0 || ((gid_t)gidval) !=3D gidval) { - virReportSystemError(EINVAL, _("%s cannot parse GID '%s'"), + virReportSystemError(EINVAL, _("%1$s cannot parse GID '%2$s'"), progname, argv[optind]); goto cleanup; } @@ -285,7 +285,7 @@ main(int argc, char **argv) last_error =3D virGetLastError(); if (last_error->code !=3D VIR_ERR_OPERATION_INVALID) { virReportSystemError(last_error->code, - _("Can't create %s container: %s"), + _("Can't create %1$s container: %2$s"), name, last_error->message); goto cleanup; } @@ -318,7 +318,7 @@ main(int argc, char **argv) if (virSetUIDGID(uid, gid, groups, ngroups) < 0) goto cleanup; if (chdir(homedir) < 0) { - virReportSystemError(errno, _("Unable to chdir(%s)"), homedir); + virReportSystemError(errno, _("Unable to chdir(%1$s)"), homedir); goto cleanup; } =20 @@ -347,7 +347,7 @@ main(int argc, char **argv) shcmd =3D shargv[0]; if (!g_path_is_absolute(shcmd)) { virReportSystemError(errno, - _("Shell '%s' should have absolute path"), + _("Shell '%1$s' should have absolute path"), shcmd); goto cleanup; } @@ -382,7 +382,7 @@ main(int argc, char **argv) g_setenv("TERM", term, TRUE); =20 if (execv(shcmd, (char *const*) shargv) < 0) { - virReportSystemError(errno, _("Unable to exec shell %s"), + virReportSystemError(errno, _("Unable to exec shell %1$s"), shcmd); virDispatchError(NULL); return errno =3D=3D ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE; diff --git a/tools/virt-pki-query-dn.c b/tools/virt-pki-query-dn.c index 2d7849feb7..c8196e32e3 100644 --- a/tools/virt-pki-query-dn.c +++ b/tools/virt-pki-query-dn.c @@ -28,8 +28,8 @@ print_usage(const char *progname, { fprintf(out, _("Usage:\n" - " %s FILE\n" - " %s { -v | -h }\n" + " %1$s FILE\n" + " %2$s { -v | -h }\n" "\n" "Extract Distinguished Name from a PEM certificate.\n" "The output is meant to be used in the tls_allowed_dn_list\n" @@ -102,7 +102,7 @@ main(int argc, } =20 if (bufsize > UINT_MAX) { - g_printerr(_("%s: File '%s' is too large\n"), progname, filename); + g_printerr(_("%1$s: File '%2$s' is too large\n"), progname, filena= me); return EXIT_FAILURE; } =20 @@ -111,14 +111,14 @@ main(int argc, =20 rv =3D gnutls_x509_crt_init(&crt); if (rv < 0) { - g_printerr(_("Unable to initialize certificate: %s\n"), + g_printerr(_("Unable to initialize certificate: %1$s\n"), gnutls_strerror(rv)); return EXIT_FAILURE; } =20 rv =3D gnutls_x509_crt_import(crt, &crt_data, GNUTLS_X509_FMT_PEM); if (rv < 0) { - g_printerr(_("Unable to load certificate, make sure it is in PEM f= ormat: %s\n"), + g_printerr(_("Unable to load certificate, make sure it is in PEM f= ormat: %1$s\n"), gnutls_strerror(rv)); return EXIT_FAILURE; } @@ -129,7 +129,7 @@ main(int argc, rv =3D gnutls_x509_crt_get_dn(crt, dname, &dnamesize); } if (rv !=3D 0) { - g_printerr(_("Failed to get distinguished name: %s\n"), + g_printerr(_("Failed to get distinguished name: %1$s\n"), gnutls_strerror(rv)); return EXIT_FAILURE; } diff --git a/tools/vsh.c b/tools/vsh.c index 0066504ebe..5b672b8edf 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -272,39 +272,39 @@ vshCmddefCheckInternals(vshControl *ctl, const vshCmdDef *alias; =20 if (!cmd->alias) { - vshError(ctl, _("command '%s' has inconsistent alias"), cmd->n= ame); + vshError(ctl, _("command '%1$s' has inconsistent alias"), cmd-= >name); return -1; } =20 if (!(alias =3D vshCmddefSearch(cmd->alias))) { - vshError(ctl, _("command alias '%s' is pointing to a non-exist= ent command '%s'"), + vshError(ctl, _("command alias '%1$s' is pointing to a non-exi= stent command '%2$s'"), cmd->name, cmd->alias); return -1; } =20 if (alias->flags & VSH_CMD_FLAG_ALIAS) { - vshError(ctl, _("command alias '%s' is pointing to another com= mand alias '%s'"), + vshError(ctl, _("command alias '%1$s' is pointing to another c= ommand alias '%2$s'"), cmd->name, cmd->alias); return -1; } =20 if (cmd->handler) { - vshError(ctl, _("command '%s' has handler set"), cmd->name); + vshError(ctl, _("command '%1$s' has handler set"), cmd->name); return -1; } =20 if (cmd->opts) { - vshError(ctl, _("command '%s' has options set"), cmd->name); + vshError(ctl, _("command '%1$s' has options set"), cmd->name); return -1; } =20 if (cmd->info) { - vshError(ctl, _("command '%s' has info set"), cmd->name); + vshError(ctl, _("command '%1$s' has info set"), cmd->name); return -1; } =20 if (cmd->flags & ~VSH_CMD_FLAG_ALIAS) { - vshError(ctl, _("command '%s' has multiple flags set"), cmd->n= ame); + vshError(ctl, _("command '%1$s' has multiple flags set"), cmd-= >name); return -1; } =20 @@ -314,7 +314,7 @@ vshCmddefCheckInternals(vshControl *ctl, =20 /* Each command has to provide a non-empty help string. */ if (!(help =3D vshCmddefGetInfo(cmd, "help")) || !*help) { - vshError(ctl, _("command '%s' lacks help"), cmd->name); + vshError(ctl, _("command '%1$s' lacks help"), cmd->name); return -1; } =20 @@ -325,7 +325,7 @@ vshCmddefCheckInternals(vshControl *ctl, const vshCmdOptDef *opt =3D &cmd->opts[i]; =20 if (i > 63) { - vshError(ctl, _("command '%s' has too many options"), cmd->nam= e); + vshError(ctl, _("command '%1$s' has too many options"), cmd->n= ame); return -1; /* too many options */ } =20 @@ -337,7 +337,7 @@ vshCmddefCheckInternals(vshControl *ctl, switch (opt->type) { case VSH_OT_BOOL: if (opt->completer || opt->completer_flags) { - vshError(ctl, _("bool parameter '%s' of command '%s' has c= ompleter set"), + vshError(ctl, _("bool parameter '%1$s' of command '%2$s' h= as completer set"), opt->name, cmd->name); return -1; } @@ -346,7 +346,7 @@ vshCmddefCheckInternals(vshControl *ctl, =20 case VSH_OT_STRING: if (opt->flags & VSH_OFLAG_REQ) { - vshError(ctl, _("parameter '%s' of command '%s' misused VS= H_OFLAG_REQ"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' misuse= d VSH_OFLAG_REQ"), opt->name, cmd->name); return -1; /* neither bool nor string options can be manda= tory */ } @@ -360,7 +360,7 @@ vshCmddefCheckInternals(vshControl *ctl, char *p; =20 if (opt->flags || !opt->help) { - vshError(ctl, _("parameter '%s' of command '%s' has incorr= ect alias option"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' has in= correct alias option"), opt->name, cmd->name); return -1; /* alias options are tracked by the original na= me */ } @@ -376,13 +376,13 @@ vshCmddefCheckInternals(vshControl *ctl, if (p) { /* If alias comes with value, replacement must not be bool= */ if (cmd->opts[j].type =3D=3D VSH_OT_BOOL) { - vshError(ctl, _("alias '%s' of command '%s' has mismat= ched alias type"), + vshError(ctl, _("alias '%1$s' of command '%2$s' has mi= smatched alias type"), opt->name, cmd->name); return -1; } } if (!cmd->opts[j].name) { - vshError(ctl, _("alias '%s' of command '%s' has missing al= ias option"), + vshError(ctl, _("alias '%1$s' of command '%2$s' has missin= g alias option"), opt->name, cmd->name); return -1; /* alias option must map to a later option name= */ } @@ -390,7 +390,7 @@ vshCmddefCheckInternals(vshControl *ctl, break; case VSH_OT_ARGV: if (cmd->opts[i + 1].name) { - vshError(ctl, _("parameter '%s' of command '%s' must be li= sted last"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' must b= e listed last"), opt->name, cmd->name); return -1; /* argv option must be listed last */ } @@ -398,13 +398,13 @@ vshCmddefCheckInternals(vshControl *ctl, =20 case VSH_OT_DATA: if (!(opt->flags & VSH_OFLAG_REQ)) { - vshError(ctl, _("parameter '%s' of command '%s' must use V= SH_OFLAG_REQ flag"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' must u= se VSH_OFLAG_REQ flag"), opt->name, cmd->name); return -1; /* OT_DATA should always be required. */ } =20 if (seenOptionalOption) { - vshError(ctl, _("parameter '%s' of command '%s' must be li= sted before optional parameters"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' must b= e listed before optional parameters"), opt->name, cmd->name); return -1; /* mandatory options must be listed first */ } @@ -413,7 +413,7 @@ vshCmddefCheckInternals(vshControl *ctl, case VSH_OT_INT: if (opt->flags & VSH_OFLAG_REQ) { if (seenOptionalOption) { - vshError(ctl, _("parameter '%s' of command '%s' must b= e listed before optional parameters"), + vshError(ctl, _("parameter '%1$s' of command '%2$s' mu= st be listed before optional parameters"), opt->name, cmd->name); return -1; /* mandatory options must be listed first = */ } @@ -499,7 +499,7 @@ vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cm= d, const char *name, *value =3D '\0'; if (*optstr) { if (report) - vshError(ctl, _("invalid '=3D' after option --= %s"), + vshError(ctl, _("invalid '=3D' after option --= %1$s"), opt->name); return NULL; } @@ -509,7 +509,7 @@ vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cm= d, const char *name, } if ((*opts_seen & (1ULL << i)) && opt->type !=3D VSH_OT_ARGV) { if (report) - vshError(ctl, _("option --%s already seen"), name); + vshError(ctl, _("option --%1$s already seen"), name); return NULL; } *opts_seen |=3D 1ULL << i; @@ -519,7 +519,7 @@ vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cm= d, const char *name, } =20 if (STRNEQ(cmd->name, "help") && report) { - vshError(ctl, _("command '%s' doesn't support option --%s"), + vshError(ctl, _("command '%1$s' doesn't support option --%2$s"), cmd->name, name); } return NULL; @@ -564,8 +564,8 @@ vshCommandCheckOpts(vshControl *ctl, const vshCmd *cmd,= uint64_t opts_required, =20 vshError(ctl, opt->type =3D=3D VSH_OT_DATA || opt->type =3D=3D VSH_= OT_ARGV ? - _("command '%s' requires <%s> option") : - _("command '%s' requires --%s option"), + _("command '%1$s' requires <%2$s> option") : + _("command '%1$s' requires --%2$s option"), def->name, opt->name); } } @@ -628,7 +628,7 @@ vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp) { const vshCmdDef *cmd =3D NULL; =20 - vshPrint(ctl, _(" %s (help keyword '%s'):\n"), grp->name, + vshPrint(ctl, _(" %1$s (help keyword '%2$s'):\n"), grp->name, grp->keyword); =20 for (cmd =3D grp->commands; cmd->name; cmd++) { @@ -666,13 +666,13 @@ vshCmddefHelp(const vshCmdDef *def) case VSH_OT_INT: /* xgettext:c-format */ fmt =3D ((opt->flags & VSH_OFLAG_REQ) ? "<%s>" - : _("[--%s ]")); + : _("[--%1$s ]")); if (!(opt->flags & VSH_OFLAG_REQ_OPT)) shortopt =3D true; break; case VSH_OT_STRING: /* xgettext:c-format */ - fmt =3D _("[--%s ]"); + fmt =3D _("[--%1$s ]"); if (!(opt->flags & VSH_OFLAG_REQ_OPT)) shortopt =3D true; break; @@ -685,11 +685,11 @@ vshCmddefHelp(const vshCmdDef *def) /* xgettext:c-format */ if (shortopt) { fmt =3D (opt->flags & VSH_OFLAG_REQ) - ? _("{[--%s] }...") - : _("[[--%s] ]..."); + ? _("{[--%1$s] }...") + : _("[[--%1$s] ]..."); } else { - fmt =3D (opt->flags & VSH_OFLAG_REQ) ? _("<%s>...") - : _("[<%s>]..."); + fmt =3D (opt->flags & VSH_OFLAG_REQ) ? _("<%1$s>...") + : _("[<%1$s>]..."); } break; case VSH_OT_ALIAS: @@ -719,19 +719,19 @@ vshCmddefHelp(const vshCmdDef *def) break; case VSH_OT_INT: g_snprintf(buf, sizeof(buf), - (opt->flags & VSH_OFLAG_REQ) ? _("[--%s] ") - : _("--%s "), opt->name); + (opt->flags & VSH_OFLAG_REQ) ? _("[--%1$s] ") + : _("--%1$s "), opt->name); break; case VSH_OT_STRING: - g_snprintf(buf, sizeof(buf), _("--%s "), opt->name= ); + g_snprintf(buf, sizeof(buf), _("--%1$s "), opt->na= me); break; case VSH_OT_DATA: - g_snprintf(buf, sizeof(buf), _("[--%s] "), + g_snprintf(buf, sizeof(buf), _("[--%1$s] "), opt->name); break; case VSH_OT_ARGV: g_snprintf(buf, sizeof(buf), - shortopt ? _("[--%s] ") : _("<%s>"), + shortopt ? _("[--%1$s] ") : _("<%1$s>"), opt->name); break; case VSH_OT_ALIAS: @@ -858,7 +858,7 @@ vshCommandOptInt(vshControl *ctl, const vshCmd *cmd, =20 if ((ret =3D virStrToLong_i(arg->data, NULL, 10, value)) < 0) vshError(ctl, - _("Numeric value '%s' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$s' for <%2$s> option is malformed or= out of range"), arg->data, name); else ret =3D 1; @@ -885,7 +885,7 @@ vshCommandOptUIntInternal(vshControl *ctl, ret =3D virStrToLong_uip(arg->data, NULL, 10, value); if (ret < 0) vshError(ctl, - _("Numeric value '%s' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$s' for <%2$s> option is malformed or= out of range"), arg->data, name); else ret =3D 1; @@ -946,7 +946,7 @@ vshCommandOptULInternal(vshControl *ctl, ret =3D virStrToLong_ulp(arg->data, NULL, 10, value); if (ret < 0) vshError(ctl, - _("Numeric value '%s' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$s' for <%2$s> option is malformed or= out of range"), arg->data, name); else ret =3D 1; @@ -1055,7 +1055,7 @@ vshCommandOptStringReq(vshControl *ctl, =20 if (error) { if (!cmd->skipChecks) - vshError(ctl, _("Failed to get option '%s': %s"), name, _(erro= r)); + vshError(ctl, _("Failed to get option '%1$s': %2$s"), name, _(= error)); return -1; } =20 @@ -1085,7 +1085,7 @@ vshCommandOptLongLong(vshControl *ctl, const vshCmd *= cmd, =20 if ((ret =3D virStrToLong_ll(arg->data, NULL, 10, value)) < 0) vshError(ctl, - _("Numeric value '%s' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$s' for <%2$s> option is malformed or= out of range"), arg->data, name); else ret =3D 1; @@ -1112,7 +1112,7 @@ vshCommandOptULongLongInternal(vshControl *ctl, ret =3D virStrToLong_ullp(arg->data, NULL, 10, value); if (ret < 0) vshError(ctl, - _("Numeric value '%s' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$s' for <%2$s> option is malformed or= out of range"), arg->data, name); else ret =3D 1; @@ -1181,8 +1181,8 @@ vshCommandOptScaledInt(vshControl *ctl, const vshCmd = *cmd, if (virStrToLong_ullp(arg->data, &end, 10, value) < 0 || virScaleInteger(value, end, scale, max) < 0) { vshError(ctl, - _("Scaled numeric value '%s' for <%s> option is malformed= or " - "out of range"), arg->data, name); + _("Scaled numeric value '%1$s' for <%2$s> option is malfo= rmed or out of range"), + arg->data, name); return -1; } =20 @@ -1272,8 +1272,8 @@ vshBlockJobOptionBandwidth(vshControl *ctl, if (virStrToLong_ullp(arg->data, &end, 10, &bw) < 0 || virScaleInteger(&bw, end, 1, ULONG_MAX) < 0) { vshError(ctl, - _("Scaled numeric value '%s' for <--bandwidth> option= is " - "malformed or out of range"), arg->data); + _("Scaled numeric value '%1$s' for <--bandwidth> opti= on is malformed or out of range"), + arg->data); return -1; } =20 @@ -1332,7 +1332,7 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd) if (enable_timing) { double diff_ms =3D (after - before) / 1000.0; =20 - vshPrint(ctl, _("\n(Time: %.3f ms)\n\n"), diff_ms); + vshPrint(ctl, _("\n(Time: %1$.3f ms)\n\n"), diff_ms); } else { vshPrintExtra(ctl, "\n"); } @@ -1417,7 +1417,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *pa= rser, vshCmd **partial) break; } else if (!(cmd =3D vshCmddefSearch(tkdata))) { if (!partial) - vshError(ctl, _("unknown command: '%s'"), tkdata); + vshError(ctl, _("unknown command: '%1$s'"), tkdata= ); goto syntaxError; /* ... or ignore this command only= ? */ } =20 @@ -1477,7 +1477,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *pa= rser, vshCmd **partial) last =3D arg; } else { vshError(ctl, - _("expected syntax: --%s <%s>"), + _("expected syntax: --%1$s <%2$s>"), opt->name, opt->type =3D=3D VSH_OT_INT ? _("number") : _("string"= )); @@ -1490,7 +1490,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *pa= rser, vshCmd **partial) tkdata =3D NULL; if (optstr) { if (!partial) - vshError(ctl, _("invalid '=3D' after option --= %s"), + vshError(ctl, _("invalid '=3D' after option --= %1$s"), opt->name); VIR_FREE(optstr); goto syntaxError; @@ -1508,7 +1508,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *pa= rser, vshCmd **partial) &opts_seen)) && STRNEQ(cmd->name, "help")) { if (!partial) - vshError(ctl, _("unexpected data '%s'"), tkdata); + vshError(ctl, _("unexpected data '%1$s'"), tkdata); goto syntaxError; } } @@ -1784,7 +1784,7 @@ vshCommandOptTimeoutToMs(vshControl *ctl, const vshCm= d *cmd, int *timeout) * it from seconds to milliseconds without overflowing. */ if (utimeout =3D=3D 0 || utimeout > INT_MAX / 1000) { vshError(ctl, - _("Numeric value '%u' for <%s> option is malformed or out= of range"), + _("Numeric value '%1$u' for <%2$s> option is malformed or= out of range"), utimeout, "timeout"); ret =3D -1; @@ -1836,7 +1836,7 @@ vshGetTypedParamValue(vshControl *ctl, virTypedParame= terPtr item) break; =20 default: - vshError(ctl, _("unimplemented parameter type %d"), item->type); + vshError(ctl, _("unimplemented parameter type %1$d"), item->type); exit(EXIT_FAILURE); } } @@ -1977,7 +1977,7 @@ vshTTYMakeRaw(vshControl *ctl G_GNUC_UNUSED, =20 if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &rawattr) < 0) { if (report_errors) - vshError(ctl, _("unable to set tty attributes: %s"), + vshError(ctl, _("unable to set tty attributes: %1$s"), g_strerror(errno)); return -1; } @@ -2153,7 +2153,7 @@ vshEventWait(vshControl *ctl) if (rv !=3D 1) { if (!rv) errno =3D EPIPE; - vshError(ctl, _("failed to determine loop exit status: %s"), + vshError(ctl, _("failed to determine loop exit status: %1$s"), g_strerror(errno)); return -1; } @@ -2284,7 +2284,7 @@ vshCloseLogFile(vshControl *ctl) { /* log file close */ if (VIR_CLOSE(ctl->log_fd) < 0) { - vshError(ctl, _("%s: failed to write log file: %s"), + vshError(ctl, _("%1$s: failed to write log file: %2$s"), ctl->logfile ? ctl->logfile : "?", g_strerror(errno)); } @@ -2406,7 +2406,7 @@ vshEditWriteToTempFile(vshControl *ctl, const char *d= oc) filename =3D g_strdup_printf("%s/virshXXXXXX.xml", tmpdir); fd =3D g_mkstemp_full(filename, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR); if (fd =3D=3D -1) { - vshError(ctl, _("g_mkstemp_full: failed to create temporary file: = %s"), + vshError(ctl, _("g_mkstemp_full: failed to create temporary file: = %1$s"), g_strerror(errno)); return NULL; } @@ -2414,12 +2414,12 @@ vshEditWriteToTempFile(vshControl *ctl, const char = *doc) ret =3D g_steal_pointer(&filename); =20 if (safewrite(fd, doc, strlen(doc)) =3D=3D -1) { - vshError(ctl, _("write: %s: failed to write to temporary file: %s"= ), + vshError(ctl, _("write: %1$s: failed to write to temporary file: %= 2$s"), ret, g_strerror(errno)); return NULL; } if (VIR_CLOSE(fd) < 0) { - vshError(ctl, _("close: %s: failed to write or close temporary fil= e: %s"), + vshError(ctl, _("close: %1$s: failed to write or close temporary f= ile: %2$s"), ret, g_strerror(errno)); return NULL; } @@ -2461,8 +2461,7 @@ vshEditFile(vshControl *ctl, const char *filename) if (strspn(editor, ACCEPTED_CHARS) !=3D strlen(editor)) { if (strspn(filename, ACCEPTED_CHARS) !=3D strlen(filename)) { vshError(ctl, - _("%s: temporary filename contains shell meta or othe= r " - "unacceptable characters (is $TMPDIR wrong?)"), + _("%1$s: temporary filename contains shell meta or ot= her unacceptable characters (is $TMPDIR wrong?)"), filename); return -1; } @@ -2490,7 +2489,7 @@ vshEditReadBackFile(vshControl *ctl, const char *file= name) =20 if (virFileReadAll(filename, VSH_MAX_XML_FILE, &ret) =3D=3D -1) { vshError(ctl, - _("%s: failed to read temporary file: %s"), + _("%1$s: failed to read temporary file: %2$s"), filename, g_strerror(errno)); return NULL; } @@ -2863,11 +2862,10 @@ vshReadlineInit(vshControl *ctl) /* Limit the total size of the history buffer */ if ((histsize_str =3D getenv(histsize_env))) { if (virStrToLong_i(histsize_str, NULL, 10, &max_history) < 0) { - vshError(ctl, _("Bad $%s value."), histsize_env); + vshError(ctl, _("Bad $%1$s value."), histsize_env); return -1; } else if (max_history > HISTSIZE_MAX || max_history < 0) { - vshError(ctl, _("$%s value should be between 0 " - "and %d"), + vshError(ctl, _("$%1$s value should be between 0 and %2$d"), histsize_env, HISTSIZE_MAX); return -1; } @@ -2893,7 +2891,7 @@ vshReadlineDeinit(vshControl *ctl) if (ctl->historyfile !=3D NULL) { if (g_mkdir_with_parents(ctl->historydir, 0755) < 0 && errno !=3D EEXIST) { - vshError(ctl, _("Failed to create '%s': %s"), + vshError(ctl, _("Failed to create '%1$s': %2$s"), ctl->historydir, g_strerror(errno)); } else { write_history(ctl->historyfile); @@ -2977,7 +2975,7 @@ vshInitDebug(vshControl *ctl) int debug; if (virStrToLong_i(debugEnv, NULL, 10, &debug) < 0 || debug < VSH_ERR_DEBUG || debug > VSH_ERR_ERROR) { - vshError(ctl, _("%s_DEBUG not set with a valid numeric val= ue"), + vshError(ctl, _("%1$s_DEBUG not set with a valid numeric v= alue"), ctl->env_prefix); } else { ctl->debug =3D debug; @@ -3101,7 +3099,7 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd) vshPrint(ctl, "%s", _("Grouped commands:\n\n")); =20 for (grp =3D cmdGroups; grp->name; grp++) { - vshPrint(ctl, _(" %s (help keyword '%s'):\n"), grp->name, + vshPrint(ctl, _(" %1$s (help keyword '%2$s'):\n"), grp->name, grp->keyword); =20 for (def =3D grp->commands; def->name; def++) { @@ -3125,7 +3123,7 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd) } else if ((grp =3D vshCmdGrpSearch(name))) { return vshCmdGrpHelp(ctl, grp); } else { - vshError(ctl, _("command or command group '%s' doesn't exist"), na= me); + vshError(ctl, _("command or command group '%1$s' doesn't exist"), = name); return false; } } @@ -3165,7 +3163,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd) dir =3D "/"; =20 if (chdir(dir) =3D=3D -1) { - vshError(ctl, _("cd: %s: %s"), + vshError(ctl, _("cd: %1$s: %2$s"), g_strerror(errno), dir); return false; } @@ -3282,7 +3280,7 @@ cmdPwd(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUS= ED) { g_autofree char *cwd =3D g_get_current_dir(); =20 - vshPrint(ctl, _("%s\n"), cwd); + vshPrint(ctl, _("%1$s\n"), cwd); =20 return true; } diff --git a/tools/vsh.h b/tools/vsh.h index 657a1e7a93..51f09cd2b0 100644 --- a/tools/vsh.h +++ b/tools/vsh.h @@ -486,7 +486,7 @@ void vshReadlineHistoryAdd(const char *cmd); */ #define VSH_EXCLUSIVE_OPTIONS_EXPR(NAME1, EXPR1, NAME2, EXPR2) \ if ((EXPR1) && (EXPR2)) { \ - vshError(ctl, _("Options --%s and --%s are mutually exclusive"), \ + vshError(ctl, _("Options --%1$s and --%2$s are mutually exclusive"= ), \ NAME1, NAME2); \ return false; \ } @@ -541,7 +541,7 @@ void vshReadlineHistoryAdd(const char *cmd); bool _expr2 =3D EXPR2; \ VSH_EXCLUSIVE_OPTIONS_EXPR(NAME1, _expr1, NAME2, _expr2); \ if (!_expr1 && !_expr2) { \ - vshError(ctl, _("Either --%s or --%s must be provided"), \ + vshError(ctl, _("Either --%1$s or --%2$s must be provided"), \ NAME1, NAME2); \ return false; \ } \ @@ -565,7 +565,7 @@ void vshReadlineHistoryAdd(const char *cmd); #define VSH_REQUIRE_OPTION_EXPR(NAME1, EXPR1, NAME2, EXPR2) \ do { \ if ((EXPR1) && !(EXPR2)) { \ - vshError(ctl, _("Option --%s is required by option --%s"), \ + vshError(ctl, _("Option --%1$s is required by option --%2$s"),= \ NAME2, NAME1); \ return false; \ } \ --=20 2.39.2 From nobody Fri Apr 19 05:30:58 2024 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=1678464763; cv=none; d=zohomail.com; s=zohoarc; b=nYrYnyW8BEi+9dElpyyNfFMtcjf264Kv/8DAgYKJ8e3nlUGxWhKrpmBDeWowFUf737LdMd7HTkib6lI2c3PGI8ftSNnOjlm/2vyIT0TJzQ7m/w+nLjV8cGobW9p8+9ccL+frpvCFbPeXZ6QoISD9GatHPR9DwfTcakBctLY6fo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464763; 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=9P6l4/ThumKmtdA1fAKQV9Wgw+jdUrBOOf9/G69Dlhc=; b=ZgwpjjOrRB8Z13XMEIHLNCAj+hrZHtFfpBK1Eimgg+EEMU9rxhYaSzIM8lK50s+aj3DjXmN+6JXDdYtGS25/sPQrcwkDJ+tVSXPgWIhWvjrH+j+0LRrvezQ8vSmxnRpAX/ZMfr8ozrnBOQLovjRwpiGxEZIs03+/uX2vOw2I1IM= 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 1678464763572721.9911428313678; Fri, 10 Mar 2023 08:12:43 -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-483-SefiuXFzPBqs9AqJ0EajBg-1; Fri, 10 Mar 2023 11:11:38 -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 04564886C71; Fri, 10 Mar 2023 16:11:19 +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 E36DF440DF; 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 D56F41946A6F; Fri, 10 Mar 2023 16:11:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 836DD1946A54 for ; Fri, 10 Mar 2023 16:11:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 69AFE492B08; Fri, 10 Mar 2023 16:11:17 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BAD8492B04 for ; Fri, 10 Mar 2023 16:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464762; 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=9P6l4/ThumKmtdA1fAKQV9Wgw+jdUrBOOf9/G69Dlhc=; b=fqEmLjgc+O5c7SrpWIDg4vrlc5Ectnr8pdMTp5N9E4/x1+dqB2fvUP4AvP/EOBMQFD95Gj YiZJwTcctCiYBYigRimp8qldvZr4UvsrRoaWp01Y5t/QhRhiQR2Bb6MVgduW+IOgzmQSSP 7MsyYZD/+9urT2/IUtWt3k5wy+ZHWEA= X-MC-Unique: SefiuXFzPBqs9AqJ0EajBg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 50/51] build: Add checks for permutable format strings Date: Fri, 10 Mar 2023 17:10:06 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1678464765453100001 Content-Type: text/plain; charset="utf-8" Since all messages marked for translation contain permutable format strings, we can add checks for enforcing them. The syntax check does not catch all cases as it only checks format strings between _(" and the first ". In other words messages where \" appears before the first format string or multi-line messages where the first format strings is not in the first line will not be checked. On the other hand, it's run automatically by "meson test". check-pot.py python script will detect all incorrect format strings, but it's not as easy to use as it requires libvirt.pot to be regenerated and this does not happen during a standard build. The following steps are needed to check messages with check-pot.py: meson compile libvirt-pot-dep meson compile libvirt-pot meson compile libvirt-pot-check Don't forget to revert changes to libvirt.pot if you run these commands locally as we don't want each patch series to update libvirt.pot. Shell scripts (tools/libvirt-guests.sh.in is the only one currently) need to be exempt from this check as shell's printf function does not understand the permutable format strings. Signed-off-by: Jiri Denemark --- build-aux/syntax-check.mk | 5 ++++ po/meson.build | 8 ++++++ scripts/check-pot.py | 54 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100755 scripts/check-pot.py diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 21f6b311ce..5829dc9011 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -455,6 +455,11 @@ sc_prohibit_diagnostic_without_format: { echo 'found diagnostic without %' 1>&2; \ exit 1; } || : =20 +sc_require_permutable_format_in_translation: + @prohibit=3D'\ (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 1678464848743993.5040595203134; Fri, 10 Mar 2023 08:14:08 -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-672-nRk82OoIOPy9PdKnsFwXig-1; Fri, 10 Mar 2023 11:11:32 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6554E18A6466; Fri, 10 Mar 2023 16:11:24 +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 533302166B26; Fri, 10 Mar 2023 16:11:24 +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 32C081946A7B; Fri, 10 Mar 2023 16:11:24 +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 0D58119472E3 for ; Fri, 10 Mar 2023 16:11:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 630EF4051E46; Fri, 10 Mar 2023 16:11:18 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 205704029A7A for ; Fri, 10 Mar 2023 16:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464847; 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=Lmr8ziH8p/6GKXlXBPhgJf/Cgbdgei+m8/UFpP+oIMk=; b=E2OY+gk/U6/jVZntBV9NU1oSdhv6p/fhOSt/h+DVwShSRlTA9WErjy/qpr5Zy50s4hqsic p8pTnZKzhmi8V+6acsI4m3VX9XPGhGvC5hTJqOozchJtYHww03NaJhddvATJNhhRYZ3o9y l93qA71dv5oxC7Btd0odIU4gsq9wmzI= X-MC-Unique: nRk82OoIOPy9PdKnsFwXig-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 51/51] ci: Run libvirt-pot-check in potfile job Date: Fri, 10 Mar 2023 17:10:07 +0100 Message-Id: <08758f700c7ffe2cf8f6a2f423cfce50469f6d36.1678463799.git.jdenemar@redhat.com> 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.6 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: 1678464850030100003 Content-Type: text/plain; charset="utf-8" The potfile job will fail unless all format strings are permutable (checked by meson compile libvirt-pot-check). Signed-off-by: Jiri Denemark --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b72ebc493..cbaa6a5344 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -155,6 +155,7 @@ potfile: - meson setup build --werror || (cat build/meson-logs/meson-log.txt &&= exit 1) - ninja -C build libvirt-pot-dep - ninja -C build libvirt-pot + - ninja -C build libvirt-pot-check - cp po/libvirt.pot libvirt.pot artifacts: expose_as: 'Potfile' --=20 2.39.2