From nobody Fri May 17 08:39:44 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1634787404627545.8758685899164; Wed, 20 Oct 2021 20:36:44 -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-83-MTyleNcINxSmC5petdKERw-1; Wed, 20 Oct 2021 23:36:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29AB4362F8; Thu, 21 Oct 2021 03:36:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0BD810016F5; Thu, 21 Oct 2021 03:36:10 +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 29C814A702; Thu, 21 Oct 2021 03:36:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19L3Ugj0006404 for ; Wed, 20 Oct 2021 23:30:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id CCEC0400F3C5; Thu, 21 Oct 2021 03:30:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C953040D1B9E for ; Thu, 21 Oct 2021 03:30:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 E406B18A6584 for ; Thu, 21 Oct 2021 03:30:41 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-QEn65ngOOY-VEQkHd_ZQhg-1; Wed, 20 Oct 2021 23:30:40 -0400 Received: by mail-pj1-f41.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so3888284pjb.5 for ; Wed, 20 Oct 2021 20:30:39 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([203.212.246.18]) by smtp.googlemail.com with ESMTPSA id fv9sm7533087pjb.26.2021.10.20.20.30.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 20:30:37 -0700 (PDT) X-MC-Unique: MTyleNcINxSmC5petdKERw-1 X-MC-Unique: QEn65ngOOY-VEQkHd_ZQhg-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=HwrdUEgG0daMlnjxQLyx8Eio+McV9+EwSFQy5HkJUs0=; b=mAKXn91hFle//GWzHEF+akc9c1aMZkhOkEPItmZixThGRspvbnwvAHiUaFSYOXWpQ4 sipVsTUlunb6CbLO6QLlEgG4jLyUashQcSyI0omq5/m8IzQjp4pQCHMM6ZoRH1Qq8ASR PoGzTcHuLginbVFHuarjqpQQ5itN+EpeQSlZh+cS8Jjs8A5xZ4s2lLkbl6oq7w3hSDXY IGvRcTjCwdAH48k5WOCkkWOk/GaI7yvnRcL4Ku2n2LDf3pVm7GmmMNcu7iwn3ffIvthB SwfMduS74wiAX3CytVGN5JOQvNqNuyk9Vfwy5A21tiBuNUWj80LZPpwDLS3ZwPlfNhoq 3TqQ== X-Gm-Message-State: AOAM5325ftxz/AzB08bb9zdDiHiNIiXg6TNQ/FTewiCqXYZngbAEKNYD 9m0LYTzlw3kFOzULKN/2qhwYMCXyr+hgdA== X-Google-Smtp-Source: ABdhPJwIhEW1gj4rRLMSoIyxlBH+ObqXSg/xbjcpUFc6PLBfPLSbrO+2RwX0y37pVKDZjKaxhbkj6A== X-Received: by 2002:a17:90b:4a0f:: with SMTP id kk15mr3617168pjb.34.1634787038371; Wed, 20 Oct 2021 20:30:38 -0700 (PDT) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH] i440fx/hotplug: Fix error message format to conform to spec Date: Thu, 21 Oct 2021 09:00:26 +0530 Message-Id: <20211021033026.228732-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: Ani Sinha 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.84 on 10.5.11.22 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: 1634787406891100001 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 makes some error messages conform to the spec above. Fixes: 8eadf82fb5 ("conf: introduce option to enable/disable pci hotplug on= pci-root controller") Signed-off-by: Ani Sinha Reviewed-by: Laine Stump --- 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 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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