From: Christian Franke Date: Mon, 5 Mar 2018 23:46:01 +0000 (+0100) Subject: vtysh: initialize vty structure correctly for output to terminal X-Git-Tag: frr-5.0-dev~190^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4a9746fdd0507a7552121072d6f06c7e78a10c63;p=mirror%2Ffrr.git vtysh: initialize vty structure correctly for output to terminal Signed-off-by: Christian Franke --- diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 8719226281..bf9d70bae9 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -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; diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index aa1dd407eb..3658128b1c 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -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;