The proper name is [vir|virsh]NodeDevice* and not Nodedev.
Fortunately, there are only handful of offenders.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virsh-completer.c | 14 +++++++-------
tools/virsh-completer.h | 12 ++++++------
tools/virsh-nodedev.c | 16 ++++++++--------
tools/virsh-nodedev.h | 6 +++---
4 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index 4fa6b19225..957db16003 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -1004,9 +1004,9 @@ virshDomainInterfaceStateCompleter(vshControl *ctl,
char **
-virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
- const vshCmd *cmd ATTRIBUTE_UNUSED,
- unsigned int flags)
+virshNodeDeviceEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
+ const vshCmd *cmd ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
size_t i = 0;
char **ret = NULL;
@@ -1018,7 +1018,7 @@ virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
return NULL;
for (i = 0; i < VIR_NODE_DEVICE_EVENT_ID_LAST; i++) {
- if (VIR_STRDUP(tmp[i], virshNodedevEventCallbacks[i].name) < 0)
+ if (VIR_STRDUP(tmp[i], virshNodeDeviceEventCallbacks[i].name) < 0)
return NULL;
}
@@ -1028,9 +1028,9 @@ virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
char **
-virshNodedevCapabilityNameCompleter(vshControl *ctl,
- const vshCmd *cmd,
- unsigned int flags)
+virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags)
{
VIR_AUTOSTRINGLIST tmp = NULL;
const char *cap_str = NULL;
diff --git a/tools/virsh-completer.h b/tools/virsh-completer.h
index 2e54dddc05..fb41c2c89f 100644
--- a/tools/virsh-completer.h
+++ b/tools/virsh-completer.h
@@ -106,13 +106,13 @@ char ** virshDomainInterfaceStateCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
-char ** virshNodedevEventNameCompleter(vshControl *ctl,
- const vshCmd *cmd,
- unsigned int flags);
+char ** virshNodeDeviceEventNameCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
-char ** virshNodedevCapabilityNameCompleter(vshControl *ctl,
- const vshCmd *cmd,
- unsigned int flags);
+char ** virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
char ** virshDomainDeviceAliasCompleter(vshControl *ctl,
const vshCmd *cmd,
diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index e8372a4daf..b21e2e2fcc 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -375,7 +375,7 @@ static const vshCmdOptDef opts_node_list_devices[] = {
},
{.name = "cap",
.type = VSH_OT_STRING,
- .completer = virshNodedevCapabilityNameCompleter,
+ .completer = virshNodeDeviceCapabilityNameCompleter,
.help = N_("capability names, separated by comma")
},
{.name = NULL}
@@ -775,7 +775,7 @@ struct virshNodeDeviceEventData {
bool loop;
bool timestamp;
int count;
- virshNodedevEventCallback *cb;
+ virshNodeDeviceEventCallback *cb;
};
typedef struct virshNodeDeviceEventData virshNodeDeviceEventData;
@@ -841,12 +841,12 @@ vshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventDone(data->ctl);
}
-virshNodedevEventCallback virshNodedevEventCallbacks[] = {
+virshNodeDeviceEventCallback virshNodeDeviceEventCallbacks[] = {
{ "lifecycle",
VIR_NODE_DEVICE_EVENT_CALLBACK(vshEventLifecyclePrint), },
{ "update", vshEventGenericPrint, }
};
-verify(VIR_NODE_DEVICE_EVENT_ID_LAST == ARRAY_CARDINALITY(virshNodedevEventCallbacks));
+verify(VIR_NODE_DEVICE_EVENT_ID_LAST ==
ARRAY_CARDINALITY(virshNodeDeviceEventCallbacks));
static const vshCmdInfo info_node_device_event[] = {
@@ -867,7 +867,7 @@ static const vshCmdOptDef opts_node_device_event[] = {
},
{.name = "event",
.type = VSH_OT_STRING,
- .completer = virshNodedevEventNameCompleter,
+ .completer = virshNodeDeviceEventNameCompleter,
.help = N_("which event type to wait for")
},
{.name = "loop",
@@ -906,7 +906,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
size_t i;
for (i = 0; i < VIR_NODE_DEVICE_EVENT_ID_LAST; i++)
- vshPrint(ctl, "%s\n", virshNodedevEventCallbacks[i].name);
+ vshPrint(ctl, "%s\n", virshNodeDeviceEventCallbacks[i].name);
return true;
}
@@ -918,7 +918,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
}
for (event = 0; event < VIR_NODE_DEVICE_EVENT_ID_LAST; event++)
- if (STREQ(eventName, virshNodedevEventCallbacks[event].name))
+ if (STREQ(eventName, virshNodeDeviceEventCallbacks[event].name))
break;
if (event == VIR_NODE_DEVICE_EVENT_ID_LAST) {
vshError(ctl, _("unknown event type %s"), eventName);
@@ -929,7 +929,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
data.loop = vshCommandOptBool(cmd, "loop");
data.timestamp = vshCommandOptBool(cmd, "timestamp");
data.count = 0;
- data.cb = &virshNodedevEventCallbacks[event];
+ data.cb = &virshNodeDeviceEventCallbacks[event];
if (vshCommandOptTimeoutToMs(ctl, cmd, &timeout) < 0)
return false;
if (vshCommandOptStringReq(ctl, cmd, "device", &device_value) < 0)
diff --git a/tools/virsh-nodedev.h b/tools/virsh-nodedev.h
index 9691b0db4d..95ff3bf526 100644
--- a/tools/virsh-nodedev.h
+++ b/tools/virsh-nodedev.h
@@ -22,12 +22,12 @@
#include "virsh.h"
-struct virshNodedevEventCallback {
+struct virshNodeDeviceEventCallback {
const char *name;
virConnectNodeDeviceEventGenericCallback cb;
};
-typedef struct virshNodedevEventCallback virshNodedevEventCallback;
+typedef struct virshNodeDeviceEventCallback virshNodeDeviceEventCallback;
-extern virshNodedevEventCallback virshNodedevEventCallbacks[];
+extern virshNodeDeviceEventCallback virshNodeDeviceEventCallbacks[];
extern const vshCmdDef nodedevCmds[];
--
2.21.0