diff options
Diffstat (limited to 'vtysh/vtysh_main.c')
-rw-r--r-- | vtysh/vtysh_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 20254fcd5..c57e8c799 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -221,7 +221,9 @@ static struct event *vtysh_rl_read_thread; static void vtysh_rl_read(struct event *thread) { - event_add_read(master, vtysh_rl_read, NULL, STDIN_FILENO, + bool *suppress_warnings = EVENT_ARG(thread); + + event_add_read(master, vtysh_rl_read, suppress_warnings, STDIN_FILENO, &vtysh_rl_read_thread); rl_callback_read_char(); } @@ -230,11 +232,12 @@ static void vtysh_rl_read(struct event *thread) static void vtysh_rl_run(void) { struct event thread; + bool suppress_warnings = true; master = event_master_create(NULL); rl_callback_handler_install(vtysh_prompt(), vtysh_rl_callback); - event_add_read(master, vtysh_rl_read, NULL, STDIN_FILENO, + event_add_read(master, vtysh_rl_read, &suppress_warnings, STDIN_FILENO, &vtysh_rl_read_thread); while (!vtysh_loop_exited && event_fetch(master, &thread)) |