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,9 +40,9 @@
static virDrvOpenStatus
esxDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
esxNodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,8 +925,8 @@ esxConnectToVCenter(esxPrivate *priv,
* socks5. The optional <port> part allows to override the default port 1080.
*/
static virDrvOpenStatus
esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
char *plus;
@ -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,9 +2807,9 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
static char *
esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
{
esxPrivate *priv = conn->privateData;
virVMXContext ctx;
@ -2849,9 +2849,9 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
static char *
esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
const char *domainXml,
unsigned int flags)
esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
const char *domainXml,
unsigned int flags)
{
esxPrivate *priv = conn->privateData;
int virtualHW_version;
@ -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,9 +5004,9 @@ esxDomainGetMemoryParameters(virDomainPtr domain, virTypedParameterPtr params,
#define MATCH(FLAG) (flags & (FLAG))
static int
esxListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
esxConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
int ret = -1;
esxPrivate *priv = conn->privateData;
@ -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,9 +153,9 @@ esxNumberOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
esxConnectListDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
/* ESX interfaces are always active */
return 0;
@ -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,9 +161,9 @@ esxNumberOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
esxConnectListDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
/* ESX networks are always active */
return 0;
@ -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,9 +162,9 @@ esxNumberOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
esxListDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
esxConnectListDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names ATTRIBUTE_UNUSED,
int maxnames ATTRIBUTE_UNUSED)
{
/* ESX storage pools are always active */
return 0;
@ -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,8 +341,8 @@ esxStoragePoolNumberOfStorageVolumes(virStoragePoolPtr pool)
static int
esxStoragePoolListStorageVolumes(virStoragePoolPtr pool, char **const names,
int maxnames)
esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int maxnames)
{
esxPrivate *priv = pool->conn->storagePrivateData;
virStorageDriverPtr backend = pool->privateData;
@ -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,8 +435,8 @@ esxStorageVolumeLookupByKey(virConnectPtr conn, const char *key)
static virStorageVolPtr
esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
unsigned int flags)
esxStorageVolCreateXML(virStoragePoolPtr pool, const char *xmldesc,
unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
virStorageDriverPtr backend = pool->privateData;
@ -453,8 +453,8 @@ esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
static virStorageVolPtr
esxStorageVolumeCreateXMLFrom(virStoragePoolPtr pool, const char *xmldesc,
virStorageVolPtr sourceVolume, unsigned int flags)
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool, const char *xmldesc,
virStorageVolPtr sourceVolume, unsigned int flags)
{
esxPrivate *priv = pool->conn->storagePrivateData;
virStorageDriverPtr backend = pool->privateData;
@ -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,9 +37,9 @@
static virDrvOpenStatus
hypervDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
hypervNodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,9 +1258,9 @@ hypervDomainManagedSaveRemove(virDomainPtr domain, unsigned int flags)
#define MATCH(FLAG) (flags & (FLAG))
static int
hypervListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
hypervConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
hypervPrivate *priv = conn->privateData;
virBuffer query = VIR_BUFFER_INITIALIZER;
@ -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,9 +116,9 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
return iface;
}
static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus netcfInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
struct interface_driver *driverState;
@ -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,9 +261,9 @@ static int interfaceListDefinedInterfaces(virConnectPtr conn, char **const names
}
static int
interfaceListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
netcfConnectListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
{
struct interface_driver *driver = conn->interfacePrivateData;
int count;
@ -407,8 +407,8 @@ cleanup:
}
static virInterfacePtr interfaceLookupByName(virConnectPtr conn,
const char *name)
static virInterfacePtr netcfInterfaceLookupByName(virConnectPtr conn,
const char *name)
{
struct interface_driver *driver = conn->interfacePrivateData;
struct netcf_if *iface;
@ -439,8 +439,8 @@ cleanup:
return ret;
}
static virInterfacePtr interfaceLookupByMACString(virConnectPtr conn,
const char *macstr)
static virInterfacePtr netcfInterfaceLookupByMACString(virConnectPtr conn,
const char *macstr)
{
struct interface_driver *driver = conn->interfacePrivateData;
struct netcf_if *iface;
@ -479,8 +479,8 @@ cleanup:
return ret;
}
static char *interfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
static char *netcfInterfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
struct netcf_if *iface = NULL;
@ -533,9 +533,9 @@ cleanup:
return ret;
}
static virInterfacePtr interfaceDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
static virInterfacePtr netcfInterfaceDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
struct interface_driver *driver = conn->interfacePrivateData;
struct netcf_if *iface = NULL;
@ -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,8 +610,8 @@ cleanup:
return ret;
}
static int interfaceCreate(virInterfacePtr ifinfo,
unsigned int flags)
static int netcfInterfaceCreate(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
struct netcf_if *iface = NULL;
@ -644,8 +644,8 @@ cleanup:
return ret;
}
static int interfaceDestroy(virInterfacePtr ifinfo,
unsigned int flags)
static int netcfInterfaceDestroy(virInterfacePtr ifinfo,
unsigned int flags)
{
struct interface_driver *driver = ifinfo->conn->interfacePrivateData;
struct netcf_if *iface = NULL;
@ -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,9 +101,9 @@ udevIfaceGetDevices(struct udev *udev, virUdevStatus status)
}
static virDrvOpenStatus
udevIfaceOpenInterface(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
udevInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
struct udev_iface_driver *driverState = NULL;
@ -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,10 +188,10 @@ err:
}
static int
udevIfaceListInterfacesByStatus(virConnectPtr conn,
char **const names,
int names_len,
virUdevStatus status)
udevListInterfacesByStatus(virConnectPtr conn,
char **const names,
int names_len,
virUdevStatus status)
{
struct udev_iface_driver *driverState = conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -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,39 +255,39 @@ 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,
char **const names,
int names_len)
udevConnectListInterfaces(virConnectPtr conn,
char **const names,
int names_len)
{
return udevIfaceListInterfacesByStatus(conn, names, names_len,
VIR_UDEV_IFACE_ACTIVE);
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,
char **const names,
int names_len)
udevConnectListDefinedInterfaces(virConnectPtr conn,
char **const names,
int names_len)
{
return udevIfaceListInterfacesByStatus(conn, names, names_len,
VIR_UDEV_IFACE_INACTIVE);
return udevListInterfacesByStatus(conn, names, names_len,
VIR_UDEV_IFACE_INACTIVE);
}
static int
udevIfaceListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
udevConnectListAllInterfaces(virConnectPtr conn,
virInterfacePtr **ifaces,
unsigned int flags)
{
struct udev_iface_driver *driverState = conn->interfacePrivateData;
struct udev *udev;
@ -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,10 +584,10 @@ udevIfaceFreeIfaceDef(virInterfaceDef *ifacedef)
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefBond(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
udevGetIfaceDefBond(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
{
struct dirent **slave_list = NULL;
int slave_count = 0;
@ -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,10 +815,10 @@ cleanup:
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefBridge(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
udevGetIfaceDefBridge(struct udev *udev,
struct udev_device *dev,
const char *name,
virInterfaceDef *ifacedef)
{
struct dirent **member_list = NULL;
int member_count = 0;
@ -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,10 +929,10 @@ error:
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
udevIfaceGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
struct udev_device *dev ATTRIBUTE_UNUSED,
const char *name,
virInterfaceDef *ifacedef)
udevGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
struct udev_device *dev ATTRIBUTE_UNUSED,
const char *name,
virInterfaceDef *ifacedef)
{
char *vid;
char *vlan_parent_dev = NULL;
@ -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,14 +1080,14 @@ udevIfaceGetIfaceDef(struct udev *udev, const char *name)
cleanup:
udev_device_unref(dev);
udevIfaceFreeIfaceDef(ifacedef);
udevFreeIfaceDef(ifacedef);
return NULL;
}
static char *
udevIfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
udevInterfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
{
struct udev_iface_driver *driverState = ifinfo->conn->interfacePrivateData;
struct udev *udev = udev_ref(driverState->udev);
@ -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,9 +1128,9 @@ libxlShutdown(void)
}
static int
libxlStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
libxlStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
const libxl_version_info *ver_info;
char *log_file = NULL;
@ -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,9 +1338,9 @@ libxlReload(void)
static virDrvOpenStatus
libxlOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
libxlConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,9 +2889,9 @@ libxlDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
}
static char *
libxlDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
const char * nativeConfig,
unsigned int flags)
libxlConnectDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
const char * nativeConfig,
unsigned int flags)
{
libxlDriverPrivatePtr driver = conn->privateData;
const libxl_version_info *ver_info;
@ -2931,9 +2931,9 @@ cleanup:
#define MAX_CONFIG_SIZE (1024 * 65)
static char *
libxlDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
const char * domainXml,
unsigned int flags)
libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
const char * domainXml,
unsigned int flags)
{
libxlDriverPrivatePtr driver = conn->privateData;
const libxl_version_info *ver_info;
@ -2981,8 +2981,8 @@ cleanup:
}
static int
libxlListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
libxlConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
{
libxlDriverPrivatePtr driver = conn->privateData;
int n;
@ -2994,7 +2994,7 @@ libxlListDefinedDomains(virConnectPtr conn,
}
static int
libxlNumDefinedDomains(virConnectPtr conn)
libxlConnectNumOfDefinedDomains(virConnectPtr conn)
{
libxlDriverPrivatePtr driver = conn->privateData;
int n;
@ -3715,9 +3715,9 @@ libxlNodeGetFreeMemory(virConnectPtr conn)
}
static int
libxlDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback, void *opaque,
virFreeCallback freecb)
libxlConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback, void *opaque,
virFreeCallback freecb)
{
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
@ -3733,8 +3733,8 @@ libxlDomainEventRegister(virConnectPtr conn,
static int
libxlDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
libxlConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
@ -4132,9 +4132,9 @@ cleanup:
}
static int
libxlDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque, virFreeCallback freecb)
libxlConnectDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque, virFreeCallback freecb)
{
libxlDriverPrivatePtr driver = conn->privateData;
int ret;
@ -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,15 +4168,15 @@ libxlDomainEventDeregisterAny(virConnectPtr conn, int callbackID)
static int
libxlIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
libxlConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int
libxlListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
libxlConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
libxlDriverPrivatePtr driver = conn->privateData;
int ret = -1;
@ -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,
virStateInhibitCallback callback,
void *opaque);
static int lxcShutdown(void);
static int lxcStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque);
static int lxcStateCleanup(void);
virLXCDriverPtr lxc_driver = NULL;
/* callbacks for nwfilter */
@ -109,9 +109,9 @@ static virNWFilterCallbackDriver lxcCallbackDriver = {
/* Functions */
static virDrvOpenStatus lxcOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus lxcConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,8 +377,8 @@ static int lxcNumDomains(virConnectPtr conn) {
return n;
}
static int lxcListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
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,9 +1022,9 @@ static int lxcDomainStart(virDomainPtr dom)
* Returns 0 on success or -1 in case of error
*/
static virDomainPtr
lxcDomainCreateAndStart(virConnectPtr conn,
const char *xml,
unsigned int flags) {
lxcDomainCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags) {
virLXCDriverPtr driver = conn->privateData;
virDomainObjPtr vm = NULL;
virDomainDefPtr def;
@ -1190,10 +1190,10 @@ cleanup:
static int
lxcDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
lxcConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
{
virLXCDriverPtr driver = conn->privateData;
int ret;
@ -1209,8 +1209,8 @@ lxcDomainEventRegister(virConnectPtr conn,
static int
lxcDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
lxcConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
virLXCDriverPtr driver = conn->privateData;
int ret;
@ -1226,12 +1226,12 @@ lxcDomainEventDeregister(virConnectPtr conn,
static int
lxcDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
lxcConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
{
virLXCDriverPtr driver = conn->privateData;
int ret;
@ -1249,8 +1249,8 @@ lxcDomainEventRegisterAny(virConnectPtr conn,
static int
lxcDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
lxcConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
virLXCDriverPtr driver = conn->privateData;
int ret;
@ -1376,9 +1376,9 @@ error:
}
static int lxcStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
static int lxcStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
char *ld;
@ -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,8 +1595,8 @@ cleanup:
}
static char *lxcGetSchedulerType(virDomainPtr dom,
int *nparams)
static char *lxcDomainGetSchedulerType(virDomainPtr dom,
int *nparams)
{
virLXCDriverPtr driver = dom->conn->privateData;
char *ret = NULL;
@ -1715,10 +1715,10 @@ cleanup:
static int
lxcSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
lxcDomainSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
int i;
@ -1841,18 +1841,18 @@ cleanup:
}
static int
lxcSetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
lxcDomainSetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
{
return lxcSetSchedulerParametersFlags(domain, params, nparams, 0);
return lxcDomainSetSchedulerParametersFlags(domain, params, nparams, 0);
}
static int
lxcGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
lxcDomainGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm = NULL;
@ -1954,11 +1954,11 @@ cleanup:
}
static int
lxcGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
lxcDomainGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
{
return lxcGetSchedulerParametersFlags(domain, params, nparams, 0);
return lxcDomainGetSchedulerParametersFlags(domain, params, nparams, 0);
}
@ -2661,8 +2661,8 @@ cleanup:
static int
lxcListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
lxcConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
virLXCDriverPtr driver = conn->privateData;
@ -4323,9 +4323,9 @@ static int lxcDomainDetachDevice(virDomainPtr dom,
}
static int lxcDomainOpenNamespace(virDomainPtr dom,
int **fdlist,
unsigned int flags)
static int lxcDomainLxcOpenNamespace(virDomainPtr dom,
int **fdlist,
unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -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,14 +350,14 @@ firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
#endif
/**
* networkStartup:
* networkStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
networkStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
networkStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
char *base = NULL;
#ifdef HAVE_FIREWALLD
@ -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,9 +2778,9 @@ cleanup:
return ret;
}
static virDrvOpenStatus networkOpenNetwork(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus networkOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,9 +2884,9 @@ static int networkListDefinedNetworks(virConnectPtr conn, char **const names, in
}
static int
networkListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
networkConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
{
struct network_driver *driver = conn->networkPrivateData;
int ret = -1;
@ -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,9 +590,9 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
}
static int halNodeDeviceDriverStartup(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
LibHalContext *hal_ctx = NULL;
char **udi = NULL;
@ -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,9 +1649,9 @@ out:
return ret;
}
static int udevNodeDeviceDriverStartup(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
udevPrivate *priv = NULL;
struct udev *udev = NULL;
@ -1758,21 +1758,21 @@ 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,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus nodeDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,14 +160,14 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
#endif /* HAVE_FIREWALLD */
/**
* virNWFilterStartup:
* nwfilterStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
nwfilterDriverStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
nwfilterStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
char *base = NULL;
DBusConnection *sysbus = NULL;
@ -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,16 +437,16 @@ nwfilterClose(virConnectPtr conn) {
static int
nwfilterNumNWFilters(virConnectPtr conn) {
nwfilterConnectNumOfNWFilters(virConnectPtr conn) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
return driver->nwfilters.count;
}
static int
nwfilterListNWFilters(virConnectPtr conn,
char **const names,
int nnames) {
nwfilterConnectListNWFilters(virConnectPtr conn,
char **const names,
int nnames) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
int got = 0, i;
@ -474,9 +474,9 @@ nwfilterListNWFilters(virConnectPtr conn,
static int
nwfilterListAllNWFilters(virConnectPtr conn,
virNWFilterPtr **filters,
unsigned int flags) {
nwfilterConnectListAllNWFilters(virConnectPtr conn,
virNWFilterPtr **filters,
unsigned int flags) {
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
virNWFilterPtr *tmp_filters = NULL;
int nfilters = 0;
@ -529,8 +529,8 @@ nwfilterListAllNWFilters(virConnectPtr conn,
}
static virNWFilterPtr
nwfilterDefine(virConnectPtr conn,
const char *xml)
nwfilterDefineXML(virConnectPtr conn,
const char *xml)
{
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
virNWFilterDefPtr def;
@ -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,8 +1338,8 @@ cleanup:
return ret;
}
static int openvzGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type)
static int openvzConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type)
{
if (type == NULL || STRCASEEQ(type, "openvz"))
return 1028; /* OpenVZ has no limitation */
@ -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,9 +1440,9 @@ openvzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
return openvzDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_AFFECT_LIVE);
}
static virDrvOpenStatus openvzOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus openvzConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
struct openvz_driver *driver;
@ -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,8 +1562,8 @@ static char *openvzGetCapabilities(virConnectPtr conn) {
return ret;
}
static int openvzListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
int *ids, int nids) {
static int openvzConnectListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
int *ids, int nids) {
int got = 0;
int veid;
int outfd = -1;
@ -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,8 +1616,8 @@ static int openvzNumDomains(virConnectPtr conn) {
return n;
}
static int openvzListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
static int openvzConnectListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
int got = 0;
int veid, outfd = -1, ret;
int rc = -1;
@ -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,9 +2158,9 @@ cleanup:
}
static int
openvzListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
openvzConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
struct openvz_driver *driver = conn->privateData;
int ret = -1;
@ -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,9 +947,9 @@ parallelsOpenDefault(virConnectPtr conn)
}
static virDrvOpenStatus
parallelsOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
parallelsConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
int ret;
@ -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,9 +1098,9 @@ parallelsNumOfDefinedDomains(virConnectPtr conn)
}
static int
parallelsListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
parallelsConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
parallelsConnPtr privconn = conn->privateData;
int ret = -1;
@ -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,9 +377,9 @@ static int parallelsNumNetworks(virConnectPtr conn)
return nactive;
}
static int parallelsListNetworks(virConnectPtr conn,
char **const names,
int nnames)
static int parallelsConnectListNetworks(virConnectPtr conn,
char **const names,
int nnames)
{
parallelsConnPtr privconn = conn->privateData;
int got = 0, i;
@ -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,9 +425,9 @@ static int parallelsNumDefinedNetworks(virConnectPtr conn)
return ninactive;
}
static int parallelsListDefinedNetworks(virConnectPtr conn,
char **const names,
int nnames)
static int parallelsConnectListDefinedNetworks(virConnectPtr conn,
char **const names,
int nnames)
{
parallelsConnPtr privconn = conn->privateData;
int got = 0, i;
@ -455,9 +455,9 @@ static int parallelsListDefinedNetworks(virConnectPtr conn,
return -1;
}
static int parallelsListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
static int parallelsConnectListAllNetworks(virConnectPtr conn,
virNetworkPtr **nets,
unsigned int flags)
{
parallelsConnPtr privconn = conn->privateData;
int ret = -1;
@ -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,8 +578,8 @@ parallelsStorageNumDefinedPools(virConnectPtr conn)
}
static int
parallelsStorageListDefinedPools(virConnectPtr conn,
char **const names, int nnames)
parallelsConnectListDefinedStoragePools(virConnectPtr conn,
char **const names, int nnames)
{
parallelsConnPtr privconn = conn->privateData;
int n = 0;
@ -719,8 +719,8 @@ parallelsStoragePoolGetAlloc(virStoragePoolDefPtr def)
}
static virStoragePoolPtr
parallelsStoragePoolDefine(virConnectPtr conn,
const char *xml, unsigned int flags)
parallelsStoragePoolDefineXML(virConnectPtr conn,
const char *xml, unsigned int flags)
{
parallelsConnPtr privconn = conn->privateData;
virStoragePoolDefPtr def;
@ -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,
const char *path);
int parallelsStorageVolumeDefRemove(virStoragePoolObjPtr privpool,
virStorageVolDefPtr privvol);
virStorageVolPtr parallelsStorageVolLookupByPathLocked(virConnectPtr conn,
const char *path);
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,8 +383,8 @@ phypNumDomainsGeneric(virConnectPtr conn, unsigned int type)
* 1 - all
* */
static int
phypListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
unsigned int type)
phypConnectListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
unsigned int type)
{
ConnectionData *connection_data = conn->networkPrivateData;
phyp_driverPtr phyp_driver = conn->privateData;
@ -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,8 +1099,8 @@ exit:
}
static virDrvOpenStatus
phypOpen(virConnectPtr conn,
virConnectAuthPtr auth, unsigned int flags)
phypConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth, unsigned int flags)
{
LIBSSH2_SESSION *session = NULL;
ConnectionData *connection_data = 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,8 +2626,8 @@ cleanup:
}
static virStoragePoolPtr
phypGetStoragePoolLookUpByUUID(virConnectPtr conn,
const unsigned char *uuid)
phypStoragePoolLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
virStoragePoolPtr sp = NULL;
int npools = 0;
@ -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,8 +3612,8 @@ cleanup:
}
static virDomainPtr
phypDomainCreateAndStart(virConnectPtr conn,
const char *xml, unsigned int flags)
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,15 +3737,15 @@ 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,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
phypStorageOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,14 +541,14 @@ qemuDomainFindMaxID(virDomainObjPtr vm,
/**
* qemuStartup:
* qemuStateInitialize:
*
* Initialization function for the QEmu daemon
*/
static int
qemuStartup(bool privileged,
virStateInhibitCallback callback,
void *opaque)
qemuStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque)
{
char *driverConf = NULL;
virConnectPtr conn = NULL;
@ -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,9 +978,9 @@ qemuShutdown(void) {
}
static virDrvOpenStatus qemuOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virQEMUDriverConfigPtr cfg = NULL;
virDrvOpenStatus ret = VIR_DRV_OPEN_ERROR;
@ -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,8 +1453,9 @@ qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
}
static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char *xml,
unsigned int flags) {
static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags) {
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
virDomainObjPtr vm = NULL;
@ -5113,10 +5114,10 @@ cleanup:
}
static char *qemuDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
static char *qemuConnectDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
@ -5153,10 +5154,10 @@ cleanup:
return xml;
}
static char *qemuDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
@ -5288,8 +5289,8 @@ cleanup:
}
static int qemuListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
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,8 +6598,8 @@ cleanup:
}
static char *qemuGetSchedulerType(virDomainPtr dom,
int *nparams)
static char *qemuDomainGetSchedulerType(virDomainPtr dom,
int *nparams)
{
virQEMUDriverPtr driver = dom->conn->privateData;
char *ret = NULL;
@ -7707,10 +7708,10 @@ cleanup:
}
static int
qemuSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
int i;
@ -7871,14 +7872,14 @@ cleanup:
#undef SCHED_RANGE_CHECK
static int
qemuSetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int nparams)
qemuDomainSetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int nparams)
{
return qemuSetSchedulerParametersFlags(dom,
params,
nparams,
VIR_DOMAIN_AFFECT_CURRENT);
return qemuDomainSetSchedulerParametersFlags(dom,
params,
nparams,
VIR_DOMAIN_AFFECT_CURRENT);
}
static int
@ -7984,10 +7985,10 @@ cleanup:
}
static int
qemuGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm = NULL;
@ -8121,12 +8122,12 @@ cleanup:
}
static int
qemuGetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams)
qemuDomainGetSchedulerParameters(virDomainPtr dom,
virTypedParameterPtr params,
int *nparams)
{
return qemuGetSchedulerParametersFlags(dom, params, nparams,
VIR_DOMAIN_AFFECT_CURRENT);
return qemuDomainGetSchedulerParametersFlags(dom, params, nparams,
VIR_DOMAIN_AFFECT_CURRENT);
}
/**
@ -9139,10 +9140,10 @@ cleanup:
static int
qemuDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
qemuConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
{
virQEMUDriverPtr driver = conn->privateData;
int ret;
@ -9156,8 +9157,8 @@ qemuDomainEventRegister(virConnectPtr conn,
static int
qemuDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
qemuConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
virQEMUDriverPtr driver = conn->privateData;
int ret;
@ -9171,12 +9172,12 @@ qemuDomainEventDeregister(virConnectPtr conn,
static int
qemuDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
qemuConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
{
virQEMUDriverPtr driver = conn->privateData;
int ret;
@ -9192,8 +9193,8 @@ qemuDomainEventRegisterAny(virConnectPtr conn,
static int
qemuDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
qemuConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
virQEMUDriverPtr driver = conn->privateData;
int ret;
@ -9850,9 +9851,9 @@ out:
}
static int
qemuCPUCompare(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags)
qemuConnectCompareCPU(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
int ret = VIR_CPU_COMPARE_ERROR;
@ -9878,10 +9879,10 @@ cleanup:
static char *
qemuCPUBaseline(virConnectPtr conn ATTRIBUTE_UNUSED,
const char **xmlCPUs,
unsigned int ncpus,
unsigned int flags)
qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
const char **xmlCPUs,
unsigned int ncpus,
unsigned int flags)
{
char *cpu;
@ -12446,8 +12447,8 @@ cleanup:
return ret;
}
static int qemuDomainMonitorCommand(virDomainPtr domain, const char *cmd,
char **result, unsigned int flags)
static int qemuDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
char **result, unsigned int flags)
{
virQEMUDriverPtr driver = domain->conn->privateData;
virDomainObjPtr vm = NULL;
@ -12497,9 +12498,9 @@ cleanup:
}
static virDomainPtr qemuDomainAttach(virConnectPtr conn,
unsigned int pid_value,
unsigned int flags)
static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn,
unsigned int pid_value,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainObjPtr vm = NULL;
@ -14475,9 +14476,9 @@ cleanup:
}
static int
qemuListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
qemuConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
int ret = -1;
@ -14490,10 +14491,10 @@ qemuListAllDomains(virConnectPtr conn,
}
static char *
qemuDomainAgentCommand(virDomainPtr domain,
const char *cmd,
int timeout,
unsigned int flags)
qemuDomainQemuAgentCommand(virDomainPtr domain,
const char *cmd,
int timeout,
unsigned int flags)
{
virQEMUDriverPtr driver = domain->conn->privateData;
virDomainObjPtr vm;
@ -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,9 +158,9 @@ static char *get_transport_from_scheme(char *scheme);
#ifdef WITH_LIBVIRTD
static int
remoteStartup(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
remoteStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
/* Mark that we're inside the daemon so we can avoid
* re-entering ourselves
@ -936,9 +936,9 @@ remoteOpenSecondaryDriver(virConnectPtr conn,
}
static virDrvOpenStatus
remoteOpen(virConnectPtr conn,
virConnectAuthPtr auth,
unsigned int flags)
remoteConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth,
unsigned int flags)
{
struct private_data *priv;
int ret, rflags = 0;
@ -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";
print "$structprefix$call->{ProcName}(";
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,9 +629,9 @@ secretUsageIDForDef(virSecretDefPtr def)
#define MATCH(FLAG) (flags & (FLAG))
static int
secretListAllSecrets(virConnectPtr conn,
virSecretPtr **secrets,
unsigned int flags) {
secretConnectListAllSecrets(virConnectPtr conn,
virSecretPtr **secrets,
unsigned int flags) {
virSecretDriverStatePtr driver = conn->secretPrivateData;
virSecretPtr *tmp_secrets = NULL;
int nsecrets = 0;
@ -1058,7 +1058,7 @@ cleanup:
}
static int
secretDriverCleanup(void)
secretStateCleanup(void)
{
if (driverState == NULL)
return -1;
@ -1081,9 +1081,9 @@ secretDriverCleanup(void)
}
static int
secretDriverStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
secretStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
char *base = NULL;
@ -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,9 +128,9 @@ storageDriverAutostart(virStorageDriverStatePtr driver) {
* Initialization function for the QEmu daemon
*/
static int
storageDriverStartup(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
storageStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
char *base = NULL;
@ -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,9 +326,9 @@ storageNumPools(virConnectPtr conn) {
}
static int
storageListPools(virConnectPtr conn,
char **const names,
int nnames) {
storageConnectListStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
int got = 0, i;
@ -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,9 +374,9 @@ storageNumDefinedPools(virConnectPtr conn) {
}
static int
storageListDefinedPools(virConnectPtr conn,
char **const names,
int nnames) {
storageConnectListDefinedStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
int got = 0, i;
@ -408,10 +408,10 @@ storageListDefinedPools(virConnectPtr conn,
/* This method is required to be re-entrant / thread safe, so
uses no driver lock */
static char *
storageFindPoolSources(virConnectPtr conn,
const char *type,
const char *srcSpec,
unsigned int flags)
storageConnectFindStoragePoolSources(virConnectPtr conn,
const char *type,
const char *srcSpec,
unsigned int flags)
{
int backend_type;
virStorageBackendPtr backend;
@ -486,9 +486,9 @@ cleanup:
static virStoragePoolPtr
storagePoolCreate(virConnectPtr conn,
const char *xml,
unsigned int flags)
storagePoolCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
virStorageDriverStatePtr driver = conn->storagePrivateData;
virStoragePoolDefPtr def;
@ -544,9 +544,9 @@ cleanup:
}
static virStoragePoolPtr
storagePoolDefine(virConnectPtr conn,
const char *xml,
unsigned int flags)
storagePoolDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
virStorageDriverStatePtr driver = conn->storagePrivateData;
virStoragePoolDefPtr def;
@ -643,8 +643,8 @@ cleanup:
}
static int
storagePoolStart(virStoragePoolPtr obj,
unsigned int flags)
storagePoolCreate(virStoragePoolPtr obj,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -1062,7 +1062,7 @@ cleanup:
static int
storagePoolNumVolumes(virStoragePoolPtr obj) {
storagePoolNumOfVolumes(virStoragePoolPtr obj) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
int ret = -1;
@ -1207,8 +1207,8 @@ storagePoolListAllVolumes(virStoragePoolPtr pool,
}
static virStorageVolPtr
storageVolumeLookupByName(virStoragePoolPtr obj,
const char *name) {
storageVolLookupByName(virStoragePoolPtr obj,
const char *name) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
virStorageVolDefPtr vol;
@ -1250,8 +1250,8 @@ cleanup:
static virStorageVolPtr
storageVolumeLookupByKey(virConnectPtr conn,
const char *key) {
storageVolLookupByKey(virConnectPtr conn,
const char *key) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i;
virStorageVolPtr ret = NULL;
@ -1282,8 +1282,8 @@ storageVolumeLookupByKey(virConnectPtr conn,
}
static virStorageVolPtr
storageVolumeLookupByPath(virConnectPtr conn,
const char *path) {
storageVolLookupByPath(virConnectPtr conn,
const char *path) {
virStorageDriverStatePtr driver = conn->storagePrivateData;
unsigned int i;
virStorageVolPtr ret = NULL;
@ -1336,12 +1336,12 @@ 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,
const char *xmldesc,
unsigned int flags)
storageVolCreateXML(virStoragePoolPtr obj,
const char *xmldesc,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -1440,7 +1440,7 @@ storageVolumeCreateXML(virStoragePoolPtr obj,
if (buildret < 0) {
virStoragePoolObjUnlock(pool);
storageVolumeDelete(volobj, 0);
storageVolDelete(volobj, 0);
pool = NULL;
goto cleanup;
}
@ -1462,10 +1462,10 @@ cleanup:
}
static virStorageVolPtr
storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
const char *xmldesc,
virStorageVolPtr vobj,
unsigned int flags)
storageVolCreateXMLFrom(virStoragePoolPtr obj,
const char *xmldesc,
virStorageVolPtr vobj,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool, origpool = NULL;
@ -1605,7 +1605,7 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj,
if (buildret < 0) {
virStoragePoolObjUnlock(pool);
storageVolumeDelete(volobj, 0);
storageVolDelete(volobj, 0);
pool = NULL;
goto cleanup;
}
@ -1627,11 +1627,11 @@ cleanup:
static int
storageVolumeDownload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
unsigned int flags)
storageVolDownload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool = NULL;
@ -1690,11 +1690,11 @@ out:
static int
storageVolumeUpload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
unsigned int flags)
storageVolUpload(virStorageVolPtr obj,
virStreamPtr stream,
unsigned long long offset,
unsigned long long length,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool = NULL;
@ -1754,9 +1754,9 @@ out:
}
static int
storageVolumeResize(virStorageVolPtr obj,
unsigned long long capacity,
unsigned int flags)
storageVolResize(virStorageVolPtr obj,
unsigned long long capacity,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStorageBackendPtr backend;
@ -1858,9 +1858,9 @@ out:
* appear as if it were zero-filled.
*/
static int
storageVolumeZeroSparseFile(virStorageVolDefPtr vol,
off_t size,
int fd)
storageVolZeroSparseFile(virStorageVolDefPtr vol,
off_t size,
int fd)
{
int ret = -1;
@ -1947,8 +1947,8 @@ out:
static int
storageVolumeWipeInternal(virStorageVolDefPtr def,
unsigned int algorithm)
storageVolWipeInternal(virStorageVolDefPtr def,
unsigned int algorithm)
{
int ret = -1, fd = -1;
struct stat st;
@ -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,9 +2044,9 @@ out:
static int
storageVolumeWipePattern(virStorageVolPtr obj,
unsigned int algorithm,
unsigned int flags)
storageVolWipePattern(virStorageVolPtr obj,
unsigned int algorithm,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool = NULL;
@ -2095,7 +2095,7 @@ storageVolumeWipePattern(virStorageVolPtr obj,
goto out;
}
if (storageVolumeWipeInternal(vol, algorithm) == -1) {
if (storageVolWipeInternal(vol, algorithm) == -1) {
goto out;
}
@ -2111,15 +2111,15 @@ out:
}
static int
storageVolumeWipe(virStorageVolPtr obj,
unsigned int flags)
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,
unsigned int flags) {
storageVolDelete(virStorageVolPtr obj,
unsigned int flags) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
virStorageBackendPtr backend;
@ -2201,8 +2201,8 @@ cleanup:
}
static int
storageVolumeGetInfo(virStorageVolPtr obj,
virStorageVolInfoPtr info) {
storageVolGetInfo(virStorageVolPtr obj,
virStorageVolInfoPtr info) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
virStorageBackendPtr backend;
@ -2255,8 +2255,8 @@ cleanup:
}
static char *
storageVolumeGetXMLDesc(virStorageVolPtr obj,
unsigned int flags)
storageVolGetXMLDesc(virStorageVolPtr obj,
unsigned int flags)
{
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
@ -2309,7 +2309,7 @@ cleanup:
}
static char *
storageVolumeGetPath(virStorageVolPtr obj) {
storageVolGetPath(virStorageVolPtr obj) {
virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
virStoragePoolObjPtr pool;
virStorageVolDefPtr vol;
@ -2351,9 +2351,9 @@ cleanup:
}
static int
storageListAllPools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
storageConnectListAllStoragePools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
{
virStorageDriverStatePtr driver = conn->storagePrivateData;
int ret = -1;
@ -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,9 +1142,9 @@ static int testOpenFromFile(virConnectPtr conn,
}
static virDrvOpenStatus testOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus testConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
int ret;
testConnPtr privconn;
@ -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,30 +1216,30 @@ static int testClose(virConnectPtr conn)
return 0;
}
static int testGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED,
unsigned long *hvVer)
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,
const char *type 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,9 +1452,9 @@ cleanup:
return ret;
}
static int testListDomains(virConnectPtr conn,
int *ids,
int maxids)
static int testConnectListDomains(virConnectPtr conn,
int *ids,
int maxids)
{
testConnPtr privconn = conn->privateData;
int n;
@ -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,8 +2089,8 @@ cleanup:
return ret;
}
static int testSetMaxMemory(virDomainPtr domain,
unsigned long memory)
static int testDomainSetMaxMemory(virDomainPtr domain,
unsigned long memory)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -2116,8 +2116,8 @@ cleanup:
return ret;
}
static int testSetMemory(virDomainPtr domain,
unsigned long memory)
static int testDomainSetMemory(virDomainPtr domain,
unsigned long memory)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -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,9 +2478,9 @@ static int testNumOfDefinedDomains(virConnectPtr conn) {
return count;
}
static int testListDefinedDomains(virConnectPtr conn,
char **const names,
int maxnames) {
static int testConnectListDefinedDomains(virConnectPtr conn,
char **const names,
int maxnames) {
testConnPtr privconn = conn->privateData;
int n;
@ -2728,10 +2728,10 @@ static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
}
static int
testDomainGetSchedulerParamsFlags(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
testDomainGetSchedulerParametersFlags(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams,
unsigned int flags)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -2765,18 +2765,18 @@ cleanup:
}
static int
testDomainGetSchedulerParams(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
testDomainGetSchedulerParameters(virDomainPtr domain,
virTypedParameterPtr params,
int *nparams)
{
return testDomainGetSchedulerParamsFlags(domain, params, nparams, 0);
return testDomainGetSchedulerParametersFlags(domain, params, nparams, 0);
}
static int
testDomainSetSchedulerParamsFlags(virDomainPtr domain,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
testDomainSetSchedulerParametersFlags(virDomainPtr domain,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
{
testConnPtr privconn = domain->conn->privateData;
virDomainObjPtr privdom;
@ -2815,11 +2815,11 @@ cleanup:
}
static int
testDomainSetSchedulerParams(virDomainPtr domain,
virTypedParameterPtr params,
int nparams)
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,14 +2940,14 @@ 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,
const unsigned char *uuid)
static virNetworkPtr testNetworkLookupByUUID(virConnectPtr conn,
const unsigned char *uuid)
{
testConnPtr privconn = conn->privateData;
virNetworkObjPtr net;
@ -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,9 +3978,9 @@ testStorageNumPools(virConnectPtr conn) {
}
static int
testStorageListPools(virConnectPtr conn,
char **const names,
int nnames) {
testConnectListStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -4008,7 +4008,7 @@ no_memory:
}
static int
testStorageNumDefinedPools(virConnectPtr conn) {
testConnectNumOfDefinedStoragePools(virConnectPtr conn) {
testConnPtr privconn = conn->privateData;
int numInactive = 0, i;
@ -4025,9 +4025,9 @@ testStorageNumDefinedPools(virConnectPtr conn) {
}
static int
testStorageListDefinedPools(virConnectPtr conn,
char **const names,
int nnames) {
testConnectListDefinedStoragePools(virConnectPtr conn,
char **const names,
int nnames) {
testConnPtr privconn = conn->privateData;
int n = 0, i;
@ -4055,9 +4055,9 @@ no_memory:
}
static int
testStorageListAllPools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
testConnectListAllStoragePools(virConnectPtr conn,
virStoragePoolPtr **pools,
unsigned int flags)
{
testConnPtr privconn = conn->privateData;
int ret = -1;
@ -4116,8 +4116,8 @@ cleanup:
static int
testStoragePoolStart(virStoragePoolPtr pool,
unsigned int flags)
testStoragePoolCreate(virStoragePoolPtr pool,
unsigned int flags)
{
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -4151,10 +4151,10 @@ cleanup:
}
static char *
testStorageFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type,
const char *srcSpec,
unsigned int flags)
testConnectFindStoragePoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
const char *type,
const char *srcSpec,
unsigned int flags)
{
virStoragePoolSourcePtr source = NULL;
int pool_type;
@ -4207,9 +4207,9 @@ cleanup:
static virStoragePoolPtr
testStoragePoolCreate(virConnectPtr conn,
const char *xml,
unsigned int flags)
testStoragePoolCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
testConnPtr privconn = conn->privateData;
virStoragePoolDefPtr def;
@ -4254,9 +4254,9 @@ cleanup:
}
static virStoragePoolPtr
testStoragePoolDefine(virConnectPtr conn,
const char *xml,
unsigned int flags)
testStoragePoolDefineXML(virConnectPtr conn,
const char *xml,
unsigned int flags)
{
testConnPtr privconn = conn->privateData;
virStoragePoolDefPtr def;
@ -4591,7 +4591,7 @@ cleanup:
static int
testStoragePoolNumVolumes(virStoragePoolPtr pool) {
testStoragePoolNumOfVolumes(virStoragePoolPtr pool) {
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
int ret = -1;
@ -4737,8 +4737,8 @@ testStoragePoolListAllVolumes(virStoragePoolPtr obj,
}
static virStorageVolPtr
testStorageVolumeLookupByName(virStoragePoolPtr pool,
const char *name ATTRIBUTE_UNUSED) {
testStorageVolLookupByName(virStoragePoolPtr pool,
const char *name ATTRIBUTE_UNUSED) {
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
virStorageVolDefPtr privvol;
@ -4781,8 +4781,8 @@ cleanup:
static virStorageVolPtr
testStorageVolumeLookupByKey(virConnectPtr conn,
const char *key) {
testStorageVolLookupByKey(virConnectPtr conn,
const char *key) {
testConnPtr privconn = conn->privateData;
unsigned int i;
virStorageVolPtr ret = NULL;
@ -4816,8 +4816,8 @@ testStorageVolumeLookupByKey(virConnectPtr conn,
}
static virStorageVolPtr
testStorageVolumeLookupByPath(virConnectPtr conn,
const char *path) {
testStorageVolLookupByPath(virConnectPtr conn,
const char *path) {
testConnPtr privconn = conn->privateData;
unsigned int i;
virStorageVolPtr ret = NULL;
@ -4851,9 +4851,9 @@ testStorageVolumeLookupByPath(virConnectPtr conn,
}
static virStorageVolPtr
testStorageVolumeCreateXML(virStoragePoolPtr pool,
const char *xmldesc,
unsigned int flags)
testStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc,
unsigned int flags)
{
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -4935,10 +4935,10 @@ cleanup:
}
static virStorageVolPtr
testStorageVolumeCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
testStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
{
testConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool;
@ -5030,8 +5030,8 @@ cleanup:
}
static int
testStorageVolumeDelete(virStorageVolPtr vol,
unsigned int flags)
testStorageVolDelete(virStorageVolPtr vol,
unsigned int flags)
{
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -5113,8 +5113,8 @@ static int testStorageVolumeTypeForPool(int pooltype) {
}
static int
testStorageVolumeGetInfo(virStorageVolPtr vol,
virStorageVolInfoPtr info) {
testStorageVolGetInfo(virStorageVolPtr vol,
virStorageVolInfoPtr info) {
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
virStorageVolDefPtr privvol;
@ -5158,8 +5158,8 @@ cleanup:
}
static char *
testStorageVolumeGetXMLDesc(virStorageVolPtr vol,
unsigned int flags)
testStorageVolGetXMLDesc(virStorageVolPtr vol,
unsigned int flags)
{
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
@ -5202,7 +5202,7 @@ cleanup:
}
static char *
testStorageVolumeGetPath(virStorageVolPtr vol) {
testStorageVolGetPath(virStorageVolPtr vol) {
testConnPtr privconn = vol->conn->privateData;
virStoragePoolObjPtr privpool;
virStorageVolDefPtr privvol;
@ -5604,10 +5604,10 @@ out:
/* Domain event implementations */
static int
testDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
testConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
{
testConnPtr driver = conn->privateData;
int ret;
@ -5623,8 +5623,8 @@ testDomainEventRegister(virConnectPtr conn,
static int
testDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
testConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
testConnPtr driver = conn->privateData;
int ret;
@ -5640,12 +5640,12 @@ testDomainEventDeregister(virConnectPtr conn,
static int
testDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
testConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
{
testConnPtr driver = conn->privateData;
int ret;
@ -5662,8 +5662,8 @@ testDomainEventRegisterAny(virConnectPtr conn,
}
static int
testDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
testConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
testConnPtr driver = conn->privateData;
int ret;
@ -5722,9 +5722,9 @@ static int testNWFilterClose(virConnectPtr conn) {
return 0;
}
static int testListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
static int testConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
testConnPtr privconn = conn->privateData;
int ret;
@ -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,9 +446,9 @@ virDomainDefParserConfig umlDriverDomainDefParserConfig = {
* Initialization function for the Uml daemon
*/
static int
umlStartup(bool privileged,
virStateInhibitCallback callback,
void *opaque)
umlStateInitialize(bool privileged,
virStateInhibitCallback callback,
void *opaque)
{
char *base = NULL;
char *userdir = NULL;
@ -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,9 +1186,9 @@ static void umlShutdownVMDaemon(struct uml_driver *driver,
}
static virDrvOpenStatus umlOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus umlConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -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,8 +1514,8 @@ static int umlNumDomains(virConnectPtr conn) {
return n;
}
static virDomainPtr umlDomainCreate(virConnectPtr conn, const char *xml,
unsigned int flags) {
static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
unsigned int flags) {
struct uml_driver *driver = conn->privateData;
virDomainDefPtr def;
virDomainObjPtr vm = NULL;
@ -1876,8 +1876,8 @@ cleanup:
}
static int umlListDefinedDomains(virConnectPtr conn,
char **const names, int nnames) {
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,10 +2492,10 @@ cleanup:
static int
umlDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
umlConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
{
struct uml_driver *driver = conn->privateData;
int ret;
@ -2510,8 +2510,8 @@ umlDomainEventRegister(virConnectPtr conn,
}
static int
umlDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
umlConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
struct uml_driver *driver = conn->privateData;
int ret;
@ -2526,12 +2526,12 @@ umlDomainEventDeregister(virConnectPtr conn,
}
static int
umlDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
umlConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb)
{
struct uml_driver *driver = conn->privateData;
int ret;
@ -2549,8 +2549,8 @@ umlDomainEventRegisterAny(virConnectPtr conn,
static int
umlDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
umlConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
struct uml_driver *driver = conn->privateData;
int ret;
@ -2572,9 +2572,9 @@ static void umlDomainEventQueue(struct uml_driver *driver,
virDomainEventStateQueue(driver->domainEventState, event);
}
static int umlListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
static int umlConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
struct uml_driver *driver = conn->privateData;
int ret = -1;
@ -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,9 +141,9 @@ int vboxRegister(void) {
return 0;
}
static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
uid_t uid = getuid();
@ -184,5 +184,5 @@ static virDrvOpenStatus vboxOpenDummy(virConnectPtr conn,
static virDriver vboxDriverDummy = {
VIR_DRV_VBOX,
"VBOX",
.connectOpen = vboxOpenDummy,
.connectOpen = vboxConnectOpen,
};

View File

@ -991,9 +991,9 @@ static void vboxUninitialize(vboxGlobalData *data) {
}
static virDrvOpenStatus vboxOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
static virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
vboxGlobalData *data = NULL;
uid_t uid = getuid();
@ -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,10 +7248,10 @@ static void vboxReadCallback(int watch ATTRIBUTE_UNUSED,
}
}
static int vboxDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb) {
static int vboxConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb) {
VBOX_OBJECT_CHECK(conn, int, -1);
int vboxRet = -1;
nsresult rc;
@ -7311,8 +7311,8 @@ static int vboxDomainEventRegister(virConnectPtr conn,
}
}
static int vboxDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback) {
static int vboxConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback) {
VBOX_OBJECT_CHECK(conn, int, -1);
int cnt;
@ -7338,12 +7338,12 @@ static int vboxDomainEventDeregister(virConnectPtr conn,
return ret;
}
static int vboxDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb) {
static int vboxConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freecb) {
VBOX_OBJECT_CHECK(conn, int, -1);
int vboxRet = -1;
nsresult rc;
@ -7405,8 +7405,8 @@ static int vboxDomainEventRegisterAny(virConnectPtr conn,
}
}
static int vboxDomainEventDeregisterAny(virConnectPtr conn,
int callbackID) {
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,8 +8291,8 @@ static int vboxStorageNumOfPools(virConnectPtr conn ATTRIBUTE_UNUSED) {
return 1;
}
static int vboxStorageListPools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
static int vboxConnectListStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
char **const names, int nnames) {
int numActive = 0;
if (nnames == 1) {
@ -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,9 +9239,9 @@ endjob:
#define MATCH(FLAG) (flags & (FLAG))
static int
vboxListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
vboxConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
VBOX_OBJECT_CHECK(conn, int, -1);
vboxArray machines = VBOX_ARRAY_INITIALIZER;
@ -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,9 +82,9 @@ vmwareDomainXMLConfigInit(void)
}
static virDrvOpenStatus
vmwareOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
vmwareConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags)
{
struct vmware_driver *driver;
char * vmrun = NULL;
@ -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,9 +937,9 @@ vmwareDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
}
static char *
vmwareDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig,
unsigned int flags)
{
struct vmware_driver *driver = conn->privateData;
virVMXContext ctx;
@ -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,8 +1025,8 @@ vmwareListDomains(virConnectPtr conn, int *ids, int nids)
}
static int
vmwareListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
vmwareConnectListDefinedDomains(virConnectPtr conn,
char **const names, int nnames)
{
struct vmware_driver *driver = conn->privateData;
int n;
@ -1093,15 +1106,15 @@ vmwareDomainGetState(virDomainPtr dom,
}
static int
vmwareIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
vmwareConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
return 1;
}
static int
vmwareListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
vmwareConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
struct vmware_driver *driver = conn->privateData;
int ret = -1;
@ -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,9 +203,9 @@ done:
#ifdef WITH_LIBVIRTD
static int
xenInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
xenUnifiedStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
inside_daemon = true;
return 0;
@ -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,10 +1392,10 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
static char *
xenUnifiedDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn,
const char *format,
const char *config,
unsigned int flags)
{
virDomainDefPtr def = NULL;
char *ret = NULL;
@ -1444,10 +1444,10 @@ cleanup:
#define MAX_CONFIG_SIZE (1024 * 65)
static char *
xenUnifiedDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
xenUnifiedConnectDomainXMLToNative(virConnectPtr conn,
const char *format,
const char *xmlData,
unsigned int flags)
{
virDomainDefPtr def = NULL;
char *ret = NULL;
@ -1590,8 +1590,8 @@ failure:
}
static int
xenUnifiedListDefinedDomains(virConnectPtr conn, char **const names,
int maxnames)
xenUnifiedConnectListDefinedDomains(virConnectPtr conn, char **const names,
int maxnames)
{
GET_PRIVATE(conn);
int i;
@ -1607,7 +1607,7 @@ xenUnifiedListDefinedDomains(virConnectPtr conn, char **const names,
}
static int
xenUnifiedNumOfDefinedDomains(virConnectPtr conn)
xenUnifiedConnectNumOfDefinedDomains(virConnectPtr conn)
{
GET_PRIVATE(conn);
int i;
@ -1988,10 +1988,10 @@ xenUnifiedNodeGetFreeMemory(virConnectPtr conn)
static int
xenUnifiedDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freefunc)
xenUnifiedConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freefunc)
{
GET_PRIVATE(conn);
@ -2013,8 +2013,8 @@ xenUnifiedDomainEventRegister(virConnectPtr conn,
static int
xenUnifiedDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
xenUnifiedConnectDomainEventDeregister(virConnectPtr conn,
virConnectDomainEventCallback callback)
{
int ret;
GET_PRIVATE(conn);
@ -2036,12 +2036,12 @@ xenUnifiedDomainEventDeregister(virConnectPtr conn,
static int
xenUnifiedDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freefunc)
xenUnifiedConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr dom,
int eventID,
virConnectDomainEventGenericCallback callback,
void *opaque,
virFreeCallback freefunc)
{
GET_PRIVATE(conn);
@ -2064,8 +2064,8 @@ xenUnifiedDomainEventRegisterAny(virConnectPtr conn,
}
static int
xenUnifiedDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
xenUnifiedConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID)
{
int ret;
GET_PRIVATE(conn);
@ -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,14 +102,14 @@ 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,
unsigned int flags)
xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
{
char *username = NULL;
char *password = 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,14 +1549,14 @@ 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,
int maxnames)
xenapiConnectListDefinedDomains(virConnectPtr conn, char **const names,
int maxnames)
{
int i,j=0,doms;
xen_vm_set *result;
@ -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 */
};
/**