diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-03-26 16:38:45 +0200 |
|---|---|---|
| committer | Mark Stapp <mjs@cisco.com> | 2024-08-20 11:07:45 -0400 |
| commit | 1797b7eefc730bb4f5aec08f130861650c61dd97 (patch) | |
| tree | 6b97f5357cb86c73b2ed9b24f893d8296688a66c /pathd/path_cli.c | |
| parent | d9775c690cb6f3d5fcc91805c3ada83aaa8f4835 (diff) | |
pathd: rework debugs
Pathd uses a single debug struct with additional option flags to
configure different types of debug messages. This is not how debug
library is supposed to be used. The idea of option flags is to allow
more granular control of a single type, not to represent multiple types.
This commit adds a separate debug struct for each type which greatly
simplifies the code.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'pathd/path_cli.c')
| -rw-r--r-- | pathd/path_cli.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c index e22931c13e..b841d29bd0 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -1101,10 +1101,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; } @@ -1310,9 +1308,7 @@ int config_write_segment_routing(struct vty *vty) 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"); + vty_out(vty, "debug pathd policy\n"); return 1; } return 0; |
