lib/vty: add separate output fd support to VTYs
to be used with stdin/stdout terminals, this adds support for writing to
a different FD than we're reading from. Also fixes error messages from
config load being written to stdin.
[v2: fixed config write]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/lib/vty.h b/lib/vty.h
index f31f4b5..b758df3 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -34,6 +34,9 @@
/* File descripter of this vty. */
int fd;
+ /* output FD, to support stdin/stdout combination */
+ int wfd;
+
/* Is this vty connect to file or not */
enum {VTY_TERM, VTY_FILE, VTY_SHELL, VTY_SHELL_SERV} type;