[PATCH 08/13] vsh: Introduce client hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tools/virsh.c | 1 +
 tools/vsh.c   | 1 +
 tools/vsh.h   | 6 ++++++
 3 files changed, 8 insertions(+)

diff --git a/tools/virsh.c b/tools/virsh.c
index 404deb8..017a669 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -82,6 +82,7 @@
 static char *progname;
 
 static const vshCmdGrp cmdGroups[];
+static const vshClientHooks hooks;
 
 double
 virshPrettyCapacity(unsigned long long val, const char **unit)
diff --git a/tools/vsh.c b/tools/vsh.c
index 71c8344..5f8461c 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -67,6 +67,7 @@
 # define SA_SIGINFO 0
 #endif
 
+static const vshClientHooks *hooks;
 static const vshCmdGrp *cmdGroups;
 
 /* Bypass header poison */
diff --git a/tools/vsh.h b/tools/vsh.h
index aaeb086..eae38d5 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -114,6 +114,7 @@ enum {
 };
 
 /* forward declarations */
+typedef struct _vshClientHooks vshClientHooks;
 typedef struct _vshCmd vshCmd;
 typedef struct _vshCmdDef vshCmdDef;
 typedef struct _vshCmdGrp vshCmdGrp;
@@ -223,6 +224,11 @@ struct _vshControl {
     void *privData;             /* client specific data */
 };
 
+typedef void *
+(*vshConnectionHook)(vshControl *ctl);
+
+struct _vshClientHooks {
+    vshConnectionHook connHandler;
 };
 
 struct _vshCmdGrp {
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]