[PATCH] qemu: Report error on failure to set isolation group

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is more user-friendly because the error will be
displayed directly instead of being buried in the log.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/qemu/qemu_domain_address.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 8066ed123..16bf0cdf9 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1012,10 +1012,11 @@ qemuDomainFillDeviceIsolationGroup(virDomainDefPtr def,
         tmp = virPCIDeviceAddressGetIOMMUGroupNum(hostAddr);
 
         if (tmp < 0) {
-            VIR_WARN("Can't look up isolation group for host device "
-                     "%04x:%02x:%02x.%x",
-                     hostAddr->domain, hostAddr->bus,
-                     hostAddr->slot, hostAddr->function);
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("Can't look up isolation group for host device "
+                             "%04x:%02x:%02x.%x"),
+                           hostAddr->domain, hostAddr->bus,
+                           hostAddr->slot, hostAddr->function);
             goto cleanup;
         }
 
@@ -1056,9 +1057,11 @@ qemuDomainFillDeviceIsolationGroup(virDomainDefPtr def,
         tmp = qemuDomainFindUnusedIsolationGroup(def);
 
         if (tmp == 0) {
-            VIR_WARN("Can't obtain usable isolation group for interface "
-                     "configured to use hostdev-backed network '%s'",
-                     iface->data.network.name);
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("Can't obtain usable isolation group for "
+                             "interface configured to use hostdev-backed "
+                             "network '%s'"),
+                             iface->data.network.name);
             goto cleanup;
         }
 
-- 
2.13.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux