[PATCH 06/13] vsh: vshControl now includes client private data and client specific progname

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

 



For our new generic methods, it's highly sufficient to use generic
vshControl structure only, however this doesn't apply for clients
themselves. They need their own control structure and we need a valid
reference to them, so why not store them as generic private data that
only the client can process.
---
 tools/vsh.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/vsh.h b/tools/vsh.h
index 76704a1..aaeb086 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -194,6 +194,7 @@ struct _vshCmd {
  */
 struct _vshControl {
     char *name;                 /* connection name */
+    char *progname;             /* program name */
     vshCmd *cmd;                /* the current command */
     char *cmdstr;               /* string with command */
     bool imode;                 /* interactive mode? */
@@ -219,6 +220,9 @@ struct _vshControl {
     struct termios termattr;    /* settings of the tty terminal */
 # endif
     bool istty;                 /* is the terminal a tty */
+    void *privData;             /* client specific data */
+};
+
 };
 
 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]