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;
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;
}
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;
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,
},
{.name = "cap",
.type = VSH_OT_STRING,
- .completer = virshNodedevCapabilityNameCompleter,
+ .completer = virshNodeDeviceCapabilityNameCompleter,
.help = N_("capability names, separated by comma")
},
{.name = NULL}
bool loop;
bool timestamp;
int count;
- virshNodedevEventCallback *cb;
+ virshNodeDeviceEventCallback *cb;
};
typedef struct virshNodeDeviceEventData virshNodeDeviceEventData;
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[] = {
},
{.name = "event",
.type = VSH_OT_STRING,
- .completer = virshNodedevEventNameCompleter,
+ .completer = virshNodeDeviceEventNameCompleter,
.help = N_("which event type to wait for")
},
{.name = "loop",
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;
}
}
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);
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)
#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[];