提交 a0e4f654 编写于 作者: M Michal Privoznik

tools: s/Nodedev/NodeDevice/

The proper name is [vir|virsh]NodeDevice* and not Nodedev.
Fortunately, there are only handful of offenders.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJonathon Jongsma <jjongsma@redhat.com>
上级 6c62122e
......@@ -1004,7 +1004,7 @@ virshDomainInterfaceStateCompleter(vshControl *ctl,
char **
virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
virshNodeDeviceEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
unsigned int flags)
{
......@@ -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,7 +1028,7 @@ virshNodedevEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
char **
virshNodedevCapabilityNameCompleter(vshControl *ctl,
virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags)
{
......
......@@ -106,11 +106,11 @@ char ** virshDomainInterfaceStateCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshNodedevEventNameCompleter(vshControl *ctl,
char ** virshNodeDeviceEventNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshNodedevCapabilityNameCompleter(vshControl *ctl,
char ** virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
......
......@@ -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)
......
......@@ -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[];
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册