[PATCH 031/103] qemuBuildDeviceAddressPCIStr: Make error messages easier to find

Peter Krempa pkrempa at redhat.com
Thu Oct 7 15:17:19 UTC 2021


Per coding guidelines error messages should not be broken into lines and
variables should be separated by apostrophes.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_command.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index aeb04207b2..ee7a9f3060 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -345,9 +345,7 @@ qemuBuildDeviceAddressPCIStr(virBuffer *buf,

             if (!contAlias) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Device alias was not set for PCI "
-                                 "controller with index %u required "
-                                 "for device at address %s"),
+                               _("Device alias was not set for PCI controller with index '%u' required for device at address '%s'"),
                                info->addr.pci.bus, devStr);
                 return -1;
             }
@@ -372,9 +370,7 @@ qemuBuildDeviceAddressPCIStr(virBuffer *buf,

     if (!contAlias) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find PCI "
-                         "controller with index %u required "
-                         "for device at address %s"),
+                       _("Could not find PCI controller with index '%u' required for device at address '%s'"),
                        info->addr.pci.bus, devStr);
         return -1;
     }
-- 
2.31.1




More information about the libvir-list mailing list