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 /staticd/static_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 'staticd/static_debug.c')
| -rw-r--r-- | staticd/static_debug.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/staticd/static_debug.c b/staticd/static_debug.c index 7e70271063..618ba91d12 100644 --- a/staticd/static_debug.c +++ b/staticd/static_debug.c @@ -22,39 +22,8 @@ struct debug static_dbg_events = {0, "debug static events", "Staticd events"}; struct debug static_dbg_route = {0, "debug static route", "Staticd route"}; struct debug static_dbg_bfd = {0, "debug static bfd", "Staticd bfd"}; - -struct debug *static_debug_arr[] = { - &static_dbg_events, - &static_dbg_route, - &static_dbg_bfd -}; - -const char *static_debugs_conflines[] = { - "debug static events", - "debug static route", - "debug static bfd" -}; /* clang-format on */ -static int static_debug_config_write_helper(struct vty *vty, bool config) -{ - uint32_t mode = DEBUG_MODE_ALL; - - if (config) - mode = DEBUG_MODE_CONF; - - for (unsigned int i = 0; i < array_size(static_debug_arr); i++) - if (DEBUG_MODE_CHECK(static_debug_arr[i], mode)) - vty_out(vty, "%s\n", static_debugs_conflines[i]); - - return 0; -} - -int static_debug_status_write(struct vty *vty) -{ - return static_debug_config_write_helper(vty, false); -} - /* * Set debugging status. * |
