summaryrefslogtreecommitdiff
path: root/staticd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-26 19:24:45 +0200
committerMark Stapp <mjs@cisco.com>2024-08-27 09:53:02 -0400
commit82e52e0f21c12aa5b7270032c32b38e1fa33aa28 (patch)
tree6a771925348869c500ab278fd54fb30b267bc7bf /staticd
parent5dac6961540422a1ca139fae8c5ea9e5a437c4ba (diff)
lib: common debug config output
Implement common code for debug config output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'staticd')
-rw-r--r--staticd/static_debug.c11
-rw-r--r--staticd/static_debug.h8
-rw-r--r--staticd/static_vty.c8
3 files changed, 3 insertions, 24 deletions
diff --git a/staticd/static_debug.c b/staticd/static_debug.c
index 045c0d5b05..7e70271063 100644
--- a/staticd/static_debug.c
+++ b/staticd/static_debug.c
@@ -19,9 +19,9 @@
*/
/* clang-format off */
-struct debug static_dbg_events = {0, "Staticd events"};
-struct debug static_dbg_route = {0, "Staticd route"};
-struct debug static_dbg_bfd = {0, "Staticd bfd"};
+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,
@@ -50,11 +50,6 @@ static int static_debug_config_write_helper(struct vty *vty, bool config)
return 0;
}
-int static_config_write_debug(struct vty *vty)
-{
- return static_debug_config_write_helper(vty, true);
-}
-
int static_debug_status_write(struct vty *vty)
{
return static_debug_config_write_helper(vty, false);
diff --git a/staticd/static_debug.h b/staticd/static_debug.h
index c9100680f7..347f38b639 100644
--- a/staticd/static_debug.h
+++ b/staticd/static_debug.h
@@ -29,14 +29,6 @@ extern struct debug static_dbg_bfd;
void static_debug_init(void);
/*
- * Print staticd debugging configuration.
- *
- * vty
- * VTY to print debugging configuration to.
- */
-int static_config_write_debug(struct vty *vty);
-
-/*
* Print staticd debugging configuration, human readable form.
*
* vty
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index a18028ed08..65c8736882 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -1646,19 +1646,11 @@ DEFUN_NOSH (show_debugging_static,
return CMD_SUCCESS;
}
-static struct cmd_node debug_node = {
- .name = "debug",
- .node = DEBUG_NODE,
- .prompt = "",
- .config_write = static_config_write_debug,
-};
-
#endif /* ifndef INCLUDE_MGMTD_CMDDEFS_ONLY */
void static_vty_init(void)
{
#ifndef INCLUDE_MGMTD_CMDDEFS_ONLY
- install_node(&debug_node);
install_element(ENABLE_NODE, &debug_staticd_cmd);
install_element(CONFIG_NODE, &debug_staticd_cmd);
install_element(ENABLE_NODE, &show_debugging_static_cmd);