summaryrefslogtreecommitdiff
path: root/pathd/path_ted.c
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 /pathd/path_ted.c
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 'pathd/path_ted.c')
-rw-r--r--pathd/path_ted.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/pathd/path_ted.c b/pathd/path_ted.c
index 470a973ae2..88cda79187 100644
--- a/pathd/path_ted.c
+++ b/pathd/path_ted.c
@@ -30,11 +30,11 @@ static uint32_t path_ted_stop_importing_igp(void);
static enum zclient_send_status path_ted_link_state_sync(void);
static void path_ted_timer_handler_sync(struct event *thread);
static void path_ted_timer_handler_refresh(struct event *thread);
-static int path_ted_cli_debug_config_write(struct vty *vty);
extern struct zclient *zclient;
-struct ted_state ted_state_g = {};
+struct ted_state ted_state_g = { .dbg = { .conf = "debug pathd mpls-te",
+ .desc = "Pathd TED" } };
/*
* path_path_ted public API function implementations
@@ -467,14 +467,6 @@ DEFPY (show_pathd_ted_db,
* Config Write functions
*/
-int path_ted_cli_debug_config_write(struct vty *vty)
-{
- if (DEBUG_MODE_CHECK(&ted_state_g.dbg, DEBUG_MODE_CONF)) {
- vty_out(vty, "debug pathd mpls-te\n");
- return 1;
- }
- return 0;
-}
void path_ted_show_debugging(struct vty *vty)
{
@@ -528,9 +520,6 @@ static void path_ted_register_vty(void)
install_element(CONFIG_NODE, &debug_path_ted_cmd);
install_element(ENABLE_NODE, &debug_path_ted_cmd);
- hook_register(nb_client_debug_config_write,
- path_ted_cli_debug_config_write);
-
debug_install(&ted_state_g.dbg);
}