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