From 489900e3de9de74ce4197807935ffc3ef8a68bca Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 20 Jul 2012 14:52:44 +0100 Subject: [PATCH] Ensure failure to talk to Xen hypervisor is fatal when privileged 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 9ff3d292d7..43b262061e 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; } } -- GitLab