diff options
Diffstat (limited to 'pathd/path_cli.c')
| -rw-r--r-- | pathd/path_cli.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c index e22931c13e..436883c1fd 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -1089,9 +1089,7 @@ DEFPY_NOSH(show_debugging_pathd, show_debugging_pathd_cmd, vty_out(vty, "Path debugging status:\n"); cmd_show_lib_debugs(vty); - /* nothing to do here */ - path_ted_show_debugging(vty); - path_policy_show_debugging(vty); + return CMD_SUCCESS; } @@ -1101,10 +1099,8 @@ DEFPY(debug_path_policy, debug_path_policy_cmd, "[no] debug pathd policy", "policy debugging\n") { uint32_t mode = DEBUG_NODE2MODE(vty->node); - bool no_debug = no; DEBUG_MODE_SET(&path_policy_debug, mode, !no); - DEBUG_FLAGS_SET(&path_policy_debug, PATH_POLICY_DEBUG_BASIC, !no_debug); return CMD_SUCCESS; } @@ -1307,33 +1303,9 @@ int config_write_segment_routing(struct vty *vty) return 1; } -static int path_policy_cli_debug_config_write(struct vty *vty) -{ - if (DEBUG_MODE_CHECK(&path_policy_debug, DEBUG_MODE_CONF)) { - if (DEBUG_FLAGS_CHECK(&path_policy_debug, - PATH_POLICY_DEBUG_BASIC)) - vty_out(vty, "debug pathd policy\n"); - return 1; - } - return 0; -} - -static int path_policy_cli_debug_set_all(uint32_t flags, bool set) -{ - DEBUG_FLAGS_SET(&path_policy_debug, flags, set); - - /* If all modes have been turned off, don't preserve options. */ - if (!DEBUG_MODE_CHECK(&path_policy_debug, DEBUG_MODE_ALL)) - DEBUG_CLEAR(&path_policy_debug); - - return 0; -} - void path_cli_init(void) { - hook_register(nb_client_debug_config_write, - path_policy_cli_debug_config_write); - hook_register(nb_client_debug_set_all, path_policy_cli_debug_set_all); + debug_install(&path_policy_debug); install_node(&segment_routing_node); install_node(&sr_traffic_eng_node); |
