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

Daniel P. Berrange berrange at redhat.com
Fri Jul 20 14:11:35 UTC 2012


From: "Daniel P. Berrange" <berrange at 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




More information about the libvir-list mailing list