From 1285a266c106ebac3fc6d1a7d5bf839a7623a5a0 Mon Sep 17 00:00:00 2001
From: Daniel P. Berrangé <berrange@redhat.com>
Date: Mon, 4 May 2020 17:41:46 +0100
Subject: [PATCH] remote: fix driver name check for libxl driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The virConnectGetType() returns "Xen" for libxl, not "LIBXL".

This prevents users opening a connection to the libxl driver when using
the modular daemons.

cherry-pick from commit: d677de9d567e3e87be295b91723457b461345caa

Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jin Yan <jinyan12@huawei.com>
---
 src/remote/remote_daemon_dispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index c5506c2..d2652e3 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -2111,7 +2111,7 @@ remoteDispatchConnectOpen(virNetServerPtr server G_GNUC_UNUSED,
 
     VIR_DEBUG("Primary driver type is '%s'", type);
     if (STREQ(type, "QEMU") ||
-        STREQ(type, "LIBXL") ||
+        STREQ(type, "Xen") ||
         STREQ(type, "LXC") ||
         STREQ(type, "VBOX") ||
         STREQ(type, "bhyve") ||
-- 
1.8.3.1

