[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Fix legacy xen driver when building without modules



When building without driver modules, I've noticed that the legacy xen
driver no longer works.  The attached patch fixes it, but I'm not sure
if this is the correct fix.  I need to do some more testing with and
without modules, but wanted to raise this on the list for
comments/suggestions.

Thanks,
Jim


>From 436748eb3c3b3f478471ae045c06892283697ddf Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig suse com>
Date: Wed, 29 Aug 2012 11:54:29 -0600
Subject: [PATCH] Fix legacy xen driver when building without modules

Commit 1c275e9a removed the legacy xen driver, which is stateless
and can be a client-side driver.
---
 src/Makefile.am |    3 +--
 src/libvirt.c   |    6 ++++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 95e1bea..7a0249f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -756,8 +756,7 @@ libvirt_driver_xen_la_LIBADD += ../gnulib/lib/libgnu.la
 libvirt_driver_xen_la_LDFLAGS = -module -avoid-version
 else
 noinst_LTLIBRARIES += libvirt_driver_xen.la
-# Stateful, so linked to daemon instead
-#libvirt_la_BUILT_LIBADD += libvirt_driver_xen.la
+libvirt_la_BUILT_LIBADD += libvirt_driver_xen.la
 endif
 
 libvirt_driver_xen_impl_la_CFLAGS =					\
diff --git a/src/libvirt.c b/src/libvirt.c
index b034ed6..1361990 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -59,6 +59,9 @@
 #ifdef WITH_TEST
 # include "test/test_driver.h"
 #endif
+#ifdef WITH_XEN
+#include "xen/xen_driver.h"
+#endif
 #ifdef WITH_REMOTE
 # include "remote/remote_driver.h"
 #endif
@@ -434,6 +437,9 @@ virInitialize(void)
 #ifdef WITH_TEST
     if (testRegister() == -1) return -1;
 #endif
+#ifdef WITH_XEN
+    if (xenRegister () == -1) return -1;
+#endif
 #ifdef WITH_OPENVZ
     if (openvzRegister() == -1) return -1;
 #endif
-- 
1.7.10.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]