]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: initialize vty structure correctly for output to terminal 1833/head
authorChristian Franke <chris@opensourcerouting.org>
Mon, 5 Mar 2018 23:46:01 +0000 (00:46 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Tue, 6 Mar 2018 00:37:49 +0000 (01:37 +0100)
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
vtysh/vtysh.c
vtysh/vtysh_config.c

index 8719226281f162afa2a9562afb71692229a828f3..bf9d70bae96db456550d405f4d7b2edc5b5ff37f 100644 (file)
@@ -539,7 +539,7 @@ int vtysh_mark_file(const char *filename)
        }
 
        vty = vty_new();
-       vty->fd = 0; /* stdout */
+       vty->wfd = STDERR_FILENO;
        vty->type = VTY_TERM;
        vty->node = CONFIG_NODE;
 
index aa1dd407eb5c3557253231eeb83459d7743544ce..3658128b1cfc743a8fd0b53af6269c5aedfa8067 100644 (file)
@@ -398,7 +398,7 @@ static int vtysh_read_file(FILE *confp)
        int ret;
 
        vty = vty_new();
-       vty->fd = 0; /* stdout */
+       vty->wfd = STDERR_FILENO;
        vty->type = VTY_TERM;
        vty->node = CONFIG_NODE;