From 830972cab211a2f7ad82d7635ad9111afac8f47b Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 26 Mar 2024 20:25:21 +0200 Subject: 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 --- lib/debug.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/debug.c') 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; -- cgit v1.2.3