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

[libvirt] [PATCH 1/3] Ensure failure to talk to Xen hypervisor is fatal when privileged



From: "Daniel P. Berrange" <berrange redhat com>

As per the comment, the Xen hypervisor driver is considered to
be mandatory when running privileged. When it fails to open,
we should thus return an error, not ignore it.
---
 src/xen/xen_driver.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 9ff3d29..43b2620 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -340,6 +340,8 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
         if (xenHypervisorOpen(conn, auth, flags) == VIR_DRV_OPEN_SUCCESS) {
             VIR_DEBUG("Activated hypervisor sub-driver");
             priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] = 1;
+        } else {
+            goto fail;
         }
     }
 
-- 
1.7.10.4


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