libxl: remove obsolete check for xend during driver startup

No supported build targets for libvirt still ship xend, so there is no
need for the libxl driver to check for it anymore.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-07-10 11:43:04 +01:00
parent 6fc378c10e
commit defddd0476

View File

@ -525,12 +525,10 @@ libxlStateCleanup(void)
static bool static bool
libxlDriverShouldLoad(bool privileged) libxlDriverShouldLoad(bool privileged)
{ {
bool ret = false;
/* Don't load if non-root */ /* Don't load if non-root */
if (!privileged) { if (!privileged) {
VIR_INFO("Not running privileged, disabling libxenlight driver"); VIR_INFO("Not running privileged, disabling libxenlight driver");
return ret; return false;
} }
if (virFileExists(HYPERVISOR_CAPABILITIES)) { if (virFileExists(HYPERVISOR_CAPABILITIES)) {
@ -549,31 +547,15 @@ libxlDriverShouldLoad(bool privileged)
VIR_INFO("No Xen capabilities detected, probably not running " VIR_INFO("No Xen capabilities detected, probably not running "
"in a Xen Dom0. Disabling libxenlight driver"); "in a Xen Dom0. Disabling libxenlight driver");
return ret; return false;
} }
} else if (!virFileExists(HYPERVISOR_XENSTORED)) { } else if (!virFileExists(HYPERVISOR_XENSTORED)) {
VIR_INFO("Disabling driver as neither " HYPERVISOR_CAPABILITIES VIR_INFO("Disabling driver as neither " HYPERVISOR_CAPABILITIES
" nor " HYPERVISOR_XENSTORED " exist"); " nor " HYPERVISOR_XENSTORED " exist");
return ret; return false;
} }
/* Don't load if legacy xen toolstack (xend) is in use */ return true;
if (virFileExists("/usr/sbin/xend")) {
virCommandPtr cmd;
cmd = virCommandNewArgList("/usr/sbin/xend", "status", NULL);
if (virCommandRun(cmd, NULL) == 0) {
VIR_INFO("Legacy xen tool stack seems to be in use, disabling "
"libxenlight driver.");
} else {
ret = true;
}
virCommandFree(cmd);
} else {
ret = true;
}
return ret;
} }
/* Callbacks wrapping libvirt's event loop interface */ /* Callbacks wrapping libvirt's event loop interface */