diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-03-26 20:25:21 +0200 |
|---|---|---|
| committer | Mark Stapp <mjs@cisco.com> | 2024-08-27 09:53:02 -0400 |
| commit | 830972cab211a2f7ad82d7635ad9111afac8f47b (patch) | |
| tree | d33c9a59f0e3fefbcd9173684bacffbf41127f63 /lib/debug.c | |
| parent | 82e52e0f21c12aa5b7270032c32b38e1fa33aa28 (diff) | |
lib: common debug status output
Implement common code for debug status output and remove daemon-specific
code that is duplicated everywhere.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/debug.c')
| -rw-r--r-- | lib/debug.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/debug.c b/lib/debug.c index 9c283176a6..d25c32d428 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -38,6 +38,16 @@ DEFUN_NOSH (debug_all, /* ------------------------------------------------------------------------- */ +void debug_status_write(struct vty *vty) +{ + struct debug *debug; + + frr_each (debug_list, &debug_head, debug) { + if (DEBUG_MODE_CHECK(debug, DEBUG_MODE_ALL)) + vty_out(vty, " %s debugging is on\n", debug->desc); + } +} + static int config_write_debug(struct vty *vty) { struct debug *debug; |
