From nobody Sun May 5 05:05:19 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 1634531547185383.85266984467376; Sun, 17 Oct 2021 21:32:27 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-532-ebcMmgKMNhyPqjXVkf2jUA-1; Mon, 18 Oct 2021 00:32:24 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 09CC918D6A25; Mon, 18 Oct 2021 04:32:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6649D7092D; Mon, 18 Oct 2021 04:32:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 74AEF1809C84; Mon, 18 Oct 2021 04:32:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19I4WAxI031441 for ; Mon, 18 Oct 2021 00:32:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id C0E1210E60EE; Mon, 18 Oct 2021 04:32:10 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBB5F10E60F2 for ; Mon, 18 Oct 2021 04:32:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F97F8032EB for ; Mon, 18 Oct 2021 04:32:05 +0000 (UTC) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-381-7zn3oEwhNjynDCKK5-MIvw-1; Mon, 18 Oct 2021 00:32:03 -0400 Received: by mail-pl1-f173.google.com with SMTP id 21so10313574plo.13 for ; Sun, 17 Oct 2021 21:32:02 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.110.23]) by smtp.googlemail.com with ESMTPSA id g10sm11478577pfc.213.2021.10.17.21.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 21:32:01 -0700 (PDT) X-MC-Unique: ebcMmgKMNhyPqjXVkf2jUA-1 X-MC-Unique: 7zn3oEwhNjynDCKK5-MIvw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EJ4VGGjOMvr9/egLKgUp5DyZX5sYLuDfaJeJLnCwYZU=; b=AEoppnT6efij7iDwA3j90KCFS76EPhZStgYSVju9nMprD0Oog1YIENljXVKdBSe1l3 5Wh95NomFFFynGR9pitzlBoO6ckNRVnWmoFinQXeJf51fl6FOXjvA0K5hz9pzDK/jFZh mEAE65qcKkucvKmHaa+tWWZR5uvzoMolXXpq+X6Q42SxlopWEXdl5z3lzyPOyw+OC0Wj FMQp/aQTWeALzqw0AyqI1WDUogRkH0LoczmRUUgrK2irOCKxNGlfon5wj6k7gE8s7X6a 2qal5V6+kIAgr+iBynbWrK5oceg5D5Pn/zvHZRFfsoUHjPyRat83VBQNBM9g4fGNggy4 TmhQ== X-Gm-Message-State: AOAM530nccwmdZW9GDNzxL3x03tFzLXuqWEsiFtbEFmeaAr/sgUxbBuS 4Xf8eQ1mwzP+dVb5IYpQXm0fqS6dgBCgdQ== X-Google-Smtp-Source: ABdhPJzsuQqvn70wucnmOS++M4ejeBui4MLqEm6WN1D8JqKorBnP3bwwR+qtmmnzWrgbL/UN/77/jg== X-Received: by 2002:a17:90a:f68a:: with SMTP id cl10mr21446671pjb.39.1634531521627; Sun, 17 Oct 2021 21:32:01 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH] acpi/hotplug: Fix error message format to conform to spec Date: Mon, 18 Oct 2021 10:01:49 +0530 Message-Id: <20211018043149.43871-1-ani@anisinha.ca> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Ani Sinha , pkrempa@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1634531548916100001 Content-Type: text/plain; charset="utf-8" Error messages must conform to spec as specified here: https://www.libvirt.org/coding-style.html#error-message-format This change encloses format specifiers in quotes and unbreaks error message= s. Fixes: 8eadf82fb5 ("conf: introduce option to enable/disable pci hotplug on= pci-root controller") Fixes: 7300ccc9b3 ("conf: introduce support for acpi-bridge-hotplug feature= ") Signed-off-by: Ani Sinha --- src/conf/domain_conf.c | 6 ++---- src/qemu/qemu_validate.c | 6 +++--- .../pc-i440fx-acpi-root-hotplug-disable.x86_64-5.1.0.err | 2 +- .../pc-i440fx-acpi-root-hotplug-enable.x86_64-5.1.0.err | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6fcf86ba58..d5de07d13d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17557,8 +17557,7 @@ virDomainFeaturesPCIDefParse(virDomainDef *def, feature =3D virDomainPCITypeFromString((const char *)node->name); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported PCI feature: %s"), - node->name); + _("unsupported PCI feature: '%s'"), node->name); return -1; } =20 @@ -21833,8 +21832,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_PCI_ACPI_BRIDGE_HOTPLUG: if (src->pci_features[i] !=3D dst->pci_features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("State of PCI feature '%s' differs: " - "source: '%s', destination: '%s'"), + _("State of PCI feature '%s' differs: s= ource: '%s', destination: '%s'"), virDomainPCITypeToString(i), virTristateSwitchTypeToString(src->pci_= features[i]), virTristateSwitchTypeToString(dst->pci_= features[i])); diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3045e4b64b..f93b697265 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3947,7 +3947,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' device= is not supported by this QEMU binary"), + _("setting the '%s' property on a '%s' devi= ce is not supported by this QEMU binary"), "hotplug", "pci-root"); return -1; } @@ -3956,8 +3956,8 @@ 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 hotplug property on a '%s' d= evice is not supported by this QEMU binary"), - modelName); + _("setting the '%s' property on a '%s' devi= ce is not supported by this QEMU binary"), + "hotplug", modelName); return -1; } break; diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.x86= _64-5.1.0.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.= x86_64-5.1.0.err index b507f1f8bc..55ec41c476 100644 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-5.1= .0.err +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-5.1= .0.err @@ -1 +1 @@ -unsupported configuration: setting the hotplug property on a 'pci-root' de= vice is not supported by this QEMU binary +unsupported configuration: setting the 'hotplug' property on a 'pci-root' = device is not supported by this QEMU binary diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x86_= 64-5.1.0.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x8= 6_64-5.1.0.err index b507f1f8bc..55ec41c476 100644 --- a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-5.1.= 0.err +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-5.1.= 0.err @@ -1 +1 @@ -unsupported configuration: setting the hotplug property on a 'pci-root' de= vice is not supported by this QEMU binary +unsupported configuration: setting the 'hotplug' property on a 'pci-root' = device is not supported by this QEMU binary --=20 2.25.1