From defddd04768d5a60aed77b6915302c137e5b91c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 10 Jul 2019 11:43:04 +0100 Subject: [PATCH] libxl: remove obsolete check for xend during driver startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- src/libxl/libxl_driver.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 731700ded6..ac10fb6dbc 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -525,12 +525,10 @@ libxlStateCleanup(void) static bool libxlDriverShouldLoad(bool privileged) { - bool ret = false; - /* Don't load if non-root */ if (!privileged) { VIR_INFO("Not running privileged, disabling libxenlight driver"); - return ret; + return false; } if (virFileExists(HYPERVISOR_CAPABILITIES)) { @@ -549,31 +547,15 @@ libxlDriverShouldLoad(bool privileged) VIR_INFO("No Xen capabilities detected, probably not running " "in a Xen Dom0. Disabling libxenlight driver"); - return ret; + return false; } } else if (!virFileExists(HYPERVISOR_XENSTORED)) { VIR_INFO("Disabling driver as neither " HYPERVISOR_CAPABILITIES " nor " HYPERVISOR_XENSTORED " exist"); - return ret; + return false; } - /* Don't load if legacy xen toolstack (xend) is in use */ - 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; + return true; } /* Callbacks wrapping libvirt's event loop interface */