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 84db436c88..c055d29d4b 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;