Make driver method names consistent with public APIs

Ensure that all drivers implementing public APIs use a
naming convention for their implementation that matches
the public API name.

eg for the public API   virDomainCreate make sure QEMU
uses qemuDomainCreate and not qemuDomainStart

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-04-23 13:50:18 +01:00
parent d407a11eab
commit 90430791ae
37 changed files with 1709 additions and 1527 deletions

View File

@ -437,8 +437,56 @@ check-drivername:
EXTRA_DIST += check-drivername.pl
DRIVER_SOURCE_FILES = \
esx/esx_device_monitor.c \
esx/esx_driver.c \
esx/esx_interface_driver.c \
esx/esx_network_driver.c \
esx/esx_nwfilter_driver.c \
esx/esx_secret_driver.c \
esx/esx_storage_driver.c \
hyperv/hyperv_device_monitor.c \
hyperv/hyperv_driver.c \
hyperv/hyperv_interface_driver.c \
hyperv/hyperv_network_driver.c \
hyperv/hyperv_nwfilter_driver.c \
hyperv/hyperv_secret_driver.c \
hyperv/hyperv_storage_driver.c \
interface/interface_backend_netcf.c \
interface/interface_backend_udev.c \
libxl/libxl_driver.c \
lxc/lxc_driver.c \
network/bridge_driver.c \
node_device/node_device_hal.c \
node_device/node_device_udev.c \
nwfilter/nwfilter_driver.c \
openvz/openvz_driver.c \
parallels/parallels_driver.c \
parallels/parallels_network.c \
parallels/parallels_storage.c \
phyp/phyp_driver.c \
qemu/qemu_driver.c \
remote/remote_driver.c \
secret/secret_driver.c \
storage/storage_driver.c \
test/test_driver.c \
uml/uml_driver.c \
vbox/vbox_driver.c \
vbox/vbox_tmpl.c \
vmware/vmware_driver.c \
xen/xen_driver.c \
xenapi/xenapi_driver.c \
$(NULL)
check-driverimpls:
$(AM_V_GEN)$(PERL) $(srcdir)/check-driverimpls.pl \
$(DRIVER_SOURCE_FILES)
EXTRA_DIST += check-driverimpls.pl
check-local: check-protocol check-symfile check-symsorting \
check-drivername
check-drivername check-driverimpls
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
# Mock driver, covering domains, storage, networks, etc

81
src/check-driverimpls.pl Executable file
View File

@ -0,0 +1,81 @@
#!/usr/bin/perl
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
#
use strict;
use warnings;
my $intable = 0;
my $table;
my $mainprefix;
my $status = 0;
while (<>) {
if ($intable) {
if (/}/) {
$intable = 0;
$table = undef;
$mainprefix = undef;
} elsif (/\.(\w+)\s*=\s*(\w+),?/) {
my $api = $1;
my $impl = $2;
next if $api eq "no";
next if $api eq "name";
my $suffix = $impl;
my $prefix = $impl;
$prefix =~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/;
# External impls
next if $prefix eq "node";
next if $prefix eq "vir";
if (defined $mainprefix) {
if ($mainprefix ne $prefix) {
print "$ARGV:$. Bad prefix '$prefix' for API '$api', expecting '$mainprefix'\n";
$status = 1;
}
} else {
$mainprefix = $prefix;
}
if ($api !~ /^$mainprefix/) {
$suffix =~ s/^[a-z]+(?:Unified)?//;
$suffix =~ s/^([A-Z]+)/lc $1/e;
}
if ($api ne $suffix) {
my $want = $api;
$want =~ s/^nwf/NWF/;
if ($api !~ /^$mainprefix/) {
$want =~ s/^([a-z])/uc $1/e;
$want = $mainprefix . $want;
}
print "$ARGV:$. Bad impl name '$impl' for API '$api', expecting '$want'\n";
$status = 1;
}
}
} elsif (/^(?:static\s+)?(vir(?:\w+)?Driver)\s+/) {
next if $1 eq "virNWFilterCallbackDriver";
$intable = 1;
$table = $1;
}
}
exit $status;

View File

@ -40,7 +40,7 @@
static virDrvOpenStatus
esxDeviceOpen(virConnectPtr conn,
esxNodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -58,7 +58,7 @@ esxDeviceOpen(virConnectPtr conn,
static int
esxDeviceClose(virConnectPtr conn)
esxNodeDeviceClose(virConnectPtr conn)
{
conn->nodeDevicePrivateData = NULL;
@ -69,8 +69,8 @@ esxDeviceClose(virConnectPtr conn)
static virNodeDeviceDriver esxNodeDeviceDriver = {
.name = "ESX",
.nodeDeviceOpen = esxDeviceOpen, /* 0.7.6 */
.nodeDeviceClose = esxDeviceClose, /* 0.7.6 */
.nodeDeviceOpen = esxNodeDeviceOpen, /* 0.7.6 */
.nodeDeviceClose = esxNodeDeviceClose, /* 0.7.6 */
};

View File

@ -925,7 +925,7 @@ esxConnectToVCenter(esxPrivate *priv,
* socks5. The optional <port> part allows to override the default port 1080.
*/
static virDrvOpenStatus
esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
@ -1107,7 +1107,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
static int
esxClose(virConnectPtr conn)
esxConnectClose(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
int result = 0;
@ -1173,7 +1173,7 @@ esxSupportsVMotion(esxPrivate *priv)
static int
esxSupportsFeature(virConnectPtr conn, int feature)
esxConnectSupportsFeature(virConnectPtr conn, int feature)
{
esxPrivate *priv = conn->privateData;
esxVI_Boolean supportsVMotion = esxVI_Boolean_Undefined;
@ -1198,7 +1198,7 @@ esxSupportsFeature(virConnectPtr conn, int feature)
static const char *
esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
esxConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return "ESX";
}
@ -1206,7 +1206,7 @@ esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxGetVersion(virConnectPtr conn, unsigned long *version)
esxConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
esxPrivate *priv = conn->privateData;
@ -1225,7 +1225,7 @@ esxGetVersion(virConnectPtr conn, unsigned long *version)
static char *
esxGetHostname(virConnectPtr conn)
esxConnectGetHostname(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL;
@ -1450,7 +1450,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
static char *
esxGetCapabilities(virConnectPtr conn)
esxConnectGetCapabilities(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
char *xml = virCapabilitiesFormatXML(priv->caps);
@ -1466,7 +1466,7 @@ esxGetCapabilities(virConnectPtr conn)
static int
esxListDomains(virConnectPtr conn, int *ids, int maxids)
esxConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
bool success = false;
esxPrivate *priv = conn->privateData;
@ -1530,7 +1530,7 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids)
static int
esxNumberOfDomains(virConnectPtr conn)
esxConnectNumOfDomains(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
@ -2807,7 +2807,7 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
static char *
esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
{
@ -2849,7 +2849,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
static char *
esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
const char *domainXml,
unsigned int flags)
{
@ -2902,7 +2902,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
static int
esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
esxConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
{
bool success = false;
esxPrivate *priv = conn->privateData;
@ -2974,7 +2974,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
static int
esxNumberOfDefinedDomains(virConnectPtr conn)
esxConnectNumOfDefinedDomains(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
@ -4109,7 +4109,7 @@ esxNodeGetFreeMemory(virConnectPtr conn)
static int
esxIsEncrypted(virConnectPtr conn)
esxConnectIsEncrypted(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
@ -4123,7 +4123,7 @@ esxIsEncrypted(virConnectPtr conn)
static int
esxIsSecure(virConnectPtr conn)
esxConnectIsSecure(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
@ -4137,7 +4137,7 @@ esxIsSecure(virConnectPtr conn)
static int
esxIsAlive(virConnectPtr conn)
esxConnectIsAlive(virConnectPtr conn)
{
esxPrivate *priv = conn->privateData;
@ -5004,7 +5004,7 @@ esxDomainGetMemoryParameters(virDomainPtr domain, virTypedParameterPtr params,
#define MATCH(FLAG) (flags & (FLAG))
static int
esxListAllDomains(virConnectPtr conn,
esxConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -5236,17 +5236,17 @@ no_memory:
static virDriver esxDriver = {
.no = VIR_DRV_ESX,
.name = "ESX",
.connectOpen = esxOpen, /* 0.7.0 */
.connectClose = esxClose, /* 0.7.0 */
.connectSupportsFeature = esxSupportsFeature, /* 0.7.0 */
.connectGetType = esxGetType, /* 0.7.0 */
.connectGetVersion = esxGetVersion, /* 0.7.0 */
.connectGetHostname = esxGetHostname, /* 0.7.0 */
.connectOpen = esxConnectOpen, /* 0.7.0 */
.connectClose = esxConnectClose, /* 0.7.0 */
.connectSupportsFeature = esxConnectSupportsFeature, /* 0.7.0 */
.connectGetType = esxConnectGetType, /* 0.7.0 */
.connectGetVersion = esxConnectGetVersion, /* 0.7.0 */
.connectGetHostname = esxConnectGetHostname, /* 0.7.0 */
.nodeGetInfo = esxNodeGetInfo, /* 0.7.0 */
.connectGetCapabilities = esxGetCapabilities, /* 0.7.1 */
.connectListDomains = esxListDomains, /* 0.7.0 */
.connectNumOfDomains = esxNumberOfDomains, /* 0.7.0 */
.connectListAllDomains = esxListAllDomains, /* 0.10.2 */
.connectGetCapabilities = esxConnectGetCapabilities, /* 0.7.1 */
.connectListDomains = esxConnectListDomains, /* 0.7.0 */
.connectNumOfDomains = esxConnectNumOfDomains, /* 0.7.0 */
.connectListAllDomains = esxConnectListAllDomains, /* 0.10.2 */
.domainLookupByID = esxDomainLookupByID, /* 0.7.0 */
.domainLookupByUUID = esxDomainLookupByUUID, /* 0.7.0 */
.domainLookupByName = esxDomainLookupByName, /* 0.7.0 */
@ -5270,10 +5270,10 @@ static virDriver esxDriver = {
.domainGetVcpusFlags = esxDomainGetVcpusFlags, /* 0.8.5 */
.domainGetMaxVcpus = esxDomainGetMaxVcpus, /* 0.7.0 */
.domainGetXMLDesc = esxDomainGetXMLDesc, /* 0.7.0 */
.connectDomainXMLFromNative = esxDomainXMLFromNative, /* 0.7.0 */
.connectDomainXMLToNative = esxDomainXMLToNative, /* 0.7.2 */
.connectListDefinedDomains = esxListDefinedDomains, /* 0.7.0 */
.connectNumOfDefinedDomains = esxNumberOfDefinedDomains, /* 0.7.0 */
.connectDomainXMLFromNative = esxConnectDomainXMLFromNative, /* 0.7.0 */
.connectDomainXMLToNative = esxConnectDomainXMLToNative, /* 0.7.2 */
.connectListDefinedDomains = esxConnectListDefinedDomains, /* 0.7.0 */
.connectNumOfDefinedDomains = esxConnectNumOfDefinedDomains, /* 0.7.0 */
.domainCreate = esxDomainCreate, /* 0.7.0 */
.domainCreateWithFlags = esxDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = esxDomainDefineXML, /* 0.7.2 */
@ -5290,8 +5290,8 @@ static virDriver esxDriver = {
.domainMigratePerform = esxDomainMigratePerform, /* 0.7.0 */
.domainMigrateFinish = esxDomainMigrateFinish, /* 0.7.0 */
.nodeGetFreeMemory = esxNodeGetFreeMemory, /* 0.7.2 */
.connectIsEncrypted = esxIsEncrypted, /* 0.7.3 */
.connectIsSecure = esxIsSecure, /* 0.7.3 */
.connectIsEncrypted = esxConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = esxConnectIsSecure, /* 0.7.3 */
.domainIsActive = esxDomainIsActive, /* 0.7.3 */
.domainIsPersistent = esxDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = esxDomainIsUpdated, /* 0.8.6 */
@ -5309,7 +5309,7 @@ static virDriver esxDriver = {
.domainSnapshotIsCurrent = esxDomainSnapshotIsCurrent, /* 0.9.13 */
.domainSnapshotHasMetadata = esxDomainSnapshotHasMetadata, /* 0.9.13 */
.domainSnapshotDelete = esxDomainSnapshotDelete, /* 0.8.0 */
.connectIsAlive = esxIsAlive, /* 0.9.8 */
.connectIsAlive = esxConnectIsAlive, /* 0.9.8 */
};

View File

@ -70,7 +70,7 @@ esxInterfaceClose(virConnectPtr conn)
static int
esxNumberOfInterfaces(virConnectPtr conn)
esxConnectNumOfInterfaces(virConnectPtr conn)
{
esxPrivate *priv = conn->interfacePrivateData;
esxVI_PhysicalNic *physicalNicList = NULL;
@ -95,7 +95,7 @@ esxNumberOfInterfaces(virConnectPtr conn)
static int
esxListInterfaces(virConnectPtr conn, char **const names, int maxnames)
esxConnectListInterfaces(virConnectPtr conn, char **const names, int maxnames)
{
bool success = false;
esxPrivate *priv = conn->interfacePrivateData;
@ -144,7 +144,7 @@ esxListInterfaces(virConnectPtr conn, char **const names, int maxnames)
static int
esxNumberOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
esxConnectNumOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* ESX interfaces are always active */
return 0;
@ -153,7 +153,7 @@ esxNumberOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED,
esxConnectListDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
@ -300,10 +300,10 @@ static virInterfaceDriver esxInterfaceDriver = {
.name = "ESX",
.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 */
.connectListDefinedInterfaces = esxListDefinedInterfaces, /* 0.10.0 */
.connectNumOfInterfaces = esxConnectNumOfInterfaces, /* 0.10.0 */
.connectListInterfaces = esxConnectListInterfaces, /* 0.10.0 */
.connectNumOfDefinedInterfaces = esxConnectNumOfDefinedInterfaces, /* 0.10.0 */
.connectListDefinedInterfaces = esxConnectListDefinedInterfaces, /* 0.10.0 */
.interfaceLookupByName = esxInterfaceLookupByName, /* 0.10.0 */
.interfaceLookupByMACString = esxInterfaceLookupByMACString, /* 0.10.0 */
.interfaceGetXMLDesc = esxInterfaceGetXMLDesc, /* 0.10.0 */

View File

@ -76,7 +76,7 @@ esxNetworkClose(virConnectPtr conn)
static int
esxNumberOfNetworks(virConnectPtr conn)
esxConnectNumOfNetworks(virConnectPtr conn)
{
esxPrivate *priv = conn->networkPrivateData;
esxVI_HostVirtualSwitch *hostVirtualSwitchList = NULL;
@ -102,7 +102,7 @@ esxNumberOfNetworks(virConnectPtr conn)
static int
esxListNetworks(virConnectPtr conn, char **const names, int maxnames)
esxConnectListNetworks(virConnectPtr conn, char **const names, int maxnames)
{
bool success = false;
esxPrivate *priv = conn->networkPrivateData;
@ -152,7 +152,7 @@ esxListNetworks(virConnectPtr conn, char **const names, int maxnames)
static int
esxNumberOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
esxConnectNumOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* ESX networks are always active */
return 0;
@ -161,7 +161,7 @@ esxNumberOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED,
esxConnectListDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
@ -935,10 +935,10 @@ static virNetworkDriver esxNetworkDriver = {
.name = "ESX",
.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 */
.connectListDefinedNetworks = esxListDefinedNetworks, /* 0.10.0 */
.connectNumOfNetworks = esxConnectNumOfNetworks, /* 0.10.0 */
.connectListNetworks = esxConnectListNetworks, /* 0.10.0 */
.connectNumOfDefinedNetworks = esxConnectNumOfDefinedNetworks, /* 0.10.0 */
.connectListDefinedNetworks = esxConnectListDefinedNetworks, /* 0.10.0 */
.networkLookupByUUID = esxNetworkLookupByUUID, /* 0.10.0 */
.networkLookupByName = esxNetworkLookupByName, /* 0.10.0 */
.networkDefineXML = esxNetworkDefineXML, /* 0.10.0 */

View File

@ -83,7 +83,7 @@ esxStorageClose(virConnectPtr conn)
static int
esxNumberOfStoragePools(virConnectPtr conn)
esxConnectNumOfStoragePools(virConnectPtr conn)
{
int count = 0;
esxPrivate *priv = conn->storagePrivateData;
@ -110,7 +110,7 @@ esxNumberOfStoragePools(virConnectPtr conn)
static int
esxListStoragePools(virConnectPtr conn, char **const names, int maxnames)
esxConnectListStoragePools(virConnectPtr conn, char **const names, int maxnames)
{
bool success = false;
esxPrivate *priv = conn->storagePrivateData;
@ -153,7 +153,7 @@ esxListStoragePools(virConnectPtr conn, char **const names, int maxnames)
static int
esxNumberOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
esxConnectNumOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* ESX storage pools are always active */
return 0;
@ -162,7 +162,7 @@ esxNumberOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
esxConnectListDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
@ -324,7 +324,7 @@ esxStoragePoolSetAutostart(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
static int
esxStoragePoolNumberOfStorageVolumes(virStoragePoolPtr pool)
esxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
esxPrivate *priv = pool->conn->storagePrivateData;
virStorageDriverPtr backend = pool->privateData;
@ -341,7 +341,7 @@ esxStoragePoolNumberOfStorageVolumes(virStoragePoolPtr pool)
static int
esxStoragePoolListStorageVolumes(virStoragePoolPtr pool, char **const names,
esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int maxnames)
{
esxPrivate *priv = pool->conn->storagePrivateData;
@ -359,7 +359,7 @@ esxStoragePoolListStorageVolumes(virStoragePoolPtr pool, char **const names,
static virStorageVolPtr
esxStorageVolumeLookupByName(virStoragePoolPtr pool, const char *name)
esxStorageVolLookupByName(virStoragePoolPtr pool, const char *name)
{
esxPrivate *priv = pool->conn->storagePrivateData;
virStorageDriverPtr backend = pool->privateData;
@ -376,7 +376,7 @@ esxStorageVolumeLookupByName(virStoragePoolPtr pool, const char *name)
static virStorageVolPtr
esxStorageVolumeLookupByPath(virConnectPtr conn, const char *path)
esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
esxPrivate *priv = conn->storagePrivateData;
@ -407,7 +407,7 @@ esxStorageVolumeLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolPtr
esxStorageVolumeLookupByKey(virConnectPtr conn, const char *key)
esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
virStorageVolPtr volume;
esxPrivate *priv = conn->storagePrivateData;
@ -435,7 +435,7 @@ esxStorageVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
esxStorageVolCreateXML(virStoragePoolPtr pool, const char *xmldesc,
unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
@ -453,7 +453,7 @@ esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
static virStorageVolPtr
esxStorageVolumeCreateXMLFrom(virStoragePoolPtr pool, const char *xmldesc,
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool, const char *xmldesc,
virStorageVolPtr sourceVolume, unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
@ -471,7 +471,7 @@ esxStorageVolumeCreateXMLFrom(virStoragePoolPtr pool, const char *xmldesc,
static int
esxStorageVolumeDelete(virStorageVolPtr volume, unsigned int flags)
esxStorageVolDelete(virStorageVolPtr volume, unsigned int flags)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStorageDriverPtr backend = volume->privateData;
@ -488,7 +488,7 @@ esxStorageVolumeDelete(virStorageVolPtr volume, unsigned int flags)
static int
esxStorageVolumeWipe(virStorageVolPtr volume, unsigned int flags)
esxStorageVolWipe(virStorageVolPtr volume, unsigned int flags)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStorageDriverPtr backend = volume->privateData;
@ -505,7 +505,7 @@ esxStorageVolumeWipe(virStorageVolPtr volume, unsigned int flags)
static int
esxStorageVolumeGetInfo(virStorageVolPtr volume, virStorageVolInfoPtr info)
esxStorageVolGetInfo(virStorageVolPtr volume, virStorageVolInfoPtr info)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStorageDriverPtr backend = volume->privateData;
@ -522,7 +522,7 @@ esxStorageVolumeGetInfo(virStorageVolPtr volume, virStorageVolInfoPtr info)
static char *
esxStorageVolumeGetXMLDesc(virStorageVolPtr volume, unsigned int flags)
esxStorageVolGetXMLDesc(virStorageVolPtr volume, unsigned int flags)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStorageDriverPtr backend = volume->privateData;
@ -539,7 +539,7 @@ esxStorageVolumeGetXMLDesc(virStorageVolPtr volume, unsigned int flags)
static char *
esxStorageVolumeGetPath(virStorageVolPtr volume)
esxStorageVolGetPath(virStorageVolPtr volume)
{
esxPrivate *priv = volume->conn->storagePrivateData;
virStorageDriverPtr backend = volume->privateData;
@ -577,10 +577,10 @@ static virStorageDriver esxStorageDriver = {
.name = "ESX",
.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 */
.connectListDefinedStoragePools = esxListDefinedStoragePools, /* 0.8.2 */
.connectNumOfStoragePools = esxConnectNumOfStoragePools, /* 0.8.2 */
.connectListStoragePools = esxConnectListStoragePools, /* 0.8.2 */
.connectNumOfDefinedStoragePools = esxConnectNumOfDefinedStoragePools, /* 0.8.2 */
.connectListDefinedStoragePools = esxConnectListDefinedStoragePools, /* 0.8.2 */
.storagePoolLookupByName = esxStoragePoolLookupByName, /* 0.8.2 */
.storagePoolLookupByUUID = esxStoragePoolLookupByUUID, /* 0.8.2 */
.storagePoolLookupByVolume = esxStoragePoolLookupByVolume, /* 0.8.4 */
@ -589,18 +589,18 @@ static virStorageDriver esxStorageDriver = {
.storagePoolGetXMLDesc = esxStoragePoolGetXMLDesc, /* 0.8.2 */
.storagePoolGetAutostart = esxStoragePoolGetAutostart, /* 0.8.2 */
.storagePoolSetAutostart = esxStoragePoolSetAutostart, /* 0.8.2 */
.storagePoolNumOfVolumes = esxStoragePoolNumberOfStorageVolumes, /* 0.8.4 */
.storagePoolListVolumes = esxStoragePoolListStorageVolumes, /* 0.8.4 */
.storageVolLookupByName = esxStorageVolumeLookupByName, /* 0.8.4 */
.storageVolLookupByPath = esxStorageVolumeLookupByPath, /* 0.8.4 */
.storageVolLookupByKey = esxStorageVolumeLookupByKey, /* 0.8.4 */
.storageVolCreateXML = esxStorageVolumeCreateXML, /* 0.8.4 */
.storageVolCreateXMLFrom = esxStorageVolumeCreateXMLFrom, /* 0.8.7 */
.storageVolDelete = esxStorageVolumeDelete, /* 0.8.7 */
.storageVolWipe = esxStorageVolumeWipe, /* 0.8.7 */
.storageVolGetInfo = esxStorageVolumeGetInfo, /* 0.8.4 */
.storageVolGetXMLDesc = esxStorageVolumeGetXMLDesc, /* 0.8.4 */
.storageVolGetPath = esxStorageVolumeGetPath, /* 0.8.4 */
.storagePoolNumOfVolumes = esxStoragePoolNumOfVolumes, /* 0.8.4 */
.storagePoolListVolumes = esxStoragePoolListVolumes, /* 0.8.4 */
.storageVolLookupByName = esxStorageVolLookupByName, /* 0.8.4 */
.storageVolLookupByPath = esxStorageVolLookupByPath, /* 0.8.4 */
.storageVolLookupByKey = esxStorageVolLookupByKey, /* 0.8.4 */
.storageVolCreateXML = esxStorageVolCreateXML, /* 0.8.4 */
.storageVolCreateXMLFrom = esxStorageVolCreateXMLFrom, /* 0.8.7 */
.storageVolDelete = esxStorageVolDelete, /* 0.8.7 */
.storageVolWipe = esxStorageVolWipe, /* 0.8.7 */
.storageVolGetInfo = esxStorageVolGetInfo, /* 0.8.4 */
.storageVolGetXMLDesc = esxStorageVolGetXMLDesc, /* 0.8.4 */
.storageVolGetPath = esxStorageVolGetPath, /* 0.8.4 */
.storagePoolIsActive = esxStoragePoolIsActive, /* 0.8.2 */
.storagePoolIsPersistent = esxStoragePoolIsPersistent, /* 0.8.2 */
};

View File

@ -37,7 +37,7 @@
static virDrvOpenStatus
hypervDeviceOpen(virConnectPtr conn,
hypervNodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -55,7 +55,7 @@ hypervDeviceOpen(virConnectPtr conn,
static int
hypervDeviceClose(virConnectPtr conn)
hypervNodeDeviceClose(virConnectPtr conn)
{
conn->nodeDevicePrivateData = NULL;
@ -66,8 +66,8 @@ hypervDeviceClose(virConnectPtr conn)
static virNodeDeviceDriver hypervNodeDeviceDriver = {
"Hyper-V",
.nodeDeviceOpen = hypervDeviceOpen, /* 0.9.5 */
.nodeDeviceClose = hypervDeviceClose, /* 0.9.5 */
.nodeDeviceOpen = hypervNodeDeviceOpen, /* 0.9.5 */
.nodeDeviceClose = hypervNodeDeviceClose, /* 0.9.5 */
};

View File

@ -66,7 +66,7 @@ hypervFreePrivate(hypervPrivate **priv)
static virDrvOpenStatus
hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
char *plus;
@ -215,7 +215,7 @@ hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
static int
hypervClose(virConnectPtr conn)
hypervConnectClose(virConnectPtr conn)
{
hypervPrivate *priv = conn->privateData;
@ -229,7 +229,7 @@ hypervClose(virConnectPtr conn)
static const char *
hypervGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
hypervConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return "Hyper-V";
}
@ -237,7 +237,7 @@ hypervGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
static char *
hypervGetHostname(virConnectPtr conn)
hypervConnectGetHostname(virConnectPtr conn)
{
char *hostname = NULL;
hypervPrivate *priv = conn->privateData;
@ -371,7 +371,7 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
static int
hypervListDomains(virConnectPtr conn, int *ids, int maxids)
hypervConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
bool success = false;
hypervPrivate *priv = conn->privateData;
@ -415,7 +415,7 @@ hypervListDomains(virConnectPtr conn, int *ids, int maxids)
static int
hypervNumberOfDomains(virConnectPtr conn)
hypervConnectNumOfDomains(virConnectPtr conn)
{
bool success = false;
hypervPrivate *priv = conn->privateData;
@ -954,7 +954,7 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
static int
hypervListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
{
bool success = false;
hypervPrivate *priv = conn->privateData;
@ -1014,7 +1014,7 @@ hypervListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
static int
hypervNumberOfDefinedDomains(virConnectPtr conn)
hypervConnectNumOfDefinedDomains(virConnectPtr conn)
{
bool success = false;
hypervPrivate *priv = conn->privateData;
@ -1088,7 +1088,7 @@ hypervDomainCreate(virDomainPtr domain)
static int
hypervIsEncrypted(virConnectPtr conn)
hypervConnectIsEncrypted(virConnectPtr conn)
{
hypervPrivate *priv = conn->privateData;
@ -1102,7 +1102,7 @@ hypervIsEncrypted(virConnectPtr conn)
static int
hypervIsSecure(virConnectPtr conn)
hypervConnectIsSecure(virConnectPtr conn)
{
hypervPrivate *priv = conn->privateData;
@ -1116,7 +1116,7 @@ hypervIsSecure(virConnectPtr conn)
static int
hypervIsAlive(virConnectPtr conn)
hypervConnectIsAlive(virConnectPtr conn)
{
hypervPrivate *priv = conn->privateData;
@ -1258,7 +1258,7 @@ hypervDomainManagedSaveRemove(virDomainPtr domain, unsigned int flags)
#define MATCH(FLAG) (flags & (FLAG))
static int
hypervListAllDomains(virConnectPtr conn,
hypervConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -1398,14 +1398,14 @@ no_memory:
static virDriver hypervDriver = {
.no = VIR_DRV_HYPERV,
.name = "Hyper-V",
.connectOpen = hypervOpen, /* 0.9.5 */
.connectClose = hypervClose, /* 0.9.5 */
.connectGetType = hypervGetType, /* 0.9.5 */
.connectGetHostname = hypervGetHostname, /* 0.9.5 */
.connectOpen = hypervConnectOpen, /* 0.9.5 */
.connectClose = hypervConnectClose, /* 0.9.5 */
.connectGetType = hypervConnectGetType, /* 0.9.5 */
.connectGetHostname = hypervConnectGetHostname, /* 0.9.5 */
.nodeGetInfo = hypervNodeGetInfo, /* 0.9.5 */
.connectListDomains = hypervListDomains, /* 0.9.5 */
.connectNumOfDomains = hypervNumberOfDomains, /* 0.9.5 */
.connectListAllDomains = hypervListAllDomains, /* 0.10.2 */
.connectListDomains = hypervConnectListDomains, /* 0.9.5 */
.connectNumOfDomains = hypervConnectNumOfDomains, /* 0.9.5 */
.connectListAllDomains = hypervConnectListAllDomains, /* 0.10.2 */
.domainLookupByID = hypervDomainLookupByID, /* 0.9.5 */
.domainLookupByUUID = hypervDomainLookupByUUID, /* 0.9.5 */
.domainLookupByName = hypervDomainLookupByName, /* 0.9.5 */
@ -1417,19 +1417,19 @@ static virDriver hypervDriver = {
.domainGetInfo = hypervDomainGetInfo, /* 0.9.5 */
.domainGetState = hypervDomainGetState, /* 0.9.5 */
.domainGetXMLDesc = hypervDomainGetXMLDesc, /* 0.9.5 */
.connectListDefinedDomains = hypervListDefinedDomains, /* 0.9.5 */
.connectNumOfDefinedDomains = hypervNumberOfDefinedDomains, /* 0.9.5 */
.connectListDefinedDomains = hypervConnectListDefinedDomains, /* 0.9.5 */
.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains, /* 0.9.5 */
.domainCreate = hypervDomainCreate, /* 0.9.5 */
.domainCreateWithFlags = hypervDomainCreateWithFlags, /* 0.9.5 */
.connectIsEncrypted = hypervIsEncrypted, /* 0.9.5 */
.connectIsSecure = hypervIsSecure, /* 0.9.5 */
.connectIsEncrypted = hypervConnectIsEncrypted, /* 0.9.5 */
.connectIsSecure = hypervConnectIsSecure, /* 0.9.5 */
.domainIsActive = hypervDomainIsActive, /* 0.9.5 */
.domainIsPersistent = hypervDomainIsPersistent, /* 0.9.5 */
.domainIsUpdated = hypervDomainIsUpdated, /* 0.9.5 */
.domainManagedSave = hypervDomainManagedSave, /* 0.9.5 */
.domainHasManagedSaveImage = hypervDomainHasManagedSaveImage, /* 0.9.5 */
.domainManagedSaveRemove = hypervDomainManagedSaveRemove, /* 0.9.5 */
.connectIsAlive = hypervIsAlive, /* 0.9.8 */
.connectIsAlive = hypervConnectIsAlive, /* 0.9.8 */
};

View File

@ -116,7 +116,7 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
return iface;
}
static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn,
static virDrvOpenStatus netcfInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -159,7 +159,7 @@ alloc_error:
return VIR_DRV_OPEN_ERROR;
}
static int interfaceCloseInterface(virConnectPtr conn)
static int netcfInterfaceClose(virConnectPtr conn)
{
if (conn->interfacePrivateData != NULL)
@ -177,7 +177,7 @@ static int interfaceCloseInterface(virConnectPtr conn)
return 0;
}
static int interfaceNumOfInterfaces(virConnectPtr conn)
static int netcfConnectNumOfInterfaces(virConnectPtr conn)
{
int count;
struct interface_driver *driver = conn->interfacePrivateData;
@ -196,7 +196,7 @@ static int interfaceNumOfInterfaces(virConnectPtr conn)
return count;
}
static int interfaceListInterfaces(virConnectPtr conn, char **const names, int nnames)
static int netcfConnectListInterfaces(virConnectPtr conn, char **const names, int nnames)
{
struct interface_driver *driver = conn->interfacePrivateData;
int count;
@ -218,7 +218,7 @@ static int interfaceListInterfaces(virConnectPtr conn, char **const names, int n
}
static int interfaceNumOfDefinedInterfaces(virConnectPtr conn)
static int netcfConnectNumOfDefinedInterfaces(virConnectPtr conn)
{
int count;
struct interface_driver *driver = conn->interfacePrivateData;
@ -238,7 +238,7 @@ static int interfaceNumOfDefinedInterfaces(virConnectPtr conn)
return count;
}
static int interfaceListDefinedInterfaces(virConnectPtr conn, char **const names, int nnames)
static int netcfConnectListDefinedInterfaces(virConnectPtr conn, char **const names, int nnames)
{
struct interface_driver *driver = conn->interfacePrivateData;
int count;
@ -261,7 +261,7 @@ static int interfaceListDefinedInterfaces(virConnectPtr conn, char **const names
}
static int
interfaceListAllInterfaces(virConnectPtr conn,
netcfConnectListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
{
@ -407,7 +407,7 @@ cleanup:
}
static virInterfacePtr interfaceLookupByName(virConnectPtr conn,
static virInterfacePtr netcfInterfaceLookupByName(virConnectPtr conn,
const char *name)
{
struct interface_driver *driver = conn->interfacePrivateData;
@ -439,7 +439,7 @@ cleanup:
return ret;
}
static virInterfacePtr interfaceLookupByMACString(virConnectPtr conn,
static virInterfacePtr netcfInterfaceLookupByMACString(virConnectPtr conn,
const char *macstr)
{
struct interface_driver *driver = conn->interfacePrivateData;
@ -479,7 +479,7 @@ cleanup:
return ret;
}
static char *interfaceGetXMLDesc(virInterfacePtr ifinfo,
static char *netcfInterfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
@ -533,7 +533,7 @@ cleanup:
return ret;
}
static virInterfacePtr interfaceDefineXML(virConnectPtr conn,
static virInterfacePtr netcfInterfaceDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
@ -580,7 +580,7 @@ cleanup:
return ret;
}
static int interfaceUndefine(virInterfacePtr ifinfo) {
static int netcfInterfaceUndefine(virInterfacePtr ifinfo) {
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
struct netcf_if *iface = NULL;
int ret = -1;
@ -610,7 +610,7 @@ cleanup:
return ret;
}
static int interfaceCreate(virInterfacePtr ifinfo,
static int netcfInterfaceCreate(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
@ -644,7 +644,7 @@ cleanup:
return ret;
}
static int interfaceDestroy(virInterfacePtr ifinfo,
static int netcfInterfaceDestroy(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
@ -678,7 +678,7 @@ cleanup:
return ret;
}
static int interfaceIsActive(virInterfacePtr ifinfo)
static int netcfInterfaceIsActive(virInterfacePtr ifinfo)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
struct netcf_if *iface = NULL;
@ -712,7 +712,7 @@ cleanup:
}
#ifdef HAVE_NETCF_TRANSACTIONS
static int interfaceChangeBegin(virConnectPtr conn, unsigned int flags)
static int netcfInterfaceChangeBegin(virConnectPtr conn, unsigned int flags)
{
struct interface_driver *driver = conn->interfacePrivateData;
int ret;
@ -735,7 +735,7 @@ static int interfaceChangeBegin(virConnectPtr conn, unsigned int flags)
return ret;
}
static int interfaceChangeCommit(virConnectPtr conn, unsigned int flags)
static int netcfInterfaceChangeCommit(virConnectPtr conn, unsigned int flags)
{
struct interface_driver *driver = conn->interfacePrivateData;
int ret;
@ -758,7 +758,7 @@ static int interfaceChangeCommit(virConnectPtr conn, unsigned int flags)
return ret;
}
static int interfaceChangeRollback(virConnectPtr conn, unsigned int flags)
static int netcfInterfaceChangeRollback(virConnectPtr conn, unsigned int flags)
{
struct interface_driver *driver = conn->interfacePrivateData;
int ret;
@ -784,25 +784,25 @@ static int interfaceChangeRollback(virConnectPtr conn, unsigned int flags)
static virInterfaceDriver interfaceDriver = {
"netcf",
.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 */
.connectListDefinedInterfaces = interfaceListDefinedInterfaces, /* 0.7.0 */
.connectListAllInterfaces = interfaceListAllInterfaces, /* 0.10.2 */
.interfaceLookupByName = interfaceLookupByName, /* 0.7.0 */
.interfaceLookupByMACString = interfaceLookupByMACString, /* 0.7.0 */
.interfaceGetXMLDesc = interfaceGetXMLDesc, /* 0.7.0 */
.interfaceDefineXML = interfaceDefineXML, /* 0.7.0 */
.interfaceUndefine = interfaceUndefine, /* 0.7.0 */
.interfaceCreate = interfaceCreate, /* 0.7.0 */
.interfaceDestroy = interfaceDestroy, /* 0.7.0 */
.interfaceIsActive = interfaceIsActive, /* 0.7.3 */
.interfaceOpen = netcfInterfaceOpen, /* 0.7.0 */
.interfaceClose = netcfInterfaceClose, /* 0.7.0 */
.connectNumOfInterfaces = netcfConnectNumOfInterfaces, /* 0.7.0 */
.connectListInterfaces = netcfConnectListInterfaces, /* 0.7.0 */
.connectNumOfDefinedInterfaces = netcfConnectNumOfDefinedInterfaces, /* 0.7.0 */
.connectListDefinedInterfaces = netcfConnectListDefinedInterfaces, /* 0.7.0 */
.connectListAllInterfaces = netcfConnectListAllInterfaces, /* 0.10.2 */
.interfaceLookupByName = netcfInterfaceLookupByName, /* 0.7.0 */
.interfaceLookupByMACString = netcfInterfaceLookupByMACString, /* 0.7.0 */
.interfaceGetXMLDesc = netcfInterfaceGetXMLDesc, /* 0.7.0 */
.interfaceDefineXML = netcfInterfaceDefineXML, /* 0.7.0 */
.interfaceUndefine = netcfInterfaceUndefine, /* 0.7.0 */
.interfaceCreate = netcfInterfaceCreate, /* 0.7.0 */
.interfaceDestroy = netcfInterfaceDestroy, /* 0.7.0 */
.interfaceIsActive = netcfInterfaceIsActive, /* 0.7.3 */
#ifdef HAVE_NETCF_TRANSACTIONS
.interfaceChangeBegin = interfaceChangeBegin, /* 0.9.2 */
.interfaceChangeCommit = interfaceChangeCommit, /* 0.9.2 */
.interfaceChangeRollback = interfaceChangeRollback, /* 0.9.2 */
.interfaceChangeBegin = netcfInterfaceChangeBegin, /* 0.9.2 */
.interfaceChangeCommit = netcfInterfaceChangeCommit, /* 0.9.2 */
.interfaceChangeRollback = netcfInterfaceChangeRollback, /* 0.9.2 */
#endif /* HAVE_NETCF_TRANSACTIONS */
};

View File

@ -43,7 +43,7 @@ typedef enum {
VIR_UDEV_IFACE_ALL
} virUdevStatus ;
static virInterfaceDef *udevIfaceGetIfaceDef(struct udev *udev, const char *name);
static virInterfaceDef *udevGetIfaceDef(struct udev *udev, const char *name);
static const char *
virUdevStatusString(virUdevStatus status)
@ -61,7 +61,7 @@ virUdevStatusString(virUdevStatus status)
}
static struct udev_enumerate * ATTRIBUTE_NONNULL(1)
udevIfaceGetDevices(struct udev *udev, virUdevStatus status)
udevGetDevices(struct udev *udev, virUdevStatus status)
{
struct udev_enumerate *enumerate;
@ -101,7 +101,7 @@ udevIfaceGetDevices(struct udev *udev, virUdevStatus status)
}
static virDrvOpenStatus
udevIfaceOpenInterface(virConnectPtr conn,
udevInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -132,7 +132,7 @@ err:
}
static int
udevIfaceCloseInterface(virConnectPtr conn)
udevInterfaceClose(virConnectPtr conn)
{
struct udev_iface_driver *driverState;
@ -149,7 +149,7 @@ udevIfaceCloseInterface(virConnectPtr conn)
}
static int
udevIfaceNumOfInterfacesByStatus(virConnectPtr conn, virUdevStatus status)
udevNumOfInterfacesByStatus(virConnectPtr conn, virUdevStatus status)
{
struct udev_iface_driver *driverState = conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -158,7 +158,7 @@ udevIfaceNumOfInterfacesByStatus(virConnectPtr conn, virUdevStatus status)
struct udev_list_entry *dev_entry;
int count = 0;
enumerate = udevIfaceGetDevices(udev, status);
enumerate = udevGetDevices(udev, status);
if (!enumerate) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@ -188,7 +188,7 @@ err:
}
static int
udevIfaceListInterfacesByStatus(virConnectPtr conn,
udevListInterfacesByStatus(virConnectPtr conn,
char **const names,
int names_len,
virUdevStatus status)
@ -200,7 +200,7 @@ udevIfaceListInterfacesByStatus(virConnectPtr conn,
struct udev_list_entry *dev_entry;
int count = 0;
enumerate = udevIfaceGetDevices(udev, status);
enumerate = udevGetDevices(udev, status);
if (!enumerate) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@ -255,37 +255,37 @@ err:
}
static int
udevIfaceNumOfInterfaces(virConnectPtr conn)
udevConnectNumOfInterfaces(virConnectPtr conn)
{
return udevIfaceNumOfInterfacesByStatus(conn, VIR_UDEV_IFACE_ACTIVE);
return udevNumOfInterfacesByStatus(conn, VIR_UDEV_IFACE_ACTIVE);
}
static int
udevIfaceListInterfaces(virConnectPtr conn,
udevConnectListInterfaces(virConnectPtr conn,
char **const names,
int names_len)
{
return udevIfaceListInterfacesByStatus(conn, names, names_len,
return udevListInterfacesByStatus(conn, names, names_len,
VIR_UDEV_IFACE_ACTIVE);
}
static int
udevIfaceNumOfDefinedInterfaces(virConnectPtr conn)
udevConnectNumOfDefinedInterfaces(virConnectPtr conn)
{
return udevIfaceNumOfInterfacesByStatus(conn, VIR_UDEV_IFACE_INACTIVE);
return udevNumOfInterfacesByStatus(conn, VIR_UDEV_IFACE_INACTIVE);
}
static int
udevIfaceListDefinedInterfaces(virConnectPtr conn,
udevConnectListDefinedInterfaces(virConnectPtr conn,
char **const names,
int names_len)
{
return udevIfaceListInterfacesByStatus(conn, names, names_len,
return udevListInterfacesByStatus(conn, names, names_len,
VIR_UDEV_IFACE_INACTIVE);
}
static int
udevIfaceListAllInterfaces(virConnectPtr conn,
udevConnectListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
{
@ -308,7 +308,7 @@ udevIfaceListAllInterfaces(virConnectPtr conn,
udev = udev_ref(driverState->udev);
/* List all interfaces in case we support more filter flags in the future */
enumerate = udevIfaceGetDevices(udev, VIR_UDEV_IFACE_ALL);
enumerate = udevGetDevices(udev, VIR_UDEV_IFACE_ALL);
if (!enumerate) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@ -410,7 +410,7 @@ cleanup:
}
static virInterfacePtr
udevIfaceLookupByName(virConnectPtr conn, const char *name)
udevInterfaceLookupByName(virConnectPtr conn, const char *name)
{
struct udev_iface_driver *driverState = conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -438,7 +438,7 @@ err:
}
static virInterfacePtr
udevIfaceLookupByMACString(virConnectPtr conn, const char *macstr)
udevInterfaceLookupByMACString(virConnectPtr conn, const char *macstr)
{
struct udev_iface_driver *driverState = conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -448,7 +448,7 @@ udevIfaceLookupByMACString(virConnectPtr conn, const char *macstr)
const char *name;
virInterfacePtr ret = NULL;
enumerate = udevIfaceGetDevices(udev, VIR_UDEV_IFACE_ALL);
enumerate = udevGetDevices(udev, VIR_UDEV_IFACE_ALL);
if (!enumerate) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@ -503,7 +503,7 @@ err:
* @return 1 if we want to add it to scandir's list, 0 if not.
*/
static int
udevIfaceBondScanDirFilter(const struct dirent *entry)
udevBondScanDirFilter(const struct dirent *entry)
{
/* This is ugly so if anyone has a better suggestion, please improve
* this. Unfortunately the kernel stores everything in the top level
@ -524,7 +524,7 @@ udevIfaceBondScanDirFilter(const struct dirent *entry)
* @return 1 if we want to add it to scandir's list, 0 if not.
*/
static int
udevIfaceBridgeScanDirFilter(const struct dirent *entry)
udevBridgeScanDirFilter(const struct dirent *entry)
{
if (STREQ(entry->d_name, ".") || STREQ(entry->d_name, ".."))
return 0;
@ -543,12 +543,12 @@ udevIfaceBridgeScanDirFilter(const struct dirent *entry)
}
/**
* Frees any memory allocated by udevIfaceGetIfaceDef()
* Frees any memory allocated by udevGetIfaceDef()
*
* @param ifacedef - interface to free and cleanup
*/
static void
udevIfaceFreeIfaceDef(virInterfaceDef *ifacedef)
udevFreeIfaceDef(virInterfaceDef *ifacedef)
{
int i;
@ -558,7 +558,7 @@ udevIfaceFreeIfaceDef(virInterfaceDef *ifacedef)
if (ifacedef->type == VIR_INTERFACE_TYPE_BOND) {
VIR_FREE(ifacedef->data.bond.target);
for (i = 0; i < ifacedef->data.bond.nbItf; i++) {
udevIfaceFreeIfaceDef(ifacedef->data.bond.itf[i]);
udevFreeIfaceDef(ifacedef->data.bond.itf[i]);
}
VIR_FREE(ifacedef->data.bond.itf);
}
@ -566,7 +566,7 @@ udevIfaceFreeIfaceDef(virInterfaceDef *ifacedef)
if (ifacedef->type == VIR_INTERFACE_TYPE_BRIDGE) {
VIR_FREE(ifacedef->data.bridge.delay);
for (i = 0; i < ifacedef->data.bridge.nbItf; i++) {
udevIfaceFreeIfaceDef(ifacedef->data.bridge.itf[i]);
udevFreeIfaceDef(ifacedef->data.bridge.itf[i]);
}
VIR_FREE(ifacedef->data.bridge.itf);
}
@ -584,7 +584,7 @@ udevIfaceFreeIfaceDef(virInterfaceDef *ifacedef)
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefBond(struct udev *udev,
udevGetIfaceDefBond(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
@ -759,7 +759,7 @@ udevIfaceGetIfaceDefBond(struct udev *udev,
/* Slaves of the bond */
/* Get each slave in the bond */
slave_count = scandir(udev_device_get_syspath(dev), &slave_list,
udevIfaceBondScanDirFilter, alphasort);
udevBondScanDirFilter, alphasort);
if (slave_count < 0) {
virReportSystemError(errno,
@ -789,7 +789,7 @@ udevIfaceGetIfaceDefBond(struct udev *udev,
tmp_str++;
ifacedef->data.bond.itf[i] =
udevIfaceGetIfaceDef(udev, tmp_str);
udevGetIfaceDef(udev, tmp_str);
if (!ifacedef->data.bond.itf[i]) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get interface information for '%s', which is "
@ -815,7 +815,7 @@ cleanup:
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefBridge(struct udev *udev,
udevGetIfaceDefBridge(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
@ -881,7 +881,7 @@ udevIfaceGetIfaceDefBridge(struct udev *udev,
/* Get each member of the bridge */
member_count = scandir(member_path, &member_list,
udevIfaceBridgeScanDirFilter, alphasort);
udevBridgeScanDirFilter, alphasort);
/* Don't need the path anymore */
VIR_FREE(member_path);
@ -903,7 +903,7 @@ udevIfaceGetIfaceDefBridge(struct udev *udev,
/* Get the interface defintions for each member of the bridge */
for (i = 0; i < member_count; i++) {
ifacedef->data.bridge.itf[i] =
udevIfaceGetIfaceDef(udev, member_list[i]->d_name);
udevGetIfaceDef(udev, member_list[i]->d_name);
if (!ifacedef->data.bridge.itf[i]) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get interface information for '%s', which is "
@ -929,7 +929,7 @@ error:
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
udevGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
struct udev_device *dev ATTRIBUTE_UNUSED,
const char *name,
virInterfaceDef *ifacedef)
@ -969,7 +969,7 @@ cleanup:
}
static virInterfaceDef * ATTRIBUTE_NONNULL(1)
udevIfaceGetIfaceDef(struct udev *udev, const char *name)
udevGetIfaceDef(struct udev *udev, const char *name)
{
struct udev_device *dev = NULL;
virInterfaceDef *ifacedef;
@ -1058,15 +1058,15 @@ udevIfaceGetIfaceDef(struct udev *udev, const char *name)
switch (ifacedef->type) {
case VIR_INTERFACE_TYPE_VLAN:
if (udevIfaceGetIfaceDefVlan(udev, dev, name, ifacedef) < 0)
if (udevGetIfaceDefVlan(udev, dev, name, ifacedef) < 0)
goto cleanup;
break;
case VIR_INTERFACE_TYPE_BRIDGE:
if (udevIfaceGetIfaceDefBridge(udev, dev, name, ifacedef) < 0)
if (udevGetIfaceDefBridge(udev, dev, name, ifacedef) < 0)
goto cleanup;
break;
case VIR_INTERFACE_TYPE_BOND:
if (udevIfaceGetIfaceDefBond(udev, dev, name, ifacedef) < 0)
if (udevGetIfaceDefBond(udev, dev, name, ifacedef) < 0)
goto cleanup;
break;
case VIR_INTERFACE_TYPE_ETHERNET:
@ -1080,13 +1080,13 @@ udevIfaceGetIfaceDef(struct udev *udev, const char *name)
cleanup:
udev_device_unref(dev);
udevIfaceFreeIfaceDef(ifacedef);
udevFreeIfaceDef(ifacedef);
return NULL;
}
static char *
udevIfaceGetXMLDesc(virInterfacePtr ifinfo,
udevInterfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
{
struct udev_iface_driver *driverState = ifinfo->conn->interfacePrivateData;
@ -1099,7 +1099,7 @@ udevIfaceGetXMLDesc(virInterfacePtr ifinfo,
/* Recursively build up the interface XML based on the requested
* interface name
*/
ifacedef = udevIfaceGetIfaceDef(udev, ifinfo->name);
ifacedef = udevGetIfaceDef(udev, ifinfo->name);
/* We've already printed by it happened */
if (!ifacedef)
@ -1109,7 +1109,7 @@ udevIfaceGetXMLDesc(virInterfacePtr ifinfo,
xmlstr = virInterfaceDefFormat(ifacedef);
/* Recursively free our interface structures and free the children too */
udevIfaceFreeIfaceDef(ifacedef);
udevFreeIfaceDef(ifacedef);
err:
/* decrement our udev ptr */
@ -1119,7 +1119,7 @@ err:
}
static int
udevIfaceIsActive(virInterfacePtr ifinfo)
udevInterfaceIsActive(virInterfacePtr ifinfo)
{
struct udev_iface_driver *driverState = ifinfo->conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -1149,17 +1149,17 @@ cleanup:
static virInterfaceDriver udevIfaceDriver = {
"udev",
.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 */
.connectListDefinedInterfaces = udevIfaceListDefinedInterfaces, /* 1.0.0 */
.connectListAllInterfaces = udevIfaceListAllInterfaces, /* 1.0.0 */
.interfaceLookupByName = udevIfaceLookupByName, /* 1.0.0 */
.interfaceLookupByMACString = udevIfaceLookupByMACString, /* 1.0.0 */
.interfaceIsActive = udevIfaceIsActive, /* 1.0.0 */
.interfaceGetXMLDesc = udevIfaceGetXMLDesc, /* 1.0.0 */
.interfaceOpen = udevInterfaceOpen, /* 1.0.0 */
.interfaceClose = udevInterfaceClose, /* 1.0.0 */
.connectNumOfInterfaces = udevConnectNumOfInterfaces, /* 1.0.0 */
.connectListInterfaces = udevConnectListInterfaces, /* 1.0.0 */
.connectNumOfDefinedInterfaces = udevConnectNumOfDefinedInterfaces, /* 1.0.0 */
.connectListDefinedInterfaces = udevConnectListDefinedInterfaces, /* 1.0.0 */
.connectListAllInterfaces = udevConnectListAllInterfaces, /* 1.0.0 */
.interfaceLookupByName = udevInterfaceLookupByName, /* 1.0.0 */
.interfaceLookupByMACString = udevInterfaceLookupByMACString, /* 1.0.0 */
.interfaceIsActive = udevInterfaceIsActive, /* 1.0.0 */
.interfaceGetXMLDesc = udevInterfaceGetXMLDesc, /* 1.0.0 */
};
int

View File

@ -1095,7 +1095,7 @@ libxlReconnectDomains(libxlDriverPrivatePtr driver)
}
static int
libxlShutdown(void)
libxlStateCleanup(void)
{
if (!libxl_driver)
return -1;
@ -1128,7 +1128,7 @@ libxlShutdown(void)
}
static int
libxlStartup(bool privileged,
libxlStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -1308,12 +1308,12 @@ fail:
VIR_FREE(log_file);
if (libxl_driver)
libxlDriverUnlock(libxl_driver);
libxlShutdown();
libxlStateCleanup();
return ret;
}
static int
libxlReload(void)
libxlStateReload(void)
{
if (!libxl_driver)
return 0;
@ -1338,7 +1338,7 @@ libxlReload(void)
static virDrvOpenStatus
libxlOpen(virConnectPtr conn,
libxlConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1384,20 +1384,20 @@ libxlOpen(virConnectPtr conn,
};
static int
libxlClose(virConnectPtr conn ATTRIBUTE_UNUSED)
libxlConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
{
conn->privateData = NULL;
return 0;
}
static const char *
libxlGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
libxlConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return "xenlight";
}
static int
libxlGetVersion(virConnectPtr conn, unsigned long *version)
libxlConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
libxlDriverPrivatePtr driver = conn->privateData;
@ -1408,7 +1408,7 @@ libxlGetVersion(virConnectPtr conn, unsigned long *version)
}
static int
libxlGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED)
libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED)
{
int ret;
libxlDriverPrivatePtr driver = conn->privateData;
@ -1429,7 +1429,7 @@ libxlNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
}
static char *
libxlGetCapabilities(virConnectPtr conn)
libxlConnectGetCapabilities(virConnectPtr conn)
{
libxlDriverPrivatePtr driver = conn->privateData;
char *xml;
@ -1443,7 +1443,7 @@ libxlGetCapabilities(virConnectPtr conn)
}
static int
libxlListDomains(virConnectPtr conn, int *ids, int nids)
libxlConnectListDomains(virConnectPtr conn, int *ids, int nids)
{
libxlDriverPrivatePtr driver = conn->privateData;
int n;
@ -1456,7 +1456,7 @@ libxlListDomains(virConnectPtr conn, int *ids, int nids)
}
static int
libxlNumDomains(virConnectPtr conn)
libxlConnectNumOfDomains(virConnectPtr conn)
{
libxlDriverPrivatePtr driver = conn->privateData;
int n;
@ -2585,7 +2585,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
goto cleanup;
}
if ((max = libxlGetMaxVcpus(dom->conn, NULL)) < 0) {
if ((max = libxlConnectGetMaxVcpus(dom->conn, NULL)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not determine max vcpus for the domain"));
goto cleanup;
@ -2889,7 +2889,7 @@ libxlDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
}
static char *
libxlDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
libxlConnectDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
const char * nativeConfig,
unsigned int flags)
{
@ -2931,7 +2931,7 @@ cleanup:
#define MAX_CONFIG_SIZE (1024 * 65)
static char *
libxlDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
const char * domainXml,
unsigned int flags)
{
@ -2981,7 +2981,7 @@ cleanup:
}
static int
libxlListDefinedDomains(virConnectPtr conn,
libxlConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
{
libxlDriverPrivatePtr driver = conn->privateData;
@ -2994,7 +2994,7 @@ libxlListDefinedDomains(virConnectPtr conn,
}
static int
libxlNumDefinedDomains(virConnectPtr conn)
libxlConnectNumOfDefinedDomains(virConnectPtr conn)
{
libxlDriverPrivatePtr driver = conn->privateData;
int n;
@ -3715,7 +3715,7 @@ libxlNodeGetFreeMemory(virConnectPtr conn)
}
static int
libxlDomainEventRegister(virConnectPtr conn,
libxlConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback, void *opaque,
virFreeCallback freecb)
{
@ -3733,7 +3733,7 @@ libxlDomainEventRegister(virConnectPtr conn,
static int
libxlDomainEventDeregister(virConnectPtr conn,
libxlConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
libxlDriverPrivatePtr driver = conn->privateData;
@ -4132,7 +4132,7 @@ cleanup:
}
static int
libxlDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
libxlConnectDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque, virFreeCallback freecb)
{
@ -4152,7 +4152,7 @@ libxlDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
static int
libxlDomainEventDeregisterAny(virConnectPtr conn, int callbackID)
libxlConnectDomainEventDeregisterAny(virConnectPtr conn, int callbackID)
{
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
@ -4168,13 +4168,13 @@ libxlDomainEventDeregisterAny(virConnectPtr conn, int callbackID)
static int
libxlIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
libxlConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int
libxlListAllDomains(virConnectPtr conn,
libxlConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -4195,17 +4195,17 @@ libxlListAllDomains(virConnectPtr conn,
static virDriver libxlDriver = {
.no = VIR_DRV_LIBXL,
.name = "xenlight",
.connectOpen = libxlOpen, /* 0.9.0 */
.connectClose = libxlClose, /* 0.9.0 */
.connectGetType = libxlGetType, /* 0.9.0 */
.connectGetVersion = libxlGetVersion, /* 0.9.0 */
.connectOpen = libxlConnectOpen, /* 0.9.0 */
.connectClose = libxlConnectClose, /* 0.9.0 */
.connectGetType = libxlConnectGetType, /* 0.9.0 */
.connectGetVersion = libxlConnectGetVersion, /* 0.9.0 */
.connectGetHostname = virGetHostname, /* 0.9.0 */
.connectGetMaxVcpus = libxlGetMaxVcpus, /* 0.9.0 */
.connectGetMaxVcpus = libxlConnectGetMaxVcpus, /* 0.9.0 */
.nodeGetInfo = libxlNodeGetInfo, /* 0.9.0 */
.connectGetCapabilities = libxlGetCapabilities, /* 0.9.0 */
.connectListDomains = libxlListDomains, /* 0.9.0 */
.connectNumOfDomains = libxlNumDomains, /* 0.9.0 */
.connectListAllDomains = libxlListAllDomains, /* 0.9.13 */
.connectGetCapabilities = libxlConnectGetCapabilities, /* 0.9.0 */
.connectListDomains = libxlConnectListDomains, /* 0.9.0 */
.connectNumOfDomains = libxlConnectNumOfDomains, /* 0.9.0 */
.connectListAllDomains = libxlConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = libxlDomainCreateXML, /* 0.9.0 */
.domainLookupByID = libxlDomainLookupByID, /* 0.9.0 */
.domainLookupByUUID = libxlDomainLookupByUUID, /* 0.9.0 */
@ -4235,10 +4235,10 @@ static virDriver libxlDriver = {
.domainPinVcpu = libxlDomainPinVcpu, /* 0.9.0 */
.domainGetVcpus = libxlDomainGetVcpus, /* 0.9.0 */
.domainGetXMLDesc = libxlDomainGetXMLDesc, /* 0.9.0 */
.connectDomainXMLFromNative = libxlDomainXMLFromNative, /* 0.9.0 */
.connectDomainXMLToNative = libxlDomainXMLToNative, /* 0.9.0 */
.connectListDefinedDomains = libxlListDefinedDomains, /* 0.9.0 */
.connectNumOfDefinedDomains = libxlNumDefinedDomains, /* 0.9.0 */
.connectDomainXMLFromNative = libxlConnectDomainXMLFromNative, /* 0.9.0 */
.connectDomainXMLToNative = libxlConnectDomainXMLToNative, /* 0.9.0 */
.connectListDefinedDomains = libxlConnectListDefinedDomains, /* 0.9.0 */
.connectNumOfDefinedDomains = libxlConnectNumOfDefinedDomains, /* 0.9.0 */
.domainCreate = libxlDomainCreate, /* 0.9.0 */
.domainCreateWithFlags = libxlDomainCreateWithFlags, /* 0.9.0 */
.domainDefineXML = libxlDomainDefineXML, /* 0.9.0 */
@ -4257,24 +4257,24 @@ static virDriver libxlDriver = {
.domainSetSchedulerParameters = libxlDomainSetSchedulerParameters, /* 0.9.0 */
.domainSetSchedulerParametersFlags = libxlDomainSetSchedulerParametersFlags, /* 0.9.2 */
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
.connectDomainEventRegister = libxlDomainEventRegister, /* 0.9.0 */
.connectDomainEventDeregister = libxlDomainEventDeregister, /* 0.9.0 */
.connectDomainEventRegister = libxlConnectDomainEventRegister, /* 0.9.0 */
.connectDomainEventDeregister = libxlConnectDomainEventDeregister, /* 0.9.0 */
.domainManagedSave = libxlDomainManagedSave, /* 0.9.2 */
.domainHasManagedSaveImage = libxlDomainHasManagedSaveImage, /* 0.9.2 */
.domainManagedSaveRemove = libxlDomainManagedSaveRemove, /* 0.9.2 */
.domainIsActive = libxlDomainIsActive, /* 0.9.0 */
.domainIsPersistent = libxlDomainIsPersistent, /* 0.9.0 */
.domainIsUpdated = libxlDomainIsUpdated, /* 0.9.0 */
.connectDomainEventRegisterAny = libxlDomainEventRegisterAny, /* 0.9.0 */
.connectDomainEventDeregisterAny = libxlDomainEventDeregisterAny, /* 0.9.0 */
.connectIsAlive = libxlIsAlive, /* 0.9.8 */
.connectDomainEventRegisterAny = libxlConnectDomainEventRegisterAny, /* 0.9.0 */
.connectDomainEventDeregisterAny = libxlConnectDomainEventDeregisterAny, /* 0.9.0 */
.connectIsAlive = libxlConnectIsAlive, /* 0.9.8 */
};
static virStateDriver libxlStateDriver = {
.name = "LIBXL",
.stateInitialize = libxlStartup,
.stateCleanup = libxlShutdown,
.stateReload = libxlReload,
.stateInitialize = libxlStateInitialize,
.stateCleanup = libxlStateCleanup,
.stateReload = libxlStateReload,
};

View File

@ -74,10 +74,10 @@
#define LXC_NB_MEM_PARAM 3
static int lxcStartup(bool privileged,
static int lxcStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque);
static int lxcShutdown(void);
static int lxcStateCleanup(void);
virLXCDriverPtr lxc_driver = NULL;
/* callbacks for nwfilter */
@ -109,7 +109,7 @@ static virNWFilterCallbackDriver lxcCallbackDriver = {
/* Functions */
static virDrvOpenStatus lxcOpen(virConnectPtr conn,
static virDrvOpenStatus lxcConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -153,7 +153,7 @@ static virDrvOpenStatus lxcOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int lxcClose(virConnectPtr conn)
static int lxcConnectClose(virConnectPtr conn)
{
virLXCDriverPtr driver = conn->privateData;
@ -166,27 +166,27 @@ static int lxcClose(virConnectPtr conn)
}
static int lxcIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int lxcConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int lxcIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int lxcConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int lxcIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int lxcConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static char *lxcGetCapabilities(virConnectPtr conn) {
static char *lxcConnectGetCapabilities(virConnectPtr conn) {
virLXCDriverPtr driver = conn->privateData;
char *xml;
@ -355,7 +355,7 @@ cleanup:
return ret;
}
static int lxcListDomains(virConnectPtr conn, int *ids, int nids) {
static int lxcConnectListDomains(virConnectPtr conn, int *ids, int nids) {
virLXCDriverPtr driver = conn->privateData;
int n;
@ -366,7 +366,7 @@ static int lxcListDomains(virConnectPtr conn, int *ids, int nids) {
return n;
}
static int lxcNumDomains(virConnectPtr conn) {
static int lxcConnectNumOfDomains(virConnectPtr conn) {
virLXCDriverPtr driver = conn->privateData;
int n;
@ -377,7 +377,7 @@ static int lxcNumDomains(virConnectPtr conn) {
return n;
}
static int lxcListDefinedDomains(virConnectPtr conn,
static int lxcConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
virLXCDriverPtr driver = conn->privateData;
int n;
@ -390,7 +390,7 @@ static int lxcListDefinedDomains(virConnectPtr conn,
}
static int lxcNumDefinedDomains(virConnectPtr conn) {
static int lxcConnectNumOfDefinedDomains(virConnectPtr conn) {
virLXCDriverPtr driver = conn->privateData;
int n;
@ -403,7 +403,7 @@ static int lxcNumDefinedDomains(virConnectPtr conn) {
static virDomainPtr lxcDomainDefine(virConnectPtr conn, const char *xml)
static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
{
virLXCDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
@ -608,7 +608,7 @@ cleanup:
return ret;
}
static char *lxcGetOSType(virDomainPtr dom)
static char *lxcDomainGetOSType(virDomainPtr dom)
{
virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -937,7 +937,7 @@ cleanup:
}
/**
* lxcDomainStartWithFlags:
* lxcDomainCreateWithFlags:
* @dom: domain to start
* @flags: Must be 0 for now
*
@ -945,7 +945,7 @@ cleanup:
*
* Returns 0 on success or -1 in case of error
*/
static int lxcDomainStartWithFlags(virDomainPtr dom, unsigned int flags)
static int lxcDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -999,20 +999,20 @@ cleanup:
}
/**
* lxcDomainStart:
* lxcDomainCreate:
* @dom: domain to start
*
* Looks up domain and starts it.
*
* Returns 0 on success or -1 in case of error
*/
static int lxcDomainStart(virDomainPtr dom)
static int lxcDomainCreate(virDomainPtr dom)
{
return lxcDomainStartWithFlags(dom, 0);
return lxcDomainCreateWithFlags(dom, 0);
}
/**
* lxcDomainCreateAndStart:
* lxcDomainCreateXML:
* @conn: pointer to connection
* @xml: XML definition of domain
* @flags: Must be 0 for now
@ -1022,7 +1022,7 @@ static int lxcDomainStart(virDomainPtr dom)
* Returns 0 on success or -1 in case of error
*/
static virDomainPtr
lxcDomainCreateAndStart(virConnectPtr conn,
lxcDomainCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags) {
virLXCDriverPtr driver = conn->privateData;
@ -1190,7 +1190,7 @@ cleanup:
static int
lxcDomainEventRegister(virConnectPtr conn,
lxcConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
@ -1209,7 +1209,7 @@ lxcDomainEventRegister(virConnectPtr conn,
static int
lxcDomainEventDeregister(virConnectPtr conn,
lxcConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
virLXCDriverPtr driver = conn->privateData;
@ -1226,7 +1226,7 @@ lxcDomainEventDeregister(virConnectPtr conn,
static int
lxcDomainEventRegisterAny(virConnectPtr conn,
lxcConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -1249,7 +1249,7 @@ lxcDomainEventRegisterAny(virConnectPtr conn,
static int
lxcDomainEventDeregisterAny(virConnectPtr conn,
lxcConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
virLXCDriverPtr driver = conn->privateData;
@ -1376,7 +1376,7 @@ error:
}
static int lxcStartup(bool privileged,
static int lxcStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -1475,7 +1475,7 @@ static int lxcStartup(bool privileged,
cleanup:
lxcDriverUnlock(lxc_driver);
lxcShutdown();
lxcStateCleanup();
return -1;
}
@ -1494,13 +1494,13 @@ static void lxcNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
}
/**
* lxcReload:
* lxcStateReload:
*
* Function to restart the LXC driver, it will recheck the configuration
* files and perform autostart
*/
static int
lxcReload(void) {
lxcStateReload(void) {
if (!lxc_driver)
return 0;
@ -1517,7 +1517,7 @@ lxcReload(void) {
return 0;
}
static int lxcShutdown(void)
static int lxcStateCleanup(void)
{
if (lxc_driver == NULL)
return -1;
@ -1547,7 +1547,7 @@ static int lxcShutdown(void)
}
static int lxcVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *version)
static int lxcConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *version)
{
struct utsname ver;
@ -1595,7 +1595,7 @@ cleanup:
}
static char *lxcGetSchedulerType(virDomainPtr dom,
static char *lxcDomainGetSchedulerType(virDomainPtr dom,
int *nparams)
{
virLXCDriverPtr driver = dom->conn->privateData;
@ -1715,7 +1715,7 @@ cleanup:
static int
lxcSetSchedulerParametersFlags(virDomainPtr dom,
lxcDomainSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
@ -1841,15 +1841,15 @@ cleanup:
}
static int
lxcSetSchedulerParameters(virDomainPtr domain,
lxcDomainSetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
{
return lxcSetSchedulerParametersFlags(domain, params, nparams, 0);
return lxcDomainSetSchedulerParametersFlags(domain, params, nparams, 0);
}
static int
lxcGetSchedulerParametersFlags(virDomainPtr dom,
lxcDomainGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
@ -1954,11 +1954,11 @@ cleanup:
}
static int
lxcGetSchedulerParameters(virDomainPtr domain,
lxcDomainGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
{
return lxcGetSchedulerParametersFlags(domain, params, nparams, 0);
return lxcDomainGetSchedulerParametersFlags(domain, params, nparams, 0);
}
@ -2661,7 +2661,7 @@ cleanup:
static int
lxcListAllDomains(virConnectPtr conn,
lxcConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -4323,7 +4323,7 @@ static int lxcDomainDetachDevice(virDomainPtr dom,
}
static int lxcDomainOpenNamespace(virDomainPtr dom,
static int lxcDomainLxcOpenNamespace(virDomainPtr dom,
int **fdlist,
unsigned int flags)
{
@ -4372,7 +4372,7 @@ cleanup:
static char *
lxcGetSysinfo(virConnectPtr conn, unsigned int flags)
lxcConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
{
virLXCDriverPtr driver = conn->privateData;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@ -4399,17 +4399,17 @@ lxcGetSysinfo(virConnectPtr conn, unsigned int flags)
static virDriver lxcDriver = {
.no = VIR_DRV_LXC,
.name = LXC_DRIVER_NAME,
.connectOpen = lxcOpen, /* 0.4.2 */
.connectClose = lxcClose, /* 0.4.2 */
.connectGetVersion = lxcVersion, /* 0.4.6 */
.connectOpen = lxcConnectOpen, /* 0.4.2 */
.connectClose = lxcConnectClose, /* 0.4.2 */
.connectGetVersion = lxcConnectGetVersion, /* 0.4.6 */
.connectGetHostname = virGetHostname, /* 0.6.3 */
.connectGetSysinfo = lxcGetSysinfo, /* 1.0.5 */
.connectGetSysinfo = lxcConnectGetSysinfo, /* 1.0.5 */
.nodeGetInfo = nodeGetInfo, /* 0.6.5 */
.connectGetCapabilities = lxcGetCapabilities, /* 0.6.5 */
.connectListDomains = lxcListDomains, /* 0.4.2 */
.connectNumOfDomains = lxcNumDomains, /* 0.4.2 */
.connectListAllDomains = lxcListAllDomains, /* 0.9.13 */
.domainCreateXML = lxcDomainCreateAndStart, /* 0.4.4 */
.connectGetCapabilities = lxcConnectGetCapabilities, /* 0.6.5 */
.connectListDomains = lxcConnectListDomains, /* 0.4.2 */
.connectNumOfDomains = lxcConnectNumOfDomains, /* 0.4.2 */
.connectListAllDomains = lxcConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = lxcDomainCreateXML, /* 0.4.4 */
.domainLookupByID = lxcDomainLookupByID, /* 0.4.2 */
.domainLookupByUUID = lxcDomainLookupByUUID, /* 0.4.2 */
.domainLookupByName = lxcDomainLookupByName, /* 0.4.2 */
@ -4417,7 +4417,7 @@ static virDriver lxcDriver = {
.domainResume = lxcDomainResume, /* 0.7.2 */
.domainDestroy = lxcDomainDestroy, /* 0.4.4 */
.domainDestroyFlags = lxcDomainDestroyFlags, /* 0.9.4 */
.domainGetOSType = lxcGetOSType, /* 0.4.2 */
.domainGetOSType = lxcDomainGetOSType, /* 0.4.2 */
.domainGetMaxMemory = lxcDomainGetMaxMemory, /* 0.7.2 */
.domainSetMaxMemory = lxcDomainSetMaxMemory, /* 0.7.2 */
.domainSetMemory = lxcDomainSetMemory, /* 0.7.2 */
@ -4430,11 +4430,11 @@ static virDriver lxcDriver = {
.domainGetSecurityLabel = lxcDomainGetSecurityLabel, /* 0.9.10 */
.nodeGetSecurityModel = lxcNodeGetSecurityModel, /* 0.9.10 */
.domainGetXMLDesc = lxcDomainGetXMLDesc, /* 0.4.2 */
.connectListDefinedDomains = lxcListDefinedDomains, /* 0.4.2 */
.connectNumOfDefinedDomains = lxcNumDefinedDomains, /* 0.4.2 */
.domainCreate = lxcDomainStart, /* 0.4.4 */
.domainCreateWithFlags = lxcDomainStartWithFlags, /* 0.8.2 */
.domainDefineXML = lxcDomainDefine, /* 0.4.2 */
.connectListDefinedDomains = lxcConnectListDefinedDomains, /* 0.4.2 */
.connectNumOfDefinedDomains = lxcConnectNumOfDefinedDomains, /* 0.4.2 */
.domainCreate = lxcDomainCreate, /* 0.4.4 */
.domainCreateWithFlags = lxcDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = lxcDomainDefineXML, /* 0.4.2 */
.domainUndefine = lxcDomainUndefine, /* 0.4.2 */
.domainUndefineFlags = lxcDomainUndefineFlags, /* 0.9.4 */
.domainAttachDevice = lxcDomainAttachDevice, /* 1.0.1 */
@ -4444,28 +4444,28 @@ static virDriver lxcDriver = {
.domainUpdateDeviceFlags = lxcDomainUpdateDeviceFlags, /* 1.0.1 */
.domainGetAutostart = lxcDomainGetAutostart, /* 0.7.0 */
.domainSetAutostart = lxcDomainSetAutostart, /* 0.7.0 */
.domainGetSchedulerType = lxcGetSchedulerType, /* 0.5.0 */
.domainGetSchedulerParameters = lxcGetSchedulerParameters, /* 0.5.0 */
.domainGetSchedulerParametersFlags = lxcGetSchedulerParametersFlags, /* 0.9.2 */
.domainSetSchedulerParameters = lxcSetSchedulerParameters, /* 0.5.0 */
.domainSetSchedulerParametersFlags = lxcSetSchedulerParametersFlags, /* 0.9.2 */
.domainGetSchedulerType = lxcDomainGetSchedulerType, /* 0.5.0 */
.domainGetSchedulerParameters = lxcDomainGetSchedulerParameters, /* 0.5.0 */
.domainGetSchedulerParametersFlags = lxcDomainGetSchedulerParametersFlags, /* 0.9.2 */
.domainSetSchedulerParameters = lxcDomainSetSchedulerParameters, /* 0.5.0 */
.domainSetSchedulerParametersFlags = lxcDomainSetSchedulerParametersFlags, /* 0.9.2 */
.domainInterfaceStats = lxcDomainInterfaceStats, /* 0.7.3 */
.nodeGetCPUStats = nodeGetCPUStats, /* 0.9.3 */
.nodeGetMemoryStats = nodeGetMemoryStats, /* 0.9.3 */
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.6.5 */
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.6.5 */
.nodeGetCPUMap = nodeGetCPUMap, /* 1.0.0 */
.connectDomainEventRegister = lxcDomainEventRegister, /* 0.7.0 */
.connectDomainEventDeregister = lxcDomainEventDeregister, /* 0.7.0 */
.connectIsEncrypted = lxcIsEncrypted, /* 0.7.3 */
.connectIsSecure = lxcIsSecure, /* 0.7.3 */
.connectDomainEventRegister = lxcConnectDomainEventRegister, /* 0.7.0 */
.connectDomainEventDeregister = lxcConnectDomainEventDeregister, /* 0.7.0 */
.connectIsEncrypted = lxcConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = lxcConnectIsSecure, /* 0.7.3 */
.domainIsActive = lxcDomainIsActive, /* 0.7.3 */
.domainIsPersistent = lxcDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = lxcDomainIsUpdated, /* 0.8.6 */
.connectDomainEventRegisterAny = lxcDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = lxcDomainEventDeregisterAny, /* 0.8.0 */
.connectDomainEventRegisterAny = lxcConnectDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = lxcConnectDomainEventDeregisterAny, /* 0.8.0 */
.domainOpenConsole = lxcDomainOpenConsole, /* 0.8.6 */
.connectIsAlive = lxcIsAlive, /* 0.9.8 */
.connectIsAlive = lxcConnectIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.nodeGetMemoryParameters = nodeGetMemoryParameters, /* 0.10.2 */
.nodeSetMemoryParameters = nodeSetMemoryParameters, /* 0.10.2 */
@ -4473,14 +4473,14 @@ static virDriver lxcDriver = {
.domainShutdown = lxcDomainShutdown, /* 1.0.1 */
.domainShutdownFlags = lxcDomainShutdownFlags, /* 1.0.1 */
.domainReboot = lxcDomainReboot, /* 1.0.1 */
.domainLxcOpenNamespace = lxcDomainOpenNamespace, /* 1.0.2 */
.domainLxcOpenNamespace = lxcDomainLxcOpenNamespace, /* 1.0.2 */
};
static virStateDriver lxcStateDriver = {
.name = LXC_DRIVER_NAME,
.stateInitialize = lxcStartup,
.stateCleanup = lxcShutdown,
.stateReload = lxcReload,
.stateInitialize = lxcStateInitialize,
.stateCleanup = lxcStateCleanup,
.stateReload = lxcStateReload,
};
int lxcRegister(void)

View File

@ -98,7 +98,7 @@ static void networkDriverUnlock(struct network_driver *driver)
virMutexUnlock(&driver->lock);
}
static int networkShutdown(void);
static int networkStateCleanup(void);
static int networkStartNetwork(struct network_driver *driver,
virNetworkObjPtr network);
@ -350,12 +350,12 @@ firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
#endif
/**
* networkStartup:
* networkStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
networkStartup(bool privileged,
networkStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -472,18 +472,18 @@ error:
networkDriverUnlock(driverState);
VIR_FREE(base);
networkShutdown();
networkStateCleanup();
return -1;
}
/**
* networkReload:
* networkStateReload:
*
* Function to restart the QEmu daemon, it will recheck the configuration
* files and update its state and the networking
*/
static int
networkReload(void) {
networkStateReload(void) {
if (!driverState)
return 0;
@ -502,12 +502,12 @@ networkReload(void) {
/**
* networkShutdown:
* networkStateCleanup:
*
* Shutdown the QEmu daemon, it will stop all active domains and networks
*/
static int
networkShutdown(void) {
networkStateCleanup(void) {
if (!driverState)
return -1;
@ -2778,7 +2778,7 @@ cleanup:
return ret;
}
static virDrvOpenStatus networkOpenNetwork(virConnectPtr conn,
static virDrvOpenStatus networkOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -2791,12 +2791,12 @@ static virDrvOpenStatus networkOpenNetwork(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int networkCloseNetwork(virConnectPtr conn) {
static int networkClose(virConnectPtr conn) {
conn->networkPrivateData = NULL;
return 0;
}
static int networkNumNetworks(virConnectPtr conn) {
static int networkConnectNumOfNetworks(virConnectPtr conn) {
int nactive = 0, i;
struct network_driver *driver = conn->networkPrivateData;
@ -2812,7 +2812,7 @@ static int networkNumNetworks(virConnectPtr conn) {
return nactive;
}
static int networkListNetworks(virConnectPtr conn, char **const names, int nnames) {
static int networkConnectListNetworks(virConnectPtr conn, char **const names, int nnames) {
struct network_driver *driver = conn->networkPrivateData;
int got = 0, i;
@ -2840,7 +2840,7 @@ static int networkListNetworks(virConnectPtr conn, char **const names, int nname
return -1;
}
static int networkNumDefinedNetworks(virConnectPtr conn) {
static int networkConnectNumOfDefinedNetworks(virConnectPtr conn) {
int ninactive = 0, i;
struct network_driver *driver = conn->networkPrivateData;
@ -2856,7 +2856,7 @@ static int networkNumDefinedNetworks(virConnectPtr conn) {
return ninactive;
}
static int networkListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
static int networkConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
struct network_driver *driver = conn->networkPrivateData;
int got = 0, i;
@ -2884,7 +2884,7 @@ static int networkListDefinedNetworks(virConnectPtr conn, char **const names, in
}
static int
networkListAllNetworks(virConnectPtr conn,
networkConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
{
@ -3090,7 +3090,7 @@ networkValidate(struct network_driver *driver,
return 0;
}
static virNetworkPtr networkCreate(virConnectPtr conn, const char *xml) {
static virNetworkPtr networkCreateXML(virConnectPtr conn, const char *xml) {
struct network_driver *driver = conn->networkPrivateData;
virNetworkDefPtr def;
virNetworkObjPtr network = NULL;
@ -3129,7 +3129,7 @@ cleanup:
return ret;
}
static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
static virNetworkPtr networkDefineXML(virConnectPtr conn, const char *xml) {
struct network_driver *driver = conn->networkPrivateData;
virNetworkDefPtr def = NULL;
bool freeDef = true;
@ -3372,7 +3372,7 @@ cleanup:
return ret;
}
static int networkStart(virNetworkPtr net) {
static int networkCreate(virNetworkPtr net) {
struct network_driver *driver = net->conn->networkPrivateData;
virNetworkObjPtr network;
int ret = -1;
@ -3592,20 +3592,20 @@ cleanup:
static virNetworkDriver networkDriver = {
"Network",
.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 */
.connectListDefinedNetworks = networkListDefinedNetworks, /* 0.2.0 */
.connectListAllNetworks = networkListAllNetworks, /* 0.10.2 */
.networkOpen = networkOpen, /* 0.2.0 */
.networkClose = networkClose, /* 0.2.0 */
.connectNumOfNetworks = networkConnectNumOfNetworks, /* 0.2.0 */
.connectListNetworks = networkConnectListNetworks, /* 0.2.0 */
.connectNumOfDefinedNetworks = networkConnectNumOfDefinedNetworks, /* 0.2.0 */
.connectListDefinedNetworks = networkConnectListDefinedNetworks, /* 0.2.0 */
.connectListAllNetworks = networkConnectListAllNetworks, /* 0.10.2 */
.networkLookupByUUID = networkLookupByUUID, /* 0.2.0 */
.networkLookupByName = networkLookupByName, /* 0.2.0 */
.networkCreateXML = networkCreate, /* 0.2.0 */
.networkDefineXML = networkDefine, /* 0.2.0 */
.networkCreateXML = networkCreateXML, /* 0.2.0 */
.networkDefineXML = networkDefineXML, /* 0.2.0 */
.networkUndefine = networkUndefine, /* 0.2.0 */
.networkUpdate = networkUpdate, /* 0.10.2 */
.networkCreate = networkStart, /* 0.2.0 */
.networkCreate = networkCreate, /* 0.2.0 */
.networkDestroy = networkDestroy, /* 0.2.0 */
.networkGetXMLDesc = networkGetXMLDesc, /* 0.2.0 */
.networkGetBridgeName = networkGetBridgeName, /* 0.2.0 */
@ -3617,9 +3617,9 @@ static virNetworkDriver networkDriver = {
static virStateDriver networkStateDriver = {
.name = "Network",
.stateInitialize = networkStartup,
.stateCleanup = networkShutdown,
.stateReload = networkReload,
.stateInitialize = networkStateInitialize,
.stateCleanup = networkStateCleanup,
.stateReload = networkStateReload,
};
int networkRegister(void) {

View File

@ -590,7 +590,7 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
}
static int halNodeDeviceDriverStartup(bool privileged ATTRIBUTE_UNUSED,
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -691,7 +691,7 @@ static int halNodeDeviceDriverStartup(bool privileged ATTRIBUTE_UNUSED,
}
static int halNodeDeviceDriverShutdown(void)
static int nodeDeviceStateCleanup(void)
{
if (driverState) {
nodeDeviceLock(driverState);
@ -708,7 +708,7 @@ static int halNodeDeviceDriverShutdown(void)
}
static int halNodeDeviceDriverReload(void)
static int nodeDeviceStateReload(void)
{
DBusError err;
char **udi = NULL;
@ -740,7 +740,7 @@ static int halNodeDeviceDriverReload(void)
}
static virDrvOpenStatus halNodeDrvOpen(virConnectPtr conn,
static virDrvOpenStatus nodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -754,7 +754,7 @@ static virDrvOpenStatus halNodeDrvOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int halNodeDrvClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static int nodeDeviceClose(virConnectPtr conn ATTRIBUTE_UNUSED)
{
conn->nodeDevicePrivateData = NULL;
return 0;
@ -763,8 +763,8 @@ static int halNodeDrvClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static virNodeDeviceDriver halNodeDeviceDriver = {
.name = "halNodeDeviceDriver",
.nodeDeviceOpen = halNodeDrvOpen, /* 0.5.0 */
.nodDeviceClose = halNodeDrvClose, /* 0.5.0 */
.nodeDeviceOpen = nodeDeviceOpen, /* 0.5.0 */
.nodDeviceClose = nodDeviceClose, /* 0.5.0 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */
.nodeListDevices = nodeListDevices, /* 0.5.0 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
@ -781,9 +781,9 @@ static virNodeDeviceDriver halNodeDeviceDriver = {
static virStateDriver halStateDriver = {
.name = "HAL",
.stateInitialize = halNodeDeviceDriverStartup, /* 0.5.0 */
.stateCleanup = halNodeDeviceDriverShutdown, /* 0.5.0 */
.stateReload = halNodeDeviceDriverReload, /* 0.5.0 */
.stateInitialize = nodeDeviceStateInitialize, /* 0.5.0 */
.stateCleanup = nodeDeviceStateCleanup, /* 0.5.0 */
.stateReload = nodeDeviceStateReload, /* 0.5.0 */
};
int halNodeRegister(void)

View File

@ -1437,7 +1437,7 @@ out:
}
static int udevNodeDeviceDriverShutdown(void)
static int nodeDeviceStateCleanup(void)
{
int ret = 0;
@ -1649,7 +1649,7 @@ out:
return ret;
}
static int udevNodeDeviceDriverStartup(bool privileged ATTRIBUTE_UNUSED,
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -1758,19 +1758,19 @@ out_unlock:
out:
if (ret == -1) {
udevNodeDeviceDriverShutdown();
nodeDeviceStateCleanup();
}
return ret;
}
static int udevNodeDeviceDriverReload(void)
static int nodeDeviceStateReload(void)
{
return 0;
}
static virDrvOpenStatus udevNodeDrvOpen(virConnectPtr conn,
static virDrvOpenStatus nodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1785,7 +1785,7 @@ static virDrvOpenStatus udevNodeDrvOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int udevNodeDrvClose(virConnectPtr conn)
static int nodeDeviceClose(virConnectPtr conn)
{
conn->nodeDevicePrivateData = NULL;
return 0;
@ -1793,8 +1793,8 @@ static int udevNodeDrvClose(virConnectPtr conn)
static virNodeDeviceDriver udevNodeDeviceDriver = {
.name = "udevNodeDeviceDriver",
.nodeDeviceOpen = udevNodeDrvOpen, /* 0.7.3 */
.nodeDeviceClose = udevNodeDrvClose, /* 0.7.3 */
.nodeDeviceOpen = nodeDeviceOpen, /* 0.7.3 */
.nodeDeviceClose = nodeDeviceClose, /* 0.7.3 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */
.nodeListDevices = nodeListDevices, /* 0.7.3 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
@ -1810,9 +1810,9 @@ static virNodeDeviceDriver udevNodeDeviceDriver = {
static virStateDriver udevStateDriver = {
.name = "udev",
.stateInitialize = udevNodeDeviceDriverStartup, /* 0.7.3 */
.stateCleanup = udevNodeDeviceDriverShutdown, /* 0.7.3 */
.stateReload = udevNodeDeviceDriverReload, /* 0.7.3 */
.stateInitialize = nodeDeviceStateInitialize, /* 0.7.3 */
.stateCleanup = nodeDeviceStateCleanup, /* 0.7.3 */
.stateReload = nodeDeviceStateReload, /* 0.7.3 */
};
int udevNodeRegister(void)

View File

@ -62,9 +62,9 @@
static virNWFilterDriverStatePtr driverState;
static int nwfilterDriverShutdown(void);
static int nwfilterStateCleanup(void);
static int nwfilterDriverReload(void);
static int nwfilterStateReload(void);
static void nwfilterDriverLock(virNWFilterDriverStatePtr driver)
{
@ -87,7 +87,7 @@ nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
dbus_message_is_signal(message, "org.fedoraproject.FirewallD1",
"Reloaded")) {
VIR_DEBUG("Reload in nwfilter_driver because of firewalld.");
nwfilterDriverReload();
nwfilterStateReload();
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@ -160,12 +160,12 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
#endif /* HAVE_FIREWALLD */
/**
* virNWFilterStartup:
* nwfilterStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
nwfilterDriverStartup(bool privileged,
nwfilterStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -244,7 +244,7 @@ out_of_memory:
error:
VIR_FREE(base);
nwfilterDriverUnlock(driverState);
nwfilterDriverShutdown();
nwfilterStateCleanup();
return -1;
@ -263,13 +263,13 @@ err_free_driverstate:
}
/**
* virNWFilterReload:
* nwfilterStateReload:
*
* Function to restart the nwfilter driver, it will recheck the configuration
* files and update its state
*/
static int
nwfilterDriverReload(void) {
nwfilterStateReload(void) {
virConnectPtr conn;
if (!driverState) {
@ -328,12 +328,12 @@ virNWFilterDriverIsWatchingFirewallD(void)
}
/**
* virNWFilterShutdown:
* nwfilterStateCleanup:
*
* Shutdown the nwfilter driver, it will stop all active nwfilters
*/
static int
nwfilterDriverShutdown(void) {
nwfilterStateCleanup(void) {
if (!driverState)
return -1;
@ -437,14 +437,14 @@ nwfilterClose(virConnectPtr conn) {
static int
nwfilterNumNWFilters(virConnectPtr conn) {
nwfilterConnectNumOfNWFilters(virConnectPtr conn) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
return driver->nwfilters.count;
}
static int
nwfilterListNWFilters(virConnectPtr conn,
nwfilterConnectListNWFilters(virConnectPtr conn,
char **const names,
int nnames) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
@ -474,7 +474,7 @@ nwfilterListNWFilters(virConnectPtr conn,
static int
nwfilterListAllNWFilters(virConnectPtr conn,
nwfilterConnectListAllNWFilters(virConnectPtr conn,
virNWFilterPtr **filters,
unsigned int flags) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
@ -529,7 +529,7 @@ nwfilterListAllNWFilters(virConnectPtr conn,
}
static virNWFilterPtr
nwfilterDefine(virConnectPtr conn,
nwfilterDefineXML(virConnectPtr conn,
const char *xml)
{
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
@ -661,12 +661,12 @@ static virNWFilterDriver nwfilterDriver = {
.name = "nwfilter",
.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 */
.connectNumOfNWFilters = nwfilterConnectNumOfNWFilters, /* 0.8.0 */
.connectListNWFilters = nwfilterConnectListNWFilters, /* 0.8.0 */
.connectListAllNWFilters = nwfilterConnectListAllNWFilters, /* 0.10.2 */
.nwfilterLookupByName = nwfilterLookupByName, /* 0.8.0 */
.nwfilterLookupByUUID = nwfilterLookupByUUID, /* 0.8.0 */
.nwfilterDefineXML = nwfilterDefine, /* 0.8.0 */
.nwfilterDefineXML = nwfilterDefineXML, /* 0.8.0 */
.nwfilterUndefine = nwfilterUndefine, /* 0.8.0 */
.nwfilterGetXMLDesc = nwfilterGetXMLDesc, /* 0.8.0 */
};
@ -674,9 +674,9 @@ static virNWFilterDriver nwfilterDriver = {
static virStateDriver stateDriver = {
.name = "NWFilter",
.stateInitialize = nwfilterDriverStartup,
.stateCleanup = nwfilterDriverShutdown,
.stateReload = nwfilterDriverReload,
.stateInitialize = nwfilterStateInitialize,
.stateCleanup = nwfilterStateCleanup,
.stateReload = nwfilterStateReload,
};

View File

@ -68,7 +68,7 @@
#define OPENVZ_NB_MEM_PARAM 3
static int openvzGetProcessInfo(unsigned long long *cpuTime, int vpsid);
static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type);
static int openvzConnectGetMaxVcpus(virConnectPtr conn, const char *type);
static int openvzDomainGetMaxVcpus(virDomainPtr dom);
static int openvzDomainSetVcpusInternal(virDomainObjPtr vm,
unsigned int nvcpus);
@ -335,7 +335,7 @@ cleanup:
return dom;
}
static int openvzGetVersion(virConnectPtr conn, unsigned long *version) {
static int openvzConnectGetVersion(virConnectPtr conn, unsigned long *version) {
struct openvz_driver *driver = conn->privateData;
openvzDriverLock(driver);
*version = driver->version;
@ -343,7 +343,7 @@ static int openvzGetVersion(virConnectPtr conn, unsigned long *version) {
return 0;
}
static char *openvzGetOSType(virDomainPtr dom)
static char *openvzDomainGetOSType(virDomainPtr dom)
{
struct openvz_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -712,6 +712,18 @@ openvzDomainShutdown(virDomainPtr dom)
return openvzDomainShutdownFlags(dom, 0);
}
static int
openvzDomainDestroy(virDomainPtr dom)
{
return openvzDomainShutdownFlags(dom, 0);
}
static int
openvzDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
{
return openvzDomainShutdownFlags(dom, flags);
}
static int openvzDomainReboot(virDomainPtr dom,
unsigned int flags)
{
@ -1326,7 +1338,7 @@ cleanup:
return ret;
}
static int openvzGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED,
static int openvzConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type)
{
if (type == NULL || STRCASEEQ(type, "openvz"))
@ -1347,7 +1359,7 @@ openvzDomainGetVcpusFlags(virDomainPtr dom ATTRIBUTE_UNUSED,
return -1;
}
return openvzGetMaxVCPUs(NULL, "openvz");
return openvzConnectGetMaxVcpus(NULL, "openvz");
}
static int openvzDomainGetMaxVcpus(virDomainPtr dom)
@ -1428,7 +1440,7 @@ openvzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
return openvzDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_AFFECT_LIVE);
}
static virDrvOpenStatus openvzOpen(virConnectPtr conn,
static virDrvOpenStatus openvzConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1510,7 +1522,7 @@ cleanup:
return VIR_DRV_OPEN_ERROR;
};
static int openvzClose(virConnectPtr conn) {
static int openvzConnectClose(virConnectPtr conn) {
struct openvz_driver *driver = conn->privateData;
openvzFreeDriver(driver);
@ -1519,27 +1531,27 @@ static int openvzClose(virConnectPtr conn) {
return 0;
}
static const char *openvzGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
static const char *openvzConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
return "OpenVZ";
}
static int openvzIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED) {
static int openvzConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED) {
/* Encryption is not relevant / applicable to way we talk to openvz */
return 0;
}
static int openvzIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED) {
static int openvzConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED) {
/* We run CLI tools directly so this is secure */
return 1;
}
static int
openvzIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
openvzConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static char *openvzGetCapabilities(virConnectPtr conn) {
static char *openvzConnectGetCapabilities(virConnectPtr conn) {
struct openvz_driver *driver = conn->privateData;
char *ret;
@ -1550,7 +1562,7 @@ static char *openvzGetCapabilities(virConnectPtr conn) {
return ret;
}
static int openvzListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
static int openvzConnectListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
int *ids, int nids) {
int got = 0;
int veid;
@ -1593,7 +1605,7 @@ cleanup:
return rc;
}
static int openvzNumDomains(virConnectPtr conn) {
static int openvzConnectNumOfDomains(virConnectPtr conn) {
struct openvz_driver *driver = conn->privateData;
int n;
@ -1604,7 +1616,7 @@ static int openvzNumDomains(virConnectPtr conn) {
return n;
}
static int openvzListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
static int openvzConnectListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
int got = 0;
int veid, outfd = -1, ret;
@ -1707,7 +1719,7 @@ Version: 2.2
return 0;
}
static int openvzNumDefinedDomains(virConnectPtr conn) {
static int openvzConnectNumOfDefinedDomains(virConnectPtr conn) {
struct openvz_driver *driver = conn->privateData;
int n;
@ -2146,7 +2158,7 @@ cleanup:
}
static int
openvzListAllDomains(virConnectPtr conn,
openvzConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -2166,22 +2178,22 @@ openvzListAllDomains(virConnectPtr conn,
static virDriver openvzDriver = {
.no = VIR_DRV_OPENVZ,
.name = "OPENVZ",
.connectOpen = openvzOpen, /* 0.3.1 */
.connectClose = openvzClose, /* 0.3.1 */
.connectGetType = openvzGetType, /* 0.3.1 */
.connectGetVersion = openvzGetVersion, /* 0.5.0 */
.connectOpen = openvzConnectOpen, /* 0.3.1 */
.connectClose = openvzConnectClose, /* 0.3.1 */
.connectGetType = openvzConnectGetType, /* 0.3.1 */
.connectGetVersion = openvzConnectGetVersion, /* 0.5.0 */
.connectGetHostname = virGetHostname, /* 0.9.12 */
.connectGetMaxVcpus = openvzGetMaxVCPUs, /* 0.4.6 */
.connectGetMaxVcpus = openvzConnectGetMaxVcpus, /* 0.4.6 */
.nodeGetInfo = nodeGetInfo, /* 0.3.2 */
.nodeGetCPUStats = nodeGetCPUStats, /* 0.9.12 */
.nodeGetMemoryStats = nodeGetMemoryStats, /* 0.9.12 */
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.9.12 */
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.9.12 */
.nodeGetCPUMap = nodeGetCPUMap, /* 1.0.0 */
.connectGetCapabilities = openvzGetCapabilities, /* 0.4.6 */
.connectListDomains = openvzListDomains, /* 0.3.1 */
.connectNumOfDomains = openvzNumDomains, /* 0.3.1 */
.connectListAllDomains = openvzListAllDomains, /* 0.9.13 */
.connectGetCapabilities = openvzConnectGetCapabilities, /* 0.4.6 */
.connectListDomains = openvzConnectListDomains, /* 0.3.1 */
.connectNumOfDomains = openvzConnectNumOfDomains, /* 0.3.1 */
.connectListAllDomains = openvzConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = openvzDomainCreateXML, /* 0.3.3 */
.domainLookupByID = openvzDomainLookupByID, /* 0.3.1 */
.domainLookupByUUID = openvzDomainLookupByUUID, /* 0.3.1 */
@ -2191,9 +2203,9 @@ static virDriver openvzDriver = {
.domainShutdown = openvzDomainShutdown, /* 0.3.1 */
.domainShutdownFlags = openvzDomainShutdownFlags, /* 0.9.10 */
.domainReboot = openvzDomainReboot, /* 0.3.1 */
.domainDestroy = openvzDomainShutdown, /* 0.3.1 */
.domainDestroyFlags = openvzDomainShutdownFlags, /* 0.9.4 */
.domainGetOSType = openvzGetOSType, /* 0.3.1 */
.domainDestroy = openvzDomainDestroy, /* 0.3.1 */
.domainDestroyFlags = openvzDomainDestroyFlags, /* 0.9.4 */
.domainGetOSType = openvzDomainGetOSType, /* 0.3.1 */
.domainGetMemoryParameters = openvzDomainGetMemoryParameters, /* 0.9.12 */
.domainSetMemoryParameters = openvzDomainSetMemoryParameters, /* 0.9.12 */
.domainGetInfo = openvzDomainGetInfo, /* 0.3.1 */
@ -2203,8 +2215,8 @@ static virDriver openvzDriver = {
.domainGetVcpusFlags = openvzDomainGetVcpusFlags, /* 0.8.5 */
.domainGetMaxVcpus = openvzDomainGetMaxVcpus, /* 0.4.6 */
.domainGetXMLDesc = openvzDomainGetXMLDesc, /* 0.4.6 */
.connectListDefinedDomains = openvzListDefinedDomains, /* 0.3.1 */
.connectNumOfDefinedDomains = openvzNumDefinedDomains, /* 0.3.1 */
.connectListDefinedDomains = openvzConnectListDefinedDomains, /* 0.3.1 */
.connectNumOfDefinedDomains = openvzConnectNumOfDefinedDomains, /* 0.3.1 */
.domainCreate = openvzDomainCreate, /* 0.3.1 */
.domainCreateWithFlags = openvzDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = openvzDomainDefineXML, /* 0.3.3 */
@ -2213,12 +2225,12 @@ static virDriver openvzDriver = {
.domainGetAutostart = openvzDomainGetAutostart, /* 0.4.6 */
.domainSetAutostart = openvzDomainSetAutostart, /* 0.4.6 */
.domainInterfaceStats = openvzDomainInterfaceStats, /* 0.9.12 */
.connectIsEncrypted = openvzIsEncrypted, /* 0.7.3 */
.connectIsSecure = openvzIsSecure, /* 0.7.3 */
.connectIsEncrypted = openvzConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = openvzConnectIsSecure, /* 0.7.3 */
.domainIsActive = openvzDomainIsActive, /* 0.7.3 */
.domainIsPersistent = openvzDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = openvzDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = openvzIsAlive, /* 0.9.8 */
.connectIsAlive = openvzConnectIsAlive, /* 0.9.8 */
.domainUpdateDeviceFlags = openvzDomainUpdateDeviceFlags, /* 0.9.13 */
.domainGetHostname = openvzDomainGetHostname, /* 0.10.0 */
};

View File

@ -68,7 +68,7 @@
#define IS_CT(def) (STREQ_NULLABLE(def->os.type, "exe"))
static int parallelsClose(virConnectPtr conn);
static int parallelsConnectClose(virConnectPtr conn);
static const char * parallelsGetDiskBusName(int bus) {
switch (bus) {
@ -151,7 +151,7 @@ parallelsBuildCapabilities(void)
}
static char *
parallelsGetCapabilities(virConnectPtr conn)
parallelsConnectGetCapabilities(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
char *xml;
@ -947,7 +947,7 @@ parallelsOpenDefault(virConnectPtr conn)
}
static virDrvOpenStatus
parallelsOpen(virConnectPtr conn,
parallelsConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -980,7 +980,7 @@ parallelsOpen(virConnectPtr conn,
}
static int
parallelsClose(virConnectPtr conn)
parallelsConnectClose(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
@ -998,7 +998,7 @@ parallelsClose(virConnectPtr conn)
}
static int
parallelsGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *hvVer)
parallelsConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *hvVer)
{
char *output, *sVer, *tmp;
const char *searchStr = "prlsrvctl version ";
@ -1044,7 +1044,7 @@ cleanup:
}
static int
parallelsListDomains(virConnectPtr conn, int *ids, int maxids)
parallelsConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
parallelsConnPtr privconn = conn->privateData;
int n;
@ -1057,7 +1057,7 @@ parallelsListDomains(virConnectPtr conn, int *ids, int maxids)
}
static int
parallelsNumOfDomains(virConnectPtr conn)
parallelsConnectNumOfDomains(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
int count;
@ -1070,7 +1070,7 @@ parallelsNumOfDomains(virConnectPtr conn)
}
static int
parallelsListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
parallelsConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
{
parallelsConnPtr privconn = conn->privateData;
int n;
@ -1085,7 +1085,7 @@ parallelsListDefinedDomains(virConnectPtr conn, char **const names, int maxnames
}
static int
parallelsNumOfDefinedDomains(virConnectPtr conn)
parallelsConnectNumOfDefinedDomains(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
int count;
@ -1098,7 +1098,7 @@ parallelsNumOfDefinedDomains(virConnectPtr conn)
}
static int
parallelsListAllDomains(virConnectPtr conn,
parallelsConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -1114,7 +1114,7 @@ parallelsListAllDomains(virConnectPtr conn,
}
static virDomainPtr
parallelsLookupDomainByID(virConnectPtr conn, int id)
parallelsDomainLookupByID(virConnectPtr conn, int id)
{
parallelsConnPtr privconn = conn->privateData;
virDomainPtr ret = NULL;
@ -1140,7 +1140,7 @@ parallelsLookupDomainByID(virConnectPtr conn, int id)
}
static virDomainPtr
parallelsLookupDomainByUUID(virConnectPtr conn, const unsigned char *uuid)
parallelsDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
{
parallelsConnPtr privconn = conn->privateData;
virDomainPtr ret = NULL;
@ -1169,7 +1169,7 @@ parallelsLookupDomainByUUID(virConnectPtr conn, const unsigned char *uuid)
}
static virDomainPtr
parallelsLookupDomainByName(virConnectPtr conn, const char *name)
parallelsDomainLookupByName(virConnectPtr conn, const char *name)
{
parallelsConnPtr privconn = conn->privateData;
virDomainPtr ret = NULL;
@ -1196,7 +1196,7 @@ parallelsLookupDomainByName(virConnectPtr conn, const char *name)
}
static int
parallelsGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
parallelsDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
{
parallelsConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -1225,7 +1225,7 @@ parallelsGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
}
static char *
parallelsGetOSType(virDomainPtr domain)
parallelsDomainGetOSType(virDomainPtr domain)
{
parallelsConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -1404,7 +1404,7 @@ static int parallelsPause(virDomainObjPtr privdom)
}
static int
parallelsPauseDomain(virDomainPtr domain)
parallelsDomainSuspend(virDomainPtr domain)
{
return parallelsDomainChangeState(domain,
VIR_DOMAIN_RUNNING, "running",
@ -1418,7 +1418,7 @@ static int parallelsResume(virDomainObjPtr privdom)
}
static int
parallelsResumeDomain(virDomainPtr domain)
parallelsDomainResume(virDomainPtr domain)
{
return parallelsDomainChangeState(domain,
VIR_DOMAIN_PAUSED, "paused",
@ -1446,7 +1446,7 @@ static int parallelsKill(virDomainObjPtr privdom)
}
static int
parallelsDestroyDomain(virDomainPtr domain)
parallelsDomainDestroy(virDomainPtr domain)
{
return parallelsDomainChangeState(domain,
VIR_DOMAIN_RUNNING, "running",
@ -1460,7 +1460,7 @@ static int parallelsStop(virDomainObjPtr privdom)
}
static int
parallelsShutdownDomain(virDomainPtr domain)
parallelsDomainShutdown(virDomainPtr domain)
{
return parallelsDomainChangeState(domain,
VIR_DOMAIN_RUNNING, "running",
@ -1650,7 +1650,7 @@ static int parallelsAddHddByVolume(parallelsDomObjPtr pdom,
if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
if (parallelsStorageVolumeDefRemove(pool, voldef))
if (parallelsStorageVolDefRemove(pool, voldef))
goto cleanup;
ret = 0;
@ -1669,7 +1669,7 @@ static int parallelsAddHdd(virConnectPtr conn,
virStorageVolPtr vol = NULL;
int ret = -1;
if (!(vol = parallelsStorageVolumeLookupByPathLocked(conn, disk->src))) {
if (!(vol = parallelsStorageVolLookupByPathLocked(conn, disk->src))) {
virReportError(VIR_ERR_INVALID_ARG,
_("Can't find volume with path '%s'"), disk->src);
return -1;
@ -2229,7 +2229,7 @@ parallelsCreateVm(virConnectPtr conn, virDomainDefPtr def)
if (def->disks[i]->device != VIR_DOMAIN_DISK_DEVICE_DISK)
continue;
vol = parallelsStorageVolumeLookupByPathLocked(conn, def->disks[i]->src);
vol = parallelsStorageVolLookupByPathLocked(conn, def->disks[i]->src);
if (!vol) {
virReportError(VIR_ERR_INVALID_ARG,
_("Can't find volume with path '%s'"),
@ -2390,30 +2390,30 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
static virDriver parallelsDriver = {
.no = VIR_DRV_PARALLELS,
.name = "Parallels",
.connectOpen = parallelsOpen, /* 0.10.0 */
.connectClose = parallelsClose, /* 0.10.0 */
.connectGetVersion = parallelsGetVersion, /* 0.10.0 */
.connectOpen = parallelsConnectOpen, /* 0.10.0 */
.connectClose = parallelsConnectClose, /* 0.10.0 */
.connectGetVersion = parallelsConnectGetVersion, /* 0.10.0 */
.connectGetHostname = virGetHostname, /* 0.10.0 */
.nodeGetInfo = nodeGetInfo, /* 0.10.0 */
.connectGetCapabilities = parallelsGetCapabilities, /* 0.10.0 */
.connectListDomains = parallelsListDomains, /* 0.10.0 */
.connectNumOfDomains = parallelsNumOfDomains, /* 0.10.0 */
.connectListDefinedDomains = parallelsListDefinedDomains, /* 0.10.0 */
.connectNumOfDefinedDomains = parallelsNumOfDefinedDomains, /* 0.10.0 */
.connectListAllDomains = parallelsListAllDomains, /* 0.10.0 */
.domainLookupByID = parallelsLookupDomainByID, /* 0.10.0 */
.domainLookupByUUID = parallelsLookupDomainByUUID, /* 0.10.0 */
.domainLookupByName = parallelsLookupDomainByName, /* 0.10.0 */
.domainGetOSType = parallelsGetOSType, /* 0.10.0 */
.domainGetInfo = parallelsGetDomainInfo, /* 0.10.0 */
.connectGetCapabilities = parallelsConnectGetCapabilities, /* 0.10.0 */
.connectListDomains = parallelsConnectListDomains, /* 0.10.0 */
.connectNumOfDomains = parallelsConnectNumOfDomains, /* 0.10.0 */
.connectListDefinedDomains = parallelsConnectListDefinedDomains, /* 0.10.0 */
.connectNumOfDefinedDomains = parallelsConnectNumOfDefinedDomains, /* 0.10.0 */
.connectListAllDomains = parallelsConnectListAllDomains, /* 0.10.0 */
.domainLookupByID = parallelsDomainLookupByID, /* 0.10.0 */
.domainLookupByUUID = parallelsDomainLookupByUUID, /* 0.10.0 */
.domainLookupByName = parallelsDomainLookupByName, /* 0.10.0 */
.domainGetOSType = parallelsDomainGetOSType, /* 0.10.0 */
.domainGetInfo = parallelsDomainGetInfo, /* 0.10.0 */
.domainGetState = parallelsDomainGetState, /* 0.10.0 */
.domainGetXMLDesc = parallelsDomainGetXMLDesc, /* 0.10.0 */
.domainIsPersistent = parallelsDomainIsPersistent, /* 0.10.0 */
.domainGetAutostart = parallelsDomainGetAutostart, /* 0.10.0 */
.domainSuspend = parallelsPauseDomain, /* 0.10.0 */
.domainResume = parallelsResumeDomain, /* 0.10.0 */
.domainDestroy = parallelsDestroyDomain, /* 0.10.0 */
.domainShutdown = parallelsShutdownDomain, /* 0.10.0 */
.domainSuspend = parallelsDomainSuspend, /* 0.10.0 */
.domainResume = parallelsDomainResume, /* 0.10.0 */
.domainDestroy = parallelsDomainDestroy, /* 0.10.0 */
.domainShutdown = parallelsDomainShutdown, /* 0.10.0 */
.domainCreate = parallelsDomainCreate, /* 0.10.0 */
.domainDefineXML = parallelsDomainDefineXML, /* 0.10.0 */
};

View File

@ -334,7 +334,7 @@ cleanup:
}
static virDrvOpenStatus
parallelsOpenNetwork(virConnectPtr conn,
parallelsNetworkOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -351,7 +351,7 @@ parallelsOpenNetwork(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int parallelsCloseNetwork(virConnectPtr conn)
static int parallelsNetworkClose(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
parallelsDriverLock(privconn);
@ -360,7 +360,7 @@ static int parallelsCloseNetwork(virConnectPtr conn)
return 0;
}
static int parallelsNumNetworks(virConnectPtr conn)
static int parallelsConnectNumOfNetworks(virConnectPtr conn)
{
int nactive = 0, i;
parallelsConnPtr privconn = conn->privateData;
@ -377,7 +377,7 @@ static int parallelsNumNetworks(virConnectPtr conn)
return nactive;
}
static int parallelsListNetworks(virConnectPtr conn,
static int parallelsConnectListNetworks(virConnectPtr conn,
char **const names,
int nnames)
{
@ -408,7 +408,7 @@ static int parallelsListNetworks(virConnectPtr conn,
return -1;
}
static int parallelsNumDefinedNetworks(virConnectPtr conn)
static int parallelsConnectNumOfDefinedNetworks(virConnectPtr conn)
{
int ninactive = 0, i;
parallelsConnPtr privconn = conn->privateData;
@ -425,7 +425,7 @@ static int parallelsNumDefinedNetworks(virConnectPtr conn)
return ninactive;
}
static int parallelsListDefinedNetworks(virConnectPtr conn,
static int parallelsConnectListDefinedNetworks(virConnectPtr conn,
char **const names,
int nnames)
{
@ -455,7 +455,7 @@ static int parallelsListDefinedNetworks(virConnectPtr conn,
return -1;
}
static int parallelsListAllNetworks(virConnectPtr conn,
static int parallelsConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
{
@ -614,13 +614,13 @@ cleanup:
}
static virNetworkDriver parallelsNetworkDriver = {
"Parallels",
.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 */
.connectListDefinedNetworks = parallelsListDefinedNetworks, /* 1.0.1 */
.connectListAllNetworks = parallelsListAllNetworks, /* 1.0.1 */
.networkOpen = parallelsNetworkOpen, /* 1.0.1 */
.networkClose = parallelsNetworkClose, /* 1.0.1 */
.connectNumOfNetworks = parallelsConnectNumOfNetworks, /* 1.0.1 */
.connectListNetworks = parallelsConnectListNetworks, /* 1.0.1 */
.connectNumOfDefinedNetworks = parallelsConnectNumOfDefinedNetworks, /* 1.0.1 */
.connectListDefinedNetworks = parallelsConnectListDefinedNetworks, /* 1.0.1 */
.connectListAllNetworks = parallelsConnectListAllNetworks, /* 1.0.1 */
.networkLookupByUUID = parallelsNetworkLookupByUUID, /* 1.0.1 */
.networkLookupByName = parallelsNetworkLookupByName, /* 1.0.1 */
.networkGetXMLDesc = parallelsNetworkGetXMLDesc, /* 1.0.1 */

View File

@ -45,10 +45,10 @@
_("pool '%s' not found"), pool_name);
static virStorageVolDefPtr
parallelsStorageVolumeDefine(virStoragePoolObjPtr pool, const char *xmldesc,
parallelsStorageVolDefineXML(virStoragePoolObjPtr pool, const char *xmldesc,
const char *xmlfile, bool is_new);
static virStorageVolPtr
parallelsStorageVolumeLookupByPath(virConnectPtr conn, const char *path);
parallelsStorageVolLookupByPath(virConnectPtr conn, const char *path);
static int
parallelsStoragePoolGetAlloc(virStoragePoolDefPtr def);
@ -108,7 +108,7 @@ parallelsFindVolumes(virStoragePoolObjPtr pool)
virReportOOMError();
goto cleanup;
}
if (!parallelsStorageVolumeDefine(pool, NULL, path, false))
if (!parallelsStorageVolDefineXML(pool, NULL, path, false))
goto cleanup;
VIR_FREE(path);
@ -513,7 +513,7 @@ error:
}
static int
parallelsStorageNumPools(virConnectPtr conn)
parallelsConnectNumOfStoragePools(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
int numActive = 0;
@ -529,7 +529,7 @@ parallelsStorageNumPools(virConnectPtr conn)
}
static int
parallelsStorageListPools(virConnectPtr conn, char **const names, int nnames)
parallelsConnectListStoragePools(virConnectPtr conn, char **const names, int nnames)
{
parallelsConnPtr privconn = conn->privateData;
int n = 0;
@ -559,7 +559,7 @@ no_memory:
}
static int
parallelsStorageNumDefinedPools(virConnectPtr conn)
parallelsConnectNumOfDefinedStoragePools(virConnectPtr conn)
{
parallelsConnPtr privconn = conn->privateData;
int numInactive = 0;
@ -578,7 +578,7 @@ parallelsStorageNumDefinedPools(virConnectPtr conn)
}
static int
parallelsStorageListDefinedPools(virConnectPtr conn,
parallelsConnectListDefinedStoragePools(virConnectPtr conn,
char **const names, int nnames)
{
parallelsConnPtr privconn = conn->privateData;
@ -719,7 +719,7 @@ parallelsStoragePoolGetAlloc(virStoragePoolDefPtr def)
}
static virStoragePoolPtr
parallelsStoragePoolDefine(virConnectPtr conn,
parallelsStoragePoolDefineXML(virConnectPtr conn,
const char *xml, unsigned int flags)
{
parallelsConnPtr privconn = conn->privateData;
@ -812,7 +812,7 @@ cleanup:
}
static int
parallelsStoragePoolStart(virStoragePoolPtr pool, unsigned int flags)
parallelsStoragePoolCreate(virStoragePoolPtr pool, unsigned int flags)
{
parallelsConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1028,7 +1028,7 @@ cleanup:
}
static int
parallelsStoragePoolNumVolumes(virStoragePoolPtr pool)
parallelsStoragePoolNumOfVolumes(virStoragePoolPtr pool)
{
parallelsConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1104,7 +1104,7 @@ error:
}
static virStorageVolPtr
parallelsStorageVolumeLookupByName(virStoragePoolPtr pool,
parallelsStorageVolLookupByName(virStoragePoolPtr pool,
const char *name)
{
parallelsConnPtr privconn = pool->conn->privateData;
@ -1148,7 +1148,7 @@ cleanup:
static virStorageVolPtr
parallelsStorageVolumeLookupByKey(virConnectPtr conn, const char *key)
parallelsStorageVolLookupByKey(virConnectPtr conn, const char *key)
{
parallelsConnPtr privconn = conn->privateData;
size_t i;
@ -1182,7 +1182,7 @@ parallelsStorageVolumeLookupByKey(virConnectPtr conn, const char *key)
}
virStorageVolPtr
parallelsStorageVolumeLookupByPathLocked(virConnectPtr conn, const char *path)
parallelsStorageVolLookupByPathLocked(virConnectPtr conn, const char *path)
{
parallelsConnPtr privconn = conn->privateData;
size_t i;
@ -1214,20 +1214,20 @@ parallelsStorageVolumeLookupByPathLocked(virConnectPtr conn, const char *path)
}
static virStorageVolPtr
parallelsStorageVolumeLookupByPath(virConnectPtr conn, const char *path)
parallelsStorageVolLookupByPath(virConnectPtr conn, const char *path)
{
parallelsConnPtr privconn = conn->privateData;
virStorageVolPtr ret = NULL;
parallelsDriverLock(privconn);
ret = parallelsStorageVolumeLookupByPathLocked(conn, path);
ret = parallelsStorageVolLookupByPathLocked(conn, path);
parallelsDriverUnlock(privconn);
return ret;
}
static virStorageVolDefPtr
parallelsStorageVolumeDefine(virStoragePoolObjPtr pool,
parallelsStorageVolDefineXML(virStoragePoolObjPtr pool,
const char *xmldesc,
const char *xmlfile, bool is_new)
{
@ -1305,7 +1305,7 @@ cleanup:
}
static virStorageVolPtr
parallelsStorageVolumeCreateXML(virStoragePoolPtr pool,
parallelsStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc, unsigned int flags)
{
parallelsConnPtr privconn = pool->conn->privateData;
@ -1330,7 +1330,7 @@ parallelsStorageVolumeCreateXML(virStoragePoolPtr pool,
goto cleanup;
}
privvol = parallelsStorageVolumeDefine(privpool, xmldesc, NULL, true);
privvol = parallelsStorageVolDefineXML(privpool, xmldesc, NULL, true);
if (!privvol)
goto cleanup;
@ -1344,7 +1344,7 @@ cleanup:
}
static virStorageVolPtr
parallelsStorageVolumeCreateXMLFrom(virStoragePoolPtr pool,
parallelsStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
@ -1436,7 +1436,7 @@ cleanup:
return ret;
}
int parallelsStorageVolumeDefRemove(virStoragePoolObjPtr privpool,
int parallelsStorageVolDefRemove(virStoragePoolObjPtr privpool,
virStorageVolDefPtr privvol)
{
int ret = -1;
@ -1484,7 +1484,7 @@ cleanup:
}
static int
parallelsStorageVolumeDelete(virStorageVolPtr vol, unsigned int flags)
parallelsStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
{
parallelsConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1518,7 +1518,7 @@ parallelsStorageVolumeDelete(virStorageVolPtr vol, unsigned int flags)
}
if (parallelsStorageVolumeDefRemove(privpool, privvol))
if (parallelsStorageVolDefRemove(privpool, privvol))
goto cleanup;
ret = 0;
@ -1531,7 +1531,7 @@ cleanup:
static int
parallelsStorageVolumeTypeForPool(int pooltype)
parallelsStorageVolTypeForPool(int pooltype)
{
switch (pooltype) {
@ -1545,7 +1545,7 @@ default:
}
static int
parallelsStorageVolumeGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info)
parallelsStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info)
{
parallelsConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1576,7 +1576,7 @@ parallelsStorageVolumeGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info)
}
memset(info, 0, sizeof(*info));
info->type = parallelsStorageVolumeTypeForPool(privpool->def->type);
info->type = parallelsStorageVolTypeForPool(privpool->def->type);
info->capacity = privvol->capacity;
info->allocation = privvol->allocation;
ret = 0;
@ -1588,7 +1588,7 @@ cleanup:
}
static char *
parallelsStorageVolumeGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
parallelsStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
{
parallelsConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1629,7 +1629,7 @@ cleanup:
}
static char *
parallelsStorageVolumeGetPath(virStorageVolPtr vol)
parallelsStorageVolGetPath(virStorageVolPtr vol)
{
parallelsConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -1674,34 +1674,34 @@ static virStorageDriver parallelsStorageDriver = {
.storageOpen = parallelsStorageOpen, /* 0.10.0 */
.storageClose = parallelsStorageClose, /* 0.10.0 */
.connectNumOfStoragePools = parallelsStorageNumPools, /* 0.10.0 */
.connectListStoragePools = parallelsStorageListPools, /* 0.10.0 */
.connectNumOfDefinedStoragePools = parallelsStorageNumDefinedPools, /* 0.10.0 */
.connectListDefinedStoragePools = parallelsStorageListDefinedPools, /* 0.10.0 */
.connectNumOfStoragePools = parallelsConnectNumOfStoragePools, /* 0.10.0 */
.connectListStoragePools = parallelsConnectListStoragePools, /* 0.10.0 */
.connectNumOfDefinedStoragePools = parallelsConnectNumOfDefinedStoragePools, /* 0.10.0 */
.connectListDefinedStoragePools = parallelsConnectListDefinedStoragePools, /* 0.10.0 */
.storagePoolLookupByName = parallelsStoragePoolLookupByName, /* 0.10.0 */
.storagePoolLookupByUUID = parallelsStoragePoolLookupByUUID, /* 0.10.0 */
.storagePoolLookupByVolume = parallelsStoragePoolLookupByVolume, /* 0.10.0 */
.storagePoolDefineXML = parallelsStoragePoolDefine, /* 0.10.0 */
.storagePoolDefineXML = parallelsStoragePoolDefineXML, /* 0.10.0 */
.storagePoolUndefine = parallelsStoragePoolUndefine, /* 0.10.0 */
.storagePoolCreate = parallelsStoragePoolStart, /* 0.10.0 */
.storagePoolCreate = parallelsStoragePoolCreate, /* 0.10.0 */
.storagePoolDestroy = parallelsStoragePoolDestroy, /* 0.10.0 */
.storagePoolRefresh = parallelsStoragePoolRefresh, /* 0.10.0 */
.storagePoolGetInfo = parallelsStoragePoolGetInfo, /* 0.10.0 */
.storagePoolGetXMLDesc = parallelsStoragePoolGetXMLDesc, /* 0.10.0 */
.storagePoolGetAutostart = parallelsStoragePoolGetAutostart, /* 0.10.0 */
.storagePoolSetAutostart = parallelsStoragePoolSetAutostart, /* 0.10.0 */
.storagePoolNumOfVolumes = parallelsStoragePoolNumVolumes, /* 0.10.0 */
.storagePoolNumOfVolumes = parallelsStoragePoolNumOfVolumes, /* 0.10.0 */
.storagePoolListVolumes = parallelsStoragePoolListVolumes, /* 0.10.0 */
.storageVolLookupByName = parallelsStorageVolumeLookupByName, /* 0.10.0 */
.storageVolLookupByKey = parallelsStorageVolumeLookupByKey, /* 0.10.0 */
.storageVolLookupByPath = parallelsStorageVolumeLookupByPath, /* 0.10.0 */
.storageVolCreateXML = parallelsStorageVolumeCreateXML, /* 0.10.0 */
.storageVolCreateXMLFrom = parallelsStorageVolumeCreateXMLFrom, /* 0.10.0 */
.storageVolDelete = parallelsStorageVolumeDelete, /* 0.10.0 */
.storageVolGetInfo = parallelsStorageVolumeGetInfo, /* 0.10.0 */
.storageVolGetXMLDesc = parallelsStorageVolumeGetXMLDesc, /* 0.10.0 */
.storageVolGetPath = parallelsStorageVolumeGetPath, /* 0.10.0 */
.storageVolLookupByName = parallelsStorageVolLookupByName, /* 0.10.0 */
.storageVolLookupByKey = parallelsStorageVolLookupByKey, /* 0.10.0 */
.storageVolLookupByPath = parallelsStorageVolLookupByPath, /* 0.10.0 */
.storageVolCreateXML = parallelsStorageVolCreateXML, /* 0.10.0 */
.storageVolCreateXMLFrom = parallelsStorageVolCreateXMLFrom, /* 0.10.0 */
.storageVolDelete = parallelsStorageVolDelete, /* 0.10.0 */
.storageVolGetInfo = parallelsStorageVolGetInfo, /* 0.10.0 */
.storageVolGetXMLDesc = parallelsStorageVolGetXMLDesc, /* 0.10.0 */
.storageVolGetPath = parallelsStorageVolGetPath, /* 0.10.0 */
.storagePoolIsActive = parallelsStoragePoolIsActive, /* 0.10.0 */
.storagePoolIsPersistent = parallelsStoragePoolIsPersistent, /* 0.10.0 */
};

View File

@ -70,9 +70,9 @@ int parallelsCmdRun(const char *binary, ...)
char * parallelsAddFileExt(const char *path, const char *ext);
void parallelsDriverLock(parallelsConnPtr driver);
void parallelsDriverUnlock(parallelsConnPtr driver);
virStorageVolPtr parallelsStorageVolumeLookupByPathLocked(virConnectPtr conn,
virStorageVolPtr parallelsStorageVolLookupByPathLocked(virConnectPtr conn,
const char *path);
int parallelsStorageVolumeDefRemove(virStoragePoolObjPtr privpool,
int parallelsStorageVolDefRemove(virStoragePoolObjPtr privpool,
virStorageVolDefPtr privvol);
#endif

View File

@ -344,7 +344,7 @@ no_memory:
* * - All
* */
static int
phypNumDomainsGeneric(virConnectPtr conn, unsigned int type)
phypConnectNumOfDomainsGeneric(virConnectPtr conn, unsigned int type)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -383,7 +383,7 @@ phypNumDomainsGeneric(virConnectPtr conn, unsigned int type)
* 1 - all
* */
static int
phypListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
phypConnectListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
unsigned int type)
{
ConnectionData *connection_data = conn->networkPrivateData;
@ -781,7 +781,7 @@ phypUUIDTable_Init(virConnectPtr conn)
int ret = -1;
bool table_created = false;
if ((nids_numdomains = phypNumDomainsGeneric(conn, 2)) < 0)
if ((nids_numdomains = phypConnectNumOfDomainsGeneric(conn, 2)) < 0)
goto cleanup;
if (VIR_ALLOC_N(ids, nids_numdomains) < 0) {
@ -790,7 +790,7 @@ phypUUIDTable_Init(virConnectPtr conn)
}
if ((nids_listdomains =
phypListDomainsGeneric(conn, ids, nids_numdomains, 1)) < 0)
phypConnectListDomainsGeneric(conn, ids, nids_numdomains, 1)) < 0)
goto cleanup;
/* exit early if there are no domains */
@ -1099,7 +1099,7 @@ exit:
}
static virDrvOpenStatus
phypOpen(virConnectPtr conn,
phypConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth, unsigned int flags)
{
LIBSSH2_SESSION *session = NULL;
@ -1230,7 +1230,7 @@ failure:
}
static int
phypClose(virConnectPtr conn)
phypConnectClose(virConnectPtr conn)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -1252,7 +1252,7 @@ phypClose(virConnectPtr conn)
static int
phypIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
phypConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always encrypted */
return 1;
@ -1260,7 +1260,7 @@ phypIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
phypIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
phypConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always secure */
return 1;
@ -1268,7 +1268,7 @@ phypIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
phypIsAlive(virConnectPtr conn)
phypConnectIsAlive(virConnectPtr conn)
{
ConnectionData *connection_data = conn->networkPrivateData;
@ -1284,7 +1284,7 @@ phypIsAlive(virConnectPtr conn)
static int
phypIsUpdated(virDomainPtr conn ATTRIBUTE_UNUSED)
phypDomainIsUpdated(virDomainPtr conn ATTRIBUTE_UNUSED)
{
return 0;
}
@ -1425,7 +1425,7 @@ phypDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
}
static int
phypGetLparCPUMAX(virDomainPtr dom)
phypDomainGetMaxVcpus(virDomainPtr dom)
{
return phypDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_LIVE |
VIR_DOMAIN_VCPU_MAXIMUM));
@ -1700,7 +1700,7 @@ phypGetVIOSFreeSCSIAdapter(virConnectPtr conn)
static int
phypAttachDevice(virDomainPtr domain, const char *xml)
phypDomainAttachDevice(virDomainPtr domain, const char *xml)
{
int result = -1;
virConnectPtr conn = domain->conn;
@ -1862,7 +1862,7 @@ cleanup:
}
static char *
phypVolumeGetKey(virConnectPtr conn, const char *name)
phypStorageVolGetKey(virConnectPtr conn, const char *name)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -1977,7 +1977,7 @@ phypBuildVolume(virConnectPtr conn, const char *lvname, const char *spname,
goto cleanup;
}
key = phypVolumeGetKey(conn, lvname);
key = phypStorageVolGetKey(conn, lvname);
cleanup:
VIR_FREE(ret);
@ -1986,12 +1986,12 @@ cleanup:
}
static virStorageVolPtr
phypVolumeLookupByName(virStoragePoolPtr pool, const char *volname)
phypStorageVolLookupByName(virStoragePoolPtr pool, const char *volname)
{
char *key;
virStorageVolPtr vol;
key = phypVolumeGetKey(pool->conn, volname);
key = phypStorageVolGetKey(pool->conn, volname);
if (key == NULL)
return NULL;
@ -2059,7 +2059,7 @@ phypStorageVolCreateXML(virStoragePoolPtr pool,
}
/* checking if this name already exists on this system */
if ((dup_vol = phypVolumeLookupByName(pool, voldef->name)) != NULL) {
if ((dup_vol = phypStorageVolLookupByName(pool, voldef->name)) != NULL) {
VIR_ERROR(_("StoragePool name already exists."));
virObjectUnref(dup_vol);
goto err;
@ -2102,7 +2102,7 @@ err:
}
static char *
phypVolumeGetPhysicalVolumeByStoragePool(virStorageVolPtr vol, char *sp)
phypStorageVolGetPhysicalVolumeByStoragePool(virStorageVolPtr vol, char *sp)
{
virConnectPtr conn = vol->conn;
ConnectionData *connection_data = conn->networkPrivateData;
@ -2133,7 +2133,7 @@ phypVolumeGetPhysicalVolumeByStoragePool(virStorageVolPtr vol, char *sp)
}
static virStorageVolPtr
phypVolumeLookupByPath(virConnectPtr conn, const char *volname)
phypStorageVolLookupByPath(virConnectPtr conn, const char *volname)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -2162,7 +2162,7 @@ phypVolumeLookupByPath(virConnectPtr conn, const char *volname)
if (exit_status < 0 || ret == NULL)
goto cleanup;
key = phypVolumeGetKey(conn, volname);
key = phypStorageVolGetKey(conn, volname);
if (key == NULL)
goto cleanup;
@ -2229,7 +2229,7 @@ phypStoragePoolLookupByName(virConnectPtr conn, const char *name)
}
static char *
phypVolumeGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
phypStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
{
virStorageVolDef voldef;
virStoragePoolDef pool;
@ -2309,7 +2309,7 @@ cleanup:
*
* */
static char *
phypVolumeGetPath(virStorageVolPtr vol)
phypStorageVolGetPath(virStorageVolPtr vol)
{
virConnectPtr conn = vol->conn;
ConnectionData *connection_data = conn->networkPrivateData;
@ -2340,7 +2340,7 @@ phypVolumeGetPath(virStorageVolPtr vol)
if (exit_status < 0 || ret == NULL)
goto cleanup;
pv = phypVolumeGetPhysicalVolumeByStoragePool(vol, ret);
pv = phypStorageVolGetPhysicalVolumeByStoragePool(vol, ret);
if (!pv)
goto cleanup;
@ -2452,7 +2452,7 @@ phypStoragePoolNumOfVolumes(virStoragePoolPtr pool)
}
static int
phypDestroyStoragePool(virStoragePoolPtr pool)
phypStoragePoolDestroy(virStoragePoolPtr pool)
{
int result = -1;
virConnectPtr conn = pool->conn;
@ -2537,7 +2537,7 @@ cleanup:
}
static int
phypNumOfStoragePools(virConnectPtr conn)
phypConnectNumOfStoragePools(virConnectPtr conn)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -2563,7 +2563,7 @@ phypNumOfStoragePools(virConnectPtr conn)
}
static int
phypListStoragePools(virConnectPtr conn, char **const pools, int npools)
phypConnectListStoragePools(virConnectPtr conn, char **const pools, int npools)
{
bool success = false;
ConnectionData *connection_data = conn->networkPrivateData;
@ -2626,7 +2626,7 @@ cleanup:
}
static virStoragePoolPtr
phypGetStoragePoolLookUpByUUID(virConnectPtr conn,
phypStoragePoolLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
virStoragePoolPtr sp = NULL;
@ -2641,7 +2641,7 @@ phypGetStoragePoolLookUpByUUID(virConnectPtr conn,
goto err;
}
if ((npools = phypNumOfStoragePools(conn)) == -1) {
if ((npools = phypConnectNumOfStoragePools(conn)) == -1) {
virReportOOMError();
goto err;
}
@ -2651,7 +2651,7 @@ phypGetStoragePoolLookUpByUUID(virConnectPtr conn,
goto err;
}
if ((gotpools = phypListStoragePools(conn, pools, npools)) == -1) {
if ((gotpools = phypConnectListStoragePools(conn, pools, npools)) == -1) {
virReportOOMError();
goto err;
}
@ -2704,7 +2704,7 @@ phypStoragePoolCreateXML(virConnectPtr conn,
}
/* checking if ID or UUID already exists on this system */
if ((dup_sp = phypGetStoragePoolLookUpByUUID(conn, def->uuid)) != NULL) {
if ((dup_sp = phypStoragePoolLookupByUUID(conn, def->uuid)) != NULL) {
VIR_WARN("StoragePool uuid already exists.");
virObjectUnref(dup_sp);
goto err;
@ -2725,7 +2725,7 @@ err:
}
static char *
phypGetStoragePoolXMLDesc(virStoragePoolPtr pool, unsigned int flags)
phypStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
{
virCheckFlags(0, NULL);
@ -3031,7 +3031,7 @@ phypInterfaceIsActive(virInterfacePtr iface)
}
static int
phypListInterfaces(virConnectPtr conn, char **const names, int nnames)
phypConnectListInterfaces(virConnectPtr conn, char **const names, int nnames)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -3089,7 +3089,7 @@ cleanup:
}
static int
phypNumOfInterfaces(virConnectPtr conn)
phypConnectNumOfInterfaces(virConnectPtr conn)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -3183,25 +3183,25 @@ cleanup:
}
static int
phypNumDefinedDomains(virConnectPtr conn)
phypConnectNumOfDefinedDomains(virConnectPtr conn)
{
return phypNumDomainsGeneric(conn, 1);
return phypConnectNumOfDomainsGeneric(conn, 1);
}
static int
phypNumDomains(virConnectPtr conn)
phypConnectNumOfDomains(virConnectPtr conn)
{
return phypNumDomainsGeneric(conn, 0);
return phypConnectNumOfDomainsGeneric(conn, 0);
}
static int
phypListDomains(virConnectPtr conn, int *ids, int nids)
phypConnectListDomains(virConnectPtr conn, int *ids, int nids)
{
return phypListDomainsGeneric(conn, ids, nids, 0);
return phypConnectListDomainsGeneric(conn, ids, nids, 0);
}
static int
phypListDefinedDomains(virConnectPtr conn, char **const names, int nnames)
phypConnectListDefinedDomains(virConnectPtr conn, char **const names, int nnames)
{
bool success = false;
ConnectionData *connection_data = conn->networkPrivateData;
@ -3612,7 +3612,7 @@ cleanup:
}
static virDomainPtr
phypDomainCreateAndStart(virConnectPtr conn,
phypDomainCreateXML(virConnectPtr conn,
const char *xml, unsigned int flags)
{
virCheckFlags(0, NULL);
@ -3702,7 +3702,7 @@ phypDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
if ((ncpus = phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0)
return 0;
if (nvcpus > phypGetLparCPUMAX(dom)) {
if (nvcpus > phypDomainGetMaxVcpus(dom)) {
VIR_ERROR(_("You are trying to set a number of CPUs bigger than "
"the max possible."));
return 0;
@ -3737,13 +3737,13 @@ phypDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
}
static int
phypDomainSetCPU(virDomainPtr dom, unsigned int nvcpus)
phypDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
{
return phypDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_VCPU_LIVE);
}
static virDrvOpenStatus
phypVIOSDriverOpen(virConnectPtr conn,
phypStorageOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -3756,7 +3756,26 @@ phypVIOSDriverOpen(virConnectPtr conn,
}
static int
phypVIOSDriverClose(virConnectPtr conn ATTRIBUTE_UNUSED)
phypStorageClose(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 0;
}
static virDrvOpenStatus
phypInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
if (conn->driver->no != VIR_DRV_PHYP)
return VIR_DRV_OPEN_DECLINED;
return VIR_DRV_OPEN_SUCCESS;
}
static int
phypInterfaceClose(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 0;
}
@ -3764,12 +3783,12 @@ phypVIOSDriverClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static virDriver phypDriver = {
.no = VIR_DRV_PHYP,
.name = "PHYP",
.connectOpen = phypOpen, /* 0.7.0 */
.connectClose = phypClose, /* 0.7.0 */
.connectOpen = phypConnectOpen, /* 0.7.0 */
.connectClose = phypConnectClose, /* 0.7.0 */
.connectGetCapabilities = phypConnectGetCapabilities, /* 0.7.3 */
.connectListDomains = phypListDomains, /* 0.7.0 */
.connectNumOfDomains = phypNumDomains, /* 0.7.0 */
.domainCreateXML = phypDomainCreateAndStart, /* 0.7.3 */
.connectListDomains = phypConnectListDomains, /* 0.7.0 */
.connectNumOfDomains = phypConnectNumOfDomains, /* 0.7.0 */
.domainCreateXML = phypDomainCreateXML, /* 0.7.3 */
.domainLookupByID = phypDomainLookupByID, /* 0.7.0 */
.domainLookupByName = phypDomainLookupByName, /* 0.7.0 */
.domainResume = phypDomainResume, /* 0.7.0 */
@ -3779,48 +3798,48 @@ static virDriver phypDriver = {
.domainDestroyFlags = phypDomainDestroyFlags, /* 0.9.4 */
.domainGetInfo = phypDomainGetInfo, /* 0.7.0 */
.domainGetState = phypDomainGetState, /* 0.9.2 */
.domainSetVcpus = phypDomainSetCPU, /* 0.7.3 */
.domainSetVcpus = phypDomainSetVcpus, /* 0.7.3 */
.domainSetVcpusFlags = phypDomainSetVcpusFlags, /* 0.8.5 */
.domainGetVcpusFlags = phypDomainGetVcpusFlags, /* 0.8.5 */
.domainGetMaxVcpus = phypGetLparCPUMAX, /* 0.7.3 */
.domainGetMaxVcpus = phypDomainGetMaxVcpus, /* 0.7.3 */
.domainGetXMLDesc = phypDomainGetXMLDesc, /* 0.7.0 */
.connectListDefinedDomains = phypListDefinedDomains, /* 0.7.0 */
.connectNumOfDefinedDomains = phypNumDefinedDomains, /* 0.7.0 */
.domainAttachDevice = phypAttachDevice, /* 0.8.2 */
.connectIsEncrypted = phypIsEncrypted, /* 0.7.3 */
.connectIsSecure = phypIsSecure, /* 0.7.3 */
.domainIsUpdated = phypIsUpdated, /* 0.8.6 */
.connectIsAlive = phypIsAlive, /* 0.9.8 */
.connectListDefinedDomains = phypConnectListDefinedDomains, /* 0.7.0 */
.connectNumOfDefinedDomains = phypConnectNumOfDefinedDomains, /* 0.7.0 */
.domainAttachDevice = phypDomainAttachDevice, /* 0.8.2 */
.connectIsEncrypted = phypConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = phypConnectIsSecure, /* 0.7.3 */
.domainIsUpdated = phypDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = phypConnectIsAlive, /* 0.9.8 */
};
static virStorageDriver phypStorageDriver = {
.name = "PHYP",
.storageOpen = phypVIOSDriverOpen, /* 0.8.2 */
.storageClose = phypVIOSDriverClose, /* 0.8.2 */
.storageOpen = phypStorageOpen, /* 0.8.2 */
.storageClose = phypStorageClose, /* 0.8.2 */
.connectNumOfStoragePools = phypNumOfStoragePools, /* 0.8.2 */
.connectListStoragePools = phypListStoragePools, /* 0.8.2 */
.connectNumOfStoragePools = phypConnectNumOfStoragePools, /* 0.8.2 */
.connectListStoragePools = phypConnectListStoragePools, /* 0.8.2 */
.storagePoolLookupByName = phypStoragePoolLookupByName, /* 0.8.2 */
.storagePoolLookupByUUID = phypGetStoragePoolLookUpByUUID, /* 0.8.2 */
.storagePoolLookupByUUID = phypStoragePoolLookupByUUID, /* 0.8.2 */
.storagePoolCreateXML = phypStoragePoolCreateXML, /* 0.8.2 */
.storagePoolDestroy = phypDestroyStoragePool, /* 0.8.2 */
.storagePoolGetXMLDesc = phypGetStoragePoolXMLDesc, /* 0.8.2 */
.storagePoolDestroy = phypStoragePoolDestroy, /* 0.8.2 */
.storagePoolGetXMLDesc = phypStoragePoolGetXMLDesc, /* 0.8.2 */
.storagePoolNumOfVolumes = phypStoragePoolNumOfVolumes, /* 0.8.2 */
.storagePoolListVolumes = phypStoragePoolListVolumes, /* 0.8.2 */
.storageVolLookupByName = phypVolumeLookupByName, /* 0.8.2 */
.storageVolLookupByPath = phypVolumeLookupByPath, /* 0.8.2 */
.storageVolLookupByName = phypStorageVolLookupByName, /* 0.8.2 */
.storageVolLookupByPath = phypStorageVolLookupByPath, /* 0.8.2 */
.storageVolCreateXML = phypStorageVolCreateXML, /* 0.8.2 */
.storageVolGetXMLDesc = phypVolumeGetXMLDesc, /* 0.8.2 */
.storageVolGetPath = phypVolumeGetPath, /* 0.8.2 */
.storageVolGetXMLDesc = phypStorageVolGetXMLDesc, /* 0.8.2 */
.storageVolGetPath = phypStorageVolGetPath, /* 0.8.2 */
};
static virInterfaceDriver phypInterfaceDriver = {
.name = "PHYP",
.interfaceOpen = phypVIOSDriverOpen, /* 0.9.1 */
.interfaceClose = phypVIOSDriverClose, /* 0.9.1 */
.connectNumOfInterfaces = phypNumOfInterfaces, /* 0.9.1 */
.connectListInterfaces = phypListInterfaces, /* 0.9.1 */
.interfaceOpen = phypInterfaceOpen, /* 0.9.1 */
.interfaceClose = phypInterfaceClose, /* 0.9.1 */
.connectNumOfInterfaces = phypConnectNumOfInterfaces, /* 0.9.1 */
.connectListInterfaces = phypConnectListInterfaces, /* 0.9.1 */
.interfaceLookupByName = phypInterfaceLookupByName, /* 0.9.1 */
.interfaceDefineXML = phypInterfaceDefineXML, /* 0.9.1 */
.interfaceDestroy = phypInterfaceDestroy, /* 0.9.1 */

View File

@ -135,7 +135,7 @@
static void processWatchdogEvent(void *data, void *opaque);
static int qemuShutdown(void);
static int qemuStateCleanup(void);
static int qemuDomainObjStart(virConnectPtr conn,
virQEMUDriverPtr driver,
@ -541,12 +541,12 @@ qemuDomainFindMaxID(virDomainObjPtr vm,
/**
* qemuStartup:
* qemuStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
qemuStartup(bool privileged,
qemuStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque)
{
@ -821,7 +821,7 @@ error:
VIR_FREE(driverConf);
VIR_FREE(membase);
VIR_FREE(mempath);
qemuShutdown();
qemuStateCleanup();
return -1;
}
@ -840,13 +840,13 @@ static void qemuNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
}
/**
* qemuReload:
* qemuStateReload:
*
* Function to restart the QEmu daemon, it will recheck the configuration
* files and update its state and the networking
*/
static int
qemuReload(void) {
qemuStateReload(void) {
virQEMUDriverConfigPtr cfg = NULL;
virCapsPtr caps = NULL;
@ -871,13 +871,13 @@ cleanup:
/*
* qemuStop:
* qemuStateStop:
*
* Save any VMs in preparation for shutdown
*
*/
static int
qemuStop(void) {
qemuStateStop(void) {
int ret = -1;
virConnectPtr conn;
int numDomains = 0;
@ -932,12 +932,12 @@ qemuStop(void) {
}
/**
* qemuShutdown:
* qemuStateCleanup:
*
* Shutdown the QEmu daemon, it will stop all active domains and networks
*/
static int
qemuShutdown(void) {
qemuStateCleanup(void) {
if (!qemu_driver)
return -1;
@ -978,7 +978,7 @@ qemuShutdown(void) {
}
static virDrvOpenStatus qemuOpen(virConnectPtr conn,
static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1049,7 +1049,7 @@ cleanup:
return ret;
}
static int qemuClose(virConnectPtr conn)
static int qemuConnectClose(virConnectPtr conn)
{
virQEMUDriverPtr driver = conn->privateData;
@ -1063,7 +1063,7 @@ static int qemuClose(virConnectPtr conn)
/* Which features are supported by this driver? */
static int
qemuSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
qemuConnectSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
{
switch (feature) {
case VIR_DRV_FEATURE_MIGRATION_V2:
@ -1080,24 +1080,24 @@ qemuSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
}
}
static const char *qemuGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
static const char *qemuConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
return "QEMU";
}
static int qemuIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int qemuConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int qemuIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int qemuConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int qemuIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int qemuConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
@ -1135,7 +1135,7 @@ cleanup:
static char *
qemuGetSysinfo(virConnectPtr conn, unsigned int flags)
qemuConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@ -1157,7 +1157,7 @@ qemuGetSysinfo(virConnectPtr conn, unsigned int flags)
return virBufferContentAndReset(&buf);
}
static int qemuGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
static int qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
if (!type)
return 16;
@ -1176,7 +1176,7 @@ static int qemuGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type
}
static char *qemuGetCapabilities(virConnectPtr conn) {
static char *qemuConnectGetCapabilities(virConnectPtr conn) {
virQEMUDriverPtr driver = conn->privateData;
virCapsPtr caps = NULL;
char *xml = NULL;
@ -1390,7 +1390,7 @@ cleanup:
return ret;
}
static int qemuGetVersion(virConnectPtr conn, unsigned long *version) {
static int qemuConnectGetVersion(virConnectPtr conn, unsigned long *version) {
virQEMUDriverPtr driver = conn->privateData;
int ret = -1;
unsigned int qemuVersion = 0;
@ -1412,7 +1412,7 @@ cleanup:
return ret;
}
static int qemuListDomains(virConnectPtr conn, int *ids, int nids) {
static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids) {
virQEMUDriverPtr driver = conn->privateData;
int n;
@ -1421,7 +1421,7 @@ static int qemuListDomains(virConnectPtr conn, int *ids, int nids) {
return n;
}
static int qemuNumDomains(virConnectPtr conn) {
static int qemuConnectNumOfDomains(virConnectPtr conn) {
virQEMUDriverPtr driver = conn->privateData;
int n;
@ -1453,7 +1453,8 @@ qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
}
static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char *xml,
static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags) {
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
@ -5113,7 +5114,7 @@ cleanup:
}
static char *qemuDomainXMLFromNative(virConnectPtr conn,
static char *qemuConnectDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
@ -5153,7 +5154,7 @@ cleanup:
return xml;
}
static char *qemuDomainXMLToNative(virConnectPtr conn,
static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
@ -5288,7 +5289,7 @@ cleanup:
}
static int qemuListDefinedDomains(virConnectPtr conn,
static int qemuConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
virQEMUDriverPtr driver = conn->privateData;
int n;
@ -5297,7 +5298,7 @@ static int qemuListDefinedDomains(virConnectPtr conn,
return n;
}
static int qemuNumDefinedDomains(virConnectPtr conn) {
static int qemuConnectNumOfDefinedDomains(virConnectPtr conn) {
virQEMUDriverPtr driver = conn->privateData;
int n;
@ -5386,7 +5387,7 @@ cleanup:
}
static int
qemuDomainStartWithFlags(virDomainPtr dom, unsigned int flags)
qemuDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -5425,12 +5426,12 @@ cleanup:
}
static int
qemuDomainStart(virDomainPtr dom)
qemuDomainCreate(virDomainPtr dom)
{
return qemuDomainStartWithFlags(dom, 0);
return qemuDomainCreateWithFlags(dom, 0);
}
static virDomainPtr qemuDomainDefine(virConnectPtr conn, const char *xml) {
static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml) {
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
virDomainDefPtr oldDef = NULL;
@ -6597,7 +6598,7 @@ cleanup:
}
static char *qemuGetSchedulerType(virDomainPtr dom,
static char *qemuDomainGetSchedulerType(virDomainPtr dom,
int *nparams)
{
virQEMUDriverPtr driver = dom->conn->privateData;
@ -7707,7 +7708,7 @@ cleanup:
}
static int
qemuSetSchedulerParametersFlags(virDomainPtr dom,
qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
@ -7871,11 +7872,11 @@ cleanup:
#undef SCHED_RANGE_CHECK
static int
qemuSetSchedulerParameters(virDomainPtr dom,
qemuDomainSetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int nparams)
{
return qemuSetSchedulerParametersFlags(dom,
return qemuDomainSetSchedulerParametersFlags(dom,
params,
nparams,
VIR_DOMAIN_AFFECT_CURRENT);
@ -7984,7 +7985,7 @@ cleanup:
}
static int
qemuGetSchedulerParametersFlags(virDomainPtr dom,
qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
@ -8121,11 +8122,11 @@ cleanup:
}
static int
qemuGetSchedulerParameters(virDomainPtr dom,
qemuDomainGetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams)
{
return qemuGetSchedulerParametersFlags(dom, params, nparams,
return qemuDomainGetSchedulerParametersFlags(dom, params, nparams,
VIR_DOMAIN_AFFECT_CURRENT);
}
@ -9139,7 +9140,7 @@ cleanup:
static int
qemuDomainEventRegister(virConnectPtr conn,
qemuConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
@ -9156,7 +9157,7 @@ qemuDomainEventRegister(virConnectPtr conn,
static int
qemuDomainEventDeregister(virConnectPtr conn,
qemuConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
virQEMUDriverPtr driver = conn->privateData;
@ -9171,7 +9172,7 @@ qemuDomainEventDeregister(virConnectPtr conn,
static int
qemuDomainEventRegisterAny(virConnectPtr conn,
qemuConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -9192,7 +9193,7 @@ qemuDomainEventRegisterAny(virConnectPtr conn,
static int
qemuDomainEventDeregisterAny(virConnectPtr conn,
qemuConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
virQEMUDriverPtr driver = conn->privateData;
@ -9850,7 +9851,7 @@ out:
}
static int
qemuCPUCompare(virConnectPtr conn,
qemuConnectCompareCPU(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags)
{
@ -9878,7 +9879,7 @@ cleanup:
static char *
qemuCPUBaseline(virConnectPtr conn ATTRIBUTE_UNUSED,
qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
const char **xmlCPUs,
unsigned int ncpus,
unsigned int flags)
@ -12446,7 +12447,7 @@ cleanup:
return ret;
}
static int qemuDomainMonitorCommand(virDomainPtr domain, const char *cmd,
static int qemuDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
char **result, unsigned int flags)
{
virQEMUDriverPtr driver = domain->conn->privateData;
@ -12497,7 +12498,7 @@ cleanup:
}
static virDomainPtr qemuDomainAttach(virConnectPtr conn,
static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn,
unsigned int pid_value,
unsigned int flags)
{
@ -14475,7 +14476,7 @@ cleanup:
}
static int
qemuListAllDomains(virConnectPtr conn,
qemuConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -14490,7 +14491,7 @@ qemuListAllDomains(virConnectPtr conn,
}
static char *
qemuDomainAgentCommand(virDomainPtr domain,
qemuDomainQemuAgentCommand(virDomainPtr domain,
const char *cmd,
int timeout,
unsigned int flags)
@ -14626,20 +14627,20 @@ cleanup:
static virDriver qemuDriver = {
.no = VIR_DRV_QEMU,
.name = QEMU_DRIVER_NAME,
.connectOpen = qemuOpen, /* 0.2.0 */
.connectClose = qemuClose, /* 0.2.0 */
.connectSupportsFeature = qemuSupportsFeature, /* 0.5.0 */
.connectGetType = qemuGetType, /* 0.2.0 */
.connectGetVersion = qemuGetVersion, /* 0.2.0 */
.connectOpen = qemuConnectOpen, /* 0.2.0 */
.connectClose = qemuConnectClose, /* 0.2.0 */
.connectSupportsFeature = qemuConnectSupportsFeature, /* 0.5.0 */
.connectGetType = qemuConnectGetType, /* 0.2.0 */
.connectGetVersion = qemuConnectGetVersion, /* 0.2.0 */
.connectGetHostname = virGetHostname, /* 0.3.3 */
.connectGetSysinfo = qemuGetSysinfo, /* 0.8.8 */
.connectGetMaxVcpus = qemuGetMaxVCPUs, /* 0.2.1 */
.connectGetSysinfo = qemuConnectGetSysinfo, /* 0.8.8 */
.connectGetMaxVcpus = qemuConnectGetMaxVcpus, /* 0.2.1 */
.nodeGetInfo = nodeGetInfo, /* 0.2.0 */
.connectGetCapabilities = qemuGetCapabilities, /* 0.2.1 */
.connectListDomains = qemuListDomains, /* 0.2.0 */
.connectNumOfDomains = qemuNumDomains, /* 0.2.0 */
.connectListAllDomains = qemuListAllDomains, /* 0.9.13 */
.domainCreateXML = qemuDomainCreate, /* 0.2.0 */
.connectGetCapabilities = qemuConnectGetCapabilities, /* 0.2.1 */
.connectListDomains = qemuConnectListDomains, /* 0.2.0 */
.connectNumOfDomains = qemuConnectNumOfDomains, /* 0.2.0 */
.connectListAllDomains = qemuConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = qemuDomainCreateXML, /* 0.2.0 */
.domainLookupByID = qemuDomainLookupByID, /* 0.2.0 */
.domainLookupByUUID = qemuDomainLookupByUUID, /* 0.2.0 */
.domainLookupByName = qemuDomainLookupByName, /* 0.2.0 */
@ -14685,13 +14686,13 @@ static virDriver qemuDriver = {
.domainGetSecurityLabelList = qemuDomainGetSecurityLabelList, /* 0.10.0 */
.nodeGetSecurityModel = qemuNodeGetSecurityModel, /* 0.6.1 */
.domainGetXMLDesc = qemuDomainGetXMLDesc, /* 0.2.0 */
.connectDomainXMLFromNative = qemuDomainXMLFromNative, /* 0.6.4 */
.connectDomainXMLToNative = qemuDomainXMLToNative, /* 0.6.4 */
.connectListDefinedDomains = qemuListDefinedDomains, /* 0.2.0 */
.connectNumOfDefinedDomains = qemuNumDefinedDomains, /* 0.2.0 */
.domainCreate = qemuDomainStart, /* 0.2.0 */
.domainCreateWithFlags = qemuDomainStartWithFlags, /* 0.8.2 */
.domainDefineXML = qemuDomainDefine, /* 0.2.0 */
.connectDomainXMLFromNative = qemuConnectDomainXMLFromNative, /* 0.6.4 */
.connectDomainXMLToNative = qemuConnectDomainXMLToNative, /* 0.6.4 */
.connectListDefinedDomains = qemuConnectListDefinedDomains, /* 0.2.0 */
.connectNumOfDefinedDomains = qemuConnectNumOfDefinedDomains, /* 0.2.0 */
.domainCreate = qemuDomainCreate, /* 0.2.0 */
.domainCreateWithFlags = qemuDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = qemuDomainDefineXML, /* 0.2.0 */
.domainUndefine = qemuDomainUndefine, /* 0.2.0 */
.domainUndefineFlags = qemuDomainUndefineFlags, /* 0.9.4 */
.domainAttachDevice = qemuDomainAttachDevice, /* 0.4.1 */
@ -14701,11 +14702,11 @@ static virDriver qemuDriver = {
.domainUpdateDeviceFlags = qemuDomainUpdateDeviceFlags, /* 0.8.0 */
.domainGetAutostart = qemuDomainGetAutostart, /* 0.2.1 */
.domainSetAutostart = qemuDomainSetAutostart, /* 0.2.1 */
.domainGetSchedulerType = qemuGetSchedulerType, /* 0.7.0 */
.domainGetSchedulerParameters = qemuGetSchedulerParameters, /* 0.7.0 */
.domainGetSchedulerParametersFlags = qemuGetSchedulerParametersFlags, /* 0.9.2 */
.domainSetSchedulerParameters = qemuSetSchedulerParameters, /* 0.7.0 */
.domainSetSchedulerParametersFlags = qemuSetSchedulerParametersFlags, /* 0.9.2 */
.domainGetSchedulerType = qemuDomainGetSchedulerType, /* 0.7.0 */
.domainGetSchedulerParameters = qemuDomainGetSchedulerParameters, /* 0.7.0 */
.domainGetSchedulerParametersFlags = qemuDomainGetSchedulerParametersFlags, /* 0.9.2 */
.domainSetSchedulerParameters = qemuDomainSetSchedulerParameters, /* 0.7.0 */
.domainSetSchedulerParametersFlags = qemuDomainSetSchedulerParametersFlags, /* 0.9.2 */
.domainMigratePerform = qemuDomainMigratePerform, /* 0.5.0 */
.domainBlockResize = qemuDomainBlockResize, /* 0.9.8 */
.domainBlockStats = qemuDomainBlockStats, /* 0.4.1 */
@ -14719,21 +14720,21 @@ static virDriver qemuDriver = {
.nodeGetMemoryStats = nodeGetMemoryStats, /* 0.9.3 */
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.4.4 */
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.4.4 */
.connectDomainEventRegister = qemuDomainEventRegister, /* 0.5.0 */
.connectDomainEventDeregister = qemuDomainEventDeregister, /* 0.5.0 */
.connectDomainEventRegister = qemuConnectDomainEventRegister, /* 0.5.0 */
.connectDomainEventDeregister = qemuConnectDomainEventDeregister, /* 0.5.0 */
.domainMigratePrepare2 = qemuDomainMigratePrepare2, /* 0.5.0 */
.domainMigrateFinish2 = qemuDomainMigrateFinish2, /* 0.5.0 */
.nodeDeviceDettach = qemuNodeDeviceDettach, /* 0.6.1 */
.nodeDeviceReAttach = qemuNodeDeviceReAttach, /* 0.6.1 */
.nodeDeviceReset = qemuNodeDeviceReset, /* 0.6.1 */
.domainMigratePrepareTunnel = qemuDomainMigratePrepareTunnel, /* 0.7.2 */
.connectIsEncrypted = qemuIsEncrypted, /* 0.7.3 */
.connectIsSecure = qemuIsSecure, /* 0.7.3 */
.connectIsEncrypted = qemuConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = qemuConnectIsSecure, /* 0.7.3 */
.domainIsActive = qemuDomainIsActive, /* 0.7.3 */
.domainIsPersistent = qemuDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = qemuDomainIsUpdated, /* 0.8.6 */
.connectCompareCPU = qemuCPUCompare, /* 0.7.5 */
.connectBaselineCPU = qemuCPUBaseline, /* 0.7.7 */
.connectCompareCPU = qemuConnectCompareCPU, /* 0.7.5 */
.connectBaselineCPU = qemuConnectBaselineCPU, /* 0.7.7 */
.domainGetJobInfo = qemuDomainGetJobInfo, /* 0.7.7 */
.domainGetJobStats = qemuDomainGetJobStats, /* 1.0.3 */
.domainAbortJob = qemuDomainAbortJob, /* 0.7.7 */
@ -14742,8 +14743,8 @@ static virDriver qemuDriver = {
.domainMigrateSetCompressionCache = qemuDomainMigrateSetCompressionCache, /* 1.0.3 */
.domainMigrateSetMaxSpeed = qemuDomainMigrateSetMaxSpeed, /* 0.9.0 */
.domainMigrateGetMaxSpeed = qemuDomainMigrateGetMaxSpeed, /* 0.9.5 */
.connectDomainEventRegisterAny = qemuDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = qemuDomainEventDeregisterAny, /* 0.8.0 */
.connectDomainEventRegisterAny = qemuConnectDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = qemuConnectDomainEventDeregisterAny, /* 0.8.0 */
.domainManagedSave = qemuDomainManagedSave, /* 0.8.0 */
.domainHasManagedSaveImage = qemuDomainHasManagedSaveImage, /* 0.8.0 */
.domainManagedSaveRemove = qemuDomainManagedSaveRemove, /* 0.8.0 */
@ -14763,9 +14764,9 @@ static virDriver qemuDriver = {
.domainSnapshotHasMetadata = qemuDomainSnapshotHasMetadata, /* 0.9.13 */
.domainRevertToSnapshot = qemuDomainRevertToSnapshot, /* 0.8.0 */
.domainSnapshotDelete = qemuDomainSnapshotDelete, /* 0.8.0 */
.domainQemuMonitorCommand = qemuDomainMonitorCommand, /* 0.8.3 */
.domainQemuAttach = qemuDomainAttach, /* 0.9.4 */
.domainQemuAgentCommand = qemuDomainAgentCommand, /* 0.10.0 */
.domainQemuMonitorCommand = qemuDomainQemuMonitorCommand, /* 0.8.3 */
.domainQemuAttach = qemuDomainQemuAttach, /* 0.9.4 */
.domainQemuAgentCommand = qemuDomainQemuAgentCommand, /* 0.10.0 */
.domainOpenConsole = qemuDomainOpenConsole, /* 0.8.6 */
.domainOpenGraphics = qemuDomainOpenGraphics, /* 0.9.7 */
.domainInjectNMI = qemuDomainInjectNMI, /* 0.9.2 */
@ -14782,7 +14783,7 @@ static virDriver qemuDriver = {
.domainBlockPull = qemuDomainBlockPull, /* 0.9.4 */
.domainBlockRebase = qemuDomainBlockRebase, /* 0.9.10 */
.domainBlockCommit = qemuDomainBlockCommit, /* 1.0.0 */
.connectIsAlive = qemuIsAlive, /* 0.9.8 */
.connectIsAlive = qemuConnectIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.domainSetBlockIoTune = qemuDomainSetBlockIoTune, /* 0.9.8 */
.domainGetBlockIoTune = qemuDomainGetBlockIoTune, /* 0.9.8 */
@ -14806,10 +14807,10 @@ static virDriver qemuDriver = {
static virStateDriver qemuStateDriver = {
.name = "QEMU",
.stateInitialize = qemuStartup,
.stateCleanup = qemuShutdown,
.stateReload = qemuReload,
.stateStop = qemuStop,
.stateInitialize = qemuStateInitialize,
.stateCleanup = qemuStateCleanup,
.stateReload = qemuStateReload,
.stateStop = qemuStateStop,
};
int qemuRegister(void) {

View File

@ -158,7 +158,7 @@ static char *get_transport_from_scheme(char *scheme);
#ifdef WITH_LIBVIRTD
static int
remoteStartup(bool privileged ATTRIBUTE_UNUSED,
remoteStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -936,7 +936,7 @@ remoteOpenSecondaryDriver(virConnectPtr conn,
}
static virDrvOpenStatus
remoteOpen(virConnectPtr conn,
remoteConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth,
unsigned int flags)
{
@ -1058,7 +1058,7 @@ doRemoteClose(virConnectPtr conn, struct private_data *priv)
}
static int
remoteClose(virConnectPtr conn)
remoteConnectClose(virConnectPtr conn)
{
int ret = 0;
struct private_data *priv = conn->privateData;
@ -5049,7 +5049,7 @@ done:
/*----------------------------------------------------------------------*/
static int
remoteQemuDomainMonitorCommand(virDomainPtr domain, const char *cmd,
remoteDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
char **result, unsigned int flags)
{
int rv = -1;
@ -5472,7 +5472,7 @@ done:
static int
remoteSetKeepAlive(virConnectPtr conn, int interval, unsigned int count)
remoteConnectSetKeepAlive(virConnectPtr conn, int interval, unsigned int count)
{
struct private_data *priv = conn->privateData;
int ret = -1;
@ -5504,7 +5504,7 @@ cleanup:
static int
remoteIsAlive(virConnectPtr conn)
remoteConnectIsAlive(virConnectPtr conn)
{
struct private_data *priv = conn->privateData;
bool ret;
@ -6120,8 +6120,8 @@ unsigned long remoteVersion(void)
static virDriver remote_driver = {
.no = VIR_DRV_REMOTE,
.name = "remote",
.connectOpen = remoteOpen, /* 0.3.0 */
.connectClose = remoteClose, /* 0.3.0 */
.connectOpen = remoteConnectOpen, /* 0.3.0 */
.connectClose = remoteConnectClose, /* 0.3.0 */
.connectSupportsFeature = remoteConnectSupportsFeature, /* 0.3.0 */
.connectGetType = remoteConnectGetType, /* 0.3.0 */
.connectGetVersion = remoteConnectGetVersion, /* 0.3.0 */
@ -6264,9 +6264,9 @@ static virDriver remote_driver = {
.domainSnapshotIsCurrent = remoteDomainSnapshotIsCurrent, /* 0.9.13 */
.domainSnapshotHasMetadata = remoteDomainSnapshotHasMetadata, /* 0.9.13 */
.domainSnapshotDelete = remoteDomainSnapshotDelete, /* 0.8.0 */
.domainQemuMonitorCommand = remoteQemuDomainMonitorCommand, /* 0.8.3 */
.domainQemuAttach = qemuDomainAttach, /* 0.9.4 */
.domainQemuAgentCommand = qemuDomainAgentCommand, /* 0.10.0 */
.domainQemuMonitorCommand = remoteDomainQemuMonitorCommand, /* 0.8.3 */
.domainQemuAttach = remoteDomainQemuAttach, /* 0.9.4 */
.domainQemuAgentCommand = remoteDomainQemuAgentCommand, /* 0.10.0 */
.domainOpenConsole = remoteDomainOpenConsole, /* 0.8.6 */
.domainOpenChannel = remoteDomainOpenChannel, /* 1.0.2 */
.domainOpenGraphics = remoteDomainOpenGraphics, /* 0.9.7 */
@ -6285,8 +6285,8 @@ static virDriver remote_driver = {
.domainBlockPull = remoteDomainBlockPull, /* 0.9.4 */
.domainBlockRebase = remoteDomainBlockRebase, /* 0.9.10 */
.domainBlockCommit = remoteDomainBlockCommit, /* 0.10.2 */
.connectSetKeepAlive = remoteSetKeepAlive, /* 0.9.8 */
.connectIsAlive = remoteIsAlive, /* 0.9.8 */
.connectSetKeepAlive = remoteConnectSetKeepAlive, /* 0.9.8 */
.connectIsAlive = remoteConnectIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = remoteNodeSuspendForDuration, /* 0.9.8 */
.domainSetBlockIoTune = remoteDomainSetBlockIoTune, /* 0.9.8 */
.domainGetBlockIoTune = remoteDomainGetBlockIoTune, /* 0.9.8 */
@ -6449,7 +6449,7 @@ static virNWFilterDriver nwfilter_driver = {
#ifdef WITH_LIBVIRTD
static virStateDriver state_driver = {
.name = "Remote",
.stateInitialize = remoteStartup,
.stateInitialize = remoteStateInitialize,
};
#endif

View File

@ -1426,7 +1426,15 @@ elsif ($mode eq "client") {
# print function
print "\n";
print "static $single_ret_type\n";
if ($structprefix eq "remote") {
print "$structprefix$call->{ProcName}(";
} else {
my $proc = $call->{ProcName};
my $extra = $structprefix;
$extra =~ s/^(\w)/uc $1/e;
$proc =~ s/^(Domain)(.*)/$1 . $extra . $2/e;
print "remote$proc(";
}
print join(", ", @args_list);

View File

@ -553,7 +553,7 @@ secretClose(virConnectPtr conn) {
}
static int
secretNumOfSecrets(virConnectPtr conn)
secretConnectNumOfSecrets(virConnectPtr conn)
{
virSecretDriverStatePtr driver = conn->secretPrivateData;
int i;
@ -570,7 +570,7 @@ secretNumOfSecrets(virConnectPtr conn)
}
static int
secretListSecrets(virConnectPtr conn, char **uuids, int maxuuids)
secretConnectListSecrets(virConnectPtr conn, char **uuids, int maxuuids)
{
virSecretDriverStatePtr driver = conn->secretPrivateData;
int i;
@ -629,7 +629,7 @@ secretUsageIDForDef(virSecretDefPtr def)
#define MATCH(FLAG) (flags & (FLAG))
static int
secretListAllSecrets(virConnectPtr conn,
secretConnectListAllSecrets(virConnectPtr conn,
virSecretPtr **secrets,
unsigned int flags) {
virSecretDriverStatePtr driver = conn->secretPrivateData;
@ -1058,7 +1058,7 @@ cleanup:
}
static int
secretDriverCleanup(void)
secretStateCleanup(void)
{
if (driverState == NULL)
return -1;
@ -1081,7 +1081,7 @@ secretDriverCleanup(void)
}
static int
secretDriverStartup(bool privileged,
secretStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -1120,12 +1120,12 @@ secretDriverStartup(bool privileged,
error:
VIR_FREE(base);
secretDriverUnlock(driverState);
secretDriverCleanup();
secretStateCleanup();
return -1;
}
static int
secretDriverReload(void)
secretStateReload(void)
{
virSecretEntryPtr new_secrets = NULL;
@ -1159,9 +1159,9 @@ static virSecretDriver secretDriver = {
.name = "secret",
.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 */
.connectNumOfSecrets = secretConnectNumOfSecrets, /* 0.7.1 */
.connectListSecrets = secretConnectListSecrets, /* 0.7.1 */
.connectListAllSecrets = secretConnectListAllSecrets, /* 0.10.2 */
.secretLookupByUUID = secretLookupByUUID, /* 0.7.1 */
.secretLookupByUsage = secretLookupByUsage, /* 0.7.1 */
.secretDefineXML = secretDefineXML, /* 0.7.1 */
@ -1173,9 +1173,9 @@ static virSecretDriver secretDriver = {
static virStateDriver stateDriver = {
.name = "Secret",
.stateInitialize = secretDriverStartup,
.stateCleanup = secretDriverCleanup,
.stateReload = secretDriverReload,
.stateInitialize = secretStateInitialize,
.stateCleanup = secretStateCleanup,
.stateReload = secretStateReload,
};
int

View File

@ -53,7 +53,7 @@
static virStorageDriverStatePtr driverState;
static int storageDriverShutdown(void);
static int storageStateCleanup(void);
static void storageDriverLock(virStorageDriverStatePtr driver)
{
@ -128,7 +128,7 @@ storageDriverAutostart(virStorageDriverStatePtr driver) {
* Initialization function for the QEmu daemon
*/
static int
storageDriverStartup(bool privileged,
storageStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -179,18 +179,18 @@ out_of_memory:
error:
VIR_FREE(base);
storageDriverUnlock(driverState);
storageDriverShutdown();
storageStateCleanup();
return -1;
}
/**
* virStorageReload:
* storageStateReload:
*
* Function to restart the storage driver, it will recheck the configuration
* files and update its state
*/
static int
storageDriverReload(void) {
storageStateReload(void) {
if (!driverState)
return -1;
@ -206,12 +206,12 @@ storageDriverReload(void) {
/**
* virStorageShutdown:
* storageStateCleanup
*
* Shutdown the storage driver, it will stop all active storage pools
*/
static int
storageDriverShutdown(void) {
storageStateCleanup(void) {
if (!driverState)
return -1;
@ -309,7 +309,7 @@ storageClose(virConnectPtr conn) {
}
static int
storageNumPools(virConnectPtr conn) {
storageConnectNumOfStoragePools(virConnectPtr conn) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i, nactive = 0;
@ -326,7 +326,7 @@ storageNumPools(virConnectPtr conn) {
}
static int
storageListPools(virConnectPtr conn,
storageConnectListStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
@ -357,7 +357,7 @@ storageListPools(virConnectPtr conn,
}
static int
storageNumDefinedPools(virConnectPtr conn) {
storageConnectNumOfDefinedStoragePools(virConnectPtr conn) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i, nactive = 0;
@ -374,7 +374,7 @@ storageNumDefinedPools(virConnectPtr conn) {
}
static int
storageListDefinedPools(virConnectPtr conn,
storageConnectListDefinedStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
@ -408,7 +408,7 @@ storageListDefinedPools(virConnectPtr conn,
/* This method is required to be re-entrant / thread safe, so
uses no driver lock */
static char *
storageFindPoolSources(virConnectPtr conn,
storageConnectFindStoragePoolSources(virConnectPtr conn,
const char *type,
const char *srcSpec,
unsigned int flags)
@ -486,7 +486,7 @@ cleanup:
static virStoragePoolPtr
storagePoolCreate(virConnectPtr conn,
storagePoolCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
@ -544,7 +544,7 @@ cleanup:
}
static virStoragePoolPtr
storagePoolDefine(virConnectPtr conn,
storagePoolDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
@ -643,7 +643,7 @@ cleanup:
}
static int
storagePoolStart(virStoragePoolPtr obj,
storagePoolCreate(virStoragePoolPtr obj,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
@ -1062,7 +1062,7 @@ cleanup:
static int
storagePoolNumVolumes(virStoragePoolPtr obj) {
storagePoolNumOfVolumes(virStoragePoolPtr obj) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
int ret = -1;
@ -1207,7 +1207,7 @@ storagePoolListAllVolumes(virStoragePoolPtr pool,
}
static virStorageVolPtr
storageVolumeLookupByName(virStoragePoolPtr obj,
storageVolLookupByName(virStoragePoolPtr obj,
const char *name) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -1250,7 +1250,7 @@ cleanup:
static virStorageVolPtr
storageVolumeLookupByKey(virConnectPtr conn,
storageVolLookupByKey(virConnectPtr conn,
const char *key) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i;
@ -1282,7 +1282,7 @@ storageVolumeLookupByKey(virConnectPtr conn,
}
static virStorageVolPtr
storageVolumeLookupByPath(virConnectPtr conn,
storageVolLookupByPath(virConnectPtr conn,
const char *path) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i;
@ -1336,10 +1336,10 @@ storageVolumeLookupByPath(virConnectPtr conn,
return ret;
}
static int storageVolumeDelete(virStorageVolPtr obj, unsigned int flags);
static int storageVolDelete(virStorageVolPtr obj, unsigned int flags);
static virStorageVolPtr
storageVolumeCreateXML(virStoragePoolPtr obj,
storageVolCreateXML(virStoragePoolPtr obj,
const char *xmldesc,
unsigned int flags)
{
@ -1440,7 +1440,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj,
if (buildret < 0) {
virStoragePoolObjUnlock(pool);
storageVolumeDelete(volobj, 0);
storageVolDelete(volobj, 0);
pool = NULL;
goto cleanup;
}
@ -1462,7 +1462,7 @@ cleanup:
}
static virStorageVolPtr
storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
storageVolCreateXMLFrom(virStoragePoolPtr obj,
const char *xmldesc,
virStorageVolPtr vobj,
unsigned int flags)
@ -1605,7 +1605,7 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
if (buildret < 0) {
virStoragePoolObjUnlock(pool);
storageVolumeDelete(volobj, 0);
storageVolDelete(volobj, 0);
pool = NULL;
goto cleanup;
}
@ -1627,7 +1627,7 @@ cleanup:
static int
storageVolumeDownload(virStorageVolPtr obj,
storageVolDownload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
@ -1690,7 +1690,7 @@ out:
static int
storageVolumeUpload(virStorageVolPtr obj,
storageVolUpload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
@ -1754,7 +1754,7 @@ out:
}
static int
storageVolumeResize(virStorageVolPtr obj,
storageVolResize(virStorageVolPtr obj,
unsigned long long capacity,
unsigned int flags)
{
@ -1858,7 +1858,7 @@ out:
* appear as if it were zero-filled.
*/
static int
storageVolumeZeroSparseFile(virStorageVolDefPtr vol,
storageVolZeroSparseFile(virStorageVolDefPtr vol,
off_t size,
int fd)
{
@ -1947,7 +1947,7 @@ out:
static int
storageVolumeWipeInternal(virStorageVolDefPtr def,
storageVolWipeInternal(virStorageVolDefPtr def,
unsigned int algorithm)
{
int ret = -1, fd = -1;
@ -2017,7 +2017,7 @@ storageVolumeWipeInternal(virStorageVolDefPtr def,
goto out;
} else {
if (S_ISREG(st.st_mode) && st.st_blocks < (st.st_size / DEV_BSIZE)) {
ret = storageVolumeZeroSparseFile(def, st.st_size, fd);
ret = storageVolZeroSparseFile(def, st.st_size, fd);
} else {
if (VIR_ALLOC_N(writebuf, st.st_blksize) != 0) {
@ -2044,7 +2044,7 @@ out:
static int
storageVolumeWipePattern(virStorageVolPtr obj,
storageVolWipePattern(virStorageVolPtr obj,
unsigned int algorithm,
unsigned int flags)
{
@ -2095,7 +2095,7 @@ storageVolumeWipePattern(virStorageVolPtr obj,
goto out;
}
if (storageVolumeWipeInternal(vol, algorithm) == -1) {
if (storageVolWipeInternal(vol, algorithm) == -1) {
goto out;
}
@ -2111,14 +2111,14 @@ out:
}
static int
storageVolumeWipe(virStorageVolPtr obj,
storageVolWipe(virStorageVolPtr obj,
unsigned int flags)
{
return storageVolumeWipePattern(obj, VIR_STORAGE_VOL_WIPE_ALG_ZERO, flags);
return storageVolWipePattern(obj, VIR_STORAGE_VOL_WIPE_ALG_ZERO, flags);
}
static int
storageVolumeDelete(virStorageVolPtr obj,
storageVolDelete(virStorageVolPtr obj,
unsigned int flags) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -2201,7 +2201,7 @@ cleanup:
}
static int
storageVolumeGetInfo(virStorageVolPtr obj,
storageVolGetInfo(virStorageVolPtr obj,
virStorageVolInfoPtr info) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -2255,7 +2255,7 @@ cleanup:
}
static char *
storageVolumeGetXMLDesc(virStorageVolPtr obj,
storageVolGetXMLDesc(virStorageVolPtr obj,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
@ -2309,7 +2309,7 @@ cleanup:
}
static char *
storageVolumeGetPath(virStorageVolPtr obj) {
storageVolGetPath(virStorageVolPtr obj) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
virStorageVolDefPtr vol;
@ -2351,7 +2351,7 @@ cleanup:
}
static int
storageListAllPools(virConnectPtr conn,
storageConnectListAllStoragePools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
{
@ -2371,20 +2371,20 @@ static virStorageDriver storageDriver = {
.name = "storage",
.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 */
.connectListDefinedStoragePools = storageListDefinedPools, /* 0.4.0 */
.connectListAllStoragePools = storageListAllPools, /* 0.10.2 */
.connectFindStoragePoolSources = storageFindPoolSources, /* 0.4.0 */
.connectNumOfStoragePools = storageConnectNumOfStoragePools, /* 0.4.0 */
.connectListStoragePools = storageConnectListStoragePools, /* 0.4.0 */
.connectNumOfDefinedStoragePools = storageConnectNumOfDefinedStoragePools, /* 0.4.0 */
.connectListDefinedStoragePools = storageConnectListDefinedStoragePools, /* 0.4.0 */
.connectListAllStoragePools = storageConnectListAllStoragePools, /* 0.10.2 */
.connectFindStoragePoolSources = storageConnectFindStoragePoolSources, /* 0.4.0 */
.storagePoolLookupByName = storagePoolLookupByName, /* 0.4.0 */
.storagePoolLookupByUUID = storagePoolLookupByUUID, /* 0.4.0 */
.storagePoolLookupByVolume = storagePoolLookupByVolume, /* 0.4.0 */
.storagePoolCreateXML = storagePoolCreate, /* 0.4.0 */
.storagePoolDefineXML = storagePoolDefine, /* 0.4.0 */
.storagePoolCreateXML = storagePoolCreateXML, /* 0.4.0 */
.storagePoolDefineXML = storagePoolDefineXML, /* 0.4.0 */
.storagePoolBuild = storagePoolBuild, /* 0.4.0 */
.storagePoolUndefine = storagePoolUndefine, /* 0.4.0 */
.storagePoolCreate = storagePoolStart, /* 0.4.0 */
.storagePoolCreate = storagePoolCreate, /* 0.4.0 */
.storagePoolDestroy = storagePoolDestroy, /* 0.4.0 */
.storagePoolDelete = storagePoolDelete, /* 0.4.0 */
.storagePoolRefresh = storagePoolRefresh, /* 0.4.0 */
@ -2392,24 +2392,24 @@ static virStorageDriver storageDriver = {
.storagePoolGetXMLDesc = storagePoolGetXMLDesc, /* 0.4.0 */
.storagePoolGetAutostart = storagePoolGetAutostart, /* 0.4.0 */
.storagePoolSetAutostart = storagePoolSetAutostart, /* 0.4.0 */
.storagePoolNumOfVolumes = storagePoolNumVolumes, /* 0.4.0 */
.storagePoolNumOfVolumes = storagePoolNumOfVolumes, /* 0.4.0 */
.storagePoolListVolumes = storagePoolListVolumes, /* 0.4.0 */
.storagePoolListAllVolumes = storagePoolListAllVolumes, /* 0.10.2 */
.storageVolLookupByName = storageVolumeLookupByName, /* 0.4.0 */
.storageVolLookupByKey = storageVolumeLookupByKey, /* 0.4.0 */
.storageVolLookupByPath = storageVolumeLookupByPath, /* 0.4.0 */
.storageVolCreateXML = storageVolumeCreateXML, /* 0.4.0 */
.storageVolCreateXMLFrom = storageVolumeCreateXMLFrom, /* 0.6.4 */
.storageVolDownload = storageVolumeDownload, /* 0.9.0 */
.storageVolUpload = storageVolumeUpload, /* 0.9.0 */
.storageVolDelete = storageVolumeDelete, /* 0.4.0 */
.storageVolWipe = storageVolumeWipe, /* 0.8.0 */
.storageVolWipePattern = storageVolumeWipePattern, /* 0.9.10 */
.storageVolGetInfo = storageVolumeGetInfo, /* 0.4.0 */
.storageVolGetXMLDesc = storageVolumeGetXMLDesc, /* 0.4.0 */
.storageVolGetPath = storageVolumeGetPath, /* 0.4.0 */
.storageVolResize = storageVolumeResize, /* 0.9.10 */
.storageVolLookupByName = storageVolLookupByName, /* 0.4.0 */
.storageVolLookupByKey = storageVolLookupByKey, /* 0.4.0 */
.storageVolLookupByPath = storageVolLookupByPath, /* 0.4.0 */
.storageVolCreateXML = storageVolCreateXML, /* 0.4.0 */
.storageVolCreateXMLFrom = storageVolCreateXMLFrom, /* 0.6.4 */
.storageVolDownload = storageVolDownload, /* 0.9.0 */
.storageVolUpload = storageVolUpload, /* 0.9.0 */
.storageVolDelete = storageVolDelete, /* 0.4.0 */
.storageVolWipe = storageVolWipe, /* 0.8.0 */
.storageVolWipePattern = storageVolWipePattern, /* 0.9.10 */
.storageVolGetInfo = storageVolGetInfo, /* 0.4.0 */
.storageVolGetXMLDesc = storageVolGetXMLDesc, /* 0.4.0 */
.storageVolGetPath = storageVolGetPath, /* 0.4.0 */
.storageVolResize = storageVolResize, /* 0.9.10 */
.storagePoolIsActive = storagePoolIsActive, /* 0.7.3 */
.storagePoolIsPersistent = storagePoolIsPersistent, /* 0.7.3 */
@ -2418,9 +2418,9 @@ static virStorageDriver storageDriver = {
static virStateDriver stateDriver = {
.name = "Storage",
.stateInitialize = storageDriverStartup,
.stateCleanup = storageDriverShutdown,
.stateReload = storageDriverReload,
.stateInitialize = storageStateInitialize,
.stateCleanup = storageStateCleanup,
.stateReload = storageStateReload,
};
int storageRegister(void) {

View File

@ -117,7 +117,7 @@ static const virNodeInfo defaultNodeInfo = {
};
static int testClose(virConnectPtr conn);
static int testConnectClose(virConnectPtr conn);
static void testDomainEventQueue(testConnPtr driver,
virDomainEventPtr event);
@ -1142,7 +1142,7 @@ static int testOpenFromFile(virConnectPtr conn,
}
static virDrvOpenStatus testOpen(virConnectPtr conn,
static virDrvOpenStatus testConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1185,7 +1185,7 @@ static virDrvOpenStatus testOpen(virConnectPtr conn,
privconn->domainEventState = virDomainEventStateNew();
if (!privconn->domainEventState) {
testDriverUnlock(privconn);
testClose(conn);
testConnectClose(conn);
return VIR_DRV_OPEN_ERROR;
}
@ -1194,7 +1194,7 @@ static virDrvOpenStatus testOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int testClose(virConnectPtr conn)
static int testConnectClose(virConnectPtr conn)
{
testConnPtr privconn = conn->privateData;
testDriverLock(privconn);
@ -1216,29 +1216,29 @@ static int testClose(virConnectPtr conn)
return 0;
}
static int testGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED,
static int testConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED,
unsigned long *hvVer)
{
*hvVer = 2;
return 0;
}
static int testIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int testConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int testIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int testConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 0;
}
static int testIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int testConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int testGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED,
static int testConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type ATTRIBUTE_UNUSED)
{
return 32;
@ -1254,7 +1254,7 @@ static int testNodeGetInfo(virConnectPtr conn,
return 0;
}
static char *testGetCapabilities(virConnectPtr conn)
static char *testConnectGetCapabilities(virConnectPtr conn)
{
testConnPtr privconn = conn->privateData;
char *xml;
@ -1265,7 +1265,7 @@ static char *testGetCapabilities(virConnectPtr conn)
return xml;
}
static int testNumOfDomains(virConnectPtr conn)
static int testConnectNumOfDomains(virConnectPtr conn)
{
testConnPtr privconn = conn->privateData;
int count;
@ -1374,7 +1374,7 @@ cleanup:
}
static virDomainPtr testLookupDomainByID(virConnectPtr conn,
static virDomainPtr testDomainLookupByID(virConnectPtr conn,
int id)
{
testConnPtr privconn = conn->privateData;
@ -1400,7 +1400,7 @@ cleanup:
return ret;
}
static virDomainPtr testLookupDomainByUUID(virConnectPtr conn,
static virDomainPtr testDomainLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
testConnPtr privconn = conn->privateData;
@ -1426,7 +1426,7 @@ cleanup:
return ret;
}
static virDomainPtr testLookupDomainByName(virConnectPtr conn,
static virDomainPtr testDomainLookupByName(virConnectPtr conn,
const char *name)
{
testConnPtr privconn = conn->privateData;
@ -1452,7 +1452,7 @@ cleanup:
return ret;
}
static int testListDomains(virConnectPtr conn,
static int testConnectListDomains(virConnectPtr conn,
int *ids,
int maxids)
{
@ -1466,7 +1466,7 @@ static int testListDomains(virConnectPtr conn,
return n;
}
static int testDestroyDomain(virDomainPtr domain)
static int testDomainDestroy(virDomainPtr domain)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -1503,7 +1503,7 @@ cleanup:
return ret;
}
static int testResumeDomain(virDomainPtr domain)
static int testDomainResume(virDomainPtr domain)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -1544,7 +1544,7 @@ cleanup:
return ret;
}
static int testPauseDomain(virDomainPtr domain)
static int testDomainSuspend(virDomainPtr domain)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -1587,7 +1587,7 @@ cleanup:
return ret;
}
static int testShutdownDomainFlags(virDomainPtr domain,
static int testDomainShutdownFlags(virDomainPtr domain,
unsigned int flags)
{
testConnPtr privconn = domain->conn->privateData;
@ -1633,13 +1633,13 @@ cleanup:
return ret;
}
static int testShutdownDomain(virDomainPtr domain)
static int testDomainShutdown(virDomainPtr domain)
{
return testShutdownDomainFlags(domain, 0);
return testDomainShutdownFlags(domain, 0);
}
/* Similar behaviour as shutdown */
static int testRebootDomain(virDomainPtr domain,
static int testDomainReboot(virDomainPtr domain,
unsigned int action ATTRIBUTE_UNUSED)
{
testConnPtr privconn = domain->conn->privateData;
@ -1709,7 +1709,7 @@ cleanup:
return ret;
}
static int testGetDomainInfo(virDomainPtr domain,
static int testDomainGetInfo(virDomainPtr domain,
virDomainInfoPtr info)
{
testConnPtr privconn = domain->conn->privateData;
@ -2059,14 +2059,14 @@ cleanup:
return ret;
}
static char *testGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
static char *testDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
char *ret = strdup("linux");
if (!ret)
virReportOOMError();
return ret;
}
static unsigned long long testGetMaxMemory(virDomainPtr domain) {
static unsigned long long testDomainGetMaxMemory(virDomainPtr domain) {
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
unsigned long long ret = 0;
@ -2089,7 +2089,7 @@ cleanup:
return ret;
}
static int testSetMaxMemory(virDomainPtr domain,
static int testDomainSetMaxMemory(virDomainPtr domain,
unsigned long memory)
{
testConnPtr privconn = domain->conn->privateData;
@ -2116,7 +2116,7 @@ cleanup:
return ret;
}
static int testSetMemory(virDomainPtr domain,
static int testDomainSetMemory(virDomainPtr domain,
unsigned long memory)
{
testConnPtr privconn = domain->conn->privateData;
@ -2215,7 +2215,7 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned int nrCpus,
_("invalid flag combination: (0x%x)"), flags);
return -1;
}
if (!nrCpus || (maxvcpus = testGetMaxVCPUs(domain->conn, NULL)) < nrCpus) {
if (!nrCpus || (maxvcpus = testConnectGetMaxVcpus(domain->conn, NULL)) < nrCpus) {
virReportError(VIR_ERR_INVALID_ARG,
_("argument out of range: %d"), nrCpus);
return -1;
@ -2286,7 +2286,7 @@ cleanup:
}
static int
testSetVcpus(virDomainPtr domain, unsigned int nrCpus)
testDomainSetVcpus(virDomainPtr domain, unsigned int nrCpus)
{
return testDomainSetVcpusFlags(domain, nrCpus, VIR_DOMAIN_AFFECT_LIVE);
}
@ -2467,7 +2467,7 @@ cleanup:
return ret;
}
static int testNumOfDefinedDomains(virConnectPtr conn) {
static int testConnectNumOfDefinedDomains(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int count;
@ -2478,7 +2478,7 @@ static int testNumOfDefinedDomains(virConnectPtr conn) {
return count;
}
static int testListDefinedDomains(virConnectPtr conn,
static int testConnectListDefinedDomains(virConnectPtr conn,
char **const names,
int maxnames) {
@ -2728,7 +2728,7 @@ static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
}
static int
testDomainGetSchedulerParamsFlags(virDomainPtr domain,
testDomainGetSchedulerParametersFlags(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
@ -2765,15 +2765,15 @@ cleanup:
}
static int
testDomainGetSchedulerParams(virDomainPtr domain,
testDomainGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
{
return testDomainGetSchedulerParamsFlags(domain, params, nparams, 0);
return testDomainGetSchedulerParametersFlags(domain, params, nparams, 0);
}
static int
testDomainSetSchedulerParamsFlags(virDomainPtr domain,
testDomainSetSchedulerParametersFlags(virDomainPtr domain,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
@ -2815,11 +2815,11 @@ cleanup:
}
static int
testDomainSetSchedulerParams(virDomainPtr domain,
testDomainSetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
{
return testDomainSetSchedulerParamsFlags(domain, params, nparams, 0);
return testDomainSetSchedulerParametersFlags(domain, params, nparams, 0);
}
static int testDomainBlockStats(virDomainPtr domain,
@ -2927,7 +2927,7 @@ error:
return ret;
}
static virDrvOpenStatus testOpenNetwork(virConnectPtr conn,
static virDrvOpenStatus testNetworkOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -2940,13 +2940,13 @@ static virDrvOpenStatus testOpenNetwork(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int testCloseNetwork(virConnectPtr conn) {
static int testNetworkClose(virConnectPtr conn) {
conn->networkPrivateData = NULL;
return 0;
}
static virNetworkPtr testLookupNetworkByUUID(virConnectPtr conn,
static virNetworkPtr testNetworkLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
testConnPtr privconn = conn->privateData;
@ -2970,7 +2970,7 @@ cleanup:
return ret;
}
static virNetworkPtr testLookupNetworkByName(virConnectPtr conn,
static virNetworkPtr testNetworkLookupByName(virConnectPtr conn,
const char *name)
{
testConnPtr privconn = conn->privateData;
@ -2995,7 +2995,7 @@ cleanup:
}
static int testNumNetworks(virConnectPtr conn) {
static int testConnectNumOfNetworks(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int numActive = 0, i;
@ -3011,7 +3011,7 @@ static int testNumNetworks(virConnectPtr conn) {
return numActive;
}
static int testListNetworks(virConnectPtr conn, char **const names, int nnames) {
static int testConnectListNetworks(virConnectPtr conn, char **const names, int nnames) {
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -3038,7 +3038,7 @@ no_memory:
return -1;
}
static int testNumDefinedNetworks(virConnectPtr conn) {
static int testConnectNumOfDefinedNetworks(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int numInactive = 0, i;
@ -3054,7 +3054,7 @@ static int testNumDefinedNetworks(virConnectPtr conn) {
return numInactive;
}
static int testListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
static int testConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -3082,7 +3082,7 @@ no_memory:
}
static int
testNetworkListAllNetworks(virConnectPtr conn,
testConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
{
@ -3141,7 +3141,7 @@ cleanup:
}
static virNetworkPtr testNetworkCreate(virConnectPtr conn, const char *xml) {
static virNetworkPtr testNetworkCreateXML(virConnectPtr conn, const char *xml) {
testConnPtr privconn = conn->privateData;
virNetworkDefPtr def;
virNetworkObjPtr net = NULL;
@ -3167,7 +3167,7 @@ cleanup:
}
static
virNetworkPtr testNetworkDefine(virConnectPtr conn, const char *xml)
virNetworkPtr testNetworkDefineXML(virConnectPtr conn, const char *xml)
{
testConnPtr privconn = conn->privateData;
virNetworkDefPtr def;
@ -3273,7 +3273,7 @@ cleanup:
return ret;
}
static int testNetworkStart(virNetworkPtr network) {
static int testNetworkCreate(virNetworkPtr network) {
testConnPtr privconn = network->conn->privateData;
virNetworkObjPtr privnet;
int ret = -1;
@ -3447,7 +3447,7 @@ cleanup:
* Physical host interface routines
*/
static virDrvOpenStatus testOpenInterface(virConnectPtr conn,
static virDrvOpenStatus testInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -3460,14 +3460,14 @@ static virDrvOpenStatus testOpenInterface(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int testCloseInterface(virConnectPtr conn)
static int testInterfaceClose(virConnectPtr conn)
{
conn->interfacePrivateData = NULL;
return 0;
}
static int testNumOfInterfaces(virConnectPtr conn)
static int testConnectNumOfInterfaces(virConnectPtr conn)
{
testConnPtr privconn = conn->privateData;
int i, count = 0;
@ -3484,7 +3484,7 @@ static int testNumOfInterfaces(virConnectPtr conn)
return count;
}
static int testListInterfaces(virConnectPtr conn, char **const names, int nnames)
static int testConnectListInterfaces(virConnectPtr conn, char **const names, int nnames)
{
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -3513,7 +3513,7 @@ no_memory:
return -1;
}
static int testNumOfDefinedInterfaces(virConnectPtr conn)
static int testConnectNumOfDefinedInterfaces(virConnectPtr conn)
{
testConnPtr privconn = conn->privateData;
int i, count = 0;
@ -3530,7 +3530,7 @@ static int testNumOfDefinedInterfaces(virConnectPtr conn)
return count;
}
static int testListDefinedInterfaces(virConnectPtr conn, char **const names, int nnames)
static int testConnectListDefinedInterfaces(virConnectPtr conn, char **const names, int nnames)
{
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -3559,7 +3559,7 @@ no_memory:
return -1;
}
static virInterfacePtr testLookupInterfaceByName(virConnectPtr conn,
static virInterfacePtr testInterfaceLookupByName(virConnectPtr conn,
const char *name)
{
testConnPtr privconn = conn->privateData;
@ -3583,7 +3583,7 @@ cleanup:
return ret;
}
static virInterfacePtr testLookupInterfaceByMACString(virConnectPtr conn,
static virInterfacePtr testInterfaceLookupByMACString(virConnectPtr conn,
const char *mac)
{
testConnPtr privconn = conn->privateData;
@ -3964,7 +3964,7 @@ testStoragePoolLookupByVolume(virStorageVolPtr vol) {
}
static int
testStorageNumPools(virConnectPtr conn) {
testConnectNumOfStoragePools(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int numActive = 0, i;
@ -3978,7 +3978,7 @@ testStorageNumPools(virConnectPtr conn) {
}
static int
testStorageListPools(virConnectPtr conn,
testConnectListStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
testConnPtr privconn = conn->privateData;
@ -4008,7 +4008,7 @@ no_memory:
}
static int
testStorageNumDefinedPools(virConnectPtr conn) {
testConnectNumOfDefinedStoragePools(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int numInactive = 0, i;
@ -4025,7 +4025,7 @@ testStorageNumDefinedPools(virConnectPtr conn) {
}
static int
testStorageListDefinedPools(virConnectPtr conn,
testConnectListDefinedStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
testConnPtr privconn = conn->privateData;
@ -4055,7 +4055,7 @@ no_memory:
}
static int
testStorageListAllPools(virConnectPtr conn,
testConnectListAllStoragePools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
{
@ -4116,7 +4116,7 @@ cleanup:
static int
testStoragePoolStart(virStoragePoolPtr pool,
testStoragePoolCreate(virStoragePoolPtr pool,
unsigned int flags)
{
testConnPtr privconn = pool->conn->privateData;
@ -4151,7 +4151,7 @@ cleanup:
}
static char *
testStorageFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
testConnectFindStoragePoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type,
const char *srcSpec,
unsigned int flags)
@ -4207,7 +4207,7 @@ cleanup:
static virStoragePoolPtr
testStoragePoolCreate(virConnectPtr conn,
testStoragePoolCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
@ -4254,7 +4254,7 @@ cleanup:
}
static virStoragePoolPtr
testStoragePoolDefine(virConnectPtr conn,
testStoragePoolDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
@ -4591,7 +4591,7 @@ cleanup:
static int
testStoragePoolNumVolumes(virStoragePoolPtr pool) {
testStoragePoolNumOfVolumes(virStoragePoolPtr pool) {
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
int ret = -1;
@ -4737,7 +4737,7 @@ testStoragePoolListAllVolumes(virStoragePoolPtr obj,
}
static virStorageVolPtr
testStorageVolumeLookupByName(virStoragePoolPtr pool,
testStorageVolLookupByName(virStoragePoolPtr pool,
const char *name ATTRIBUTE_UNUSED) {
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -4781,7 +4781,7 @@ cleanup:
static virStorageVolPtr
testStorageVolumeLookupByKey(virConnectPtr conn,
testStorageVolLookupByKey(virConnectPtr conn,
const char *key) {
testConnPtr privconn = conn->privateData;
unsigned int i;
@ -4816,7 +4816,7 @@ testStorageVolumeLookupByKey(virConnectPtr conn,
}
static virStorageVolPtr
testStorageVolumeLookupByPath(virConnectPtr conn,
testStorageVolLookupByPath(virConnectPtr conn,
const char *path) {
testConnPtr privconn = conn->privateData;
unsigned int i;
@ -4851,7 +4851,7 @@ testStorageVolumeLookupByPath(virConnectPtr conn,
}
static virStorageVolPtr
testStorageVolumeCreateXML(virStoragePoolPtr pool,
testStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc,
unsigned int flags)
{
@ -4935,7 +4935,7 @@ cleanup:
}
static virStorageVolPtr
testStorageVolumeCreateXMLFrom(virStoragePoolPtr pool,
testStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
@ -5030,7 +5030,7 @@ cleanup:
}
static int
testStorageVolumeDelete(virStorageVolPtr vol,
testStorageVolDelete(virStorageVolPtr vol,
unsigned int flags)
{
testConnPtr privconn = vol->conn->privateData;
@ -5113,7 +5113,7 @@ static int testStorageVolumeTypeForPool(int pooltype) {
}
static int
testStorageVolumeGetInfo(virStorageVolPtr vol,
testStorageVolGetInfo(virStorageVolPtr vol,
virStorageVolInfoPtr info) {
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -5158,7 +5158,7 @@ cleanup:
}
static char *
testStorageVolumeGetXMLDesc(virStorageVolPtr vol,
testStorageVolGetXMLDesc(virStorageVolPtr vol,
unsigned int flags)
{
testConnPtr privconn = vol->conn->privateData;
@ -5202,7 +5202,7 @@ cleanup:
}
static char *
testStorageVolumeGetPath(virStorageVolPtr vol) {
testStorageVolGetPath(virStorageVolPtr vol) {
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
virStorageVolDefPtr privvol;
@ -5604,7 +5604,7 @@ out:
/* Domain event implementations */
static int
testDomainEventRegister(virConnectPtr conn,
testConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
@ -5623,7 +5623,7 @@ testDomainEventRegister(virConnectPtr conn,
static int
testDomainEventDeregister(virConnectPtr conn,
testConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
testConnPtr driver = conn->privateData;
@ -5640,7 +5640,7 @@ testDomainEventDeregister(virConnectPtr conn,
static int
testDomainEventRegisterAny(virConnectPtr conn,
testConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -5662,7 +5662,7 @@ testDomainEventRegisterAny(virConnectPtr conn,
}
static int
testDomainEventDeregisterAny(virConnectPtr conn,
testConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
testConnPtr driver = conn->privateData;
@ -5722,7 +5722,7 @@ static int testNWFilterClose(virConnectPtr conn) {
return 0;
}
static int testListAllDomains(virConnectPtr conn,
static int testConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -5793,46 +5793,46 @@ testDomainScreenshot(virDomainPtr dom ATTRIBUTE_UNUSED,
static virDriver testDriver = {
.no = VIR_DRV_TEST,
.name = "Test",
.connectOpen = testOpen, /* 0.1.1 */
.connectClose = testClose, /* 0.1.1 */
.connectGetVersion = testGetVersion, /* 0.1.1 */
.connectOpen = testConnectOpen, /* 0.1.1 */
.connectClose = testConnectClose, /* 0.1.1 */
.connectGetVersion = testConnectGetVersion, /* 0.1.1 */
.connectGetHostname = virGetHostname, /* 0.6.3 */
.connectGetMaxVcpus = testGetMaxVCPUs, /* 0.3.2 */
.connectGetMaxVcpus = testConnectGetMaxVcpus, /* 0.3.2 */
.nodeGetInfo = testNodeGetInfo, /* 0.1.1 */
.connectGetCapabilities = testGetCapabilities, /* 0.2.1 */
.connectListDomains = testListDomains, /* 0.1.1 */
.connectNumOfDomains = testNumOfDomains, /* 0.1.1 */
.connectListAllDomains = testListAllDomains, /* 0.9.13 */
.connectGetCapabilities = testConnectGetCapabilities, /* 0.2.1 */
.connectListDomains = testConnectListDomains, /* 0.1.1 */
.connectNumOfDomains = testConnectNumOfDomains, /* 0.1.1 */
.connectListAllDomains = testConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = testDomainCreateXML, /* 0.1.4 */
.domainLookupByID = testLookupDomainByID, /* 0.1.1 */
.domainLookupByUUID = testLookupDomainByUUID, /* 0.1.1 */
.domainLookupByName = testLookupDomainByName, /* 0.1.1 */
.domainSuspend = testPauseDomain, /* 0.1.1 */
.domainResume = testResumeDomain, /* 0.1.1 */
.domainShutdown = testShutdownDomain, /* 0.1.1 */
.domainShutdownFlags = testShutdownDomainFlags, /* 0.9.10 */
.domainReboot = testRebootDomain, /* 0.1.1 */
.domainDestroy = testDestroyDomain, /* 0.1.1 */
.domainGetOSType = testGetOSType, /* 0.1.9 */
.domainGetMaxMemory = testGetMaxMemory, /* 0.1.4 */
.domainSetMaxMemory = testSetMaxMemory, /* 0.1.1 */
.domainSetMemory = testSetMemory, /* 0.1.4 */
.domainGetInfo = testGetDomainInfo, /* 0.1.1 */
.domainLookupByID = testDomainLookupByID, /* 0.1.1 */
.domainLookupByUUID = testDomainLookupByUUID, /* 0.1.1 */
.domainLookupByName = testDomainLookupByName, /* 0.1.1 */
.domainSuspend = testDomainSuspend, /* 0.1.1 */
.domainResume = testDomainResume, /* 0.1.1 */
.domainShutdown = testDomainShutdown, /* 0.1.1 */
.domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */
.domainReboot = testDomainReboot, /* 0.1.1 */
.domainDestroy = testDomainDestroy, /* 0.1.1 */
.domainGetOSType = testDomainGetOSType, /* 0.1.9 */
.domainGetMaxMemory = testDomainGetMaxMemory, /* 0.1.4 */
.domainSetMaxMemory = testDomainSetMaxMemory, /* 0.1.1 */
.domainSetMemory = testDomainSetMemory, /* 0.1.4 */
.domainGetInfo = testDomainGetInfo, /* 0.1.1 */
.domainGetState = testDomainGetState, /* 0.9.2 */
.domainSave = testDomainSave, /* 0.3.2 */
.domainSaveFlags = testDomainSaveFlags, /* 0.9.4 */
.domainRestore = testDomainRestore, /* 0.3.2 */
.domainRestoreFlags = testDomainRestoreFlags, /* 0.9.4 */
.domainCoreDump = testDomainCoreDump, /* 0.3.2 */
.domainSetVcpus = testSetVcpus, /* 0.1.4 */
.domainSetVcpus = testDomainSetVcpus, /* 0.1.4 */
.domainSetVcpusFlags = testDomainSetVcpusFlags, /* 0.8.5 */
.domainGetVcpusFlags = testDomainGetVcpusFlags, /* 0.8.5 */
.domainPinVcpu = testDomainPinVcpu, /* 0.7.3 */
.domainGetVcpus = testDomainGetVcpus, /* 0.7.3 */
.domainGetMaxVcpus = testDomainGetMaxVcpus, /* 0.7.3 */
.domainGetXMLDesc = testDomainGetXMLDesc, /* 0.1.4 */
.connectListDefinedDomains = testListDefinedDomains, /* 0.1.11 */
.connectNumOfDefinedDomains = testNumOfDefinedDomains, /* 0.1.11 */
.connectListDefinedDomains = testConnectListDefinedDomains, /* 0.1.11 */
.connectNumOfDefinedDomains = testConnectNumOfDefinedDomains, /* 0.1.11 */
.domainCreate = testDomainCreate, /* 0.1.11 */
.domainCreateWithFlags = testDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = testDomainDefineXML, /* 0.1.11 */
@ -5841,43 +5841,43 @@ static virDriver testDriver = {
.domainGetAutostart = testDomainGetAutostart, /* 0.3.2 */
.domainSetAutostart = testDomainSetAutostart, /* 0.3.2 */
.domainGetSchedulerType = testDomainGetSchedulerType, /* 0.3.2 */
.domainGetSchedulerParameters = testDomainGetSchedulerParams, /* 0.3.2 */
.domainGetSchedulerParametersFlags = testDomainGetSchedulerParamsFlags, /* 0.9.2 */
.domainSetSchedulerParameters = testDomainSetSchedulerParams, /* 0.3.2 */
.domainSetSchedulerParametersFlags = testDomainSetSchedulerParamsFlags, /* 0.9.2 */
.domainGetSchedulerParameters = testDomainGetSchedulerParameters, /* 0.3.2 */
.domainGetSchedulerParametersFlags = testDomainGetSchedulerParametersFlags, /* 0.9.2 */
.domainSetSchedulerParameters = testDomainSetSchedulerParameters, /* 0.3.2 */
.domainSetSchedulerParametersFlags = testDomainSetSchedulerParametersFlags, /* 0.9.2 */
.domainBlockStats = testDomainBlockStats, /* 0.7.0 */
.domainInterfaceStats = testDomainInterfaceStats, /* 0.7.0 */
.nodeGetCellsFreeMemory = testNodeGetCellsFreeMemory, /* 0.4.2 */
.connectDomainEventRegister = testDomainEventRegister, /* 0.6.0 */
.connectDomainEventDeregister = testDomainEventDeregister, /* 0.6.0 */
.connectIsEncrypted = testIsEncrypted, /* 0.7.3 */
.connectIsSecure = testIsSecure, /* 0.7.3 */
.connectDomainEventRegister = testConnectDomainEventRegister, /* 0.6.0 */
.connectDomainEventDeregister = testConnectDomainEventDeregister, /* 0.6.0 */
.connectIsEncrypted = testConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = testConnectIsSecure, /* 0.7.3 */
.domainIsActive = testDomainIsActive, /* 0.7.3 */
.domainIsPersistent = testDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = testDomainIsUpdated, /* 0.8.6 */
.connectDomainEventRegisterAny = testDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = testDomainEventDeregisterAny, /* 0.8.0 */
.connectIsAlive = testIsAlive, /* 0.9.8 */
.connectDomainEventRegisterAny = testConnectDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = testConnectDomainEventDeregisterAny, /* 0.8.0 */
.connectIsAlive = testConnectIsAlive, /* 0.9.8 */
.nodeGetCPUMap = testNodeGetCPUMap, /* 1.0.0 */
.domainScreenshot = testDomainScreenshot, /* 1.0.5 */
};
static virNetworkDriver testNetworkDriver = {
"Test",
.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 */
.connectListDefinedNetworks = testListDefinedNetworks, /* 0.3.2 */
.connectListAllNetworks = testNetworkListAllNetworks, /* 0.10.2 */
.networkLookupByUUID = testLookupNetworkByUUID, /* 0.3.2 */
.networkLookupByName = testLookupNetworkByName, /* 0.3.2 */
.networkCreateXML = testNetworkCreate, /* 0.3.2 */
.networkDefineXML = testNetworkDefine, /* 0.3.2 */
.networkOpen = testNetworkOpen, /* 0.3.2 */
.networkClose = testNetworkClose, /* 0.3.2 */
.connectNumOfNetworks = testConnectNumOfNetworks, /* 0.3.2 */
.connectListNetworks = testConnectListNetworks, /* 0.3.2 */
.connectNumOfDefinedNetworks = testConnectNumOfDefinedNetworks, /* 0.3.2 */
.connectListDefinedNetworks = testConnectListDefinedNetworks, /* 0.3.2 */
.connectListAllNetworks = testConnectListAllNetworks, /* 0.10.2 */
.networkLookupByUUID = testNetworkLookupByUUID, /* 0.3.2 */
.networkLookupByName = testNetworkLookupByName, /* 0.3.2 */
.networkCreateXML = testNetworkCreateXML, /* 0.3.2 */
.networkDefineXML = testNetworkDefineXML, /* 0.3.2 */
.networkUndefine = testNetworkUndefine, /* 0.3.2 */
.networkUpdate = testNetworkUpdate, /* 0.10.2 */
.networkCreate = testNetworkStart, /* 0.3.2 */
.networkCreate = testNetworkCreate, /* 0.3.2 */
.networkDestroy = testNetworkDestroy, /* 0.3.2 */
.networkGetXMLDesc = testNetworkGetXMLDesc, /* 0.3.2 */
.networkGetBridgeName = testNetworkGetBridgeName, /* 0.3.2 */
@ -5889,14 +5889,14 @@ static virNetworkDriver testNetworkDriver = {
static virInterfaceDriver testInterfaceDriver = {
"Test", /* name */
.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 */
.connectListDefinedInterfaces = testListDefinedInterfaces, /* 0.7.0 */
.interfaceLookupByName = testLookupInterfaceByName, /* 0.7.0 */
.interfaceLookupByMACString = testLookupInterfaceByMACString, /* 0.7.0 */
.interfaceOpen = testInterfaceOpen, /* 0.7.0 */
.interfaceClose = testInterfaceClose, /* 0.7.0 */
.connectNumOfInterfaces = testConnectNumOfInterfaces, /* 0.7.0 */
.connectListInterfaces = testConnectListInterfaces, /* 0.7.0 */
.connectNumOfDefinedInterfaces = testConnectNumOfDefinedInterfaces, /* 0.7.0 */
.connectListDefinedInterfaces = testConnectListDefinedInterfaces, /* 0.7.0 */
.interfaceLookupByName = testInterfaceLookupByName, /* 0.7.0 */
.interfaceLookupByMACString = testInterfaceLookupByMACString, /* 0.7.0 */
.interfaceGetXMLDesc = testInterfaceGetXMLDesc, /* 0.7.0 */
.interfaceDefineXML = testInterfaceDefineXML, /* 0.7.0 */
.interfaceUndefine = testInterfaceUndefine, /* 0.7.0 */
@ -5914,20 +5914,20 @@ static virStorageDriver testStorageDriver = {
.storageOpen = testStorageOpen, /* 0.4.1 */
.storageClose = testStorageClose, /* 0.4.1 */
.connectNumOfStoragePools = testStorageNumPools, /* 0.5.0 */
.connectListStoragePools = testStorageListPools, /* 0.5.0 */
.connectNumOfDefinedStoragePools = testStorageNumDefinedPools, /* 0.5.0 */
.connectListDefinedStoragePools = testStorageListDefinedPools, /* 0.5.0 */
.connectListAllStoragePools = testStorageListAllPools, /* 0.10.2 */
.connectFindStoragePoolSources = testStorageFindPoolSources, /* 0.5.0 */
.connectNumOfStoragePools = testConnectNumOfStoragePools, /* 0.5.0 */
.connectListStoragePools = testConnectListStoragePools, /* 0.5.0 */
.connectNumOfDefinedStoragePools = testConnectNumOfDefinedStoragePools, /* 0.5.0 */
.connectListDefinedStoragePools = testConnectListDefinedStoragePools, /* 0.5.0 */
.connectListAllStoragePools = testConnectListAllStoragePools, /* 0.10.2 */
.connectFindStoragePoolSources = testConnectFindStoragePoolSources, /* 0.5.0 */
.storagePoolLookupByName = testStoragePoolLookupByName, /* 0.5.0 */
.storagePoolLookupByUUID = testStoragePoolLookupByUUID, /* 0.5.0 */
.storagePoolLookupByVolume = testStoragePoolLookupByVolume, /* 0.5.0 */
.storagePoolCreateXML = testStoragePoolCreate, /* 0.5.0 */
.storagePoolDefineXML = testStoragePoolDefine, /* 0.5.0 */
.storagePoolCreateXML = testStoragePoolCreateXML, /* 0.5.0 */
.storagePoolDefineXML = testStoragePoolDefineXML, /* 0.5.0 */
.storagePoolBuild = testStoragePoolBuild, /* 0.5.0 */
.storagePoolUndefine = testStoragePoolUndefine, /* 0.5.0 */
.storagePoolCreate = testStoragePoolStart, /* 0.5.0 */
.storagePoolCreate = testStoragePoolCreate, /* 0.5.0 */
.storagePoolDestroy = testStoragePoolDestroy, /* 0.5.0 */
.storagePoolDelete = testStoragePoolDelete, /* 0.5.0 */
.storagePoolRefresh = testStoragePoolRefresh, /* 0.5.0 */
@ -5935,19 +5935,19 @@ static virStorageDriver testStorageDriver = {
.storagePoolGetXMLDesc = testStoragePoolGetXMLDesc, /* 0.5.0 */
.storagePoolGetAutostart = testStoragePoolGetAutostart, /* 0.5.0 */
.storagePoolSetAutostart = testStoragePoolSetAutostart, /* 0.5.0 */
.storagePoolNumOfVolumes = testStoragePoolNumVolumes, /* 0.5.0 */
.storagePoolNumOfVolumes = testStoragePoolNumOfVolumes, /* 0.5.0 */
.storagePoolListVolumes = testStoragePoolListVolumes, /* 0.5.0 */
.storagePoolListAllVolumes = testStoragePoolListAllVolumes, /* 0.10.2 */
.storageVolLookupByName = testStorageVolumeLookupByName, /* 0.5.0 */
.storageVolLookupByKey = testStorageVolumeLookupByKey, /* 0.5.0 */
.storageVolLookupByPath = testStorageVolumeLookupByPath, /* 0.5.0 */
.storageVolCreateXML = testStorageVolumeCreateXML, /* 0.5.0 */
.storageVolCreateXMLFrom = testStorageVolumeCreateXMLFrom, /* 0.6.4 */
.storageVolDelete = testStorageVolumeDelete, /* 0.5.0 */
.storageVolGetInfo = testStorageVolumeGetInfo, /* 0.5.0 */
.storageVolGetXMLDesc = testStorageVolumeGetXMLDesc, /* 0.5.0 */
.storageVolGetPath = testStorageVolumeGetPath, /* 0.5.0 */
.storageVolLookupByName = testStorageVolLookupByName, /* 0.5.0 */
.storageVolLookupByKey = testStorageVolLookupByKey, /* 0.5.0 */
.storageVolLookupByPath = testStorageVolLookupByPath, /* 0.5.0 */
.storageVolCreateXML = testStorageVolCreateXML, /* 0.5.0 */
.storageVolCreateXMLFrom = testStorageVolCreateXMLFrom, /* 0.6.4 */
.storageVolDelete = testStorageVolDelete, /* 0.5.0 */
.storageVolGetInfo = testStorageVolGetInfo, /* 0.5.0 */
.storageVolGetXMLDesc = testStorageVolGetXMLDesc, /* 0.5.0 */
.storageVolGetPath = testStorageVolGetPath, /* 0.5.0 */
.storagePoolIsActive = testStoragePoolIsActive, /* 0.7.3 */
.storagePoolIsPersistent = testStoragePoolIsPersistent, /* 0.7.3 */
};

View File

@ -89,7 +89,7 @@ static int umlProcessAutoDestroyRemove(struct uml_driver *driver,
virDomainObjPtr vm);
static int umlShutdown(void);
static int umlStateCleanup(void);
static void *umlDomainObjPrivateAlloc(void)
{
@ -446,7 +446,7 @@ virDomainDefParserConfig umlDriverDomainDefParserConfig = {
* Initialization function for the Uml daemon
*/
static int
umlStartup(bool privileged,
umlStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque)
{
@ -586,7 +586,7 @@ error:
VIR_FREE(userdir);
VIR_FREE(base);
umlDriverUnlock(uml_driver);
umlShutdown();
umlStateCleanup();
return -1;
}
@ -606,13 +606,13 @@ static void umlNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
/**
* umlReload:
* umlStateReload:
*
* Function to restart the Uml daemon, it will recheck the configuration
* files and update its state and the networking
*/
static int
umlReload(void) {
umlStateReload(void) {
if (!uml_driver)
return 0;
@ -645,12 +645,12 @@ umlShutdownOneVM(virDomainObjPtr dom, void *opaque)
}
/**
* umlShutdown:
* umlStateCleanup:
*
* Shutdown the Uml daemon, it will stop all active domains and networks
*/
static int
umlShutdown(void) {
umlStateCleanup(void) {
if (!uml_driver)
return -1;
@ -1186,7 +1186,7 @@ static void umlShutdownVMDaemon(struct uml_driver *driver,
}
static virDrvOpenStatus umlOpen(virConnectPtr conn,
static virDrvOpenStatus umlConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1241,7 +1241,7 @@ static virDrvOpenStatus umlOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int umlClose(virConnectPtr conn) {
static int umlConnectClose(virConnectPtr conn) {
struct uml_driver *driver = conn->privateData;
umlDriverLock(driver);
@ -1253,32 +1253,32 @@ static int umlClose(virConnectPtr conn) {
return 0;
}
static const char *umlGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
static const char *umlConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
return "UML";
}
static int umlIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int umlConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int umlIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int umlConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int umlIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int umlConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static char *umlGetCapabilities(virConnectPtr conn) {
static char *umlConnectGetCapabilities(virConnectPtr conn) {
struct uml_driver *driver = (struct uml_driver *)conn->privateData;
char *xml;
@ -1469,7 +1469,7 @@ cleanup:
return ret;
}
static int umlGetVersion(virConnectPtr conn, unsigned long *version) {
static int umlConnectGetVersion(virConnectPtr conn, unsigned long *version) {
struct uml_driver *driver = conn->privateData;
struct utsname ut;
int ret = -1;
@ -1494,7 +1494,7 @@ cleanup:
return ret;
}
static int umlListDomains(virConnectPtr conn, int *ids, int nids) {
static int umlConnectListDomains(virConnectPtr conn, int *ids, int nids) {
struct uml_driver *driver = conn->privateData;
int n;
@ -1504,7 +1504,7 @@ static int umlListDomains(virConnectPtr conn, int *ids, int nids) {
return n;
}
static int umlNumDomains(virConnectPtr conn) {
static int umlConnectNumOfDomains(virConnectPtr conn) {
struct uml_driver *driver = conn->privateData;
int n;
@ -1514,7 +1514,7 @@ static int umlNumDomains(virConnectPtr conn) {
return n;
}
static virDomainPtr umlDomainCreate(virConnectPtr conn, const char *xml,
static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
unsigned int flags) {
struct uml_driver *driver = conn->privateData;
virDomainDefPtr def;
@ -1876,7 +1876,7 @@ cleanup:
}
static int umlListDefinedDomains(virConnectPtr conn,
static int umlConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
struct uml_driver *driver = conn->privateData;
int n;
@ -1888,7 +1888,7 @@ static int umlListDefinedDomains(virConnectPtr conn,
return n;
}
static int umlNumDefinedDomains(virConnectPtr conn) {
static int umlConnectNumOfDefinedDomains(virConnectPtr conn) {
struct uml_driver *driver = conn->privateData;
int n;
@ -1900,7 +1900,7 @@ static int umlNumDefinedDomains(virConnectPtr conn) {
}
static int umlDomainStartWithFlags(virDomainPtr dom, unsigned int flags) {
static int umlDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) {
struct uml_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
virDomainEventPtr event = NULL;
@ -1934,11 +1934,11 @@ cleanup:
return ret;
}
static int umlDomainStart(virDomainPtr dom) {
return umlDomainStartWithFlags(dom, 0);
static int umlDomainCreate(virDomainPtr dom) {
return umlDomainCreateWithFlags(dom, 0);
}
static virDomainPtr umlDomainDefine(virConnectPtr conn, const char *xml) {
static virDomainPtr umlDomainDefineXML(virConnectPtr conn, const char *xml) {
struct uml_driver *driver = conn->privateData;
virDomainDefPtr def;
virDomainObjPtr vm = NULL;
@ -2492,7 +2492,7 @@ cleanup:
static int
umlDomainEventRegister(virConnectPtr conn,
umlConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
@ -2510,7 +2510,7 @@ umlDomainEventRegister(virConnectPtr conn,
}
static int
umlDomainEventDeregister(virConnectPtr conn,
umlConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
struct uml_driver *driver = conn->privateData;
@ -2526,7 +2526,7 @@ umlDomainEventDeregister(virConnectPtr conn,
}
static int
umlDomainEventRegisterAny(virConnectPtr conn,
umlConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -2549,7 +2549,7 @@ umlDomainEventRegisterAny(virConnectPtr conn,
static int
umlDomainEventDeregisterAny(virConnectPtr conn,
umlConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct uml_driver *driver = conn->privateData;
@ -2572,7 +2572,7 @@ static void umlDomainEventQueue(struct uml_driver *driver,
virDomainEventStateQueue(driver->domainEventState, event);
}
static int umlListAllDomains(virConnectPtr conn,
static int umlConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -2593,17 +2593,17 @@ static int umlListAllDomains(virConnectPtr conn,
static virDriver umlDriver = {
.no = VIR_DRV_UML,
.name = "UML",
.connectOpen = umlOpen, /* 0.5.0 */
.connectClose = umlClose, /* 0.5.0 */
.connectGetType = umlGetType, /* 0.5.0 */
.connectGetVersion = umlGetVersion, /* 0.5.0 */
.connectOpen = umlConnectOpen, /* 0.5.0 */
.connectClose = umlConnectClose, /* 0.5.0 */
.connectGetType = umlConnectGetType, /* 0.5.0 */
.connectGetVersion = umlConnectGetVersion, /* 0.5.0 */
.connectGetHostname = virGetHostname, /* 0.5.0 */
.nodeGetInfo = nodeGetInfo, /* 0.5.0 */
.connectGetCapabilities = umlGetCapabilities, /* 0.5.0 */
.connectListDomains = umlListDomains, /* 0.5.0 */
.connectNumOfDomains = umlNumDomains, /* 0.5.0 */
.connectListAllDomains = umlListAllDomains, /* 0.9.13 */
.domainCreateXML = umlDomainCreate, /* 0.5.0 */
.connectGetCapabilities = umlConnectGetCapabilities, /* 0.5.0 */
.connectListDomains = umlConnectListDomains, /* 0.5.0 */
.connectNumOfDomains = umlConnectNumOfDomains, /* 0.5.0 */
.connectListAllDomains = umlConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = umlDomainCreateXML, /* 0.5.0 */
.domainLookupByID = umlDomainLookupByID, /* 0.5.0 */
.domainLookupByUUID = umlDomainLookupByUUID, /* 0.5.0 */
.domainLookupByName = umlDomainLookupByName, /* 0.5.0 */
@ -2618,11 +2618,11 @@ static virDriver umlDriver = {
.domainGetInfo = umlDomainGetInfo, /* 0.5.0 */
.domainGetState = umlDomainGetState, /* 0.9.2 */
.domainGetXMLDesc = umlDomainGetXMLDesc, /* 0.5.0 */
.connectListDefinedDomains = umlListDefinedDomains, /* 0.5.0 */
.connectNumOfDefinedDomains = umlNumDefinedDomains, /* 0.5.0 */
.domainCreate = umlDomainStart, /* 0.5.0 */
.domainCreateWithFlags = umlDomainStartWithFlags, /* 0.8.2 */
.domainDefineXML = umlDomainDefine, /* 0.5.0 */
.connectListDefinedDomains = umlConnectListDefinedDomains, /* 0.5.0 */
.connectNumOfDefinedDomains = umlConnectNumOfDefinedDomains, /* 0.5.0 */
.domainCreate = umlDomainCreate, /* 0.5.0 */
.domainCreateWithFlags = umlDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = umlDomainDefineXML, /* 0.5.0 */
.domainUndefine = umlDomainUndefine, /* 0.5.0 */
.domainUndefineFlags = umlDomainUndefineFlags, /* 0.9.4 */
.domainAttachDevice = umlDomainAttachDevice, /* 0.8.4 */
@ -2637,17 +2637,17 @@ static virDriver umlDriver = {
.nodeGetCellsFreeMemory = nodeGetCellsFreeMemory, /* 0.5.0 */
.nodeGetFreeMemory = nodeGetFreeMemory, /* 0.5.0 */
.nodeGetCPUMap = nodeGetCPUMap, /* 1.0.0 */
.connectDomainEventRegister = umlDomainEventRegister, /* 0.9.4 */
.connectDomainEventDeregister = umlDomainEventDeregister, /* 0.9.4 */
.connectIsEncrypted = umlIsEncrypted, /* 0.7.3 */
.connectIsSecure = umlIsSecure, /* 0.7.3 */
.connectDomainEventRegister = umlConnectDomainEventRegister, /* 0.9.4 */
.connectDomainEventDeregister = umlConnectDomainEventDeregister, /* 0.9.4 */
.connectIsEncrypted = umlConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = umlConnectIsSecure, /* 0.7.3 */
.domainIsActive = umlDomainIsActive, /* 0.7.3 */
.domainIsPersistent = umlDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = umlDomainIsUpdated, /* 0.8.6 */
.connectDomainEventRegisterAny = umlDomainEventRegisterAny, /* 0.9.4 */
.connectDomainEventDeregisterAny = umlDomainEventDeregisterAny, /* 0.9.4 */
.connectDomainEventRegisterAny = umlConnectDomainEventRegisterAny, /* 0.9.4 */
.connectDomainEventDeregisterAny = umlConnectDomainEventDeregisterAny, /* 0.9.4 */
.domainOpenConsole = umlDomainOpenConsole, /* 0.8.6 */
.connectIsAlive = umlIsAlive, /* 0.9.8 */
.connectIsAlive = umlConnectIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.nodeGetMemoryParameters = nodeGetMemoryParameters, /* 0.10.2 */
.nodeSetMemoryParameters = nodeSetMemoryParameters, /* 0.10.2 */
@ -2655,9 +2655,9 @@ static virDriver umlDriver = {
static virStateDriver umlStateDriver = {
.name = "UML",
.stateInitialize = umlStartup,
.stateCleanup = umlShutdown,
.stateReload = umlReload,
.stateInitialize = umlStateInitialize,
.stateCleanup = umlStateCleanup,
.stateReload = umlStateReload,
};
int umlRegister(void) {

View File

@ -141,7 +141,7 @@ int vboxRegister(void) {
return 0;
}
static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
static virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -184,5 +184,5 @@ static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
static virDriver vboxDriverDummy = {
VIR_DRV_VBOX,
"VBOX",
.connectOpen = vboxOpenDummy,
.connectOpen = vboxConnectOpen,
};

View File

@ -991,7 +991,7 @@ static void vboxUninitialize(vboxGlobalData *data) {
}
static virDrvOpenStatus vboxOpen(virConnectPtr conn,
static virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -1068,7 +1068,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int vboxClose(virConnectPtr conn) {
static int vboxConnectClose(virConnectPtr conn) {
vboxGlobalData *data = conn->privateData;
VIR_DEBUG("%s: in vboxClose",conn->driver->name);
@ -1078,7 +1078,7 @@ static int vboxClose(virConnectPtr conn) {
return 0;
}
static int vboxGetVersion(virConnectPtr conn, unsigned long *version) {
static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version) {
vboxGlobalData *data = conn->privateData;
VIR_DEBUG("%s: in vboxGetVersion",conn->driver->name);
@ -1089,22 +1089,22 @@ static int vboxGetVersion(virConnectPtr conn, unsigned long *version) {
return 0;
}
static int vboxIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED) {
static int vboxConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED) {
/* Driver is using local, non-network based transport */
return 1;
}
static int vboxIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED) {
static int vboxConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED) {
/* No encryption is needed, or used on the local transport*/
return 0;
}
static int vboxIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int vboxConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int vboxGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED) {
static int vboxConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED) {
VBOX_OBJECT_CHECK(conn, int, -1);
PRUint32 maxCPUCount = 0;
@ -1126,7 +1126,7 @@ static int vboxGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED
}
static char *vboxGetCapabilities(virConnectPtr conn) {
static char *vboxConnectGetCapabilities(virConnectPtr conn) {
VBOX_OBJECT_CHECK(conn, char *, NULL);
vboxDriverLock(data);
@ -1136,7 +1136,7 @@ static char *vboxGetCapabilities(virConnectPtr conn) {
return ret;
}
static int vboxListDomains(virConnectPtr conn, int *ids, int nids) {
static int vboxConnectListDomains(virConnectPtr conn, int *ids, int nids) {
VBOX_OBJECT_CHECK(conn, int, -1);
vboxArray machines = VBOX_ARRAY_INITIALIZER;
PRUint32 state;
@ -1173,7 +1173,7 @@ cleanup:
return ret;
}
static int vboxNumOfDomains(virConnectPtr conn) {
static int vboxConnectNumOfDomains(virConnectPtr conn) {
VBOX_OBJECT_CHECK(conn, int, -1);
vboxArray machines = VBOX_ARRAY_INITIALIZER;
PRUint32 state;
@ -3447,7 +3447,7 @@ cleanup:
return ret;
}
static int vboxListDefinedDomains(virConnectPtr conn, char ** const names, int maxnames) {
static int vboxConnectListDefinedDomains(virConnectPtr conn, char ** const names, int maxnames) {
VBOX_OBJECT_CHECK(conn, int, -1);
vboxArray machines = VBOX_ARRAY_INITIALIZER;
char *machineName = NULL;
@ -3499,7 +3499,7 @@ cleanup:
return ret;
}
static int vboxNumOfDefinedDomains(virConnectPtr conn) {
static int vboxConnectNumOfDefinedDomains(virConnectPtr conn) {
VBOX_OBJECT_CHECK(conn, int, -1);
vboxArray machines = VBOX_ARRAY_INITIALIZER;
PRUint32 state = MachineState_Null;
@ -7248,7 +7248,7 @@ static void vboxReadCallback(int watch ATTRIBUTE_UNUSED,
}
}
static int vboxDomainEventRegister(virConnectPtr conn,
static int vboxConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb) {
@ -7311,7 +7311,7 @@ static int vboxDomainEventRegister(virConnectPtr conn,
}
}
static int vboxDomainEventDeregister(virConnectPtr conn,
static int vboxConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback) {
VBOX_OBJECT_CHECK(conn, int, -1);
int cnt;
@ -7338,7 +7338,7 @@ static int vboxDomainEventDeregister(virConnectPtr conn,
return ret;
}
static int vboxDomainEventRegisterAny(virConnectPtr conn,
static int vboxConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -7405,7 +7405,7 @@ static int vboxDomainEventRegisterAny(virConnectPtr conn,
}
}
static int vboxDomainEventDeregisterAny(virConnectPtr conn,
static int vboxConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID) {
VBOX_OBJECT_CHECK(conn, int, -1);
int cnt;
@ -7467,7 +7467,7 @@ static int vboxNetworkClose(virConnectPtr conn) {
return 0;
}
static int vboxNumOfNetworks(virConnectPtr conn) {
static int vboxConnectNumOfNetworks(virConnectPtr conn) {
VBOX_OBJECT_HOST_CHECK(conn, int, 0);
vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER;
int i = 0;
@ -7500,7 +7500,7 @@ static int vboxNumOfNetworks(virConnectPtr conn) {
return ret;
}
static int vboxListNetworks(virConnectPtr conn, char **const names, int nnames) {
static int vboxConnectListNetworks(virConnectPtr conn, char **const names, int nnames) {
VBOX_OBJECT_HOST_CHECK(conn, int, 0);
vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER;
int i = 0;
@ -7549,7 +7549,7 @@ static int vboxListNetworks(virConnectPtr conn, char **const names, int nnames)
return ret;
}
static int vboxNumOfDefinedNetworks(virConnectPtr conn) {
static int vboxConnectNumOfDefinedNetworks(virConnectPtr conn) {
VBOX_OBJECT_HOST_CHECK(conn, int, 0);
vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER;
int i = 0;
@ -7582,7 +7582,7 @@ static int vboxNumOfDefinedNetworks(virConnectPtr conn) {
return ret;
}
static int vboxListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
static int vboxConnectListDefinedNetworks(virConnectPtr conn, char **const names, int nnames) {
VBOX_OBJECT_HOST_CHECK(conn, int, 0);
vboxArray networkInterfaces = VBOX_ARRAY_INITIALIZER;
int i = 0;
@ -8282,7 +8282,7 @@ static int vboxStorageClose(virConnectPtr conn) {
return 0;
}
static int vboxStorageNumOfPools(virConnectPtr conn ATTRIBUTE_UNUSED) {
static int vboxConnectNumOfStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED) {
/** Currently only one pool supported, the default one
* given by ISystemProperties::defaultHardDiskFolder()
@ -8291,7 +8291,7 @@ static int vboxStorageNumOfPools(virConnectPtr conn ATTRIBUTE_UNUSED) {
return 1;
}
static int vboxStorageListPools(virConnectPtr conn ATTRIBUTE_UNUSED,
static int vboxConnectListStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
int numActive = 0;
@ -8508,7 +8508,7 @@ static virStorageVolPtr vboxStorageVolLookupByKey(virConnectPtr conn, const char
VBOX_UTF16_TO_UTF8(hddNameUtf16, &hddNameUtf8);
if (hddNameUtf8) {
if (vboxStorageNumOfPools(conn) == 1) {
if (vboxConnectNumOfStoragePools(conn) == 1) {
ret = virGetStorageVol(conn, "default-pool", hddNameUtf8, key,
NULL, NULL);
VIR_DEBUG("Storage Volume Pool: %s", "default-pool");
@ -8581,7 +8581,7 @@ static virStorageVolPtr vboxStorageVolLookupByPath(virConnectPtr conn, const cha
/* TODO: currently only one default pool and thus
* the check below, change it when pools are supported
*/
if (vboxStorageNumOfPools(conn) == 1)
if (vboxConnectNumOfStoragePools(conn) == 1)
ret = virGetStorageVol(conn, "default-pool", hddNameUtf8, key,
NULL, NULL);
@ -9239,7 +9239,7 @@ endjob:
#define MATCH(FLAG) (flags & (FLAG))
static int
vboxListAllDomains(virConnectPtr conn,
vboxConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -9405,16 +9405,16 @@ no_memory:
virDriver NAME(Driver) = {
.no = VIR_DRV_VBOX,
.name = "VBOX",
.connectOpen = vboxOpen, /* 0.6.3 */
.connectClose = vboxClose, /* 0.6.3 */
.connectGetVersion = vboxGetVersion, /* 0.6.3 */
.connectOpen = vboxConnectOpen, /* 0.6.3 */
.connectClose = vboxConnectClose, /* 0.6.3 */
.connectGetVersion = vboxConnectGetVersion, /* 0.6.3 */
.connectGetHostname = virGetHostname, /* 0.6.3 */
.connectGetMaxVcpus = vboxGetMaxVcpus, /* 0.6.3 */
.connectGetMaxVcpus = vboxConnectGetMaxVcpus, /* 0.6.3 */
.nodeGetInfo = nodeGetInfo, /* 0.6.3 */
.connectGetCapabilities = vboxGetCapabilities, /* 0.6.3 */
.connectListDomains = vboxListDomains, /* 0.6.3 */
.connectNumOfDomains = vboxNumOfDomains, /* 0.6.3 */
.connectListAllDomains = vboxListAllDomains, /* 0.9.13 */
.connectGetCapabilities = vboxConnectGetCapabilities, /* 0.6.3 */
.connectListDomains = vboxConnectListDomains, /* 0.6.3 */
.connectNumOfDomains = vboxConnectNumOfDomains, /* 0.6.3 */
.connectListAllDomains = vboxConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = vboxDomainCreateXML, /* 0.6.3 */
.domainLookupByID = vboxDomainLookupByID, /* 0.6.3 */
.domainLookupByUUID = vboxDomainLookupByUUID, /* 0.6.3 */
@ -9436,8 +9436,8 @@ virDriver NAME(Driver) = {
.domainGetVcpusFlags = vboxDomainGetVcpusFlags, /* 0.8.5 */
.domainGetMaxVcpus = vboxDomainGetMaxVcpus, /* 0.7.1 */
.domainGetXMLDesc = vboxDomainGetXMLDesc, /* 0.6.3 */
.connectListDefinedDomains = vboxListDefinedDomains, /* 0.6.3 */
.connectNumOfDefinedDomains = vboxNumOfDefinedDomains, /* 0.6.3 */
.connectListDefinedDomains = vboxConnectListDefinedDomains, /* 0.6.3 */
.connectNumOfDefinedDomains = vboxConnectNumOfDefinedDomains, /* 0.6.3 */
.domainCreate = vboxDomainCreate, /* 0.6.3 */
.domainCreateWithFlags = vboxDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = vboxDomainDefineXML, /* 0.6.3 */
@ -9454,17 +9454,17 @@ virDriver NAME(Driver) = {
.domainScreenshot = vboxDomainScreenshot, /* 0.9.2 */
#endif
#if VBOX_API_VERSION > 2002 && VBOX_API_VERSION < 4000
.connectDomainEventRegister = vboxDomainEventRegister, /* 0.7.0 */
.connectDomainEventDeregister = vboxDomainEventDeregister, /* 0.7.0 */
.connectDomainEventRegister = vboxConnectDomainEventRegister, /* 0.7.0 */
.connectDomainEventDeregister = vboxConnectDomainEventDeregister, /* 0.7.0 */
#endif
.connectIsEncrypted = vboxIsEncrypted, /* 0.7.3 */
.connectIsSecure = vboxIsSecure, /* 0.7.3 */
.connectIsEncrypted = vboxConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = vboxConnectIsSecure, /* 0.7.3 */
.domainIsActive = vboxDomainIsActive, /* 0.7.3 */
.domainIsPersistent = vboxDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = vboxDomainIsUpdated, /* 0.8.6 */
#if VBOX_API_VERSION > 2002 && VBOX_API_VERSION < 4000
.connectDomainEventRegisterAny = vboxDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = vboxDomainEventDeregisterAny, /* 0.8.0 */
.connectDomainEventRegisterAny = vboxConnectDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = vboxConnectDomainEventDeregisterAny, /* 0.8.0 */
#endif
.domainSnapshotCreateXML = vboxDomainSnapshotCreateXML, /* 0.8.0 */
.domainSnapshotGetXMLDesc = vboxDomainSnapshotGetXMLDesc, /* 0.8.0 */
@ -9478,17 +9478,17 @@ virDriver NAME(Driver) = {
.domainSnapshotHasMetadata = vboxDomainSnapshotHasMetadata, /* 0.9.13 */
.domainRevertToSnapshot = vboxDomainRevertToSnapshot, /* 0.8.0 */
.domainSnapshotDelete = vboxDomainSnapshotDelete, /* 0.8.0 */
.connectIsAlive = vboxIsAlive, /* 0.9.8 */
.connectIsAlive = vboxConnectIsAlive, /* 0.9.8 */
};
virNetworkDriver NAME(NetworkDriver) = {
"VBOX",
.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 */
.connectListDefinedNetworks = vboxListDefinedNetworks, /* 0.6.4 */
.connectNumOfNetworks = vboxConnectNumOfNetworks, /* 0.6.4 */
.connectListNetworks = vboxConnectListNetworks, /* 0.6.4 */
.connectNumOfDefinedNetworks = vboxConnectNumOfDefinedNetworks, /* 0.6.4 */
.connectListDefinedNetworks = vboxConnectListDefinedNetworks, /* 0.6.4 */
.networkLookupByUUID = vboxNetworkLookupByUUID, /* 0.6.4 */
.networkLookupByName = vboxNetworkLookupByName, /* 0.6.4 */
.networkCreateXML = vboxNetworkCreateXML, /* 0.6.4 */
@ -9503,8 +9503,8 @@ virStorageDriver NAME(StorageDriver) = {
.name = "VBOX",
.storageOpen = vboxStorageOpen, /* 0.7.1 */
.storageClose = vboxStorageClose, /* 0.7.1 */
.connectNumOfStoragePools = vboxStorageNumOfPools, /* 0.7.1 */
.connectListStoragePools = vboxStorageListPools, /* 0.7.1 */
.connectNumOfStoragePools = vboxConnectNumOfStoragePools, /* 0.7.1 */
.connectListStoragePools = vboxConnectListStoragePools, /* 0.7.1 */
.storagePoolLookupByName = vboxStoragePoolLookupByName, /* 0.7.1 */
.storagePoolNumOfVolumes = vboxStoragePoolNumOfVolumes, /* 0.7.1 */
.storagePoolListVolumes = vboxStoragePoolListVolumes, /* 0.7.1 */

View File

@ -82,7 +82,7 @@ vmwareDomainXMLConfigInit(void)
}
static virDrvOpenStatus
vmwareOpen(virConnectPtr conn,
vmwareConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
@ -162,7 +162,7 @@ vmwareOpen(virConnectPtr conn,
};
static int
vmwareClose(virConnectPtr conn)
vmwareConnectClose(virConnectPtr conn)
{
struct vmware_driver *driver = conn->privateData;
@ -174,13 +174,13 @@ vmwareClose(virConnectPtr conn)
}
static const char *
vmwareGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
vmwareConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return "VMware";
}
static int
vmwareGetVersion(virConnectPtr conn, unsigned long *version)
vmwareConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
struct vmware_driver *driver = conn->privateData;
@ -430,6 +430,19 @@ vmwareDomainShutdown(virDomainPtr dom)
return vmwareDomainShutdownFlags(dom, 0);
}
static int
vmwareDomainDestroy(virDomainPtr dom)
{
return vmwareDomainShutdownFlags(dom, 0);
}
static int
vmwareDomainDestroyFlags(virDomainPtr dom,
unsigned int flags)
{
return vmwareDomainShutdownFlags(dom, flags);
}
static int
vmwareDomainSuspend(virDomainPtr dom)
{
@ -773,7 +786,7 @@ vmwareDomainLookupByID(virConnectPtr conn, int id)
}
static char *
vmwareGetOSType(virDomainPtr dom)
vmwareDomainGetOSType(virDomainPtr dom)
{
struct vmware_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -924,7 +937,7 @@ vmwareDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
}
static char *
vmwareDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
{
@ -969,7 +982,7 @@ vmwareDomainObjListUpdateAll(virDomainObjListPtr doms, struct vmware_driver *dri
}
static int
vmwareNumDefinedDomains(virConnectPtr conn)
vmwareConnectNumOfDefinedDomains(virConnectPtr conn)
{
struct vmware_driver *driver = conn->privateData;
int n;
@ -983,7 +996,7 @@ vmwareNumDefinedDomains(virConnectPtr conn)
}
static int
vmwareNumDomains(virConnectPtr conn)
vmwareConnectNumOfDomains(virConnectPtr conn)
{
struct vmware_driver *driver = conn->privateData;
int n;
@ -998,7 +1011,7 @@ vmwareNumDomains(virConnectPtr conn)
static int
vmwareListDomains(virConnectPtr conn, int *ids, int nids)
vmwareConnectListDomains(virConnectPtr conn, int *ids, int nids)
{
struct vmware_driver *driver = conn->privateData;
int n;
@ -1012,7 +1025,7 @@ vmwareListDomains(virConnectPtr conn, int *ids, int nids)
}
static int
vmwareListDefinedDomains(virConnectPtr conn,
vmwareConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
{
struct vmware_driver *driver = conn->privateData;
@ -1093,13 +1106,13 @@ vmwareDomainGetState(virDomainPtr dom,
}
static int
vmwareIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
vmwareConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int
vmwareListAllDomains(virConnectPtr conn,
vmwareConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
@ -1120,13 +1133,13 @@ vmwareListAllDomains(virConnectPtr conn,
static virDriver vmwareDriver = {
.no = VIR_DRV_VMWARE,
.name = "VMWARE",
.connectOpen = vmwareOpen, /* 0.8.7 */
.connectClose = vmwareClose, /* 0.8.7 */
.connectGetType = vmwareGetType, /* 0.8.7 */
.connectGetVersion = vmwareGetVersion, /* 0.8.7 */
.connectListDomains = vmwareListDomains, /* 0.8.7 */
.connectNumOfDomains = vmwareNumDomains, /* 0.8.7 */
.connectListAllDomains = vmwareListAllDomains, /* 0.9.13 */
.connectOpen = vmwareConnectOpen, /* 0.8.7 */
.connectClose = vmwareConnectClose, /* 0.8.7 */
.connectGetType = vmwareConnectGetType, /* 0.8.7 */
.connectGetVersion = vmwareConnectGetVersion, /* 0.8.7 */
.connectListDomains = vmwareConnectListDomains, /* 0.8.7 */
.connectNumOfDomains = vmwareConnectNumOfDomains, /* 0.8.7 */
.connectListAllDomains = vmwareConnectListAllDomains, /* 0.9.13 */
.domainCreateXML = vmwareDomainCreateXML, /* 0.8.7 */
.domainLookupByID = vmwareDomainLookupByID, /* 0.8.7 */
.domainLookupByUUID = vmwareDomainLookupByUUID, /* 0.8.7 */
@ -1136,15 +1149,15 @@ static virDriver vmwareDriver = {
.domainShutdown = vmwareDomainShutdown, /* 0.8.7 */
.domainShutdownFlags = vmwareDomainShutdownFlags, /* 0.9.10 */
.domainReboot = vmwareDomainReboot, /* 0.8.7 */
.domainDestroy = vmwareDomainShutdown, /* 0.8.7 */
.domainDestroyFlags = vmwareDomainShutdownFlags, /* 0.9.4 */
.domainGetOSType = vmwareGetOSType, /* 0.8.7 */
.domainDestroy = vmwareDomainDestroy, /* 0.8.7 */
.domainDestroyFlags = vmwareDomainDestroyFlags, /* 0.9.4 */
.domainGetOSType = vmwareDomainGetOSType, /* 0.8.7 */
.domainGetInfo = vmwareDomainGetInfo, /* 0.8.7 */
.domainGetState = vmwareDomainGetState, /* 0.9.2 */
.domainGetXMLDesc = vmwareDomainGetXMLDesc, /* 0.8.7 */
.connectDomainXMLFromNative = vmwareDomainXMLFromNative, /* 0.9.11 */
.connectListDefinedDomains = vmwareListDefinedDomains, /* 0.8.7 */
.connectNumOfDefinedDomains = vmwareNumDefinedDomains, /* 0.8.7 */
.connectDomainXMLFromNative = vmwareConnectDomainXMLFromNative, /* 0.9.11 */
.connectListDefinedDomains = vmwareConnectListDefinedDomains, /* 0.8.7 */
.connectNumOfDefinedDomains = vmwareConnectNumOfDefinedDomains, /* 0.8.7 */
.domainCreate = vmwareDomainCreate, /* 0.8.7 */
.domainCreateWithFlags = vmwareDomainCreateWithFlags, /* 0.8.7 */
.domainDefineXML = vmwareDomainDefineXML, /* 0.8.7 */
@ -1152,7 +1165,7 @@ static virDriver vmwareDriver = {
.domainUndefineFlags = vmwareDomainUndefineFlags, /* 0.9.4 */
.domainIsActive = vmwareDomainIsActive, /* 0.8.7 */
.domainIsPersistent = vmwareDomainIsPersistent, /* 0.8.7 */
.connectIsAlive = vmwareIsAlive, /* 0.9.8 */
.connectIsAlive = vmwareConnectIsAlive, /* 0.9.8 */
};
int

View File

@ -203,7 +203,7 @@ done:
#ifdef WITH_LIBVIRTD
static int
xenInitialize(bool privileged ATTRIBUTE_UNUSED,
xenUnifiedStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
@ -213,7 +213,7 @@ xenInitialize(bool privileged ATTRIBUTE_UNUSED,
static virStateDriver state_driver = {
.name = "Xen",
.stateInitialize = xenInitialize,
.stateInitialize = xenUnifiedStateInitialize,
};
#endif
@ -296,7 +296,7 @@ xenDomainXMLConfInit(void)
static virDrvOpenStatus
xenUnifiedOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
{
int i, ret = VIR_DRV_OPEN_DECLINED;
xenUnifiedPrivatePtr priv;
@ -474,7 +474,7 @@ clean:
xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) (conn)->privateData
static int
xenUnifiedClose(virConnectPtr conn)
xenUnifiedConnectClose(virConnectPtr conn)
{
GET_PRIVATE(conn);
int i;
@ -506,7 +506,7 @@ unsigned long xenUnifiedVersion(void)
static const char *
xenUnifiedType(virConnectPtr conn)
xenUnifiedConnectGetType(virConnectPtr conn)
{
GET_PRIVATE(conn);
int i;
@ -520,7 +520,7 @@ xenUnifiedType(virConnectPtr conn)
/* Which features are supported by this driver? */
static int
xenUnifiedSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
xenUnifiedConnectSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
{
switch (feature) {
case VIR_DRV_FEATURE_MIGRATION_V1:
@ -532,7 +532,7 @@ xenUnifiedSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
}
static int
xenUnifiedGetVersion(virConnectPtr conn, unsigned long *hvVer)
xenUnifiedConnectGetVersion(virConnectPtr conn, unsigned long *hvVer)
{
GET_PRIVATE(conn);
int i;
@ -547,13 +547,13 @@ xenUnifiedGetVersion(virConnectPtr conn, unsigned long *hvVer)
}
static int
xenUnifiedIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
xenUnifiedConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 0;
}
static int
xenUnifiedIsSecure(virConnectPtr conn)
xenUnifiedConnectIsSecure(virConnectPtr conn)
{
GET_PRIVATE(conn);
int ret = 1;
@ -567,14 +567,14 @@ xenUnifiedIsSecure(virConnectPtr conn)
}
static int
xenUnifiedIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
xenUnifiedConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* XenD reconnects for each request */
return 1;
}
int
xenUnifiedGetMaxVcpus(virConnectPtr conn, const char *type)
xenUnifiedConnectGetMaxVcpus(virConnectPtr conn, const char *type)
{
GET_PRIVATE(conn);
@ -602,7 +602,7 @@ xenUnifiedNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
}
static char *
xenUnifiedGetCapabilities(virConnectPtr conn)
xenUnifiedConnectGetCapabilities(virConnectPtr conn)
{
xenUnifiedPrivatePtr priv = conn->privateData;
char *xml;
@ -616,7 +616,7 @@ xenUnifiedGetCapabilities(virConnectPtr conn)
}
static int
xenUnifiedListDomains(virConnectPtr conn, int *ids, int maxids)
xenUnifiedConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
GET_PRIVATE(conn);
int ret;
@ -643,7 +643,7 @@ xenUnifiedListDomains(virConnectPtr conn, int *ids, int maxids)
}
static int
xenUnifiedNumOfDomains(virConnectPtr conn)
xenUnifiedConnectNumOfDomains(virConnectPtr conn)
{
GET_PRIVATE(conn);
int ret;
@ -1392,7 +1392,7 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
static char *
xenUnifiedDomainXMLFromNative(virConnectPtr conn,
xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
@ -1444,7 +1444,7 @@ cleanup:
#define MAX_CONFIG_SIZE (1024 * 65)
static char *
xenUnifiedDomainXMLToNative(virConnectPtr conn,
xenUnifiedConnectDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
@ -1590,7 +1590,7 @@ failure:
}
static int
xenUnifiedListDefinedDomains(virConnectPtr conn, char **const names,
xenUnifiedConnectListDefinedDomains(virConnectPtr conn, char **const names,
int maxnames)
{
GET_PRIVATE(conn);
@ -1607,7 +1607,7 @@ xenUnifiedListDefinedDomains(virConnectPtr conn, char **const names,
}
static int
xenUnifiedNumOfDefinedDomains(virConnectPtr conn)
xenUnifiedConnectNumOfDefinedDomains(virConnectPtr conn)
{
GET_PRIVATE(conn);
int i;
@ -1988,7 +1988,7 @@ xenUnifiedNodeGetFreeMemory(virConnectPtr conn)
static int
xenUnifiedDomainEventRegister(virConnectPtr conn,
xenUnifiedConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freefunc)
@ -2013,7 +2013,7 @@ xenUnifiedDomainEventRegister(virConnectPtr conn,
static int
xenUnifiedDomainEventDeregister(virConnectPtr conn,
xenUnifiedConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
int ret;
@ -2036,7 +2036,7 @@ xenUnifiedDomainEventDeregister(virConnectPtr conn,
static int
xenUnifiedDomainEventRegisterAny(virConnectPtr conn,
xenUnifiedConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
@ -2064,7 +2064,7 @@ xenUnifiedDomainEventRegisterAny(virConnectPtr conn,
}
static int
xenUnifiedDomainEventDeregisterAny(virConnectPtr conn,
xenUnifiedConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
int ret;
@ -2168,7 +2168,7 @@ xenUnifiedNodeDeviceAssignedDomainId(virNodeDevicePtr dev)
xenUnifiedPrivatePtr priv = conn->privateData;
/* Get active domains */
numdomains = xenUnifiedNumOfDomains(conn);
numdomains = xenUnifiedConnectNumOfDomains(conn);
if (numdomains < 0) {
return ret;
}
@ -2177,7 +2177,7 @@ xenUnifiedNodeDeviceAssignedDomainId(virNodeDevicePtr dev)
virReportOOMError();
goto out;
}
if ((numdomains = xenUnifiedListDomains(conn, &ids[0], numdomains)) < 0) {
if ((numdomains = xenUnifiedConnectListDomains(conn, &ids[0], numdomains)) < 0) {
goto out;
}
}
@ -2330,17 +2330,17 @@ cleanup:
static virDriver xenUnifiedDriver = {
.no = VIR_DRV_XEN_UNIFIED,
.name = "Xen",
.connectOpen = xenUnifiedOpen, /* 0.0.3 */
.connectClose = xenUnifiedClose, /* 0.0.3 */
.connectSupportsFeature = xenUnifiedSupportsFeature, /* 0.3.2 */
.connectGetType = xenUnifiedType, /* 0.0.3 */
.connectGetVersion = xenUnifiedGetVersion, /* 0.0.3 */
.connectOpen = xenUnifiedConnectOpen, /* 0.0.3 */
.connectClose = xenUnifiedConnectClose, /* 0.0.3 */
.connectSupportsFeature = xenUnifiedConnectSupportsFeature, /* 0.3.2 */
.connectGetType = xenUnifiedConnectGetType, /* 0.0.3 */
.connectGetVersion = xenUnifiedConnectGetVersion, /* 0.0.3 */
.connectGetHostname = virGetHostname, /* 0.7.3 */
.connectGetMaxVcpus = xenUnifiedGetMaxVcpus, /* 0.2.1 */
.connectGetMaxVcpus = xenUnifiedConnectGetMaxVcpus, /* 0.2.1 */
.nodeGetInfo = xenUnifiedNodeGetInfo, /* 0.1.0 */
.connectGetCapabilities = xenUnifiedGetCapabilities, /* 0.2.1 */
.connectListDomains = xenUnifiedListDomains, /* 0.0.3 */
.connectNumOfDomains = xenUnifiedNumOfDomains, /* 0.0.3 */
.connectGetCapabilities = xenUnifiedConnectGetCapabilities, /* 0.2.1 */
.connectListDomains = xenUnifiedConnectListDomains, /* 0.0.3 */
.connectNumOfDomains = xenUnifiedConnectNumOfDomains, /* 0.0.3 */
.domainCreateXML = xenUnifiedDomainCreateXML, /* 0.0.3 */
.domainLookupByID = xenUnifiedDomainLookupByID, /* 0.0.3 */
.domainLookupByUUID = xenUnifiedDomainLookupByUUID, /* 0.0.5 */
@ -2373,10 +2373,10 @@ static virDriver xenUnifiedDriver = {
.domainGetVcpus = xenUnifiedDomainGetVcpus, /* 0.1.4 */
.domainGetMaxVcpus = xenUnifiedDomainGetMaxVcpus, /* 0.2.1 */
.domainGetXMLDesc = xenUnifiedDomainGetXMLDesc, /* 0.0.3 */
.connectDomainXMLFromNative = xenUnifiedDomainXMLFromNative, /* 0.6.4 */
.connectDomainXMLToNative = xenUnifiedDomainXMLToNative, /* 0.6.4 */
.connectListDefinedDomains = xenUnifiedListDefinedDomains, /* 0.1.1 */
.connectNumOfDefinedDomains = xenUnifiedNumOfDefinedDomains, /* 0.1.5 */
.connectDomainXMLFromNative = xenUnifiedConnectDomainXMLFromNative, /* 0.6.4 */
.connectDomainXMLToNative = xenUnifiedConnectDomainXMLToNative, /* 0.6.4 */
.connectListDefinedDomains = xenUnifiedConnectListDefinedDomains, /* 0.1.1 */
.connectNumOfDefinedDomains = xenUnifiedConnectNumOfDefinedDomains, /* 0.1.5 */
.domainCreate = xenUnifiedDomainCreate, /* 0.1.1 */
.domainCreateWithFlags = xenUnifiedDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = xenUnifiedDomainDefineXML, /* 0.1.1 */
@ -2402,20 +2402,20 @@ static virDriver xenUnifiedDriver = {
.domainBlockPeek = xenUnifiedDomainBlockPeek, /* 0.4.4 */
.nodeGetCellsFreeMemory = xenUnifiedNodeGetCellsFreeMemory, /* 0.3.3 */
.nodeGetFreeMemory = xenUnifiedNodeGetFreeMemory, /* 0.3.3 */
.connectDomainEventRegister = xenUnifiedDomainEventRegister, /* 0.5.0 */
.connectDomainEventDeregister = xenUnifiedDomainEventDeregister, /* 0.5.0 */
.connectDomainEventRegister = xenUnifiedConnectDomainEventRegister, /* 0.5.0 */
.connectDomainEventDeregister = xenUnifiedConnectDomainEventDeregister, /* 0.5.0 */
.nodeDeviceDettach = xenUnifiedNodeDeviceDettach, /* 0.6.1 */
.nodeDeviceReAttach = xenUnifiedNodeDeviceReAttach, /* 0.6.1 */
.nodeDeviceReset = xenUnifiedNodeDeviceReset, /* 0.6.1 */
.connectIsEncrypted = xenUnifiedIsEncrypted, /* 0.7.3 */
.connectIsSecure = xenUnifiedIsSecure, /* 0.7.3 */
.connectIsEncrypted = xenUnifiedConnectIsEncrypted, /* 0.7.3 */
.connectIsSecure = xenUnifiedConnectIsSecure, /* 0.7.3 */
.domainIsActive = xenUnifiedDomainIsActive, /* 0.7.3 */
.domainIsPersistent = xenUnifiedDomainIsPersistent, /* 0.7.3 */
.domainIsUpdated = xenUnifiedDomainIsUpdated, /* 0.8.6 */
.connectDomainEventRegisterAny = xenUnifiedDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = xenUnifiedDomainEventDeregisterAny, /* 0.8.0 */
.connectDomainEventRegisterAny = xenUnifiedConnectDomainEventRegisterAny, /* 0.8.0 */
.connectDomainEventDeregisterAny = xenUnifiedConnectDomainEventDeregisterAny, /* 0.8.0 */
.domainOpenConsole = xenUnifiedDomainOpenConsole, /* 0.8.6 */
.connectIsAlive = xenUnifiedIsAlive, /* 0.9.8 */
.connectIsAlive = xenUnifiedConnectIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.nodeGetMemoryParameters = nodeGetMemoryParameters, /* 0.10.2 */
.nodeSetMemoryParameters = nodeSetMemoryParameters, /* 0.10.2 */

View File

@ -238,7 +238,7 @@ int xenUnifiedRemoveDomainInfo(xenUnifiedDomainInfoListPtr info,
void xenUnifiedDomainEventDispatch (xenUnifiedPrivatePtr priv,
virDomainEventPtr event);
unsigned long xenUnifiedVersion(void);
int xenUnifiedGetMaxVcpus(virConnectPtr conn, const char *type);
int xenUnifiedConnectGetMaxVcpus(virConnectPtr conn, const char *type);
void xenUnifiedLock(xenUnifiedPrivatePtr priv);
void xenUnifiedUnlock(xenUnifiedPrivatePtr priv);

View File

@ -707,7 +707,7 @@ xenXMDomainSetVcpusFlags(virDomainPtr domain,
goto cleanup;
/* Hypervisor maximum. */
if ((max = xenUnifiedGetMaxVcpus(domain->conn, NULL)) < 0) {
if ((max = xenUnifiedConnectGetMaxVcpus(domain->conn, NULL)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not determine max vcpus for the domain"));
goto cleanup;

View File

@ -102,13 +102,13 @@ getCapsObject(void)
}
/*
* XenapiOpen
* xenapiConnectOpen
*
* Authenticates and creates a session with the server
* Return VIR_DRV_OPEN_SUCCESS on success, else VIR_DRV_OPEN_ERROR
*/
static virDrvOpenStatus
xenapiOpen(virConnectPtr conn, virConnectAuthPtr auth,
xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
{
char *username = NULL;
@ -237,13 +237,13 @@ xenapiOpen(virConnectPtr conn, virConnectAuthPtr auth,
}
/*
* xenapiClose:
* xenapiConnectClose:
*
* Returns 0 on successful session logout
*
*/
static int
xenapiClose(virConnectPtr conn)
xenapiConnectClose(virConnectPtr conn)
{
struct _xenapiPrivate *priv = conn->privateData;
@ -265,12 +265,12 @@ xenapiClose(virConnectPtr conn)
/*
*
* xenapiSupportsFeature
* xenapiConnectSupportsFeature
*
* Returns 0
*/
static int
xenapiSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
xenapiConnectSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
{
switch (feature) {
case VIR_DRV_FEATURE_MIGRATION_V2:
@ -281,26 +281,26 @@ xenapiSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, int feature)
}
/*
* xenapiType:
* xenapiConnectGetType:
*
*
* Returns name of the driver
*/
static const char *
xenapiType(virConnectPtr conn ATTRIBUTE_UNUSED)
xenapiConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return "XenAPI";
}
/*
* xenapiGetVersion:
* xenapiConnectGetVersion:
*
* Gets the version of XenAPI
*
*/
static int
xenapiGetVersion(virConnectPtr conn, unsigned long *hvVer)
xenapiConnectGetVersion(virConnectPtr conn, unsigned long *hvVer)
{
xen_host host;
xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
@ -346,13 +346,13 @@ xenapiGetVersion(virConnectPtr conn, unsigned long *hvVer)
/*
* xenapiGetHostname:
* xenapiConnectGetHostname:
*
*
* Returns the hostname on success, or NULL on failure
*/
static char *
xenapiGetHostname(virConnectPtr conn)
xenapiConnectGetHostname(virConnectPtr conn)
{
char *result = NULL;
xen_host host;
@ -369,13 +369,13 @@ xenapiGetHostname(virConnectPtr conn)
/*
* xenapiGetMaxVcpus:
* xenapiConnectGetMaxVcpus:
*
*
* Returns a hardcoded value for Maximum VCPUS
*/
static int
xenapiGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type ATTRIBUTE_UNUSED)
xenapiConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type ATTRIBUTE_UNUSED)
{
/* this is hardcoded for simplicity and set to a resonable value compared
to the actual value */
@ -435,13 +435,13 @@ xenapiNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
}
/*
* xenapiGetCapabilities:
* xenapiConnectGetCapabilities:
*
*
* Returns capabilities as an XML string
*/
static char *
xenapiGetCapabilities(virConnectPtr conn)
xenapiConnectGetCapabilities(virConnectPtr conn)
{
virCapsPtr caps = ((struct _xenapiPrivate *)(conn->privateData))->caps;
@ -458,13 +458,13 @@ xenapiGetCapabilities(virConnectPtr conn)
/*
* xenapiListDomains
* xenapiConnectListDomains
*
* Collects the list of active domains, and store their ID in @maxids
* Returns the number of domain found or -1 in case of error
*/
static int
xenapiListDomains(virConnectPtr conn, int *ids, int maxids)
xenapiConnectListDomains(virConnectPtr conn, int *ids, int maxids)
{
/* vm.list */
xen_host host;
@ -495,13 +495,13 @@ xenapiListDomains(virConnectPtr conn, int *ids, int maxids)
}
/*
* xenapiNumOfDomains
* xenapiConnectNumOfDomains
*
*
* Returns the number of domains found or -1 in case of error
*/
static int
xenapiNumOfDomains(virConnectPtr conn)
xenapiConnectNumOfDomains(virConnectPtr conn)
{
/* #(vm.list) */
xen_vm_set *result = NULL;
@ -1324,7 +1324,7 @@ xenapiDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
if (state == XEN_VM_POWER_STATE_RUNNING) {
xen_vm_get_vcpus_max(session, &maxvcpu, vm);
} else {
maxvcpu = xenapiGetMaxVcpus(dom->conn, NULL);
maxvcpu = xenapiConnectGetMaxVcpus(dom->conn, NULL);
}
xen_vm_set_free(vms);
return (int)maxvcpu;
@ -1549,13 +1549,13 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
}
/*
* xenapiListDefinedDomains
* xenapiConnectListDefinedDomains
*
* list the defined but inactive domains, stores the pointers to the names in @names
* Returns number of names provided in the array or -1 in case of error
*/
static int
xenapiListDefinedDomains(virConnectPtr conn, char **const names,
xenapiConnectListDefinedDomains(virConnectPtr conn, char **const names,
int maxnames)
{
int i,j=0,doms;
@ -1596,13 +1596,13 @@ xenapiListDefinedDomains(virConnectPtr conn, char **const names,
}
/*
* xenapiNumOfDefinedDomains
* xenapiConnectNumOfDefinedDomains
*
* Provides the number of defined but inactive domains
* Returns number of domains found on success or -1 in case of error
*/
static int
xenapiNumOfDefinedDomains(virConnectPtr conn)
xenapiConnectNumOfDefinedDomains(virConnectPtr conn)
{
xen_vm_set *result;
xen_vm_record *record;
@ -1920,7 +1920,7 @@ xenapiNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *freeMems,
}
static int
xenapiIsAlive(virConnectPtr conn)
xenapiConnectIsAlive(virConnectPtr conn)
{
struct _xenapiPrivate *priv = conn->privateData;
@ -1934,17 +1934,17 @@ xenapiIsAlive(virConnectPtr conn)
static virDriver xenapiDriver = {
.no = VIR_DRV_XENAPI,
.name = "XenAPI",
.connectOpen = xenapiOpen, /* 0.8.0 */
.connectClose = xenapiClose, /* 0.8.0 */
.connectSupportsFeature = xenapiSupportsFeature, /* 0.8.0 */
.connectGetType = xenapiType, /* 0.8.0 */
.connectGetVersion = xenapiGetVersion, /* 0.8.0 */
.connectGetHostname = xenapiGetHostname, /* 0.8.0 */
.connectGetMaxVcpus = xenapiGetMaxVcpus, /* 0.8.0 */
.connectOpen = xenapiConnectOpen, /* 0.8.0 */
.connectClose = xenapiConnectClose, /* 0.8.0 */
.connectSupportsFeature = xenapiConnectSupportsFeature, /* 0.8.0 */
.connectGetType = xenapiConnectGetType, /* 0.8.0 */
.connectGetVersion = xenapiConnectGetVersion, /* 0.8.0 */
.connectGetHostname = xenapiConnectGetHostname, /* 0.8.0 */
.connectGetMaxVcpus = xenapiConnectGetMaxVcpus, /* 0.8.0 */
.nodeGetInfo = xenapiNodeGetInfo, /* 0.8.0 */
.connectGetCapabilities = xenapiGetCapabilities, /* 0.8.0 */
.connectListDomains = xenapiListDomains, /* 0.8.0 */
.connectNumOfDomains = xenapiNumOfDomains, /* 0.8.0 */
.connectGetCapabilities = xenapiConnectGetCapabilities, /* 0.8.0 */
.connectListDomains = xenapiConnectListDomains, /* 0.8.0 */
.connectNumOfDomains = xenapiConnectNumOfDomains, /* 0.8.0 */
.domainCreateXML = xenapiDomainCreateXML, /* 0.8.0 */
.domainLookupByID = xenapiDomainLookupByID, /* 0.8.0 */
.domainLookupByUUID = xenapiDomainLookupByUUID, /* 0.8.0 */
@ -1968,8 +1968,8 @@ static virDriver xenapiDriver = {
.domainGetVcpus = xenapiDomainGetVcpus, /* 0.8.0 */
.domainGetMaxVcpus = xenapiDomainGetMaxVcpus, /* 0.8.0 */
.domainGetXMLDesc = xenapiDomainGetXMLDesc, /* 0.8.0 */
.connectListDefinedDomains = xenapiListDefinedDomains, /* 0.8.0 */
.connectNumOfDefinedDomains = xenapiNumOfDefinedDomains, /* 0.8.0 */
.connectListDefinedDomains = xenapiConnectListDefinedDomains, /* 0.8.0 */
.connectNumOfDefinedDomains = xenapiConnectNumOfDefinedDomains, /* 0.8.0 */
.domainCreate = xenapiDomainCreate, /* 0.8.0 */
.domainCreateWithFlags = xenapiDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = xenapiDomainDefineXML, /* 0.8.0 */
@ -1981,7 +1981,7 @@ static virDriver xenapiDriver = {
.nodeGetCellsFreeMemory = xenapiNodeGetCellsFreeMemory, /* 0.8.0 */
.nodeGetFreeMemory = xenapiNodeGetFreeMemory, /* 0.8.0 */
.domainIsUpdated = xenapiDomainIsUpdated, /* 0.8.6 */
.connectIsAlive = xenapiIsAlive, /* 0.9.8 */
.connectIsAlive = xenapiConnectIsAlive, /* 0.9.8 */
};
/**