]> xenbits.xensource.com Git - libvirt.git/commitdiff
Ensure failure to talk to Xen hypervisor is fatal when privileged
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 20 Jul 2012 13:52:44 +0000 (14:52 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 20 Jul 2012 14:07:09 +0000 (15:07 +0100)
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

index 9ff3d292d771385788e294220e838c41c88d8ef1..43b262061e78dc1a131dbdba2d375f6ac69094f0 100644 (file)
@@ -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;
         }
     }