diff -ur ./libvirt_org/src/libvirt.c ./libvirt/src/libvirt.c

--- ./libvirt_org/src/libvirt.c 2010-02-17 17:38:08.000000000 +0000

+++ ./libvirt/src/libvirt.c     2010-02-18 12:21:43.000000000 +0000

@@ -64,6 +64,9 @@

 #ifdef WITH_ESX

 #include "esx/esx_driver.h"

 #endif

+#ifdef WITH_XENAPI

+#include "xenapi/xenapi_driver.h"

+#endif

 #endif

 

 #define VIR_FROM_THIS VIR_FROM_NONE

@@ -357,6 +360,7 @@

     virDriverLoadModule("openvz");

     virDriverLoadModule("vbox");

     virDriverLoadModule("esx");

+    virDriverLoadModule("xenapi");

     virDriverLoadModule("remote");

 #else

 #ifdef WITH_TEST

@@ -377,6 +381,9 @@

 #ifdef WITH_ESX

     if (esxRegister() == -1) return -1;

 #endif

+#ifdef WITH_XENAPI

+    if (xenapiRegister () == -1) return -1;

+#endif

 #ifdef WITH_REMOTE

     if (remoteRegister () == -1) return -1;

 #endif

@@ -1035,6 +1042,10 @@

         if (STRCASEEQ(type, "Remote"))

             *typeVer = remoteVersion();

 #endif

+#if WITH_XENAPI

+        if (STRCASEEQ(type, "XenAPI"))

+            *typeVer = LIBVIR_VERSION_NUMBER;

+#endif

         if (*typeVer == 0) {

             virLibConnError(NULL, VIR_ERR_NO_SUPPORT, type);

             goto error;

 

diff -ur ./libvirt_org/src/driver.h ./libvirt/src/driver.h

--- ./libvirt_org/src/driver.h  2010-02-17 17:38:08.000000000 +0000

+++ ./libvirt/src/driver.h      2010-02-18 10:45:54.000000000 +0000

@@ -27,6 +27,7 @@

     VIR_DRV_ONE = 9,

     VIR_DRV_ESX = 10,

     VIR_DRV_PHYP = 11,

+    VIR_DRV_XENAPI = 12

 } virDrvNo;

 

 

diff -ur ./libvirt_org/include/libvirt/virterror.h ./libvirt/include/libvirt/virterror.h

--- ./libvirt_org/include/libvirt/virterror.h   2010-02-17 17:37:51.000000000 +0000

+++ ./libvirt/include/libvirt/virterror.h       2010-02-18 12:17:54.000000000 +0000

@@ -69,6 +69,7 @@

     VIR_FROM_PHYP,      /* Error from IBM power hypervisor */

     VIR_FROM_SECRET,    /* Error from secret storage */

     VIR_FROM_CPU,       /* Error from CPU driver */

+    VIR_FROM_XENAPI     /* Error from XenAPI */

 } virErrorDomain;

 

diff -ur ./libvirt_org/src/util/virterror.c ./libvirt/src/util/virterror.c

--- ./libvirt_org/src/util/virterror.c  2010-02-17 17:38:14.000000000 +0000

+++ ./libvirt/src/util/virterror.c      2010-02-18 12:13:08.000000000 +0000

@@ -85,6 +85,9 @@

         case VIR_FROM_XEN:

             dom = "Xen ";

             break;

+        case VIR_FROM_XENAPI:

+            dom = "XenAPI ";

+            break;

         case VIR_FROM_XML:

             dom = "XML ";

             break;

Only in ./libvirt/src: xenapi