On 05/23/2018 08:32 AM, Lin Ma wrote:
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;
This should be virshDomainEventCallback because:
a) it's related to virsh, not vsh
b) it's related to Domain not some generic object
Michal