Re: [libvirt] PATCH: 11/11: Optional dlopen() support for all drivers

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

 



This patch adds full support for dlopen()'ing of individual drivers.

 - configure.in gains a new command line flag --with-driver-modules.
   It defaults to off, producing a monolithic build. If enabled, it
   checks dlopen() in -ldl and dlfcn.h

 - src/Makefile.am if the WITH_DRIVER_MODULES conditional is defined,
   then instead of building each driver as a libtool convenience
   library and linking them into libvirt.la , they are instead build
   as libtool modules, and installed to $PREFIX/lib/libvirt/drivers/

 - qemud/Makefile.am if the WITH_DRIVER_MODULES conditional is defined
   then don't link to the libtool convenience library for qemu/lxc/etc

 - libvirt_sym.version.in: Since we're loading drivers at runtime, we
   need to export more of our internal symbols. We'd already exported
   the vast majority in the previous patch to enable libvirtd to link
   to lxc, qemu, storage & network drivers. This just adds the few more
   used by the xen, remote & test drivers.

 - Renames qemudRegister() to qemuRegister() and xenUnifiedRegister()
   to just xenRegister(), so the prefix matches the module name

 - driver.c adds a virDriverLoadModule() method which given a module
   name like 'qemu', loads a file libvirt_driver_$NAME.so and runs
   the symbols ${NAME}Register(). It looks in $PREFIX/lib/libvirt/drivers/
   by default, but can be override with LIBVIRT_DRIVER_DIR env variable
   eg, point it to $SOURCETREE/src/.libs to run against a non-installed
   libvirt build.

 - libvirt.c/qemud.c, if WITH_DRIVER_MODULES is defined, then instead
   of calling the XXXRegister() methods directly, call virDriverLoadModule()
   for each module

So, as an example, having built with --enable-driver-modules, you can
run the daemon directly from source tree with

# LIBVIRT_DRIVER_DIR=`pwd`/src/.libs  LIBVIRT_DEBUG=1 ./qemud/libvirtd 
DEBUG: libvirt.c: virInitialize (register drivers)
DEBUG: libvirt.c: virRegisterDriver (registering Test as driver 0)
DEBUG: libvirt.c: virRegisterNetworkDriver (registering Test as network driver 0)
DEBUG: libvirt.c: virRegisterStorageDriver (registering Test as storage driver 0)
DEBUG: libvirt.c: virRegisterDriver (registering Xen as driver 1)
DEBUG: libvirt.c: virRegisterDriver (registering OPENVZ as driver 2)
DEBUG: libvirt.c: virRegisterDriver (registering remote as driver 3)
DEBUG: libvirt.c: virRegisterNetworkDriver (registering remote as network driver 1)
DEBUG: libvirt.c: virRegisterStorageDriver (registering remote as storage driver 1)
DEBUG: libvirt.c: virRegisterDriver (registering QEMU as driver 4)
DEBUG: libvirt.c: virRegisterDriver (registering LXC as driver 5)
DEBUG: libvirt.c: virRegisterNetworkDriver (registering Network as network driver 2)
DEBUG: libvirt.c: virRegisterStorageDriver (registering storage as storage driver 2)


And run virsh directly from source tree with

$ LIBVIRT_DEBUG=1 LIBVIRT_DRIVER_DIR=`pwd`/.libs  ./virsh --readonly --connect qemu:///system
DEBUG: libvirt.c: virInitialize (register drivers)
DEBUG: libvirt.c: virRegisterDriver (registering Test as driver 0)
DEBUG: libvirt.c: virRegisterNetworkDriver (registering Test as network driver 0)
DEBUG: libvirt.c: virRegisterStorageDriver (registering Test as storage driver 0)
DEBUG: libvirt.c: virRegisterDriver (registering Xen as driver 1)
DEBUG: libvirt.c: virRegisterDriver (registering OPENVZ as driver 2)
DEBUG: libvirt.c: virRegisterDriver (registering remote as driver 3)
DEBUG: libvirt.c: virRegisterNetworkDriver (registering remote as network driver 1)
DEBUG: libvirt.c: virRegisterStorageDriver (registering remote as storage driver 1)
DEBUG: libvirt.c: virConnectOpenAuth (name=qemu:///system, auth=0x3945e0, flags=1)
DEBUG: libvirt.c: do_open (name "qemu:///system" to URI components:
  scheme qemu
  opaque (null)
  authority (null)
  server (null)
  user (null)
  port 0
  path /system
)
DEBUG: libvirt.c: do_open (trying driver 0 (Test) ...)
DEBUG: libvirt.c: do_open (driver 0 Test returned DECLINED)
DEBUG: libvirt.c: do_open (trying driver 1 (Xen) ...)
DEBUG: libvirt.c: do_open (driver 1 Xen returned DECLINED)
DEBUG: libvirt.c: do_open (trying driver 2 (OPENVZ) ...)
DEBUG: libvirt.c: do_open (driver 2 OPENVZ returned DECLINED)
DEBUG: libvirt.c: do_open (trying driver 3 (remote) ...)
DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system)
DEBUG: remote_internal.c: doRemoteOpen (Adding Handler for remote events)
DEBUG: remote_internal.c: doRemoteOpen (virEventAddHandle failed: No addHandleImpl defined. continuing without events.)
DEBUG: libvirt.c: do_open (driver 3 remote returned SUCCESS)
DEBUG: libvirt.c: do_open (network driver 0 Test returned DECLINED)
DEBUG: libvirt.c: do_open (network driver 1 remote returned SUCCESS)
DEBUG: libvirt.c: do_open (storage driver 0 Test returned DECLINED)
DEBUG: libvirt.c: do_open (storage driver 1 remote returned SUCCESS)
Welcome to lt-virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh > 


That said, if you commonly run stuff directly from the source tree, you're
better off not building with modules, so you don't need to remember to
set the module path.


 b/src/driver.c             |   87 +++++++++++++++++++++++++++++++++++++++++++++
 configure.in               |   40 ++++++++++++++++++++
 qemud/Makefile.am          |    2 +
 qemud/qemud.c              |   18 ++++++++-
 src/Makefile.am            |   65 ++++++++++++++++++++++++++++++++-
 src/driver.h               |    2 +
 src/libvirt.c              |   22 ++++++++++-
 src/libvirt_sym.version.in |   74 +++++++++++++++++++++++++++++++++++++-
 src/qemu_driver.c          |    2 -
 src/qemu_driver.h          |    2 -
 src/xen_unified.c          |    4 +-
 src/xen_unified.h          |    2 -
 tests/Makefile.am          |    8 ++--
 13 files changed, 314 insertions(+), 14 deletions(-)

Daniel


diff -r 3af981530f52 configure.in
--- a/configure.in	Thu Oct 30 11:04:28 2008 +0000
+++ b/configure.in	Thu Oct 30 12:09:07 2008 +0000
@@ -1055,6 +1055,38 @@
 AC_CHECK_TOOL([WINDRES], [windres], [no])
 AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
 
+
+
+dnl Driver-Modules library
+AC_ARG_WITH([driver-modules],
+  [  --with-driver-modules       build drivers as loadable modules],
+  [],
+  [with_driver_modules=no])
+
+DRIVER_MODULES_CFLAGS=
+DRIVER_MODULES_LIBS=
+if test "x$with_driver_modules" = "xyes" ; then
+  old_cflags="$CFLAGS"
+  old_libs="$LIBS"
+  fail=0
+  AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
+  AC_CHECK_LIB([dl], [dlopen],[],[fail=1])
+  test $fail = 1 &&
+      AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
+
+  CFLAGS="$old_cflags"
+  LIBS="$old_libs"
+fi
+if test "$with_driver_modules" = "yes"; then
+  DRIVER_MODULES_CFLAGS="-export-dynamic"
+  DRIVER_MODULES_LIBS="-ldl"
+  AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
+fi
+AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
+AC_SUBST([DRIVER_MODULES_CFLAGS])
+AC_SUBST([DRIVER_MODULES_LIBS])
+
+
 # Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
 # we're building shared libraries.  This is the name of the directory
 # in which .o files will be created.
@@ -1110,6 +1142,14 @@
 AC_MSG_NOTICE([   iSCSI: $with_storage_iscsi])
 AC_MSG_NOTICE([    Disk: $with_storage_disk])
 AC_MSG_NOTICE([])
+AC_MSG_NOTICE([Driver Loadable Modules])
+AC_MSG_NOTICE([])
+if test "$with_driver_modules" != "no" ; then
+AC_MSG_NOTICE([  dlopen: $DRIVER_MODULES_CFLAGS $DRIVER_MODULES_LIBS])
+else
+AC_MSG_NOTICE([  dlopen: no])
+fi
+AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Libraries])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([  libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
diff -r 3af981530f52 qemud/Makefile.am
--- a/qemud/Makefile.am	Thu Oct 30 11:04:28 2008 +0000
+++ b/qemud/Makefile.am	Thu Oct 30 12:09:07 2008 +0000
@@ -92,6 +92,7 @@
 		../gnulib/lib/libgnu.la			\
 		../src/libvirt.la
 
+if ! WITH_DRIVER_MODULES
 if WITH_QEMU
 libvirtd_LDADD += ../src/libvirt_driver_qemu.la
 endif
@@ -106,6 +107,7 @@
 
 if WITH_NETWORK
 libvirtd_LDADD += ../src/libvirt_driver_network.la
+endif
 endif
 
 if HAVE_POLKIT
diff -r 3af981530f52 qemud/qemud.c
--- a/qemud/qemud.c	Thu Oct 30 11:04:28 2008 +0000
+++ b/qemud/qemud.c	Thu Oct 30 12:09:07 2008 +0000
@@ -61,6 +61,9 @@
 #include "mdns.h"
 #endif
 
+#ifdef WITH_DRIVER_MODULES
+#include "driver.h"
+#else
 #ifdef WITH_QEMU
 #include "qemu_driver.h"
 #endif
@@ -72,6 +75,7 @@
 #endif
 #ifdef WITH_STORAGE_DIR
 #include "storage_driver.h"
+#endif
 #endif
 
 
@@ -744,8 +748,19 @@
 
     virInitialize();
 
+#ifdef WITH_DRIVER_MODULES
+    /* We don't care if any of these fail, because the whole point
+     * is to allow users to only install modules they want to use.
+     * If they try to use a open a connection for a module that
+     * is not loaded they'll get a suitable error at that point
+     */
+    virDriverLoadModule("qemu");
+    virDriverLoadModule("lxc");
+    virDriverLoadModule("network");
+    virDriverLoadModule("storage");
+#else
 #ifdef WITH_QEMU
-    qemudRegister();
+    qemuRegister();
 #endif
 #ifdef WITH_LXC
     lxcRegister();
@@ -755,6 +770,7 @@
 #endif
 #ifdef WITH_STORAGE_DIR
     storageRegister();
+#endif
 #endif
 
     virEventRegisterImpl(virEventAddHandleImpl,
diff -r 3af981530f52 src/Makefile.am
--- a/src/Makefile.am	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/Makefile.am	Thu Oct 30 12:09:07 2008 +0000
@@ -6,7 +6,10 @@
 	   -I@top_srcdir@/include \
 	   -I@top_srcdir@/qemud \
 	   $(LIBXML_CFLAGS) \
+	   $(XEN_CFLAGS) \
 	   $(SELINUX_CFLAGS) \
+	   $(DRIVER_MODULE_CFLAGS) \
+	   -DLIBDIR=\""$(libdir)"\" \
 	   -DBINDIR=\""$(libexecdir)"\" \
 	   -DSBINDIR=\""$(sbindir)"\" \
 	   -DSYSCONF_DIR="\"$(sysconfdir)\"" \
@@ -30,6 +33,10 @@
 
 lib_LTLIBRARIES = libvirt.la
 
+moddir = $(libdir)/libvirt/drivers
+mod_LTLIBRARIES =
+
+
 # These files are not related to driver APIs. Simply generic
 # helper APIs for various purposes
 UTIL_SOURCES =							\
@@ -48,7 +55,7 @@
 
 # Internal generic driver infrastructure
 DRIVER_SOURCES = 						\
-		driver.h					\
+		driver.c driver.h				\
 		internal.h					\
 		datatypes.c datatypes.h				\
 		domain_event.c domain_event.h			\
@@ -162,67 +169,120 @@
 		$(STORAGE_CONF_SOURCES)
 
 if WITH_TEST
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_test.la
+else
 noinst_LTLIBRARIES += libvirt_driver_test.la
 libvirt_la_LIBADD += libvirt_driver_test.la
+endif
 libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
 endif
 
 if WITH_REMOTE
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_remote.la
+else
 noinst_LTLIBRARIES += libvirt_driver_remote.la
 libvirt_la_LIBADD += libvirt_driver_remote.la
+endif
 libvirt_driver_remote_la_CFLAGS =				\
 		$(GNUTLS_CFLAGS)				\
 		$(SASL_CFLAGS)
 libvirt_driver_remote_la_LDFLAGS =				\
 		$(GNUTLS_LIBS)					\
 		$(SASL_LIBS)
+if WITH_DRIVER_MODULES
+libvirt_driver_remote_la_LDFLAGS += -module -avoid-version
+endif
 libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
 endif
 
 if WITH_XEN
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_xen.la
+else
 noinst_LTLIBRARIES += libvirt_driver_xen.la
 libvirt_la_LIBADD += libvirt_driver_xen.la
+endif
 libvirt_driver_xen_la_CFLAGS = $(XEN_CFLAGS)
 libvirt_driver_xen_la_LDFLAGS = $(XEN_LIBS)
+if WITH_DRIVER_MODULES
+libvirt_driver_xen_la_LDFLAGS += -module -avoid-version
+endif
 libvirt_driver_xen_la_SOURCES = $(XEN_DRIVER_SOURCES)
 endif
 
 if WITH_OPENVZ
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_openvz.la
+else
 noinst_LTLIBRARIES += libvirt_driver_openvz.la
 libvirt_la_LIBADD += libvirt_driver_openvz.la
+endif
+if WITH_DRIVER_MODULES
+libvirt_driver_openvz_la_LDFLAGS = -module -avoid-version
+endif
 libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
 endif
 
 if WITH_QEMU
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_qemu.la
+else
 noinst_LTLIBRARIES += libvirt_driver_qemu.la
 # Stateful, so linked to daemon instead
 #libvirt_la_LIBADD += libvirt_driver_qemu.la
+endif
 libvirt_driver_qemu_la_CFLAGS = $(NUMACTL_CFLAGS)
 libvirt_driver_qemu_la_LDFLAGS = $(NUMACTL_LIBS)
+if WITH_DRIVER_MODULES
+libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version
+endif
 libvirt_driver_qemu_la_SOURCES = $(QEMU_DRIVER_SOURCES)
 endif
 
 if WITH_LXC
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_lxc.la
+else
 noinst_LTLIBRARIES += libvirt_driver_lxc.la
 # Stateful, so linked to daemon instead
 #libvirt_la_LIBADD += libvirt_driver_lxc.la
+endif
+if WITH_DRIVER_MODULES
+libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version
+endif
 libvirt_driver_lxc_la_SOURCES = $(LXC_DRIVER_SOURCES)
 endif
 
 
 if WITH_NETWORK
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_network.la
+else
 noinst_LTLIBRARIES += libvirt_driver_network.la
 # Stateful, so linked to daemon instead
 #libvirt_la_LIBADD += libvirt_driver_network.la
+endif
+if WITH_DRIVER_MODULES
+libvirt_driver_network_la_LDFLAGS = -module -avoid-version
+endif
 libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
 endif
 
 # Needed to keep automake quiet about conditionals
 libvirt_driver_storage_la_SOURCES =
 if WITH_STORAGE_DIR
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_storage.la
+else
 noinst_LTLIBRARIES += libvirt_driver_storage.la
 # Stateful, so linked to daemon instead
 #libvirt_la_LIBADD += libvirt_driver_storage.la
+endif
+if WITH_DRIVER_MODULES
+libvirt_driver_storage_la_LDFLAGS = -module -avoid-version
+endif
 libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
 libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
 endif
@@ -257,7 +317,8 @@
 
 # Empty source list - it merely links a bunch of convenience libs together
 libvirt_la_SOURCES =
-libvirt_la_LIBADD += $(LIBXML_LIBS) $(SELINUX_LIBS) \
+libvirt_la_LIBADD += $(LIBXML_LIBS) $(XEN_LIBS) $(SELINUX_LIBS) \
+		    $(DRIVER_MODULE_LIBS) \
 		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
 libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
                      -version-info @LIBVIRT_VERSION_INFO@ \
diff -r 3af981530f52 src/driver.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/driver.c	Thu Oct 30 12:09:07 2008 +0000
@@ -0,0 +1,87 @@
+/*
+ * driver.c: Helpers for loading drivers
+ *
+ * Copyright (C) 2006-2008 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ */
+
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "driver.h"
+#include "memory.h"
+
+#define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/drivers"
+
+#ifdef WITH_DRIVER_MODULES
+
+/* XXX re-implment this for other OS, or use libtools helper lib ? */
+
+#include <dlfcn.h>
+
+void *
+virDriverLoadModule(const char *name)
+{
+    const char *moddir = getenv("LIBVIRT_DRIVER_DIR");
+    char *modfile, *regfunc;
+    void *handle;
+    int (*regsym)(void);
+
+    if (moddir == NULL)
+        moddir = DEFAULT_DRIVER_DIR;
+
+    if (asprintf(&modfile, "%s/libvirt_driver_%s.so", moddir, name) < 0)
+        return NULL;
+
+    if (access(modfile, R_OK) < 0) {
+        VIR_FREE(modfile);
+        return NULL;
+    }
+
+    handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
+    VIR_FREE(modfile);
+    if (!handle) {
+        fprintf(stderr, "failed to load module %s\n", dlerror());
+        return NULL;
+    }
+
+    if (asprintf(&regfunc, "%sRegister", name) < 0) {
+        dlclose(handle);
+        return NULL;
+    }
+
+    regsym = dlsym(handle, regfunc);
+    VIR_FREE(regfunc);
+    if (!regsym) {
+        dlclose(handle);
+        return NULL;
+    }
+
+    if ((*regsym)() < 0) {
+        dlclose(handle);
+        return NULL;
+    }
+
+    return handle;
+}
+
+
+/* XXX unload modules, but we can't until we can unregister libvirt drivers */
+
+#endif
diff -r 3af981530f52 src/driver.h
--- a/src/driver.h	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/driver.h	Thu Oct 30 12:09:07 2008 +0000
@@ -8,6 +8,7 @@
 
 #include <libxml/uri.h>
 
+#include "internal.h"
 /*
  * List of registered drivers numbers
  */
@@ -618,5 +619,6 @@
 #ifdef WITH_LIBVIRTD
 int virRegisterStateDriver(virStateDriverPtr);
 #endif
+void *virDriverLoadModule(const char *name);
 
 #endif /* __VIR_DRIVER_H__ */
diff -r 3af981530f52 src/libvirt.c
--- a/src/libvirt.c	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/libvirt.c	Thu Oct 30 12:09:07 2008 +0000
@@ -40,6 +40,7 @@
 #include "util.h"
 #include "memory.h"
 
+#ifndef WITH_DRIVER_MODULES
 #ifdef WITH_TEST
 #include "test.h"
 #endif
@@ -51,6 +52,7 @@
 #endif
 #ifdef WITH_OPENVZ
 #include "openvz_driver.h"
+#endif
 #endif
 
 /*
@@ -273,11 +275,22 @@
      * Note that the order is important: the first ones have a higher
      * priority when calling virConnectOpen.
      */
+#ifdef WITH_DRIVER_MODULES
+    /* We don't care if any of these fail, because the whole point
+     * is to allow users to only install modules they want to use.
+     * If they try to use a open a connection for a module that
+     * is not loaded they'll get a suitable error at that point
+     */
+    virDriverLoadModule("test");
+    virDriverLoadModule("xen");
+    virDriverLoadModule("openvz");
+    virDriverLoadModule("remote");
+#else
 #ifdef WITH_TEST
     if (testRegister() == -1) return -1;
 #endif
 #ifdef WITH_XEN
-    if (xenUnifiedRegister () == -1) return -1;
+    if (xenRegister () == -1) return -1;
 #endif
 #ifdef WITH_OPENVZ
     if (openvzRegister() == -1) return -1;
@@ -285,6 +298,7 @@
 #ifdef WITH_REMOTE
     if (remoteRegister () == -1) return -1;
 #endif
+#endif
 
     return(0);
 }
@@ -461,6 +475,9 @@
         return(-1);
     }
 
+    DEBUG ("registering %s as network driver %d",
+           driver->name, virNetworkDriverTabCount);
+
     virNetworkDriverTab[virNetworkDriverTabCount] = driver;
     return virNetworkDriverTabCount++;
 }
@@ -488,6 +505,9 @@
         virLibConnError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__);
         return(-1);
     }
+
+    DEBUG ("registering %s as storage driver %d",
+           driver->name, virStorageDriverTabCount);
 
     virStorageDriverTab[virStorageDriverTabCount] = driver;
     return virStorageDriverTabCount++;
diff -r 3af981530f52 src/libvirt_sym.version.in
--- a/src/libvirt_sym.version.in	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/libvirt_sym.version.in	Thu Oct 30 12:09:07 2008 +0000
@@ -283,8 +283,12 @@
 	virCapabilitiesAddGuest;
 	virCapabilitiesAddGuestDomain;
 	virCapabilitiesAddGuestFeature;
+	virCapabilitiesAddHostMigrateTransport;
 	virCapabilitiesAddHostNUMACell;
+	virCapabilitiesAddHostFeature;
+	virCapabilitiesDefaultGuestArch;
 	virCapabilitiesDefaultGuestEmulator;
+	virCapabilitiesDefaultGuestMachine;
 	virCapabilitiesFormatXML;
 	virCapabilitiesFree;
 	virCapabilitiesNew;
@@ -296,6 +300,7 @@
 	virConfReadFile;
 	virConfReadMem;
 	virConfFree;
+	virConfFreeValue;
 	virConfGetValue;
 	virConfSetValue;
 	virConfWriteFile;
@@ -307,6 +312,7 @@
 	virGetNetwork;
 	virGetStoragePool;
 	virGetStorageVol;
+	virUnrefDomain;
 
 
 	/* domain_conf.h */
@@ -314,14 +320,22 @@
 	virDiskNameToIndex;
 	virDomainAssignDef;
 	virDomainConfigFile;
+	virDomainCpuSetFormat;
+	virDomainCpuSetParse;
+	virDomainChrDefFree;
+	virDomainChrTypeFromString;
+	virDomainChrTypeToString;
 	virDomainDefDefaultEmulator;
 	virDomainDefFormat;
 	virDomainDefFree;
 	virDomainDefParseFile;
+	virDomainDefParseNode;
 	virDomainDefParseString;
 	virDomainDeleteConfig;
+	virDomainDeviceDefFree;
 	virDomainDeviceDefParse;
 	virDomainDiskBusTypeToString;
+	virDomainDiskDefFree;
 	virDomainDiskDeviceTypeToString;
 	virDomainDiskQSort;
 	virDomainEventCallbackListAdd;
@@ -330,12 +344,52 @@
 	virDomainFindByID;
 	virDomainFindByName;
 	virDomainFindByUUID;
+	virDomainGraphicsTypeFromString;
+	virDomainGraphicsDefFree;
+	virDomainInputDefFree;
+	virDomainLifecycleTypeFromString;
+	virDomainLifecycleTypeToString;
 	virDomainLoadAllConfigs;
+	virDomainNetDefFree;
+	virDomainObjFree;
 	virDomainObjListFree;
 	virDomainRemoveInactive;
 	virDomainSaveConfig;
+	virDomainSoundDefFree;
+	virDomainSoundModelTypeFromString;
 	virDomainSoundModelTypeToString;
 	virDomainVirtTypeToString;
+
+
+	/* domain_event.h */
+	virDomainEventQueueFree;
+	virDomainEventCallbackQueuePop;
+	virDomainEventCallbackQueuePush;
+
+
+	/* driver.h */
+	virDriverLoadModule;
+
+
+	/* event.h */
+	virEventAddHandle;
+	virEventAddTimeout;
+	virEventRemoveHandle;
+	virEventRemoveTimeout;
+	virEventUpdateHandle;
+	virEventUpdateTimeout;
+
+
+	/* hash.h */
+	virHashAddEntry;
+	virHashCreate;
+	virHashForEach;
+	virHashFree;
+	virHashLookup;
+	virHashRemoveEntry;
+	virHashRemoveSet;
+	virHashSearch;
+	virHashSize;
 
 
 	/* iptables.h */
@@ -391,12 +445,15 @@
 	virNetworkAssignDef;
 	virNetworkDefFormat;
 	virNetworkDefFree;
+	virNetworkDefParseFile;
+	virNetworkDefParseNode;
 	virNetworkDefParseString;
 	virNetworkDeleteConfig;
 	virNetworkFindByName;
 	virNetworkFindByUUID;
 	virNetworkLoadAllConfigs;
 	virNetworkObjListFree;
+	virNetworkDefParseNode;
 	virNetworkRemoveInactive;
 	virNetworkSaveConfig;
 
@@ -405,8 +462,15 @@
 	virNodeInfoPopulate;
 
 
+	/* qparams.h */
+	qparam_get_query;
+	qparam_query_parse;
+	free_qparam_set;
+
+
 	/* stats_linux.h */
 	linuxDomainInterfaceStats;
+	xenLinuxDomainBlockStats;
 
 
 	/* storage_backend.h */
@@ -465,20 +529,28 @@
 	virFileOpenTty;
 	virFileReadLimFD;
 	virFileReadPid;
+	virParseNumber;
 	virRun;
+	virSkipSpaces;
 
 
 	/* uuid.h */
 	virUUIDFormat;
+	virUUIDGenerate;
+	virUUIDParse;
 
 
 	/* virterror_internal.h */
+	virRaiseError;
 	virReportErrorHelper;
+	virErrorMsg;
 
 
 	/* xml.h */
+	virXPathLong;
+	virXPathNodeSet;
 	virXPathString;
-
+	virXMLPropString;
 
 	/* Finally everything else is totally private */
     local:
diff -r 3af981530f52 src/qemu_driver.c
--- a/src/qemu_driver.c	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/qemu_driver.c	Thu Oct 30 12:09:07 2008 +0000
@@ -3312,7 +3312,7 @@
     .active = qemudActive,
 };
 
-int qemudRegister(void) {
+int qemuRegister(void) {
     virRegisterDriver(&qemuDriver);
     virRegisterStateDriver(&qemuStateDriver);
     return 0;
diff -r 3af981530f52 src/qemu_driver.h
--- a/src/qemu_driver.h	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/qemu_driver.h	Thu Oct 30 12:09:07 2008 +0000
@@ -47,6 +47,6 @@
 #  define KVM_CAP_NR_VCPUS 9       /* returns max vcpus per vm */
 #endif
 
-int qemudRegister(void);
+int qemuRegister(void);
 
 #endif /* QEMUD_DRIVER_H */
diff -r 3af981530f52 src/xen_unified.c
--- a/src/xen_unified.c	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/xen_unified.c	Thu Oct 30 12:09:07 2008 +0000
@@ -1348,14 +1348,14 @@
 };
 
 /**
- * xenUnifiedRegister:
+ * xenRegister:
  *
  * Register xen related drivers
  *
  * Returns the driver priority or -1 in case of error.
  */
 int
-xenUnifiedRegister (void)
+xenRegister (void)
 {
     /* Ignore failures here. */
     (void) xenHypervisorInit ();
diff -r 3af981530f52 src/xen_unified.h
--- a/src/xen_unified.h	Thu Oct 30 11:04:28 2008 +0000
+++ b/src/xen_unified.h	Thu Oct 30 12:09:07 2008 +0000
@@ -22,7 +22,7 @@
 #include <winsock2.h>
 #endif
 
-extern int xenUnifiedRegister (void);
+extern int xenRegister (void);
 
 #define XEN_UNIFIED_HYPERVISOR_OFFSET 0
 #define XEN_UNIFIED_PROXY_OFFSET 1
diff -r 3af981530f52 tests/Makefile.am
--- a/tests/Makefile.am	Thu Oct 30 11:04:28 2008 +0000
+++ b/tests/Makefile.am	Thu Oct 30 12:09:07 2008 +0000
@@ -92,17 +92,17 @@
 xml2sexprtest_SOURCES = \
 	xml2sexprtest.c testutilsxen.c testutilsxen.h \
 	testutils.c testutils.h
-xml2sexprtest_LDADD = $(LDADDS)
+xml2sexprtest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
 
 sexpr2xmltest_SOURCES = \
 	sexpr2xmltest.c \
 	testutils.c testutils.h
-sexpr2xmltest_LDADD = $(LDADDS)
+sexpr2xmltest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
 
 xmconfigtest_SOURCES = \
 	xmconfigtest.c testutilsxen.c testutilsxen.h \
 	testutils.c testutils.h
-xmconfigtest_LDADD = $(LDADDS)
+xmconfigtest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
 
 qemuxml2argvtest_SOURCES = \
 	qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
@@ -125,7 +125,7 @@
 
 xencapstest_SOURCES = \
 	xencapstest.c testutils.h testutils.c
-xencapstest_LDADD = $(LDADDS)
+xencapstest_LDADD = ../src/libvirt_driver_xen.la $(LDADDS)
 
 nodeinfotest_SOURCES = \
 	nodeinfotest.c testutils.h testutils.c

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]