diff options
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r-- | vtysh/vtysh.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 3f189adb..c5e24546 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -290,7 +290,7 @@ vtysh_execute_func (const char *line, int pager) if (vline == NULL) return CMD_SUCCESS; - saved_ret = ret = cmd_execute_command (vline, vty, &cmd, 1); + saved_ret = ret = cmd_execute_command (vline, vty, &cmd, NULL, 1); saved_node = vty->node; /* If command doesn't succeeded in current node, try to walk up in node tree. @@ -300,7 +300,7 @@ vtysh_execute_func (const char *line, int pager) && vty->node > CONFIG_NODE) { vty->node = node_parent(vty->node); - ret = cmd_execute_command (vline, vty, &cmd, 1); + ret = cmd_execute_command (vline, vty, &cmd, NULL, 1); tried++; } @@ -398,7 +398,7 @@ vtysh_execute_func (const char *line, int pager) return CMD_SUCCESS; } - ret = cmd_execute_command (vline, vty, &cmd, 1); + ret = cmd_execute_command (vline, vty, &cmd, , NULL, 1); cmd_free_strvec (vline); if (ret != CMD_SUCCESS_DAEMON) break; @@ -568,7 +568,7 @@ vtysh_rl_describe (void) if (rl_end && isspace ((int) rl_line_buffer[rl_end - 1])) vector_set (vline, '\0'); - describe = cmd_describe_command (vline, vty, &ret); + describe = cmd_describe_command (vline, vty->node, &ret); fprintf (stdout,"\n"); @@ -658,7 +658,7 @@ command_generator (const char *text, int state) if (rl_end && isspace ((int) rl_line_buffer[rl_end - 1])) vector_set (vline, '\0'); - matched = cmd_complete_command (vline, vty, &complete_status); + matched = cmd_complete_command (vline, vty->node, &complete_status); } if (matched && matched[index]) @@ -2227,8 +2227,7 @@ void vtysh_init_vty (void) { /* Make vty structure. */ - vty = vty_new (); - vty->type = VTY_SHELL; + vty = vty_new (0, VTY_SHELL); vty->node = VIEW_NODE; /* Initialize commands. */ |