mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Fix naming of some node device APIs
In renaming driver API implementations to match the public API naming scheme, a few cases in the node device driver were missed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
4a044d0256
commit
142e6e2784
@ -42,9 +42,6 @@ while (<>) {
|
||||
my $prefix = $impl;
|
||||
$prefix =~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/;
|
||||
|
||||
# External impls
|
||||
next if $prefix eq "node";
|
||||
|
||||
if (defined $mainprefix) {
|
||||
if ($mainprefix ne $prefix) {
|
||||
print "$ARGV:$. Bad prefix '$prefix' for API '$api', expecting '$mainprefix'\n";
|
||||
|
@ -183,9 +183,9 @@ nodeListDevices(virConnectPtr conn,
|
||||
}
|
||||
|
||||
int
|
||||
nodeListAllNodeDevices(virConnectPtr conn,
|
||||
virNodeDevicePtr **devices,
|
||||
unsigned int flags)
|
||||
nodeConnectListAllNodeDevices(virConnectPtr conn,
|
||||
virNodeDevicePtr **devices,
|
||||
unsigned int flags)
|
||||
{
|
||||
virNodeDeviceDriverStatePtr driver = conn->nodeDevicePrivateData;
|
||||
int ret = -1;
|
||||
|
@ -56,9 +56,9 @@ int detect_scsi_host_caps(union _virNodeDevCapData *d);
|
||||
int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags);
|
||||
int nodeListDevices(virConnectPtr conn, const char *cap, char **const names,
|
||||
int maxnames, unsigned int flags);
|
||||
int nodeListAllNodeDevices(virConnectPtr conn,
|
||||
virNodeDevicePtr **devices,
|
||||
unsigned int flags);
|
||||
int nodeConnectListAllNodeDevices(virConnectPtr conn,
|
||||
virNodeDevicePtr **devices,
|
||||
unsigned int flags);
|
||||
virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name);
|
||||
virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn,
|
||||
const char *wwnn,
|
||||
|
@ -591,9 +591,9 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
|
||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
|
||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
LibHalContext *hal_ctx = NULL;
|
||||
char **udi = NULL;
|
||||
@ -692,7 +692,7 @@ static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int nodeDeviceStateCleanup(void)
|
||||
static int nodeStateCleanup(void)
|
||||
{
|
||||
if (driverState) {
|
||||
nodeDeviceLock(driverState);
|
||||
@ -709,7 +709,7 @@ static int nodeDeviceStateCleanup(void)
|
||||
}
|
||||
|
||||
|
||||
static int nodeDeviceStateReload(void)
|
||||
static int nodeStateReload(void)
|
||||
{
|
||||
DBusError err;
|
||||
char **udi = NULL;
|
||||
@ -768,7 +768,7 @@ static virNodeDeviceDriver halNodeDeviceDriver = {
|
||||
.nodeDeviceClose = nodeDeviceClose, /* 0.5.0 */
|
||||
.nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */
|
||||
.nodeListDevices = nodeListDevices, /* 0.5.0 */
|
||||
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
|
||||
.connectListAllNodeDevices = nodeConnectListAllNodeDevices, /* 0.10.2 */
|
||||
.nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.5.0 */
|
||||
.nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
|
||||
.nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.5.0 */
|
||||
@ -782,9 +782,9 @@ static virNodeDeviceDriver halNodeDeviceDriver = {
|
||||
|
||||
static virStateDriver halStateDriver = {
|
||||
.name = "HAL",
|
||||
.stateInitialize = nodeDeviceStateInitialize, /* 0.5.0 */
|
||||
.stateCleanup = nodeDeviceStateCleanup, /* 0.5.0 */
|
||||
.stateReload = nodeDeviceStateReload, /* 0.5.0 */
|
||||
.stateInitialize = nodeStateInitialize, /* 0.5.0 */
|
||||
.stateCleanup = nodeStateCleanup, /* 0.5.0 */
|
||||
.stateReload = nodeStateReload, /* 0.5.0 */
|
||||
};
|
||||
|
||||
int halNodeRegister(void)
|
||||
|
@ -1438,7 +1438,7 @@ out:
|
||||
}
|
||||
|
||||
|
||||
static int nodeDeviceStateCleanup(void)
|
||||
static int nodeStateCleanup(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -1650,9 +1650,9 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
|
||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
|
||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
udevPrivate *priv = NULL;
|
||||
struct udev *udev = NULL;
|
||||
@ -1759,13 +1759,13 @@ out_unlock:
|
||||
|
||||
out:
|
||||
if (ret == -1) {
|
||||
nodeDeviceStateCleanup();
|
||||
nodeStateCleanup();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int nodeDeviceStateReload(void)
|
||||
static int nodeStateReload(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1798,7 +1798,7 @@ static virNodeDeviceDriver udevNodeDeviceDriver = {
|
||||
.nodeDeviceClose = nodeDeviceClose, /* 0.7.3 */
|
||||
.nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */
|
||||
.nodeListDevices = nodeListDevices, /* 0.7.3 */
|
||||
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
|
||||
.connectListAllNodeDevices = nodeConnectListAllNodeDevices, /* 0.10.2 */
|
||||
.nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.7.3 */
|
||||
.nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
|
||||
.nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.7.3 */
|
||||
@ -1811,9 +1811,9 @@ static virNodeDeviceDriver udevNodeDeviceDriver = {
|
||||
|
||||
static virStateDriver udevStateDriver = {
|
||||
.name = "udev",
|
||||
.stateInitialize = nodeDeviceStateInitialize, /* 0.7.3 */
|
||||
.stateCleanup = nodeDeviceStateCleanup, /* 0.7.3 */
|
||||
.stateReload = nodeDeviceStateReload, /* 0.7.3 */
|
||||
.stateInitialize = nodeStateInitialize, /* 0.7.3 */
|
||||
.stateCleanup = nodeStateCleanup, /* 0.7.3 */
|
||||
.stateReload = nodeStateReload, /* 0.7.3 */
|
||||
};
|
||||
|
||||
int udevNodeRegister(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user