]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix hotplug error message format to conform to spec
authorAni Sinha <ani@anisinha.ca>
Thu, 21 Oct 2021 03:30:26 +0000 (09:00 +0530)
committerLaine Stump <laine@redhat.com>
Tue, 26 Oct 2021 03:42:01 +0000 (23:42 -0400)
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 <ani@anisinha.ca>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_validate.c
tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.x86_64-5.1.0.err
tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.x86_64-5.1.0.err

index 98956c3eb9337cdc09873d8eba7b7b8bb55c3f18..c4384dbe8b8d3846a9636d39a635e1c77d53c12e 100644 (file)
@@ -3906,7 +3906,7 @@ qemuValidateDomainDeviceDefControllerPCI(const virDomainControllerDef *cont,
         case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
             if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG)) {
                 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' device is not supported by this QEMU binary"),
                                "hotplug", "pci-root");
                 return -1;
             }
@@ -3915,8 +3915,8 @@ qemuValidateDomainDeviceDefControllerPCI(const virDomainControllerDef *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' device is not supported by this QEMU binary"),
-                               modelName);
+                               _("setting the '%s' property on a '%s' device is not supported by this QEMU binary"),
+                               "hotplug", modelName);
                 return -1;
             }
             break;
index b507f1f8bca784d6cdafa278b13d6c8594e95ef7..55ec41c476b2f26bbcae5f2999af8810857936b5 100644 (file)
@@ -1 +1 @@
-unsupported configuration: setting the hotplug property on a 'pci-root' device 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
index b507f1f8bca784d6cdafa278b13d6c8594e95ef7..55ec41c476b2f26bbcae5f2999af8810857936b5 100644 (file)
@@ -1 +1 @@
-unsupported configuration: setting the hotplug property on a 'pci-root' device 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