[PATCH 01/12] Rename virDriver to virHypervisorDriver

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

 



To prepare for introducing a single global driver, rename the
virDriver struct to virHypervisorDriver and the registration
API to virRegisterHypervisorDriver()
---
 docs/hvsupport.pl                |  2 +-
 src/bhyve/bhyve_driver.c         |  4 ++--
 src/datatypes.h                  |  2 +-
 src/driver.h                     | 10 +++++-----
 src/esx/esx_driver.c             |  4 ++--
 src/hyperv/hyperv_driver.c       |  4 ++--
 src/libvirt.c                    | 28 ++++++++++++++--------------
 src/libvirt_private.syms         |  2 +-
 src/libxl/libxl_driver.c         |  4 ++--
 src/lxc/lxc_driver.c             |  4 ++--
 src/openvz/openvz_driver.c       |  4 ++--
 src/parallels/parallels_driver.c |  4 ++--
 src/phyp/phyp_driver.c           |  4 ++--
 src/qemu/qemu_driver.c           |  4 ++--
 src/remote/remote_driver.c       |  7 ++-----
 src/test/test_driver.c           |  4 ++--
 src/uml/uml_driver.c             |  4 ++--
 src/vbox/vbox_common.c           |  4 ++--
 src/vbox/vbox_driver.c           | 14 +++++++-------
 src/vbox/vbox_get_driver.h       |  2 +-
 src/vbox/vbox_tmpl.c             |  4 ++--
 src/vbox/vbox_uniformed_api.h    |  2 +-
 src/vmware/vmware_driver.c       |  4 ++--
 src/xen/xen_driver.c             |  4 ++--
 src/xenapi/xenapi_driver.c       |  4 ++--
 25 files changed, 65 insertions(+), 68 deletions(-)

diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 34ba599..6d8ed9c 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -15,7 +15,7 @@ my $symslxc = "$srcdir/libvirt_lxc.syms";
 my $drivertable = "$srcdir/driver.h";
 
 my %groupheaders = (
-    "virDriver" => "Hypervisor APIs",
+    "virHypervisorDriver" => "Hypervisor APIs",
     "virNetworkDriver" => "Virtual Network APIs",
     "virInterfaceDriver" => "Host Interface APIs",
     "virNodeDeviceDriver" => "Host Device APIs",
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index d2f9c73..eb0d455 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -1400,7 +1400,7 @@ bhyveConnectDomainEventDeregisterAny(virConnectPtr conn,
     return 0;
 }
 
-static virDriver bhyveDriver = {
+static virHypervisorDriver bhyveDriver = {
     .no = VIR_DRV_BHYVE,
     .name = "bhyve",
     .connectOpen = bhyveConnectOpen, /* 1.2.2 */
@@ -1459,7 +1459,7 @@ static virStateDriver bhyveStateDriver = {
 int
 bhyveRegister(void)
 {
-     if (virRegisterDriver(&bhyveDriver) < 0)
+     if (virRegisterHypervisorDriver(&bhyveDriver) < 0)
         return -1;
      if (virRegisterStateDriver(&bhyveStateDriver) < 0)
         return -1;
diff --git a/src/datatypes.h b/src/datatypes.h
index 3bc2420..5868ce3 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -336,7 +336,7 @@ struct _virConnect {
     virURIPtr uri;          /* connection URI */
 
     /* The underlying hypervisor driver and network driver. */
-    virDriverPtr      driver;
+    virHypervisorDriverPtr      driver;
     virNetworkDriverPtr networkDriver;
     virInterfaceDriverPtr interfaceDriver;
     virStorageDriverPtr storageDriver;
diff --git a/src/driver.h b/src/driver.h
index dc62a8e..4b5e123 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -1221,11 +1221,11 @@ typedef int
                         unsigned int cellCount,
                         unsigned int flags);
 
-typedef struct _virDriver virDriver;
-typedef virDriver *virDriverPtr;
+typedef struct _virHypervisorDriver virHypervisorDriver;
+typedef virHypervisorDriver *virHypervisorDriverPtr;
 
 /**
- * _virDriver:
+ * _virHypervisorDriver:
  *
  * Structure associated to a virtualization driver, defining the various
  * entry points for it.
@@ -1236,7 +1236,7 @@ typedef virDriver *virDriverPtr;
  *  - open
  *  - close
  */
-struct _virDriver {
+struct _virHypervisorDriver {
     int no; /* the number virDrvNo */
     const char *name; /* the name of the driver */
     virDrvConnectOpen connectOpen;
@@ -2241,7 +2241,7 @@ struct _virNWFilterDriver {
  * TODO: also need ways to (des)activate a given driver
  *       lookup based on the URI given in a virConnectOpen(ReadOnly)
  */
-int virRegisterDriver(virDriverPtr) ATTRIBUTE_RETURN_CHECK;
+int virRegisterHypervisorDriver(virHypervisorDriverPtr) ATTRIBUTE_RETURN_CHECK;
 int virRegisterNetworkDriver(virNetworkDriverPtr) ATTRIBUTE_RETURN_CHECK;
 int virRegisterInterfaceDriver(virInterfaceDriverPtr) ATTRIBUTE_RETURN_CHECK;
 int virRegisterStorageDriver(virStorageDriverPtr) ATTRIBUTE_RETURN_CHECK;
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 39784b9..0770e89 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -5291,7 +5291,7 @@ esxConnectListAllDomains(virConnectPtr conn,
 #undef MATCH
 
 
-static virDriver esxDriver = {
+static virHypervisorDriver esxDriver = {
     .no = VIR_DRV_ESX,
     .name = "ESX",
     .connectOpen = esxConnectOpen, /* 0.7.0 */
@@ -5376,7 +5376,7 @@ static virDriver esxDriver = {
 int
 esxRegister(void)
 {
-    if (virRegisterDriver(&esxDriver) < 0 ||
+    if (virRegisterHypervisorDriver(&esxDriver) < 0 ||
         esxInterfaceRegister() < 0 ||
         esxNetworkRegister() < 0 ||
         esxStorageRegister() < 0 ||
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index aed9307..5ffcb85 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -1354,7 +1354,7 @@ hypervConnectListAllDomains(virConnectPtr conn,
 
 
 
-static virDriver hypervDriver = {
+static virHypervisorDriver hypervDriver = {
     .no = VIR_DRV_HYPERV,
     .name = "Hyper-V",
     .connectOpen = hypervConnectOpen, /* 0.9.5 */
@@ -1418,7 +1418,7 @@ hypervDebugHandler(const char *message, debug_level_e level,
 int
 hypervRegister(void)
 {
-    if (virRegisterDriver(&hypervDriver) < 0 ||
+    if (virRegisterHypervisorDriver(&hypervDriver) < 0 ||
         hypervInterfaceRegister() < 0 ||
         hypervNetworkRegister() < 0 ||
         hypervStorageRegister() < 0 ||
diff --git a/src/libvirt.c b/src/libvirt.c
index dfca4f6..c6af39d 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -122,8 +122,8 @@ VIR_LOG_INIT("libvirt");
         }                                                               \
     } while (0)
 
-static virDriverPtr virDriverTab[MAX_DRIVERS];
-static int virDriverTabCount = 0;
+static virHypervisorDriverPtr virHypervisorDriverTab[MAX_DRIVERS];
+static int virHypervisorDriverTabCount = 0;
 static virNetworkDriverPtr virNetworkDriverTab[MAX_DRIVERS];
 static int virNetworkDriverTabCount = 0;
 static virInterfaceDriverPtr virInterfaceDriverTab[MAX_DRIVERS];
@@ -668,7 +668,7 @@ virRegisterNWFilterDriver(virNWFilterDriverPtr driver)
 
 
 /**
- * virRegisterDriver:
+ * virRegisterHypervisorDriver:
  * @driver: pointer to a driver block
  *
  * Register a virtualization driver
@@ -676,19 +676,19 @@ virRegisterNWFilterDriver(virNWFilterDriverPtr driver)
  * Returns the driver priority or -1 in case of error.
  */
 int
-virRegisterDriver(virDriverPtr driver)
+virRegisterHypervisorDriver(virHypervisorDriverPtr driver)
 {
     VIR_DEBUG("driver=%p name=%s", driver,
               driver ? NULLSTR(driver->name) : "(null)");
 
     virCheckNonNullArgReturn(driver, -1);
-    virDriverCheckTabMaxReturn(virDriverTabCount, -1);
+    virDriverCheckTabMaxReturn(virHypervisorDriverTabCount, -1);
 
     VIR_DEBUG("registering %s as driver %d",
-           driver->name, virDriverTabCount);
+           driver->name, virHypervisorDriverTabCount);
 
-    virDriverTab[virDriverTabCount] = driver;
-    return virDriverTabCount++;
+    virHypervisorDriverTab[virHypervisorDriverTabCount] = driver;
+    return virHypervisorDriverTabCount++;
 }
 
 
@@ -1106,7 +1106,7 @@ do_open(const char *name,
     /* Cleansing flags */
     ret->flags = flags & VIR_CONNECT_RO;
 
-    for (i = 0; i < virDriverTabCount; i++) {
+    for (i = 0; i < virHypervisorDriverTabCount; i++) {
         /* We're going to probe the remote driver next. So we have already
          * probed all other client-side-only driver before, but none of them
          * accepted the URI.
@@ -1114,7 +1114,7 @@ do_open(const char *name,
          * driver then report a useful error, instead of a cryptic one about
          * not being able to connect to libvirtd or not being able to find
          * certificates. */
-        if (virDriverTab[i]->no == VIR_DRV_REMOTE &&
+        if (virHypervisorDriverTab[i]->no == VIR_DRV_REMOTE &&
             ret->uri != NULL && ret->uri->scheme != NULL &&
             (
 #ifndef WITH_PHYP
@@ -1142,11 +1142,11 @@ do_open(const char *name,
             goto failed;
         }
 
-        VIR_DEBUG("trying driver %zu (%s) ...", i, virDriverTab[i]->name);
-        ret->driver = virDriverTab[i];
-        res = virDriverTab[i]->connectOpen(ret, auth, flags);
+        VIR_DEBUG("trying driver %zu (%s) ...", i, virHypervisorDriverTab[i]->name);
+        ret->driver = virHypervisorDriverTab[i];
+        res = virHypervisorDriverTab[i]->connectOpen(ret, auth, flags);
         VIR_DEBUG("driver %zu %s returned %s",
-                  i, virDriverTab[i]->name,
+                  i, virHypervisorDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
                   (res == VIR_DRV_OPEN_DECLINED ? "DECLINED" :
                   (res == VIR_DRV_OPEN_ERROR ? "ERROR" : "unknown status")));
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 9f749b7..757e805 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -857,7 +857,7 @@ virDomainMigratePrepare3Params;
 virDomainMigratePrepareTunnel;
 virDomainMigratePrepareTunnel3;
 virDomainMigratePrepareTunnel3Params;
-virRegisterDriver;
+virRegisterHypervisorDriver;
 virRegisterInterfaceDriver;
 virRegisterNetworkDriver;
 virRegisterNodeDeviceDriver;
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d4ecd62..eeebb4f 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -4729,7 +4729,7 @@ libxlDomainMigrateConfirm3Params(virDomainPtr domain,
 }
 
 
-static virDriver libxlDriver = {
+static virHypervisorDriver libxlDriver = {
     .no = VIR_DRV_LIBXL,
     .name = LIBXL_DRIVER_NAME,
     .connectOpen = libxlConnectOpen, /* 0.9.0 */
@@ -4837,7 +4837,7 @@ static virStateDriver libxlStateDriver = {
 int
 libxlRegister(void)
 {
-    if (virRegisterDriver(&libxlDriver) < 0)
+    if (virRegisterHypervisorDriver(&libxlDriver) < 0)
         return -1;
     if (virRegisterStateDriver(&libxlStateDriver) < 0)
         return -1;
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index b3e506f..979382b 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -5707,7 +5707,7 @@ lxcNodeAllocPages(virConnectPtr conn,
 
 
 /* Function Tables */
-static virDriver lxcDriver = {
+static virHypervisorDriver lxcDriver = {
     .no = VIR_DRV_LXC,
     .name = LXC_DRIVER_NAME,
     .connectOpen = lxcConnectOpen, /* 0.4.2 */
@@ -5810,7 +5810,7 @@ static virStateDriver lxcStateDriver = {
 
 int lxcRegister(void)
 {
-    if (virRegisterDriver(&lxcDriver) < 0)
+    if (virRegisterHypervisorDriver(&lxcDriver) < 0)
         return -1;
     if (virRegisterStateDriver(&lxcStateDriver) < 0)
         return -1;
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index b62273a..a0346b4 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -2552,7 +2552,7 @@ openvzDomainMigrateConfirm3Params(virDomainPtr domain,
 }
 
 
-static virDriver openvzDriver = {
+static virHypervisorDriver openvzDriver = {
     .no = VIR_DRV_OPENVZ,
     .name = "OPENVZ",
     .connectOpen = openvzConnectOpen, /* 0.3.1 */
@@ -2620,7 +2620,7 @@ static virDriver openvzDriver = {
 
 int openvzRegister(void)
 {
-    if (virRegisterDriver(&openvzDriver) < 0)
+    if (virRegisterHypervisorDriver(&openvzDriver) < 0)
         return -1;
     return 0;
 }
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 04c4bb3..808dc4a 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -2463,7 +2463,7 @@ parallelsNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
 }
 
 
-static virDriver parallelsDriver = {
+static virHypervisorDriver parallelsDriver = {
     .no = VIR_DRV_PARALLELS,
     .name = "Parallels",
     .connectOpen = parallelsConnectOpen,            /* 0.10.0 */
@@ -2518,7 +2518,7 @@ parallelsRegister(void)
 
     VIR_FREE(prlctl_path);
 
-    if (virRegisterDriver(&parallelsDriver) < 0)
+    if (virRegisterHypervisorDriver(&parallelsDriver) < 0)
         return -1;
     if (parallelsStorageRegister())
         return -1;
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 6a5a560..a56f25d 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3717,7 +3717,7 @@ phypInterfaceClose(virConnectPtr conn ATTRIBUTE_UNUSED)
     return 0;
 }
 
-static virDriver phypDriver = {
+static virHypervisorDriver phypDriver = {
     .no = VIR_DRV_PHYP,
     .name = "PHYP",
     .connectOpen = phypConnectOpen, /* 0.7.0 */
@@ -3786,7 +3786,7 @@ static virInterfaceDriver phypInterfaceDriver = {
 int
 phypRegister(void)
 {
-    if (virRegisterDriver(&phypDriver) < 0)
+    if (virRegisterHypervisorDriver(&phypDriver) < 0)
         return -1;
     if (virRegisterStorageDriver(&phypStorageDriver) < 0)
         return -1;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 009abc6..eca6a00 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18476,7 +18476,7 @@ qemuNodeAllocPages(virConnectPtr conn,
 }
 
 
-static virDriver qemuDriver = {
+static virHypervisorDriver qemuDriver = {
     .no = VIR_DRV_QEMU,
     .name = QEMU_DRIVER_NAME,
     .connectOpen = qemuConnectOpen, /* 0.2.0 */
@@ -18690,7 +18690,7 @@ static virStateDriver qemuStateDriver = {
 
 int qemuRegister(void)
 {
-    if (virRegisterDriver(&qemuDriver) < 0)
+    if (virRegisterHypervisorDriver(&qemuDriver) < 0)
         return -1;
     if (virRegisterStateDriver(&qemuStateDriver) < 0)
         return -1;
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 6c49e49..067f2d0 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -78,7 +78,6 @@ VIR_LOG_INIT("remote.remote_driver");
                                limit, params, nparams)
 
 static bool inside_daemon = false;
-static virDriverPtr remoteDriver = NULL;
 
 struct private_data {
     virMutex lock;
@@ -8030,7 +8029,7 @@ unsigned long remoteVersion(void)
     return REMOTE_PROTOCOL_VERSION;
 }
 
-static virDriver remote_driver = {
+static virHypervisorDriver hypervisor_driver = {
     .no = VIR_DRV_REMOTE,
     .name = "remote",
     .connectOpen = remoteConnectOpen, /* 0.3.0 */
@@ -8403,9 +8402,7 @@ static virStateDriver state_driver = {
 int
 remoteRegister(void)
 {
-    remoteDriver = &remote_driver;
-
-    if (virRegisterDriver(&remote_driver) < 0)
+    if (virRegisterHypervisorDriver(&hypervisor_driver) < 0)
         return -1;
     if (virRegisterNetworkDriver(&network_driver) < 0)
         return -1;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 9adf6f7..f435d03 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -7356,7 +7356,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
 
 
 
-static virDriver testDriver = {
+static virHypervisorDriver testDriver = {
     .no = VIR_DRV_TEST,
     .name = "Test",
     .connectOpen = testConnectOpen, /* 0.1.1 */
@@ -7583,7 +7583,7 @@ static virNWFilterDriver testNWFilterDriver = {
 int
 testRegister(void)
 {
-    if (virRegisterDriver(&testDriver) < 0)
+    if (virRegisterHypervisorDriver(&testDriver) < 0)
         return -1;
     if (virRegisterNetworkDriver(&testNetworkDriver) < 0)
         return -1;
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 7e25861..4f5f6e1 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2928,7 +2928,7 @@ umlNodeAllocPages(virConnectPtr conn,
 }
 
 
-static virDriver umlDriver = {
+static virHypervisorDriver umlDriver = {
     .no = VIR_DRV_UML,
     .name = "UML",
     .connectOpen = umlConnectOpen, /* 0.5.0 */
@@ -3003,7 +3003,7 @@ static virStateDriver umlStateDriver = {
 
 int umlRegister(void)
 {
-    if (virRegisterDriver(&umlDriver) < 0)
+    if (virRegisterHypervisorDriver(&umlDriver) < 0)
         return -1;
     if (virRegisterStateDriver(&umlStateDriver) < 0)
         return -1;
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 2170dc1..8c8c53c 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -7468,7 +7468,7 @@ vboxNodeAllocPages(virConnectPtr conn ATTRIBUTE_UNUSED,
  * Function Tables
  */
 
-virDriver vboxCommonDriver = {
+virHypervisorDriver vboxCommonDriver = {
     .no = VIR_DRV_VBOX,
     .name = "VBOX",
     .connectOpen = vboxConnectOpen, /* 0.6.3 */
@@ -7550,7 +7550,7 @@ static void updateDriver(void)
         vboxCommonDriver.domainScreenshot = NULL;
 }
 
-virDriverPtr vboxGetDriver(uint32_t uVersion)
+virHypervisorDriverPtr vboxGetHypervisorDriver(uint32_t uVersion)
 {
     /* Install gVBoxAPI according to the vbox API version.
      * Return -1 for unsupported version.
diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index 4d13fbf..743a488 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -73,7 +73,7 @@ extern virStorageDriver vbox43_4StorageDriver;
 
 #if !defined(WITH_DRIVER_MODULES) || defined(VBOX_STORAGE_DRIVER)
 static void
-vboxGetDrivers(virDriverPtr *driver_ret,
+vboxGetDrivers(virHypervisorDriverPtr *hypervisorDriver_ret,
                virStorageDriverPtr *storageDriver_ret)
 {
     virStorageDriverPtr storageDriver;
@@ -136,8 +136,8 @@ vboxGetDrivers(virDriverPtr *driver_ret,
         VIR_DEBUG("VBoxCGlueInit failed, using dummy driver");
     }
 
-    if (driver_ret)
-        *driver_ret = NULL;
+    if (hypervisorDriver_ret)
+        *hypervisorDriver_ret = NULL;
     if (storageDriver_ret)
         *storageDriver_ret = storageDriver;
 }
@@ -212,7 +212,7 @@ static virDrvOpenStatus dummyConnectOpen(virConnectPtr conn,
     return VIR_DRV_OPEN_ERROR;
 }
 
-static virDriver vboxDriverDummy = {
+static virHypervisorDriver vboxDriverDummy = {
     VIR_DRV_VBOX,
     "VBOX",
     .connectOpen = dummyConnectOpen, /* 0.6.3 */
@@ -220,16 +220,16 @@ static virDriver vboxDriverDummy = {
 
 int vboxRegister(void)
 {
-    virDriverPtr driver = NULL;
+    virHypervisorDriverPtr driver = NULL;
     uint32_t uVersion;
 
     if (VBoxCGlueInit(&uVersion) == 0)
-        driver = vboxGetDriver(uVersion);
+        driver = vboxGetHypervisorDriver(uVersion);
 
     if (!driver)
         driver = &vboxDriverDummy;
 
-    if (virRegisterDriver(driver) < 0)
+    if (virRegisterHypervisorDriver(driver) < 0)
         return -1;
     return 0;
 }
diff --git a/src/vbox/vbox_get_driver.h b/src/vbox/vbox_get_driver.h
index a31f10c..617974d 100644
--- a/src/vbox/vbox_get_driver.h
+++ b/src/vbox/vbox_get_driver.h
@@ -21,7 +21,7 @@
 
 # include "internal.h"
 
-virDriverPtr vboxGetDriver(uint32_t uVersion);
+virHypervisorDriverPtr vboxGetHypervisorDriver(uint32_t uVersion);
 virNetworkDriverPtr vboxGetNetworkDriver(uint32_t uVersion);
 
 #endif /* VBOX_GET_DRIVER_H */
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index a062428..db98c90 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1456,7 +1456,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom,
     /* No Callback support for VirtualBox 4.* series */
 
 static void
-_registerDomainEvent(virDriverPtr driver)
+_registerDomainEvent(virHypervisorDriverPtr driver)
 {
     driver->connectDomainEventRegister = NULL;
     driver->connectDomainEventDeregister = NULL;
@@ -2007,7 +2007,7 @@ vboxConnectDomainEventDeregisterAny(virConnectPtr conn,
 }
 
 static void
-_registerDomainEvent(virDriverPtr driver)
+_registerDomainEvent(virHypervisorDriverPtr driver)
 {
     driver->connectDomainEventRegister = vboxConnectDomainEventRegister; /* 0.7.0 */
     driver->connectDomainEventDeregister = vboxConnectDomainEventDeregister; /* 0.7.0 */
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index b92c932..66fcb78 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -541,7 +541,7 @@ typedef struct {
     int (*attachFloppy)(vboxGlobalData *data, IMachine *machine, const char *src);
     int (*detachFloppy)(IMachine *machine);
     int (*snapshotRestore)(virDomainPtr dom, IMachine *machine, ISnapshot *snapshot);
-    void (*registerDomainEvent)(virDriverPtr driver);
+    void (*registerDomainEvent)(virHypervisorDriverPtr driver);
     vboxUniformedPFN UPFN;
     vboxUniformedIID UIID;
     vboxUniformedArray UArray;
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 22ce3a3..c3fa2dc 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -1182,7 +1182,7 @@ vmwareConnectListAllDomains(virConnectPtr conn,
 
 
 
-static virDriver vmwareDriver = {
+static virHypervisorDriver vmwareDriver = {
     .no = VIR_DRV_VMWARE,
     .name = "VMWARE",
     .connectOpen = vmwareConnectOpen, /* 0.8.7 */
@@ -1223,7 +1223,7 @@ static virDriver vmwareDriver = {
 int
 vmwareRegister(void)
 {
-    if (virRegisterDriver(&vmwareDriver) < 0)
+    if (virRegisterHypervisorDriver(&vmwareDriver) < 0)
         return -1;
     return 0;
 }
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 4d7a1b7..d042050 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2744,7 +2744,7 @@ xenUnifiedNodeSuspendForDuration(virConnectPtr conn,
 /*----- Register with libvirt.c, and initialize Xen drivers. -----*/
 
 /* The interface which we export upwards to libvirt.c. */
-static virDriver xenUnifiedDriver = {
+static virHypervisorDriver xenUnifiedDriver = {
     .no = VIR_DRV_XEN_UNIFIED,
     .name = "Xen",
     .connectOpen = xenUnifiedConnectOpen, /* 0.0.3 */
@@ -2852,7 +2852,7 @@ xenRegister(void)
 {
     if (virRegisterStateDriver(&state_driver) == -1) return -1;
 
-    return virRegisterDriver(&xenUnifiedDriver);
+    return virRegisterHypervisorDriver(&xenUnifiedDriver);
 }
 
 /**
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index a448347..ed4f7e8 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1963,7 +1963,7 @@ xenapiConnectIsAlive(virConnectPtr conn)
 }
 
 /* The interface which we export upwards to libvirt.c. */
-static virDriver xenapiDriver = {
+static virHypervisorDriver xenapiDriver = {
     .no = VIR_DRV_XENAPI,
     .name = "XenAPI",
     .connectOpen = xenapiConnectOpen, /* 0.8.0 */
@@ -2025,7 +2025,7 @@ static virDriver xenapiDriver = {
 int
 xenapiRegister(void)
 {
-    return virRegisterDriver(&xenapiDriver);
+    return virRegisterHypervisorDriver(&xenapiDriver);
 }
 
 /*
-- 
2.1.0

--
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]