Dedicated name for sub-driver open/close methods

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>
This commit is contained in:
Daniel P. Berrange 2013-04-23 13:49:21 +01:00
parent 07a6b9aac4
commit d407a11eab
31 changed files with 129 additions and 102 deletions

View File

@ -197,6 +197,8 @@ while (defined($line = <FILE>)) {
my $api; my $api;
if (exists $apis{"vir$name"}) { if (exists $apis{"vir$name"}) {
$api = "vir$name"; $api = "vir$name";
} elsif ($name =~ /\w+(Open|Close)/) {
next;
} else { } else {
die "driver $name does not have a public API"; 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"; die "Driver method for $api is NULL in $src" if $meth eq "NULL";
if (!exists($groups{$ingrp}->{apis}->{$api})) { if (!exists($groups{$ingrp}->{apis}->{$api})) {
next if $api =~ /\w(Open|Close)/;
die "Found unexpected method $api in $ingrp\n"; die "Found unexpected method $api in $ingrp\n";
} }

View File

@ -144,17 +144,17 @@ virConnectDispose(void *obj)
virConnectPtr conn = obj; virConnectPtr conn = obj;
if (conn->networkDriver) if (conn->networkDriver)
conn->networkDriver->connectClose(conn); conn->networkDriver->networkClose(conn);
if (conn->interfaceDriver) if (conn->interfaceDriver)
conn->interfaceDriver->connectClose(conn); conn->interfaceDriver->interfaceClose(conn);
if (conn->storageDriver) if (conn->storageDriver)
conn->storageDriver->connectClose(conn); conn->storageDriver->storageClose(conn);
if (conn->nodeDeviceDriver) if (conn->nodeDeviceDriver)
conn->nodeDeviceDriver->connectClose(conn); conn->nodeDeviceDriver->nodeDeviceClose(conn);
if (conn->secretDriver) if (conn->secretDriver)
conn->secretDriver->connectClose(conn); conn->secretDriver->secretClose(conn);
if (conn->nwfilterDriver) if (conn->nwfilterDriver)
conn->nwfilterDriver->connectClose(conn); conn->nwfilterDriver->nwfilterClose(conn);
if (conn->driver) if (conn->driver)
conn->driver->connectClose(conn); conn->driver->connectClose(conn);

View File

@ -1228,6 +1228,10 @@ struct _virDriver {
virDrvDomainLxcOpenNamespace domainLxcOpenNamespace; virDrvDomainLxcOpenNamespace domainLxcOpenNamespace;
}; };
typedef virDrvConnectOpen virDrvNetworkOpen;
typedef virDrvConnectClose virDrvNetworkClose;
typedef int typedef int
(*virDrvConnectNumOfNetworks)(virConnectPtr conn); (*virDrvConnectNumOfNetworks)(virConnectPtr conn);
@ -1320,8 +1324,8 @@ typedef virNetworkDriver *virNetworkDriverPtr;
*/ */
struct _virNetworkDriver { struct _virNetworkDriver {
const char * name; /* the name of the driver */ const char * name; /* the name of the driver */
virDrvConnectOpen connectOpen; virDrvNetworkOpen networkOpen;
virDrvConnectClose connectClose; virDrvNetworkClose networkClose;
virDrvConnectNumOfNetworks connectNumOfNetworks; virDrvConnectNumOfNetworks connectNumOfNetworks;
virDrvConnectListNetworks connectListNetworks; virDrvConnectListNetworks connectListNetworks;
virDrvConnectNumOfDefinedNetworks connectNumOfDefinedNetworks; virDrvConnectNumOfDefinedNetworks connectNumOfDefinedNetworks;
@ -1344,6 +1348,9 @@ struct _virNetworkDriver {
}; };
typedef virDrvConnectOpen virDrvInterfaceOpen;
typedef virDrvConnectClose virDrvInterfaceClose;
typedef int typedef int
(*virDrvConnectNumOfInterfaces)(virConnectPtr conn); (*virDrvConnectNumOfInterfaces)(virConnectPtr conn);
@ -1423,8 +1430,8 @@ typedef virInterfaceDriver *virInterfaceDriverPtr;
*/ */
struct _virInterfaceDriver { struct _virInterfaceDriver {
const char *name; /* the name of the driver */ const char *name; /* the name of the driver */
virDrvConnectOpen connectOpen; virDrvInterfaceOpen interfaceOpen;
virDrvConnectClose connectClose; virDrvInterfaceClose interfaceClose;
virDrvConnectNumOfInterfaces connectNumOfInterfaces; virDrvConnectNumOfInterfaces connectNumOfInterfaces;
virDrvConnectListInterfaces connectListInterfaces; virDrvConnectListInterfaces connectListInterfaces;
virDrvConnectNumOfDefinedInterfaces connectNumOfDefinedInterfaces; virDrvConnectNumOfDefinedInterfaces connectNumOfDefinedInterfaces;
@ -1444,6 +1451,10 @@ struct _virInterfaceDriver {
}; };
typedef virDrvConnectOpen virDrvStorageOpen;
typedef virDrvConnectClose virDrvStorageClose;
typedef int typedef int
(*virDrvConnectNumOfStoragePools)(virConnectPtr conn); (*virDrvConnectNumOfStoragePools)(virConnectPtr conn);
@ -1632,8 +1643,8 @@ typedef virStorageDriver *virStorageDriverPtr;
*/ */
struct _virStorageDriver { struct _virStorageDriver {
const char * name; /* the name of the driver */ const char * name; /* the name of the driver */
virDrvConnectOpen connectOpen; virDrvStorageOpen storageOpen;
virDrvConnectClose connectClose; virDrvStorageClose storageClose;
virDrvConnectNumOfStoragePools connectNumOfStoragePools; virDrvConnectNumOfStoragePools connectNumOfStoragePools;
virDrvConnectListStoragePools connectListStoragePools; virDrvConnectListStoragePools connectListStoragePools;
virDrvConnectNumOfDefinedStoragePools connectNumOfDefinedStoragePools; virDrvConnectNumOfDefinedStoragePools connectNumOfDefinedStoragePools;
@ -1705,6 +1716,10 @@ struct _virStateDriver {
# endif # endif
typedef virDrvConnectOpen virDrvNodeDeviceOpen;
typedef virDrvConnectClose virDrvNodeDeviceClose;
typedef int typedef int
(*virDrvNodeNumOfDevices)(virConnectPtr conn, (*virDrvNodeNumOfDevices)(virConnectPtr conn,
const char *cap, const char *cap,
@ -1769,8 +1784,8 @@ typedef virNodeDeviceDriver *virNodeDeviceDriverPtr;
*/ */
struct _virNodeDeviceDriver { struct _virNodeDeviceDriver {
const char * name; /* the name of the driver */ const char * name; /* the name of the driver */
virDrvConnectOpen connectOpen; virDrvNodeDeviceOpen nodeDeviceOpen;
virDrvConnectClose connectClose; virDrvNodeDeviceClose nodeDeviceClose;
virDrvNodeNumOfDevices nodeNumOfDevices; virDrvNodeNumOfDevices nodeNumOfDevices;
virDrvNodeListDevices nodeListDevices; virDrvNodeListDevices nodeListDevices;
virDrvConnectListAllNodeDevices connectListAllNodeDevices; virDrvConnectListAllNodeDevices connectListAllNodeDevices;
@ -1790,6 +1805,10 @@ enum {
VIR_SECRET_GET_VALUE_INTERNAL_CALL = 1 << 0, VIR_SECRET_GET_VALUE_INTERNAL_CALL = 1 << 0,
}; };
typedef virDrvConnectOpen virDrvSecretOpen;
typedef virDrvConnectClose virDrvSecretClose;
typedef virSecretPtr typedef virSecretPtr
(*virDrvSecretLookupByUUID)(virConnectPtr conn, (*virDrvSecretLookupByUUID)(virConnectPtr conn,
const unsigned char *uuid); const unsigned char *uuid);
@ -1851,8 +1870,8 @@ typedef virSecretDriver *virSecretDriverPtr;
*/ */
struct _virSecretDriver { struct _virSecretDriver {
const char *name; const char *name;
virDrvConnectOpen connectOpen; virDrvSecretOpen secretOpen;
virDrvConnectClose connectClose; virDrvSecretClose secretClose;
virDrvConnectNumOfSecrets connectNumOfSecrets; virDrvConnectNumOfSecrets connectNumOfSecrets;
virDrvConnectListSecrets connectListSecrets; virDrvConnectListSecrets connectListSecrets;
virDrvConnectListAllSecrets connectListAllSecrets; virDrvConnectListAllSecrets connectListAllSecrets;
@ -1910,6 +1929,10 @@ struct _virStreamDriver {
}; };
typedef virDrvConnectOpen virDrvNWFilterOpen;
typedef virDrvConnectClose virDrvNWFilterClose;
typedef int typedef int
(*virDrvConnectNumOfNWFilters)(virConnectPtr conn); (*virDrvConnectNumOfNWFilters)(virConnectPtr conn);
@ -1958,8 +1981,8 @@ typedef virNWFilterDriver *virNWFilterDriverPtr;
*/ */
struct _virNWFilterDriver { struct _virNWFilterDriver {
const char * name; /* the name of the driver */ const char * name; /* the name of the driver */
virDrvConnectOpen connectOpen; virDrvNWFilterOpen nwfilterOpen;
virDrvConnectClose connectClose; virDrvNWFilterClose nwfilterClose;
virDrvConnectNumOfNWFilters connectNumOfNWFilters; virDrvConnectNumOfNWFilters connectNumOfNWFilters;
virDrvConnectListNWFilters connectListNWFilters; virDrvConnectListNWFilters connectListNWFilters;
virDrvConnectListAllNWFilters connectListAllNWFilters; virDrvConnectListAllNWFilters connectListAllNWFilters;

View File

@ -69,8 +69,8 @@ esxDeviceClose(virConnectPtr conn)
static virNodeDeviceDriver esxNodeDeviceDriver = { static virNodeDeviceDriver esxNodeDeviceDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxDeviceOpen, /* 0.7.6 */ .nodeDeviceOpen = esxDeviceOpen, /* 0.7.6 */
.connectClose = esxDeviceClose, /* 0.7.6 */ .nodeDeviceClose = esxDeviceClose, /* 0.7.6 */
}; };

View File

@ -298,8 +298,8 @@ esxInterfaceIsActive(virInterfacePtr iface ATTRIBUTE_UNUSED)
static virInterfaceDriver esxInterfaceDriver = { static virInterfaceDriver esxInterfaceDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxInterfaceOpen, /* 0.7.6 */ .interfaceOpen = esxInterfaceOpen, /* 0.7.6 */
.connectClose = esxInterfaceClose, /* 0.7.6 */ .interfaceClose = esxInterfaceClose, /* 0.7.6 */
.connectNumOfInterfaces = esxNumberOfInterfaces, /* 0.10.0 */ .connectNumOfInterfaces = esxNumberOfInterfaces, /* 0.10.0 */
.connectListInterfaces = esxListInterfaces, /* 0.10.0 */ .connectListInterfaces = esxListInterfaces, /* 0.10.0 */
.connectNumOfDefinedInterfaces = esxNumberOfDefinedInterfaces, /* 0.10.0 */ .connectNumOfDefinedInterfaces = esxNumberOfDefinedInterfaces, /* 0.10.0 */

View File

@ -933,8 +933,8 @@ esxNetworkIsPersistent(virNetworkPtr network ATTRIBUTE_UNUSED)
static virNetworkDriver esxNetworkDriver = { static virNetworkDriver esxNetworkDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxNetworkOpen, /* 0.7.6 */ .networkOpen = esxNetworkOpen, /* 0.7.6 */
.connectClose = esxNetworkClose, /* 0.7.6 */ .networkClose = esxNetworkClose, /* 0.7.6 */
.connectNumOfNetworks = esxNumberOfNetworks, /* 0.10.0 */ .connectNumOfNetworks = esxNumberOfNetworks, /* 0.10.0 */
.connectListNetworks = esxListNetworks, /* 0.10.0 */ .connectListNetworks = esxListNetworks, /* 0.10.0 */
.connectNumOfDefinedNetworks = esxNumberOfDefinedNetworks, /* 0.10.0 */ .connectNumOfDefinedNetworks = esxNumberOfDefinedNetworks, /* 0.10.0 */

View File

@ -69,8 +69,8 @@ esxNWFilterClose(virConnectPtr conn)
static virNWFilterDriver esxNWFilterDriver = { static virNWFilterDriver esxNWFilterDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxNWFilterOpen, /* 0.8.1 */ .nwfilterOpen = esxNWFilterOpen, /* 0.8.1 */
.connectClose = esxNWFilterClose, /* 0.8.1 */ .nwfilterClose = esxNWFilterClose, /* 0.8.1 */
}; };

View File

@ -67,8 +67,8 @@ esxSecretClose(virConnectPtr conn)
static virSecretDriver esxSecretDriver = { static virSecretDriver esxSecretDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxSecretOpen, /* 0.7.6 */ .secretOpen = esxSecretOpen, /* 0.7.6 */
.connectClose = esxSecretClose, /* 0.7.6 */ .secretClose = esxSecretClose, /* 0.7.6 */
}; };

View File

@ -575,8 +575,8 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
static virStorageDriver esxStorageDriver = { static virStorageDriver esxStorageDriver = {
.name = "ESX", .name = "ESX",
.connectOpen = esxStorageOpen, /* 0.7.6 */ .storageOpen = esxStorageOpen, /* 0.7.6 */
.connectClose = esxStorageClose, /* 0.7.6 */ .storageClose = esxStorageClose, /* 0.7.6 */
.connectNumOfStoragePools = esxNumberOfStoragePools, /* 0.8.2 */ .connectNumOfStoragePools = esxNumberOfStoragePools, /* 0.8.2 */
.connectListStoragePools = esxListStoragePools, /* 0.8.2 */ .connectListStoragePools = esxListStoragePools, /* 0.8.2 */
.connectNumOfDefinedStoragePools = esxNumberOfDefinedStoragePools, /* 0.8.2 */ .connectNumOfDefinedStoragePools = esxNumberOfDefinedStoragePools, /* 0.8.2 */

View File

@ -66,8 +66,8 @@ hypervDeviceClose(virConnectPtr conn)
static virNodeDeviceDriver hypervNodeDeviceDriver = { static virNodeDeviceDriver hypervNodeDeviceDriver = {
"Hyper-V", "Hyper-V",
.connectOpen = hypervDeviceOpen, /* 0.9.5 */ .nodeDeviceOpen = hypervDeviceOpen, /* 0.9.5 */
.connectClose = hypervDeviceClose, /* 0.9.5 */ .nodeDeviceClose = hypervDeviceClose, /* 0.9.5 */
}; };

View File

@ -66,8 +66,8 @@ hypervInterfaceClose(virConnectPtr conn)
static virInterfaceDriver hypervInterfaceDriver = { static virInterfaceDriver hypervInterfaceDriver = {
.name = "Hyper-V", .name = "Hyper-V",
.connectOpen = hypervInterfaceOpen, /* 0.9.5 */ .interfaceOpen = hypervInterfaceOpen, /* 0.9.5 */
.connectClose = hypervInterfaceClose, /* 0.9.5 */ .interfaceClose = hypervInterfaceClose, /* 0.9.5 */
}; };

View File

@ -66,8 +66,8 @@ hypervNetworkClose(virConnectPtr conn)
static virNetworkDriver hypervNetworkDriver = { static virNetworkDriver hypervNetworkDriver = {
.name = "Hyper-V", .name = "Hyper-V",
.connectOpen = hypervNetworkOpen, /* 0.9.5 */ .networkOpen = hypervNetworkOpen, /* 0.9.5 */
.connectClose = hypervNetworkClose, /* 0.9.5 */ .networkClose = hypervNetworkClose, /* 0.9.5 */
}; };

View File

@ -66,8 +66,8 @@ hypervNWFilterClose(virConnectPtr conn)
static virNWFilterDriver hypervNWFilterDriver = { static virNWFilterDriver hypervNWFilterDriver = {
.name = "Hyper-V", .name = "Hyper-V",
.connectOpen = hypervNWFilterOpen, /* 0.9.5 */ .nwfilterOpen = hypervNWFilterOpen, /* 0.9.5 */
.connectClose = hypervNWFilterClose, /* 0.9.5 */ .nwfilterClose = hypervNWFilterClose, /* 0.9.5 */
}; };

View File

@ -66,8 +66,8 @@ hypervSecretClose(virConnectPtr conn)
static virSecretDriver hypervSecretDriver = { static virSecretDriver hypervSecretDriver = {
.name = "Hyper-V", .name = "Hyper-V",
.connectOpen = hypervSecretOpen, /* 0.9.5 */ .secretOpen = hypervSecretOpen, /* 0.9.5 */
.connectClose = hypervSecretClose, /* 0.9.5 */ .secretClose = hypervSecretClose, /* 0.9.5 */
}; };

View File

@ -66,8 +66,8 @@ hypervStorageClose(virConnectPtr conn)
static virStorageDriver hypervStorageDriver = { static virStorageDriver hypervStorageDriver = {
.name = "Hyper-V", .name = "Hyper-V",
.connectOpen = hypervStorageOpen, /* 0.9.5*/ .storageOpen = hypervStorageOpen, /* 0.9.5*/
.connectClose = hypervStorageClose, /* 0.9.5 */ .storageClose = hypervStorageClose, /* 0.9.5 */
}; };

View File

@ -784,8 +784,8 @@ static int interfaceChangeRollback(virConnectPtr conn, unsigned int flags)
static virInterfaceDriver interfaceDriver = { static virInterfaceDriver interfaceDriver = {
"netcf", "netcf",
.connectOpen = interfaceOpenInterface, /* 0.7.0 */ .interfaceOpen = interfaceOpenInterface, /* 0.7.0 */
.connectClose = interfaceCloseInterface, /* 0.7.0 */ .interfaceClose = interfaceCloseInterface, /* 0.7.0 */
.connectNumOfInterfaces = interfaceNumOfInterfaces, /* 0.7.0 */ .connectNumOfInterfaces = interfaceNumOfInterfaces, /* 0.7.0 */
.connectListInterfaces = interfaceListInterfaces, /* 0.7.0 */ .connectListInterfaces = interfaceListInterfaces, /* 0.7.0 */
.connectNumOfDefinedInterfaces = interfaceNumOfDefinedInterfaces, /* 0.7.0 */ .connectNumOfDefinedInterfaces = interfaceNumOfDefinedInterfaces, /* 0.7.0 */

View File

@ -1149,8 +1149,8 @@ cleanup:
static virInterfaceDriver udevIfaceDriver = { static virInterfaceDriver udevIfaceDriver = {
"udev", "udev",
.connectOpen = udevIfaceOpenInterface, /* 1.0.0 */ .interfaceOpen = udevIfaceOpenInterface, /* 1.0.0 */
.connectClose = udevIfaceCloseInterface, /* 1.0.0 */ .interfaceClose = udevIfaceCloseInterface, /* 1.0.0 */
.connectNumOfInterfaces = udevIfaceNumOfInterfaces, /* 1.0.0 */ .connectNumOfInterfaces = udevIfaceNumOfInterfaces, /* 1.0.0 */
.connectListInterfaces = udevIfaceListInterfaces, /* 1.0.0 */ .connectListInterfaces = udevIfaceListInterfaces, /* 1.0.0 */
.connectNumOfDefinedInterfaces = udevIfaceNumOfDefinedInterfaces, /* 1.0.0 */ .connectNumOfDefinedInterfaces = udevIfaceNumOfDefinedInterfaces, /* 1.0.0 */

View File

@ -1233,7 +1233,7 @@ do_open(const char *name,
} }
for (i = 0; i < virNetworkDriverTabCount; i++) { 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", VIR_DEBUG("network driver %d %s returned %s",
i, virNetworkDriverTab[i]->name, i, virNetworkDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@ -1249,7 +1249,7 @@ do_open(const char *name,
} }
for (i = 0; i < virInterfaceDriverTabCount; i++) { 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", VIR_DEBUG("interface driver %d %s returned %s",
i, virInterfaceDriverTab[i]->name, i, virInterfaceDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@ -1266,7 +1266,7 @@ do_open(const char *name,
/* Secondary driver for storage. Optional */ /* Secondary driver for storage. Optional */
for (i = 0; i < virStorageDriverTabCount; i++) { 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", VIR_DEBUG("storage driver %d %s returned %s",
i, virStorageDriverTab[i]->name, i, virStorageDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@ -1283,7 +1283,7 @@ do_open(const char *name,
/* Node driver (optional) */ /* Node driver (optional) */
for (i = 0; i < virNodeDeviceDriverTabCount; i++) { 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", VIR_DEBUG("node driver %d %s returned %s",
i, virNodeDeviceDriverTab[i]->name, i, virNodeDeviceDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@ -1300,7 +1300,7 @@ do_open(const char *name,
/* Secret manipulation driver. Optional */ /* Secret manipulation driver. Optional */
for (i = 0; i < virSecretDriverTabCount; i++) { 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", VIR_DEBUG("secret driver %d %s returned %s",
i, virSecretDriverTab[i]->name, i, virSecretDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :
@ -1317,7 +1317,7 @@ do_open(const char *name,
/* Network filter driver. Optional */ /* Network filter driver. Optional */
for (i = 0; i < virNWFilterDriverTabCount; i++) { 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", VIR_DEBUG("nwfilter driver %d %s returned %s",
i, virNWFilterDriverTab[i]->name, i, virNWFilterDriverTab[i]->name,
res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" : res == VIR_DRV_OPEN_SUCCESS ? "SUCCESS" :

View File

@ -3592,8 +3592,8 @@ cleanup:
static virNetworkDriver networkDriver = { static virNetworkDriver networkDriver = {
"Network", "Network",
.connectOpen = networkOpenNetwork, /* 0.2.0 */ .networkOpen = networkOpenNetwork, /* 0.2.0 */
.connectClose = networkCloseNetwork, /* 0.2.0 */ .networkClose = networkCloseNetwork, /* 0.2.0 */
.connectNumOfNetworks = networkNumNetworks, /* 0.2.0 */ .connectNumOfNetworks = networkNumNetworks, /* 0.2.0 */
.connectListNetworks = networkListNetworks, /* 0.2.0 */ .connectListNetworks = networkListNetworks, /* 0.2.0 */
.connectNumOfDefinedNetworks = networkNumDefinedNetworks, /* 0.2.0 */ .connectNumOfDefinedNetworks = networkNumDefinedNetworks, /* 0.2.0 */

View File

@ -763,8 +763,8 @@ static int halNodeDrvClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static virNodeDeviceDriver halNodeDeviceDriver = { static virNodeDeviceDriver halNodeDeviceDriver = {
.name = "halNodeDeviceDriver", .name = "halNodeDeviceDriver",
.connectOpen = halNodeDrvOpen, /* 0.5.0 */ .nodeDeviceOpen = halNodeDrvOpen, /* 0.5.0 */
.connectClose = halNodeDrvClose, /* 0.5.0 */ .nodDeviceClose = halNodeDrvClose, /* 0.5.0 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */ .nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */
.nodeListDevices = nodeListDevices, /* 0.5.0 */ .nodeListDevices = nodeListDevices, /* 0.5.0 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */ .connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */

View File

@ -1793,8 +1793,8 @@ static int udevNodeDrvClose(virConnectPtr conn)
static virNodeDeviceDriver udevNodeDeviceDriver = { static virNodeDeviceDriver udevNodeDeviceDriver = {
.name = "udevNodeDeviceDriver", .name = "udevNodeDeviceDriver",
.connectOpen = udevNodeDrvOpen, /* 0.7.3 */ .nodeDeviceOpen = udevNodeDrvOpen, /* 0.7.3 */
.connectClose = udevNodeDrvClose, /* 0.7.3 */ .nodeDeviceClose = udevNodeDrvClose, /* 0.7.3 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */ .nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */
.nodeListDevices = nodeListDevices, /* 0.7.3 */ .nodeListDevices = nodeListDevices, /* 0.7.3 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */ .connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */

View File

@ -659,8 +659,8 @@ nwfilterTeardownFilter(virDomainNetDefPtr net) {
static virNWFilterDriver nwfilterDriver = { static virNWFilterDriver nwfilterDriver = {
.name = "nwfilter", .name = "nwfilter",
.connectOpen = nwfilterOpen, /* 0.8.0 */ .nwfilterOpen = nwfilterOpen, /* 0.8.0 */
.connectClose = nwfilterClose, /* 0.8.0 */ .nwfilterClose = nwfilterClose, /* 0.8.0 */
.connectNumOfNWFilters = nwfilterNumNWFilters, /* 0.8.0 */ .connectNumOfNWFilters = nwfilterNumNWFilters, /* 0.8.0 */
.connectListNWFilters = nwfilterListNWFilters, /* 0.8.0 */ .connectListNWFilters = nwfilterListNWFilters, /* 0.8.0 */
.connectListAllNWFilters = nwfilterListAllNWFilters, /* 0.10.2 */ .connectListAllNWFilters = nwfilterListAllNWFilters, /* 0.10.2 */

View File

@ -614,8 +614,8 @@ cleanup:
} }
static virNetworkDriver parallelsNetworkDriver = { static virNetworkDriver parallelsNetworkDriver = {
"Parallels", "Parallels",
.connectOpen = parallelsOpenNetwork, /* 1.0.1 */ .networkOpen = parallelsOpenNetwork, /* 1.0.1 */
.connectClose = parallelsCloseNetwork, /* 1.0.1 */ .networkClose = parallelsCloseNetwork, /* 1.0.1 */
.connectNumOfNetworks = parallelsNumNetworks, /* 1.0.1 */ .connectNumOfNetworks = parallelsNumNetworks, /* 1.0.1 */
.connectListNetworks = parallelsListNetworks, /* 1.0.1 */ .connectListNetworks = parallelsListNetworks, /* 1.0.1 */
.connectNumOfDefinedNetworks = parallelsNumDefinedNetworks, /* 1.0.1 */ .connectNumOfDefinedNetworks = parallelsNumDefinedNetworks, /* 1.0.1 */

View File

@ -1671,8 +1671,8 @@ cleanup:
static virStorageDriver parallelsStorageDriver = { static virStorageDriver parallelsStorageDriver = {
.name = "Parallels", .name = "Parallels",
.connectOpen = parallelsStorageOpen, /* 0.10.0 */ .storageOpen = parallelsStorageOpen, /* 0.10.0 */
.connectClose = parallelsStorageClose, /* 0.10.0 */ .storageClose = parallelsStorageClose, /* 0.10.0 */
.connectNumOfStoragePools = parallelsStorageNumPools, /* 0.10.0 */ .connectNumOfStoragePools = parallelsStorageNumPools, /* 0.10.0 */
.connectListStoragePools = parallelsStorageListPools, /* 0.10.0 */ .connectListStoragePools = parallelsStorageListPools, /* 0.10.0 */

View File

@ -3795,8 +3795,8 @@ static virDriver phypDriver = {
static virStorageDriver phypStorageDriver = { static virStorageDriver phypStorageDriver = {
.name = "PHYP", .name = "PHYP",
.connectOpen = phypVIOSDriverOpen, /* 0.8.2 */ .storageOpen = phypVIOSDriverOpen, /* 0.8.2 */
.connectClose = phypVIOSDriverClose, /* 0.8.2 */ .storageClose = phypVIOSDriverClose, /* 0.8.2 */
.connectNumOfStoragePools = phypNumOfStoragePools, /* 0.8.2 */ .connectNumOfStoragePools = phypNumOfStoragePools, /* 0.8.2 */
.connectListStoragePools = phypListStoragePools, /* 0.8.2 */ .connectListStoragePools = phypListStoragePools, /* 0.8.2 */
@ -3817,8 +3817,8 @@ static virStorageDriver phypStorageDriver = {
static virInterfaceDriver phypInterfaceDriver = { static virInterfaceDriver phypInterfaceDriver = {
.name = "PHYP", .name = "PHYP",
.connectOpen = phypVIOSDriverOpen, /* 0.9.1 */ .interfaceOpen = phypVIOSDriverOpen, /* 0.9.1 */
.connectClose = phypVIOSDriverClose, /* 0.9.1 */ .interfaceClose = phypVIOSDriverClose, /* 0.9.1 */
.connectNumOfInterfaces = phypNumOfInterfaces, /* 0.9.1 */ .connectNumOfInterfaces = phypNumOfInterfaces, /* 0.9.1 */
.connectListInterfaces = phypListInterfaces, /* 0.9.1 */ .connectListInterfaces = phypListInterfaces, /* 0.9.1 */
.interfaceLookupByName = phypInterfaceLookupByName, /* 0.9.1 */ .interfaceLookupByName = phypInterfaceLookupByName, /* 0.9.1 */

View File

@ -6306,8 +6306,8 @@ static virDriver remote_driver = {
static virNetworkDriver network_driver = { static virNetworkDriver network_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteNetworkOpen, /* 0.3.0 */ .networkOpen = remoteNetworkOpen, /* 0.3.0 */
.connectClose = remoteNetworkClose, /* 0.3.0 */ .networkClose = remoteNetworkClose, /* 0.3.0 */
.connectNumOfNetworks = remoteConnectNumOfNetworks, /* 0.3.0 */ .connectNumOfNetworks = remoteConnectNumOfNetworks, /* 0.3.0 */
.connectListNetworks = remoteConnectListNetworks, /* 0.3.0 */ .connectListNetworks = remoteConnectListNetworks, /* 0.3.0 */
.connectNumOfDefinedNetworks = remoteConnectNumOfDefinedNetworks, /* 0.3.0 */ .connectNumOfDefinedNetworks = remoteConnectNumOfDefinedNetworks, /* 0.3.0 */
@ -6331,8 +6331,8 @@ static virNetworkDriver network_driver = {
static virInterfaceDriver interface_driver = { static virInterfaceDriver interface_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteInterfaceOpen, /* 0.7.2 */ .interfaceOpen = remoteInterfaceOpen, /* 0.7.2 */
.connectClose = remoteInterfaceClose, /* 0.7.2 */ .interfaceClose = remoteInterfaceClose, /* 0.7.2 */
.connectNumOfInterfaces = remoteConnectNumOfInterfaces, /* 0.7.2 */ .connectNumOfInterfaces = remoteConnectNumOfInterfaces, /* 0.7.2 */
.connectListInterfaces = remoteConnectListInterfaces, /* 0.7.2 */ .connectListInterfaces = remoteConnectListInterfaces, /* 0.7.2 */
.connectNumOfDefinedInterfaces = remoteConnectNumOfDefinedInterfaces, /* 0.7.2 */ .connectNumOfDefinedInterfaces = remoteConnectNumOfDefinedInterfaces, /* 0.7.2 */
@ -6353,8 +6353,8 @@ static virInterfaceDriver interface_driver = {
static virStorageDriver storage_driver = { static virStorageDriver storage_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteStorageOpen, /* 0.4.1 */ .storageOpen = remoteStorageOpen, /* 0.4.1 */
.connectClose = remoteStorageClose, /* 0.4.1 */ .storageClose = remoteStorageClose, /* 0.4.1 */
.connectNumOfStoragePools = remoteConnectNumOfStoragePools, /* 0.4.1 */ .connectNumOfStoragePools = remoteConnectNumOfStoragePools, /* 0.4.1 */
.connectListStoragePools = remoteConnectListStoragePools, /* 0.4.1 */ .connectListStoragePools = remoteConnectListStoragePools, /* 0.4.1 */
.connectNumOfDefinedStoragePools = remoteConnectNumOfDefinedStoragePools, /* 0.4.1 */ .connectNumOfDefinedStoragePools = remoteConnectNumOfDefinedStoragePools, /* 0.4.1 */
@ -6400,8 +6400,8 @@ static virStorageDriver storage_driver = {
static virSecretDriver secret_driver = { static virSecretDriver secret_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteSecretOpen, /* 0.7.1 */ .secretOpen = remoteSecretOpen, /* 0.7.1 */
.connectClose = remoteSecretClose, /* 0.7.1 */ .secretClose = remoteSecretClose, /* 0.7.1 */
.connectNumOfSecrets = remoteConnectNumOfSecrets, /* 0.7.1 */ .connectNumOfSecrets = remoteConnectNumOfSecrets, /* 0.7.1 */
.connectListSecrets = remoteConnectListSecrets, /* 0.7.1 */ .connectListSecrets = remoteConnectListSecrets, /* 0.7.1 */
.connectListAllSecrets = remoteConnectListAllSecrets, /* 0.10.2 */ .connectListAllSecrets = remoteConnectListAllSecrets, /* 0.10.2 */
@ -6416,8 +6416,8 @@ static virSecretDriver secret_driver = {
static virNodeDeviceDriver node_device_driver = { static virNodeDeviceDriver node_device_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteNodeDeviceOpen, /* 0.5.0 */ .nodeDeviceOpen = remoteNodeDeviceOpen, /* 0.5.0 */
.connectClose = remoteNodeDeviceClose, /* 0.5.0 */ .nodeDeviceClose = remoteNodeDeviceClose, /* 0.5.0 */
.nodeNumOfDevices = remoteNodeNumOfDevices, /* 0.5.0 */ .nodeNumOfDevices = remoteNodeNumOfDevices, /* 0.5.0 */
.nodeListDevices = remoteNodeListDevices, /* 0.5.0 */ .nodeListDevices = remoteNodeListDevices, /* 0.5.0 */
.connectListAllNodeDevices = remoteConnectListAllNodeDevices, /* 0.10.2 */ .connectListAllNodeDevices = remoteConnectListAllNodeDevices, /* 0.10.2 */
@ -6433,8 +6433,8 @@ static virNodeDeviceDriver node_device_driver = {
static virNWFilterDriver nwfilter_driver = { static virNWFilterDriver nwfilter_driver = {
.name = "remote", .name = "remote",
.connectOpen = remoteNWFilterOpen, /* 0.8.0 */ .nwfilterOpen = remoteNWFilterOpen, /* 0.8.0 */
.connectClose = remoteNWFilterClose, /* 0.8.0 */ .nwfilterClose = remoteNWFilterClose, /* 0.8.0 */
.nwfilterLookupByUUID = remoteNWFilterLookupByUUID, /* 0.8.0 */ .nwfilterLookupByUUID = remoteNWFilterLookupByUUID, /* 0.8.0 */
.nwfilterLookupByName = remoteNWFilterLookupByName, /* 0.8.0 */ .nwfilterLookupByName = remoteNWFilterLookupByName, /* 0.8.0 */
.nwfilterGetXMLDesc = remoteNWFilterGetXMLDesc, /* 0.8.0 */ .nwfilterGetXMLDesc = remoteNWFilterGetXMLDesc, /* 0.8.0 */

View File

@ -1157,8 +1157,8 @@ secretDriverReload(void)
static virSecretDriver secretDriver = { static virSecretDriver secretDriver = {
.name = "secret", .name = "secret",
.connectOpen = secretOpen, /* 0.7.1 */ .secretOpen = secretOpen, /* 0.7.1 */
.connectClose = secretClose, /* 0.7.1 */ .secretClose = secretClose, /* 0.7.1 */
.connectNumOfSecrets = secretNumOfSecrets, /* 0.7.1 */ .connectNumOfSecrets = secretNumOfSecrets, /* 0.7.1 */
.connectListSecrets = secretListSecrets, /* 0.7.1 */ .connectListSecrets = secretListSecrets, /* 0.7.1 */
.connectListAllSecrets = secretListAllSecrets, /* 0.10.2 */ .connectListAllSecrets = secretListAllSecrets, /* 0.10.2 */

View File

@ -2369,8 +2369,8 @@ storageListAllPools(virConnectPtr conn,
static virStorageDriver storageDriver = { static virStorageDriver storageDriver = {
.name = "storage", .name = "storage",
.connectOpen = storageOpen, /* 0.4.0 */ .storageOpen = storageOpen, /* 0.4.0 */
.connectClose = storageClose, /* 0.4.0 */ .storageClose = storageClose, /* 0.4.0 */
.connectNumOfStoragePools = storageNumPools, /* 0.4.0 */ .connectNumOfStoragePools = storageNumPools, /* 0.4.0 */
.connectListStoragePools = storageListPools, /* 0.4.0 */ .connectListStoragePools = storageListPools, /* 0.4.0 */
.connectNumOfDefinedStoragePools = storageNumDefinedPools, /* 0.4.0 */ .connectNumOfDefinedStoragePools = storageNumDefinedPools, /* 0.4.0 */

View File

@ -5864,8 +5864,8 @@ static virDriver testDriver = {
static virNetworkDriver testNetworkDriver = { static virNetworkDriver testNetworkDriver = {
"Test", "Test",
.connectOpen = testOpenNetwork, /* 0.3.2 */ .networkOpen = testOpenNetwork, /* 0.3.2 */
.connectClose = testCloseNetwork, /* 0.3.2 */ .networkClose = testCloseNetwork, /* 0.3.2 */
.connectNumOfNetworks = testNumNetworks, /* 0.3.2 */ .connectNumOfNetworks = testNumNetworks, /* 0.3.2 */
.connectListNetworks = testListNetworks, /* 0.3.2 */ .connectListNetworks = testListNetworks, /* 0.3.2 */
.connectNumOfDefinedNetworks = testNumDefinedNetworks, /* 0.3.2 */ .connectNumOfDefinedNetworks = testNumDefinedNetworks, /* 0.3.2 */
@ -5889,8 +5889,8 @@ static virNetworkDriver testNetworkDriver = {
static virInterfaceDriver testInterfaceDriver = { static virInterfaceDriver testInterfaceDriver = {
"Test", /* name */ "Test", /* name */
.connectOpen = testOpenInterface, /* 0.7.0 */ .interfaceOpen = testOpenInterface, /* 0.7.0 */
.connectClose = testCloseInterface, /* 0.7.0 */ .interfaceClose = testCloseInterface, /* 0.7.0 */
.connectNumOfInterfaces = testNumOfInterfaces, /* 0.7.0 */ .connectNumOfInterfaces = testNumOfInterfaces, /* 0.7.0 */
.connectListInterfaces = testListInterfaces, /* 0.7.0 */ .connectListInterfaces = testListInterfaces, /* 0.7.0 */
.connectNumOfDefinedInterfaces = testNumOfDefinedInterfaces, /* 0.7.0 */ .connectNumOfDefinedInterfaces = testNumOfDefinedInterfaces, /* 0.7.0 */
@ -5911,8 +5911,8 @@ static virInterfaceDriver testInterfaceDriver = {
static virStorageDriver testStorageDriver = { static virStorageDriver testStorageDriver = {
.name = "Test", .name = "Test",
.connectOpen = testStorageOpen, /* 0.4.1 */ .storageOpen = testStorageOpen, /* 0.4.1 */
.connectClose = testStorageClose, /* 0.4.1 */ .storageClose = testStorageClose, /* 0.4.1 */
.connectNumOfStoragePools = testStorageNumPools, /* 0.5.0 */ .connectNumOfStoragePools = testStorageNumPools, /* 0.5.0 */
.connectListStoragePools = testStorageListPools, /* 0.5.0 */ .connectListStoragePools = testStorageListPools, /* 0.5.0 */
@ -5954,8 +5954,8 @@ static virStorageDriver testStorageDriver = {
static virNodeDeviceDriver testNodeDeviceDriver = { static virNodeDeviceDriver testNodeDeviceDriver = {
.name = "Test", .name = "Test",
.connectOpen = testNodeDeviceOpen, /* 0.6.0 */ .nodeDeviceOpen = testNodeDeviceOpen, /* 0.6.0 */
.connectClose = testNodeDeviceClose, /* 0.6.0 */ .nodeDeviceClose = testNodeDeviceClose, /* 0.6.0 */
.nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */ .nodeNumOfDevices = testNodeNumOfDevices, /* 0.7.2 */
.nodeListDevices = testNodeListDevices, /* 0.7.2 */ .nodeListDevices = testNodeListDevices, /* 0.7.2 */
@ -5970,15 +5970,15 @@ static virNodeDeviceDriver testNodeDeviceDriver = {
static virSecretDriver testSecretDriver = { static virSecretDriver testSecretDriver = {
.name = "Test", .name = "Test",
.connectOpen = testSecretOpen, /* 0.7.1 */ .secretOpen = testSecretOpen, /* 0.7.1 */
.connectClose = testSecretClose, /* 0.7.1 */ .secretClose = testSecretClose, /* 0.7.1 */
}; };
static virNWFilterDriver testNWFilterDriver = { static virNWFilterDriver testNWFilterDriver = {
.name = "Test", .name = "Test",
.connectOpen = testNWFilterOpen, /* 0.8.0 */ .nwfilterOpen = testNWFilterOpen, /* 0.8.0 */
.connectClose = testNWFilterClose, /* 0.8.0 */ .nwfilterClose = testNWFilterClose, /* 0.8.0 */
}; };
/** /**

View File

@ -9483,8 +9483,8 @@ virDriver NAME(Driver) = {
virNetworkDriver NAME(NetworkDriver) = { virNetworkDriver NAME(NetworkDriver) = {
"VBOX", "VBOX",
.connectOpen = vboxNetworkOpen, /* 0.6.4 */ .networkOpen = vboxNetworkOpen, /* 0.6.4 */
.connectClose = vboxNetworkClose, /* 0.6.4 */ .networkClose = vboxNetworkClose, /* 0.6.4 */
.connectNumOfNetworks = vboxNumOfNetworks, /* 0.6.4 */ .connectNumOfNetworks = vboxNumOfNetworks, /* 0.6.4 */
.connectListNetworks = vboxListNetworks, /* 0.6.4 */ .connectListNetworks = vboxListNetworks, /* 0.6.4 */
.connectNumOfDefinedNetworks = vboxNumOfDefinedNetworks, /* 0.6.4 */ .connectNumOfDefinedNetworks = vboxNumOfDefinedNetworks, /* 0.6.4 */
@ -9501,8 +9501,8 @@ virNetworkDriver NAME(NetworkDriver) = {
virStorageDriver NAME(StorageDriver) = { virStorageDriver NAME(StorageDriver) = {
.name = "VBOX", .name = "VBOX",
.connectOpen = vboxStorageOpen, /* 0.7.1 */ .storageOpen = vboxStorageOpen, /* 0.7.1 */
.connectClose = vboxStorageClose, /* 0.7.1 */ .storageClose = vboxStorageClose, /* 0.7.1 */
.connectNumOfStoragePools = vboxStorageNumOfPools, /* 0.7.1 */ .connectNumOfStoragePools = vboxStorageNumOfPools, /* 0.7.1 */
.connectListStoragePools = vboxStorageListPools, /* 0.7.1 */ .connectListStoragePools = vboxStorageListPools, /* 0.7.1 */
.storagePoolLookupByName = vboxStoragePoolLookupByName, /* 0.7.1 */ .storagePoolLookupByName = vboxStoragePoolLookupByName, /* 0.7.1 */

View File

@ -60,8 +60,8 @@ fakeSecretClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static virSecretDriver fakeSecretDriver = { static virSecretDriver fakeSecretDriver = {
.name = "fake_secret", .name = "fake_secret",
.connectOpen = NULL, .secretOpen = NULL,
.connectClose = fakeSecretClose, .secretClose = fakeSecretClose,
.connectNumOfSecrets = NULL, .connectNumOfSecrets = NULL,
.connectListSecrets = NULL, .connectListSecrets = NULL,
.secretLookupByUUID = NULL, .secretLookupByUUID = NULL,