diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-10-09 11:03:50 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-10-11 08:52:19 +0200 |
commit | 3ff671b830698abbf39586c6677f3142dcfa72f1 (patch) | |
tree | 0499749791eec6b19ea648b414426e5853a620c8 /vtysh | |
parent | Merge pull request #10733 from anlancs/zebra-remove-update (diff) | |
download | frr-3ff671b830698abbf39586c6677f3142dcfa72f1.tar.xz frr-3ff671b830698abbf39586c6677f3142dcfa72f1.zip |
lib: Suppress HOB/STARVATION warnings when running in vtysh
Running ping/traceroute/etc. (any kind of commands that use execute_command()
suffer with this kind of warnings.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'vtysh')
-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)) |