提交 142e6e27 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 4a044d02
...@@ -42,9 +42,6 @@ while (<>) { ...@@ -42,9 +42,6 @@ while (<>) {
my $prefix = $impl; my $prefix = $impl;
$prefix =~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/; $prefix =~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/;
# External impls
next if $prefix eq "node";
if (defined $mainprefix) { if (defined $mainprefix) {
if ($mainprefix ne $prefix) { if ($mainprefix ne $prefix) {
print "$ARGV:$. Bad prefix '$prefix' for API '$api', expecting '$mainprefix'\n"; print "$ARGV:$. Bad prefix '$prefix' for API '$api', expecting '$mainprefix'\n";
......
...@@ -183,9 +183,9 @@ nodeListDevices(virConnectPtr conn, ...@@ -183,9 +183,9 @@ nodeListDevices(virConnectPtr conn,
} }
int int
nodeListAllNodeDevices(virConnectPtr conn, nodeConnectListAllNodeDevices(virConnectPtr conn,
virNodeDevicePtr **devices, virNodeDevicePtr **devices,
unsigned int flags) unsigned int flags)
{ {
virNodeDeviceDriverStatePtr driver = conn->nodeDevicePrivateData; virNodeDeviceDriverStatePtr driver = conn->nodeDevicePrivateData;
int ret = -1; int ret = -1;
......
...@@ -56,9 +56,9 @@ int detect_scsi_host_caps(union _virNodeDevCapData *d); ...@@ -56,9 +56,9 @@ int detect_scsi_host_caps(union _virNodeDevCapData *d);
int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags); int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags);
int nodeListDevices(virConnectPtr conn, const char *cap, char **const names, int nodeListDevices(virConnectPtr conn, const char *cap, char **const names,
int maxnames, unsigned int flags); int maxnames, unsigned int flags);
int nodeListAllNodeDevices(virConnectPtr conn, int nodeConnectListAllNodeDevices(virConnectPtr conn,
virNodeDevicePtr **devices, virNodeDevicePtr **devices,
unsigned int flags); unsigned int flags);
virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name); virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name);
virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn,
const char *wwnn, const char *wwnn,
......
...@@ -591,9 +591,9 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED, ...@@ -591,9 +591,9 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
} }
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED, static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED, virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque ATTRIBUTE_UNUSED)
{ {
LibHalContext *hal_ctx = NULL; LibHalContext *hal_ctx = NULL;
char **udi = NULL; char **udi = NULL;
...@@ -692,7 +692,7 @@ static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED, ...@@ -692,7 +692,7 @@ static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED,
} }
static int nodeDeviceStateCleanup(void) static int nodeStateCleanup(void)
{ {
if (driverState) { if (driverState) {
nodeDeviceLock(driverState); nodeDeviceLock(driverState);
...@@ -709,7 +709,7 @@ static int nodeDeviceStateCleanup(void) ...@@ -709,7 +709,7 @@ static int nodeDeviceStateCleanup(void)
} }
static int nodeDeviceStateReload(void) static int nodeStateReload(void)
{ {
DBusError err; DBusError err;
char **udi = NULL; char **udi = NULL;
...@@ -768,7 +768,7 @@ static virNodeDeviceDriver halNodeDeviceDriver = { ...@@ -768,7 +768,7 @@ static virNodeDeviceDriver halNodeDeviceDriver = {
.nodeDeviceClose = nodeDeviceClose, /* 0.5.0 */ .nodeDeviceClose = nodeDeviceClose, /* 0.5.0 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */ .nodeNumOfDevices = nodeNumOfDevices, /* 0.5.0 */
.nodeListDevices = nodeListDevices, /* 0.5.0 */ .nodeListDevices = nodeListDevices, /* 0.5.0 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */ .connectListAllNodeDevices = nodeConnectListAllNodeDevices, /* 0.10.2 */
.nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.5.0 */ .nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.5.0 */
.nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */ .nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
.nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.5.0 */ .nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.5.0 */
...@@ -782,9 +782,9 @@ static virNodeDeviceDriver halNodeDeviceDriver = { ...@@ -782,9 +782,9 @@ static virNodeDeviceDriver halNodeDeviceDriver = {
static virStateDriver halStateDriver = { static virStateDriver halStateDriver = {
.name = "HAL", .name = "HAL",
.stateInitialize = nodeDeviceStateInitialize, /* 0.5.0 */ .stateInitialize = nodeStateInitialize, /* 0.5.0 */
.stateCleanup = nodeDeviceStateCleanup, /* 0.5.0 */ .stateCleanup = nodeStateCleanup, /* 0.5.0 */
.stateReload = nodeDeviceStateReload, /* 0.5.0 */ .stateReload = nodeStateReload, /* 0.5.0 */
}; };
int halNodeRegister(void) int halNodeRegister(void)
......
...@@ -1438,7 +1438,7 @@ out: ...@@ -1438,7 +1438,7 @@ out:
} }
static int nodeDeviceStateCleanup(void) static int nodeStateCleanup(void)
{ {
int ret = 0; int ret = 0;
...@@ -1650,9 +1650,9 @@ out: ...@@ -1650,9 +1650,9 @@ out:
return ret; return ret;
} }
static int nodeDeviceStateInitialize(bool privileged ATTRIBUTE_UNUSED, static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
virStateInhibitCallback callback ATTRIBUTE_UNUSED, virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque ATTRIBUTE_UNUSED)
{ {
udevPrivate *priv = NULL; udevPrivate *priv = NULL;
struct udev *udev = NULL; struct udev *udev = NULL;
...@@ -1759,13 +1759,13 @@ out_unlock: ...@@ -1759,13 +1759,13 @@ out_unlock:
out: out:
if (ret == -1) { if (ret == -1) {
nodeDeviceStateCleanup(); nodeStateCleanup();
} }
return ret; return ret;
} }
static int nodeDeviceStateReload(void) static int nodeStateReload(void)
{ {
return 0; return 0;
} }
...@@ -1798,7 +1798,7 @@ static virNodeDeviceDriver udevNodeDeviceDriver = { ...@@ -1798,7 +1798,7 @@ static virNodeDeviceDriver udevNodeDeviceDriver = {
.nodeDeviceClose = nodeDeviceClose, /* 0.7.3 */ .nodeDeviceClose = nodeDeviceClose, /* 0.7.3 */
.nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */ .nodeNumOfDevices = nodeNumOfDevices, /* 0.7.3 */
.nodeListDevices = nodeListDevices, /* 0.7.3 */ .nodeListDevices = nodeListDevices, /* 0.7.3 */
.connectListAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */ .connectListAllNodeDevices = nodeConnectListAllNodeDevices, /* 0.10.2 */
.nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.7.3 */ .nodeDeviceLookupByName = nodeDeviceLookupByName, /* 0.7.3 */
.nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */ .nodeDeviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
.nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.7.3 */ .nodeDeviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.7.3 */
...@@ -1811,9 +1811,9 @@ static virNodeDeviceDriver udevNodeDeviceDriver = { ...@@ -1811,9 +1811,9 @@ static virNodeDeviceDriver udevNodeDeviceDriver = {
static virStateDriver udevStateDriver = { static virStateDriver udevStateDriver = {
.name = "udev", .name = "udev",
.stateInitialize = nodeDeviceStateInitialize, /* 0.7.3 */ .stateInitialize = nodeStateInitialize, /* 0.7.3 */
.stateCleanup = nodeDeviceStateCleanup, /* 0.7.3 */ .stateCleanup = nodeStateCleanup, /* 0.7.3 */
.stateReload = nodeDeviceStateReload, /* 0.7.3 */ .stateReload = nodeStateReload, /* 0.7.3 */
}; };
int udevNodeRegister(void) int udevNodeRegister(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册