The next patch will use it in virsh-completer.c for returning the strings
of domain event name.
Signed-off-by: Lin Ma <lma(a)suse.com>
---
tools/virsh-domain.c | 8 +-------
tools/virsh-domain.h | 8 ++++++++
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index cfbbf5a7bc..347c744bc9 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -12832,12 +12832,6 @@ virshDomainEventTrayChangeToString(int reason)
return str ? _(str) : _("unknown");
}
-struct vshEventCallback {
- const char *name;
- virConnectDomainEventGenericCallback cb;
-};
-typedef struct vshEventCallback vshEventCallback;
-
struct virshDomEventData {
vshControl *ctl;
bool loop;
@@ -13278,7 +13272,7 @@ virshEventBlockThresholdPrint(virConnectPtr conn
ATTRIBUTE_UNUSED,
}
-static vshEventCallback vshEventCallbacks[] = {
+vshEventCallback vshEventCallbacks[] = {
{ "lifecycle",
VIR_DOMAIN_EVENT_CALLBACK(virshEventLifecyclePrint), },
{ "reboot", virshEventGenericPrint, },
diff --git a/tools/virsh-domain.h b/tools/virsh-domain.h
index 3f9d12a5ff..e8e5611244 100644
--- a/tools/virsh-domain.h
+++ b/tools/virsh-domain.h
@@ -28,6 +28,14 @@
# include "virsh.h"
+struct vshEventCallback {
+ const char *name;
+ virConnectDomainEventGenericCallback cb;
+};
+typedef struct vshEventCallback vshEventCallback;
+
+extern vshEventCallback vshEventCallbacks[];
+
extern const vshCmdDef domManagementCmds[];
#endif /* VIRSH_DOMAIN_H */
--
2.16.2