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

[libvirt] [PATCH 7/6] Dedicated name for sub-driver open/close methods



From: "Daniel P. Berrange" <berrange redhat com>

It will simplify later work if the sub-drivers have dedicated
APIs / field names. ie virNetworkDriver should have
virDrvNetworkOpen and virDrvNetworkClose methods

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 docs/hvsupport.pl                       |  4 +++
 src/datatypes.c                         | 12 ++++-----
 src/driver.h                            | 47 ++++++++++++++++++++++++---------
 src/esx/esx_device_monitor.c            |  4 +--
 src/esx/esx_interface_driver.c          |  4 +--
 src/esx/esx_network_driver.c            |  4 +--
 src/esx/esx_nwfilter_driver.c           |  4 +--
 src/esx/esx_secret_driver.c             |  4 +--
 src/esx/esx_storage_driver.c            |  4 +--
 src/hyperv/hyperv_device_monitor.c      |  4 +--
 src/hyperv/hyperv_interface_driver.c    |  4 +--
 src/hyperv/hyperv_network_driver.c      |  4 +--
 src/hyperv/hyperv_nwfilter_driver.c     |  4 +--
 src/hyperv/hyperv_secret_driver.c       |  4 +--
 src/hyperv/hyperv_storage_driver.c      |  4 +--
 src/interface/interface_backend_netcf.c |  4 +--
 src/interface/interface_backend_udev.c  |  4 +--
 src/libvirt.c                           | 12 ++++-----
 src/network/bridge_driver.c             |  4 +--
 src/node_device/node_device_hal.c       |  4 +--
 src/node_device/node_device_udev.c      |  4 +--
 src/nwfilter/nwfilter_driver.c          |  4 +--
 src/parallels/parallels_network.c       |  4 +--
 src/parallels/parallels_storage.c       |  4 +--
 src/phyp/phyp_driver.c                  |  8 +++---
 src/remote/remote_driver.c              | 24 ++++++++---------
 src/secret/secret_driver.c              |  4 +--
 src/storage/storage_driver.c            |  4 +--
 src/test/test_driver.c                  | 24 ++++++++---------
 src/vbox/vbox_tmpl.c                    |  8 +++---
 tests/qemuxml2argvtest.c                |  4 +--
 31 files changed, 129 insertions(+), 102 deletions(-)

diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 707b512..b415abc 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -197,6 +197,8 @@ while (defined($line = <FILE>)) {
             my $api;
             if (exists $apis{"vir$name"}) {
                 $api = "vir$name";
+            } elsif ($name =~ /\w+(Open|Close)/) {
+                next;
             } else {
                 die "driver $name does not have a public API";
             }
@@ -254,6 +256,8 @@ foreach my $src (@srcs) {
                 die "Driver method for $api is NULL in $src" if $meth eq "NULL";
 
                 if (!exists($groups{$ingrp}->{apis}->{$api})) {
+                    next if $api =~ /\w(Open|Close)/;
+
                     die "Found unexpected method $api in $ingrp\n";
                 }
 
diff --git a/src/datatypes.c b/src/datatypes.c
index f6c01ce..0e1dbb1 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -144,17 +144,17 @@ virConnectDispose(void *obj)
     virConnectPtr conn = obj;
 
     if (conn->networkDriver)
-        conn->networkDriver->connectClose(conn);
+        conn->networkDriver->networkClose(conn);
     if (conn->interfaceDriver)
-        conn->interfaceDriver->connectClose(conn);
+        conn->interfaceDriver->interfaceClose(conn);
     if (conn->storageDriver)
-        conn->storageDriver->connectClose(conn);
+        conn->storageDriver->storageClose(conn);
     if (conn->nodeDeviceDriver)
-        conn->nodeDeviceDriver->connectClose(conn);
+        conn->nodeDeviceDriver->nodeDeviceClose(conn);
     if (conn->secretDriver)
-        conn->secretDriver->connectClose(conn);
+        conn->secretDriver->secretClose(conn);
     if (conn->nwfilterDriver)
-        conn->nwfilterDriver->connectClose(conn);
+        conn->nwfilterDriver->nwfilterClose(conn);
     if (conn->driver)
         conn->driver->connectClose(conn);
 
diff --git a/src/driver.h b/src/driver.h
index 8b4f603..1a3517e 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -1228,6 +1228,10 @@ struct _virDriver {
     virDrvDomainLxcOpenNamespace domainLxcOpenNamespace;
 };
 
+
+typedef virDrvConnectOpen virDrvNetworkOpen;
+typedef virDrvConnectClose virDrvNetworkClose;
+
 typedef int
 (*virDrvConnectNumOfNetworks)(virConnectPtr conn);
 
@@ -1320,8 +1324,8 @@ typedef virNetworkDriver *virNetworkDriverPtr;
  */
 struct _virNetworkDriver {
     const char * name; /* the name of the driver */
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvNetworkOpen networkOpen;
+    virDrvNetworkClose networkClose;
     virDrvConnectNumOfNetworks connectNumOfNetworks;
     virDrvConnectListNetworks connectListNetworks;
     virDrvConnectNumOfDefinedNetworks connectNumOfDefinedNetworks;
@@ -1344,6 +1348,9 @@ struct _virNetworkDriver {
 };
 
 
+typedef virDrvConnectOpen virDrvInterfaceOpen;
+typedef virDrvConnectClose virDrvInterfaceClose;
+
 typedef int
 (*virDrvConnectNumOfInterfaces)(virConnectPtr conn);
 
@@ -1423,8 +1430,8 @@ typedef virInterfaceDriver *virInterfaceDriverPtr;
  */
 struct _virInterfaceDriver {
     const char *name; /* the name of the driver */
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvInterfaceOpen interfaceOpen;
+    virDrvInterfaceClose interfaceClose;
     virDrvConnectNumOfInterfaces connectNumOfInterfaces;
     virDrvConnectListInterfaces connectListInterfaces;
     virDrvConnectNumOfDefinedInterfaces connectNumOfDefinedInterfaces;
@@ -1444,6 +1451,10 @@ struct _virInterfaceDriver {
 };
 
 
+typedef virDrvConnectOpen virDrvStorageOpen;
+typedef virDrvConnectClose virDrvStorageClose;
+
+
 typedef int
 (*virDrvConnectNumOfStoragePools)(virConnectPtr conn);
 
@@ -1632,8 +1643,8 @@ typedef virStorageDriver *virStorageDriverPtr;
  */
 struct _virStorageDriver {
     const char * name; /* the name of the driver */
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvStorageOpen storageOpen;
+    virDrvStorageClose storageClose;
     virDrvConnectNumOfStoragePools connectNumOfStoragePools;
     virDrvConnectListStoragePools connectListStoragePools;
     virDrvConnectNumOfDefinedStoragePools connectNumOfDefinedStoragePools;
@@ -1705,6 +1716,10 @@ struct _virStateDriver {
 # endif
 
 
+typedef virDrvConnectOpen virDrvNodeDeviceOpen;
+typedef virDrvConnectClose virDrvNodeDeviceClose;
+
+
 typedef int
 (*virDrvNodeNumOfDevices)(virConnectPtr conn,
                           const char *cap,
@@ -1769,8 +1784,8 @@ typedef virNodeDeviceDriver *virNodeDeviceDriverPtr;
  */
 struct _virNodeDeviceDriver {
     const char * name; /* the name of the driver */
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvNodeDeviceOpen nodeDeviceOpen;
+    virDrvNodeDeviceClose nodeDeviceClose;
     virDrvNodeNumOfDevices nodeNumOfDevices;
     virDrvNodeListDevices nodeListDevices;
     virDrvConnectListAllNodeDevices connectListAllNodeDevices;
@@ -1790,6 +1805,10 @@ enum {
     VIR_SECRET_GET_VALUE_INTERNAL_CALL = 1 << 0,
 };
 
+typedef virDrvConnectOpen virDrvSecretOpen;
+typedef virDrvConnectClose virDrvSecretClose;
+
+
 typedef virSecretPtr
 (*virDrvSecretLookupByUUID)(virConnectPtr conn,
                             const unsigned char *uuid);
@@ -1851,8 +1870,8 @@ typedef virSecretDriver *virSecretDriverPtr;
  */
 struct _virSecretDriver {
     const char *name;
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvSecretOpen secretOpen;
+    virDrvSecretClose secretClose;
     virDrvConnectNumOfSecrets connectNumOfSecrets;
     virDrvConnectListSecrets connectListSecrets;
     virDrvConnectListAllSecrets connectListAllSecrets;
@@ -1910,6 +1929,10 @@ struct _virStreamDriver {
 };
 
 
+typedef virDrvConnectOpen virDrvNWFilterOpen;
+typedef virDrvConnectClose virDrvNWFilterClose;
+
+
 typedef int
 (*virDrvConnectNumOfNWFilters)(virConnectPtr conn);
 
@@ -1958,8 +1981,8 @@ typedef virNWFilterDriver *virNWFilterDriverPtr;
  */
 struct _virNWFilterDriver {
     const char * name; /* the name of the driver */
-    virDrvConnectOpen connectOpen;
-    virDrvConnectClose connectClose;
+    virDrvNWFilterOpen nwfilterOpen;
+    virDrvNWFilterClose nwfilterClose;
     virDrvConnectNumOfNWFilters connectNumOfNWFilters;
     virDrvConnectListNWFilters connectListNWFilters;
     virDrvConnectListAllNWFilters connectListAllNWFilters;
diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c
index 0812bdf..8b688e4 100644
--- a/src/esx/esx_device_monitor.c
+++ b/src/esx/esx_device_monitor.c
@@ -69,8 +69,8 @@ esxDeviceClose(virConnectPtr conn)
 
 static virNodeDeviceDriver esxNodeDeviceDriver = {
     .name = "ESX",
-    .connectOpen = esxDeviceOpen, /* 0.7.6 */
-    .connectClose = esxDeviceClose, /* 0.7.6 */
+    .nodeDeviceOpen = esxDeviceOpen, /* 0.7.6 */
+    .nodeDeviceClose = esxDeviceClose, /* 0.7.6 */
 };
 
 
diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
index ec19051..5a1267b 100644
--- a/src/esx/esx_interface_driver.c
+++ b/src/esx/esx_interface_driver.c
@@ -298,8 +298,8 @@ esxInterfaceIsActive(virInterfacePtr iface ATTRIBUTE_UNUSED)
 
 static virInterfaceDriver esxInterfaceDriver = {
     .name = "ESX",
-    .connectOpen = esxInterfaceOpen, /* 0.7.6 */
-    .connectClose = esxInterfaceClose, /* 0.7.6 */
+    .interfaceOpen = esxInterfaceOpen, /* 0.7.6 */
+    .interfaceClose = esxInterfaceClose, /* 0.7.6 */
     .connectNumOfInterfaces = esxNumberOfInterfaces, /* 0.10.0 */
     .connectListInterfaces = esxListInterfaces, /* 0.10.0 */
     .connectNumOfDefinedInterfaces = esxNumberOfDefinedInterfaces, /* 0.10.0 */
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index c657c82..d403638 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -933,8 +933,8 @@ esxNetworkIsPersistent(virNetworkPtr network ATTRIBUTE_UNUSED)
 
 static virNetworkDriver esxNetworkDriver = {
     .name = "ESX",
-    .connectOpen = esxNetworkOpen, /* 0.7.6 */
-    .connectClose = esxNetworkClose, /* 0.7.6 */
+    .networkOpen = esxNetworkOpen, /* 0.7.6 */
+    .networkClose = esxNetworkClose, /* 0.7.6 */
     .connectNumOfNetworks = esxNumberOfNetworks, /* 0.10.0 */
     .connectListNetworks = esxListNetworks, /* 0.10.0 */
     .connectNumOfDefinedNetworks = esxNumberOfDefinedNetworks, /* 0.10.0 */
diff --git a/src/esx/esx_nwfilter_driver.c b/src/esx/esx_nwfilter_driver.c
index 1181c33..03b7417 100644
--- a/src/esx/esx_nwfilter_driver.c
+++ b/src/esx/esx_nwfilter_driver.c
@@ -69,8 +69,8 @@ esxNWFilterClose(virConnectPtr conn)
 
 static virNWFilterDriver esxNWFilterDriver = {
     .name = "ESX",
-    .connectOpen = esxNWFilterOpen, /* 0.8.1 */
-    .connectClose = esxNWFilterClose, /* 0.8.1 */
+    .nwfilterOpen = esxNWFilterOpen, /* 0.8.1 */
+    .nwfilterClose = esxNWFilterClose, /* 0.8.1 */
 };
 
 
diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c
index a840895..2e36e15 100644
--- a/src/esx/esx_secret_driver.c
+++ b/src/esx/esx_secret_driver.c
@@ -67,8 +67,8 @@ esxSecretClose(virConnectPtr conn)
 
 static virSecretDriver esxSecretDriver = {
     .name = "ESX",
-    .connectOpen = esxSecretOpen, /* 0.7.6 */
-    .connectClose = esxSecretClose, /* 0.7.6 */
+    .secretOpen = esxSecretOpen, /* 0.7.6 */
+    .secretClose = esxSecretClose, /* 0.7.6 */
 };
 
 
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 9ab7a9c..854ee01 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -575,8 +575,8 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
 
 static virStorageDriver esxStorageDriver = {
     .name = "ESX",
-    .connectOpen = esxStorageOpen, /* 0.7.6 */
-    .connectClose = esxStorageClose, /* 0.7.6 */
+    .storageOpen = esxStorageOpen, /* 0.7.6 */
+    .storageClose = esxStorageClose, /* 0.7.6 */
     .connectNumOfStoragePools = esxNumberOfStoragePools, /* 0.8.2 */
     .connectListStoragePools = esxListStoragePools, /* 0.8.2 */
     .connectNumOfDefinedStoragePools = esxNumberOfDefinedStoragePools, /* 0.8.2 */
diff --git a/src/hyperv/hyperv_device_monitor.c b/src/hyperv/hyperv_device_monitor.c
index ace9e71..370fa3e 100644
--- a/src/hyperv/hyperv_device_monitor.c
+++ b/src/hyperv/hyperv_device_monitor.c
@@ -66,8 +66,8 @@ hypervDeviceClose(virConnectPtr conn)
 
 static virNodeDeviceDriver hypervNodeDeviceDriver = {
     "Hyper-V",
-    .connectOpen = hypervDeviceOpen, /* 0.9.5 */
-    .connectClose = hypervDeviceClose, /* 0.9.5 */
+    .nodeDeviceOpen = hypervDeviceOpen, /* 0.9.5 */
+    .nodeDeviceClose = hypervDeviceClose, /* 0.9.5 */
 };
 
 
diff --git a/src/hyperv/hyperv_interface_driver.c b/src/hyperv/hyperv_interface_driver.c
index db909f3..477b661 100644
--- a/src/hyperv/hyperv_interface_driver.c
+++ b/src/hyperv/hyperv_interface_driver.c
@@ -66,8 +66,8 @@ hypervInterfaceClose(virConnectPtr conn)
 
 static virInterfaceDriver hypervInterfaceDriver = {
     .name = "Hyper-V",
-    .connectOpen = hypervInterfaceOpen, /* 0.9.5 */
-    .connectClose = hypervInterfaceClose, /* 0.9.5 */
+    .interfaceOpen = hypervInterfaceOpen, /* 0.9.5 */
+    .interfaceClose = hypervInterfaceClose, /* 0.9.5 */
 };
 
 
diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c
index 5ede105..336d722 100644
--- a/src/hyperv/hyperv_network_driver.c
+++ b/src/hyperv/hyperv_network_driver.c
@@ -66,8 +66,8 @@ hypervNetworkClose(virConnectPtr conn)
 
 static virNetworkDriver hypervNetworkDriver = {
     .name = "Hyper-V",
-    .connectOpen = hypervNetworkOpen, /* 0.9.5 */
-    .connectClose = hypervNetworkClose, /* 0.9.5 */
+    .networkOpen = hypervNetworkOpen, /* 0.9.5 */
+    .networkClose = hypervNetworkClose, /* 0.9.5 */
 };
 
 
diff --git a/src/hyperv/hyperv_nwfilter_driver.c b/src/hyperv/hyperv_nwfilter_driver.c
index 07d8275..e748971 100644
--- a/src/hyperv/hyperv_nwfilter_driver.c
+++ b/src/hyperv/hyperv_nwfilter_driver.c
@@ -66,8 +66,8 @@ hypervNWFilterClose(virConnectPtr conn)
 
 static virNWFilterDriver hypervNWFilterDriver = {
     .name = "Hyper-V",
-    .connectOpen = hypervNWFilterOpen, /* 0.9.5 */
-    .connectClose = hypervNWFilterClose, /* 0.9.5 */
+    .nwfilterOpen = hypervNWFilterOpen, /* 0.9.5 */
+    .nwfilterClose = hypervNWFilterClose, /* 0.9.5 */
 };
 
 
diff --git a/src/hyperv/hyperv_secret_driver.c b/src/hyperv/hyperv_secret_driver.c
index 6554667..09d9b9e 100644
--- a/src/hyperv/hyperv_secret_driver.c
+++ b/src/hyperv/hyperv_secret_driver.c
@@ -66,8 +66,8 @@ hypervSecretClose(virConnectPtr conn)
 
 static virSecretDriver hypervSecretDriver = {
     .name = "Hyper-V",
-    .connectOpen = hypervSecretOpen, /* 0.9.5 */
-    .connectClose = hypervSecretClose, /* 0.9.5 */
+    .secretOpen = hypervSecretOpen, /* 0.9.5 */
+    .secretClose = hypervSecretClose, /* 0.9.5 */
 };
 
 
diff --git a/src/hyperv/hyperv_storage_driver.c b/src/hyperv/hyperv_storage_driver.c
index a908a0c..b701dc6 100644
--- a/src/hyperv/hyperv_storage_driver.c
+++ b/src/hyperv/hyperv_storage_driver.c
@@ -66,8 +66,8 @@ hypervStorageClose(virConnectPtr conn)
 
 static virStorageDriver hypervStorageDriver = {
     .name = "Hyper-V",
-    .connectOpen = hypervStorageOpen, /* 0.9.5*/
-    .connectClose = hypervStorageClose, /* 0.9.5 */
+    .storageOpen = hypervStorageOpen, /* 0.9.5*/
+    .storageClose = hypervStorageClose, /* 0.9.5 */
 };
 
 
diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c
index 8394b06..0af9cd7 100644
--- a/src/interface/interface_backend_netcf.c
+++ b/src/interface/interface_backend_netcf.c
@@ -784,8 +784,8 @@ static int interfaceChangeRollback(virConnectPtr conn, unsigned int flags)
 
 static virInterfaceDriver interfaceDriver = {
     "netcf",
-    .connectOpen = interfaceOpenInterface, /* 0.7.0 */
-    .connectClose = interfaceCloseInterface, /* 0.7.0 */
+    .interfaceOpen = interfaceOpenInterface, /* 0.7.0 */
+    .interfaceClose = interfaceCloseInterface, /* 0.7.0 */
     .connectNumOfInterfaces = interfaceNumOfInterfaces, /* 0.7.0 */
     .connectListInterfaces = interfaceListInterfaces, /* 0.7.0 */
     .connectNumOfDefinedInterfaces = interfaceNumOfDefinedInterfaces, /* 0.7.0 */
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 1c317f0..57e4465 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -1149,8 +1149,8 @@ cleanup:
 
 static virInterfaceDriver udevIfaceDriver = {
     "udev",
-    .connectOpen = udevIfaceOpenInterface, /* 1.0.0 */
-    .connectClose = udevIfaceCloseInterface, /* 1.0.0 */
+    .interfaceOpen = udevIfaceOpenInterface, /* 1.0.0 */
+    .interfaceClose = udevIfaceCloseInterface, /* 1.0.0 */
     .connectNumOfInterfaces = udevIfaceNumOfInterfaces, /* 1.0.0 */
     .connectListInterfaces = udevIfaceListInterfaces, /* 1.0.0 */
     .connectNumOfDefinedInterfaces = udevIfaceNumOfDefinedInterfaces, /* 1.0.0 */
diff --git a/src/libvirt.c b/src/libvirt.c
index b784bee..c236152 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1233,7 +1233,7 @@ do_open(const char *name,
     }
 
     for (i = 0; i < virNetworkDriverTabCount; i++) {
-        res = virNetworkDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virNetworkDriverTab[i]->networkOpen(ret, auth, flags);
         VIR_DEBUG("network driver %d %s returned %s",
                   i, virNetworkDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@@ -1249,7 +1249,7 @@ do_open(const char *name,
     }
 
     for (i = 0; i < virInterfaceDriverTabCount; i++) {
-        res = virInterfaceDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virInterfaceDriverTab[i]->interfaceOpen(ret, auth, flags);
         VIR_DEBUG("interface driver %d %s returned %s",
                   i, virInterfaceDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@@ -1266,7 +1266,7 @@ do_open(const char *name,
 
     /* Secondary driver for storage. Optional */
     for (i = 0; i < virStorageDriverTabCount; i++) {
-        res = virStorageDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virStorageDriverTab[i]->storageOpen(ret, auth, flags);
         VIR_DEBUG("storage driver %d %s returned %s",
                   i, virStorageDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@@ -1283,7 +1283,7 @@ do_open(const char *name,
 
     /* Node driver (optional) */
     for (i = 0; i < virNodeDeviceDriverTabCount; i++) {
-        res = virNodeDeviceDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virNodeDeviceDriverTab[i]->nodeDeviceOpen(ret, auth, flags);
         VIR_DEBUG("node driver %d %s returned %s",
                   i, virNodeDeviceDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@@ -1300,7 +1300,7 @@ do_open(const char *name,
 
     /* Secret manipulation driver. Optional */
     for (i = 0; i < virSecretDriverTabCount; i++) {
-        res = virSecretDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virSecretDriverTab[i]->secretOpen(ret, auth, flags);
         VIR_DEBUG("secret driver %d %s returned %s",
                   i, virSecretDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@@ -1317,7 +1317,7 @@ do_open(const char *name,
 
     /* Network filter driver. Optional */
     for (i = 0; i < virNWFilterDriverTabCount; i++) {
-        res = virNWFilterDriverTab[i]->connectOpen(ret, auth, flags);
+        res = virNWFilterDriverTab[i]->nwfilterOpen(ret, auth, flags);
         VIR_DEBUG("nwfilter driver %d %s returned %s",
                   i, virNWFilterDriverTab[i]->name,
                   res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index ab37d85..1c0bd7e 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3592,8 +3592,8 @@ cleanup:
 
 static virNetworkDriver networkDriver = {
     "Network",
-    .connectOpen = networkOpenNetwork, /* 0.2.0 */
-    .connectClose = networkCloseNetwork, /* 0.2.0 */
+    .networkOpen = networkOpenNetwork, /* 0.2.0 */
+    .networkClose = networkCloseNetwork, /* 0.2.0 */
     .connectNumOfNetworks = networkNumNetworks, /* 0.2.0 */
     .connectListNetworks = networkListNetworks, /* 0.2.0 */
     .connectNumOfDefinedNetworks = networkNumDefinedNetworks, /* 0.2.0 */
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 682b66a..53c9712 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -763,8 +763,8 @@ static int halNodeDrvClose(virConnectPtr conn ATTRIBUTE_UNUSED)
 
 static virNodeDeviceDriver halNodeDeviceDriver = {
     .name = "halNodeDeviceDriver",
-    .connectOpen = halNodeDrvOpen, /* 0.5.0 */
-    .connectClose = halNodeDrvClose, /* 0.5.0 */
+    .nodeDeviceOpen = halNodeDrvOpen, /* 0.5.0 */
+    .nodDeviceClose = halNodeDrvClose, /* 0.5.0 */
     .nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */
     .nodeListDevices = nodeListDevices, /* 0.5.0 */
     .connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 5a9c6e3..b8e64c9 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1793,8 +1793,8 @@ static int udevNodeDrvClose(virConnectPtr conn)
 
 static virNodeDeviceDriver udevNodeDeviceDriver = {
     .name = "udevNodeDeviceDriver",
-    .connectOpen = udevNodeDrvOpen, /* 0.7.3 */
-    .connectClose = udevNodeDrvClose, /* 0.7.3 */
+    .nodeDeviceOpen = udevNodeDrvOpen, /* 0.7.3 */
+    .nodeDeviceClose = udevNodeDrvClose, /* 0.7.3 */
     .nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */
     .nodeListDevices = nodeListDevices, /* 0.7.3 */
     .connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index b2ffd73..2934fec 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -659,8 +659,8 @@ nwfilterTeardownFilter(virDomainNetDefPtr net) {
 
 static virNWFilterDriver nwfilterDriver = {
     .name = "nwfilter",
-    .connectOpen = nwfilterOpen, /* 0.8.0 */
-    .connectClose = nwfilterClose, /* 0.8.0 */
+    .nwfilterOpen = nwfilterOpen, /* 0.8.0 */
+    .nwfilterClose = nwfilterClose, /* 0.8.0 */
     .connectNumOfNWFilters = nwfilterNumNWFilters, /* 0.8.0 */
     .connectListNWFilters = nwfilterListNWFilters, /* 0.8.0 */
     .connectListAllNWFilters = nwfilterListAllNWFilters, /* 0.10.2 */
diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c
index 21de3bf..1f55b19 100644
--- a/src/parallels/parallels_network.c
+++ b/src/parallels/parallels_network.c
@@ -614,8 +614,8 @@ cleanup:
 }
 static virNetworkDriver parallelsNetworkDriver = {
     "Parallels",
-    .connectOpen = parallelsOpenNetwork, /* 1.0.1 */
-    .connectClose = parallelsCloseNetwork, /* 1.0.1 */
+    .networkOpen = parallelsOpenNetwork, /* 1.0.1 */
+    .networkClose = parallelsCloseNetwork, /* 1.0.1 */
     .connectNumOfNetworks = parallelsNumNetworks, /* 1.0.1 */
     .connectListNetworks = parallelsListNetworks, /* 1.0.1 */
     .connectNumOfDefinedNetworks = parallelsNumDefinedNetworks, /* 1.0.1 */
diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
index efa7d12..6bd117a 100644
--- a/src/parallels/parallels_storage.c
+++ b/src/parallels/parallels_storage.c
@@ -1671,8 +1671,8 @@ cleanup:
 
 static virStorageDriver parallelsStorageDriver = {
     .name = "Parallels",
-    .connectOpen = parallelsStorageOpen,     /* 0.10.0 */
-    .connectClose = parallelsStorageClose,   /* 0.10.0 */
+    .storageOpen = parallelsStorageOpen,     /* 0.10.0 */
+    .storageClose = parallelsStorageClose,   /* 0.10.0 */
 
     .connectNumOfStoragePools = parallelsStorageNumPools,   /* 0.10.0 */
     .connectListStoragePools = parallelsStorageListPools,   /* 0.10.0 */
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index e188785..722e56f 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3795,8 +3795,8 @@ static virDriver phypDriver = {
 
 static virStorageDriver phypStorageDriver = {
     .name = "PHYP",
-    .connectOpen = phypVIOSDriverOpen, /* 0.8.2 */
-    .connectClose = phypVIOSDriverClose, /* 0.8.2 */
+    .storageOpen = phypVIOSDriverOpen, /* 0.8.2 */
+    .storageClose = phypVIOSDriverClose, /* 0.8.2 */
 
     .connectNumOfStoragePools = phypNumOfStoragePools, /* 0.8.2 */
     .connectListStoragePools = phypListStoragePools, /* 0.8.2 */
@@ -3817,8 +3817,8 @@ static virStorageDriver phypStorageDriver = {
 
 static virInterfaceDriver phypInterfaceDriver = {
     .name = "PHYP",
-    .connectOpen = phypVIOSDriverOpen, /* 0.9.1 */
-    .connectClose = phypVIOSDriverClose, /* 0.9.1 */
+    .interfaceOpen = phypVIOSDriverOpen, /* 0.9.1 */
+    .interfaceClose = phypVIOSDriverClose, /* 0.9.1 */
     .connectNumOfInterfaces = phypNumOfInterfaces, /* 0.9.1 */
     .connectListInterfaces = phypListInterfaces, /* 0.9.1 */
     .interfaceLookupByName = phypInterfaceLookupByName, /* 0.9.1 */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 83dc0fe..132637e 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6306,8 +6306,8 @@ static virDriver remote_driver = {
 
 static virNetworkDriver network_driver = {
     .name = "remote",
-    .connectOpen = remoteNetworkOpen, /* 0.3.0 */
-    .connectClose = remoteNetworkClose, /* 0.3.0 */
+    .networkOpen = remoteNetworkOpen, /* 0.3.0 */
+    .networkClose = remoteNetworkClose, /* 0.3.0 */
     .connectNumOfNetworks = remoteConnectNumOfNetworks, /* 0.3.0 */
     .connectListNetworks = remoteConnectListNetworks, /* 0.3.0 */
     .connectNumOfDefinedNetworks = remoteConnectNumOfDefinedNetworks, /* 0.3.0 */
@@ -6331,8 +6331,8 @@ static virNetworkDriver network_driver = {
 
 static virInterfaceDriver interface_driver = {
     .name = "remote",
-    .connectOpen = remoteInterfaceOpen, /* 0.7.2 */
-    .connectClose = remoteInterfaceClose, /* 0.7.2 */
+    .interfaceOpen = remoteInterfaceOpen, /* 0.7.2 */
+    .interfaceClose = remoteInterfaceClose, /* 0.7.2 */
     .connectNumOfInterfaces = remoteConnectNumOfInterfaces, /* 0.7.2 */
     .connectListInterfaces = remoteConnectListInterfaces, /* 0.7.2 */
     .connectNumOfDefinedInterfaces = remoteConnectNumOfDefinedInterfaces, /* 0.7.2 */
@@ -6353,8 +6353,8 @@ static virInterfaceDriver interface_driver = {
 
 static virStorageDriver storage_driver = {
     .name = "remote",
-    .connectOpen = remoteStorageOpen, /* 0.4.1 */
-    .connectClose = remoteStorageClose, /* 0.4.1 */
+    .storageOpen = remoteStorageOpen, /* 0.4.1 */
+    .storageClose = remoteStorageClose, /* 0.4.1 */
     .connectNumOfStoragePools = remoteConnectNumOfStoragePools, /* 0.4.1 */
     .connectListStoragePools = remoteConnectListStoragePools, /* 0.4.1 */
     .connectNumOfDefinedStoragePools = remoteConnectNumOfDefinedStoragePools, /* 0.4.1 */
@@ -6400,8 +6400,8 @@ static virStorageDriver storage_driver = {
 
 static virSecretDriver secret_driver = {
     .name = "remote",
-    .connectOpen = remoteSecretOpen, /* 0.7.1 */
-    .connectClose = remoteSecretClose, /* 0.7.1 */
+    .secretOpen = remoteSecretOpen, /* 0.7.1 */
+    .secretClose = remoteSecretClose, /* 0.7.1 */
     .connectNumOfSecrets = remoteConnectNumOfSecrets, /* 0.7.1 */
     .connectListSecrets = remoteConnectListSecrets, /* 0.7.1 */
     .connectListAllSecrets = remoteConnectListAllSecrets, /* 0.10.2 */
@@ -6416,8 +6416,8 @@ static virSecretDriver secret_driver = {
 
 static virNodeDeviceDriver node_device_driver = {
     .name = "remote",
-    .connectOpen = remoteNodeDeviceOpen, /* 0.5.0 */
-    .connectClose = remoteNodeDeviceClose, /* 0.5.0 */
+    .nodeDeviceOpen = remoteNodeDeviceOpen, /* 0.5.0 */
+    .nodeDeviceClose = remoteNodeDeviceClose, /* 0.5.0 */
     .nodeNumOfDevices = remoteNodeNumOfDevices, /* 0.5.0 */
     .nodeListDevices = remoteNodeListDevices, /* 0.5.0 */
     .connectListAllNodeDevices  = remoteConnectListAllNodeDevices, /* 0.10.2 */
@@ -6433,8 +6433,8 @@ static virNodeDeviceDriver node_device_driver = {
 
 static virNWFilterDriver nwfilter_driver = {
     .name = "remote",
-    .connectOpen = remoteNWFilterOpen, /* 0.8.0 */
-    .connectClose = remoteNWFilterClose, /* 0.8.0 */
+    .nwfilterOpen = remoteNWFilterOpen, /* 0.8.0 */
+    .nwfilterClose = remoteNWFilterClose, /* 0.8.0 */
     .nwfilterLookupByUUID = remoteNWFilterLookupByUUID, /* 0.8.0 */
     .nwfilterLookupByName = remoteNWFilterLookupByName, /* 0.8.0 */
     .nwfilterGetXMLDesc           = remoteNWFilterGetXMLDesc, /* 0.8.0 */
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 9e7d382..327051d 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -1157,8 +1157,8 @@ secretDriverReload(void)
 
 static virSecretDriver secretDriver = {
     .name = "secret",
-    .connectOpen = secretOpen, /* 0.7.1 */
-    .connectClose = secretClose, /* 0.7.1 */
+    .secretOpen = secretOpen, /* 0.7.1 */
+    .secretClose = secretClose, /* 0.7.1 */
     .connectNumOfSecrets = secretNumOfSecrets, /* 0.7.1 */
     .connectListSecrets = secretListSecrets, /* 0.7.1 */
     .connectListAllSecrets = secretListAllSecrets, /* 0.10.2 */
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 9613b3b..9965b69 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2369,8 +2369,8 @@ storageListAllPools(virConnectPtr conn,
 
 static virStorageDriver storageDriver = {
     .name = "storage",
-    .connectOpen = storageOpen, /* 0.4.0 */
-    .connectClose = storageClose, /* 0.4.0 */
+    .storageOpen = storageOpen, /* 0.4.0 */
+    .storageClose = storageClose, /* 0.4.0 */
     .connectNumOfStoragePools = storageNumPools, /* 0.4.0 */
     .connectListStoragePools = storageListPools, /* 0.4.0 */
     .connectNumOfDefinedStoragePools = storageNumDefinedPools, /* 0.4.0 */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index ebcb160..0b1950d 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5864,8 +5864,8 @@ static virDriver testDriver = {
 
 static virNetworkDriver testNetworkDriver = {
     "Test",
-    .connectOpen = testOpenNetwork, /* 0.3.2 */
-    .connectClose = testCloseNetwork, /* 0.3.2 */
+    .networkOpen = testOpenNetwork, /* 0.3.2 */
+    .networkClose = testCloseNetwork, /* 0.3.2 */
     .connectNumOfNetworks = testNumNetworks, /* 0.3.2 */
     .connectListNetworks = testListNetworks, /* 0.3.2 */
     .connectNumOfDefinedNetworks = testNumDefinedNetworks, /* 0.3.2 */
@@ -5889,8 +5889,8 @@ static virNetworkDriver testNetworkDriver = {
 
 static virInterfaceDriver testInterfaceDriver = {
     "Test",                     /* name */
-    .connectOpen = testOpenInterface, /* 0.7.0 */
-    .connectClose = testCloseInterface, /* 0.7.0 */
+    .interfaceOpen = testOpenInterface, /* 0.7.0 */
+    .interfaceClose = testCloseInterface, /* 0.7.0 */
     .connectNumOfInterfaces = testNumOfInterfaces, /* 0.7.0 */
     .connectListInterfaces = testListInterfaces, /* 0.7.0 */
     .connectNumOfDefinedInterfaces = testNumOfDefinedInterfaces, /* 0.7.0 */
@@ -5911,8 +5911,8 @@ static virInterfaceDriver testInterfaceDriver = {
 
 static virStorageDriver testStorageDriver = {
     .name = "Test",
-    .connectOpen = testStorageOpen, /* 0.4.1 */
-    .connectClose = testStorageClose, /* 0.4.1 */
+    .storageOpen = testStorageOpen, /* 0.4.1 */
+    .storageClose = testStorageClose, /* 0.4.1 */
 
     .connectNumOfStoragePools = testStorageNumPools, /* 0.5.0 */
     .connectListStoragePools = testStorageListPools, /* 0.5.0 */
@@ -5954,8 +5954,8 @@ static virStorageDriver testStorageDriver = {
 
 static virNodeDeviceDriver testNodeDeviceDriver = {
     .name = "Test",
-    .connectOpen = testNodeDeviceOpen, /* 0.6.0 */
-    .connectClose = testNodeDeviceClose, /* 0.6.0 */
+    .nodeDeviceOpen = testNodeDeviceOpen, /* 0.6.0 */
+    .nodeDeviceClose = testNodeDeviceClose, /* 0.6.0 */
 
     .nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */
     .nodeListDevices = testNodeListDevices, /* 0.7.2 */
@@ -5970,15 +5970,15 @@ static virNodeDeviceDriver testNodeDeviceDriver = {
 
 static virSecretDriver testSecretDriver = {
     .name = "Test",
-    .connectOpen = testSecretOpen, /* 0.7.1 */
-    .connectClose = testSecretClose, /* 0.7.1 */
+    .secretOpen = testSecretOpen, /* 0.7.1 */
+    .secretClose = testSecretClose, /* 0.7.1 */
 };
 
 
 static virNWFilterDriver testNWFilterDriver = {
     .name = "Test",
-    .connectOpen = testNWFilterOpen, /* 0.8.0 */
-    .connectClose = testNWFilterClose, /* 0.8.0 */
+    .nwfilterOpen = testNWFilterOpen, /* 0.8.0 */
+    .nwfilterClose = testNWFilterClose, /* 0.8.0 */
 };
 
 /**
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index e9c4d5b..8ef16ba 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -9483,8 +9483,8 @@ virDriver NAME(Driver) = {
 
 virNetworkDriver NAME(NetworkDriver) = {
     "VBOX",
-    .connectOpen = vboxNetworkOpen, /* 0.6.4 */
-    .connectClose = vboxNetworkClose, /* 0.6.4 */
+    .networkOpen = vboxNetworkOpen, /* 0.6.4 */
+    .networkClose = vboxNetworkClose, /* 0.6.4 */
     .connectNumOfNetworks = vboxNumOfNetworks, /* 0.6.4 */
     .connectListNetworks = vboxListNetworks, /* 0.6.4 */
     .connectNumOfDefinedNetworks = vboxNumOfDefinedNetworks, /* 0.6.4 */
@@ -9501,8 +9501,8 @@ virNetworkDriver NAME(NetworkDriver) = {
 
 virStorageDriver NAME(StorageDriver) = {
     .name               = "VBOX",
-    .connectOpen = vboxStorageOpen, /* 0.7.1 */
-    .connectClose = vboxStorageClose, /* 0.7.1 */
+    .storageOpen = vboxStorageOpen, /* 0.7.1 */
+    .storageClose = vboxStorageClose, /* 0.7.1 */
     .connectNumOfStoragePools = vboxStorageNumOfPools, /* 0.7.1 */
     .connectListStoragePools = vboxStorageListPools, /* 0.7.1 */
     .storagePoolLookupByName = vboxStoragePoolLookupByName, /* 0.7.1 */
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 25722f3..b4b1505 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -60,8 +60,8 @@ fakeSecretClose(virConnectPtr conn ATTRIBUTE_UNUSED)
 
 static virSecretDriver fakeSecretDriver = {
     .name = "fake_secret",
-    .connectOpen = NULL,
-    .connectClose = fakeSecretClose,
+    .secretOpen = NULL,
+    .secretClose = fakeSecretClose,
     .connectNumOfSecrets = NULL,
     .connectListSecrets = NULL,
     .secretLookupByUUID = NULL,
-- 
1.8.1.4


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