summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-09-27 15:05:30 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-09-27 15:05:30 +0200
commit17c149ff1bded8f6e86d363d48c2a98d4439c0b4 (patch)
tree14d125c32518708bbb0e8a3c1f64996a12df990a /vtysh
parentvtysh: Properly handle `[no] service cputime-stats` in config (diff)
downloadfrr-17c149ff1bded8f6e86d363d48c2a98d4439c0b4.tar.xz
frr-17c149ff1bded8f6e86d363d48c2a98d4439c0b4.zip
vtysh: Properly handle `service cputime-warning XX` in config
Prevent duplicate lines from each daemon in vtysh output. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh_config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index d4628839d..a2a0ac1b0 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -493,7 +493,9 @@ void vtysh_config_parse_line(void *arg, const char *line)
strncmp(line, "service cputime-stats",
strlen("service cputime-stats")) == 0 ||
strncmp(line, "no service cputime-stats",
- strlen("no service cputime-stats")) == 0)
+ strlen("no service cputime-stats")) == 0 ||
+ strncmp(line, "service cputime-warning",
+ strlen("service cputime-warning")) == 0)
config_add_line_uniq(config_top, line);
else
config_add_line(config_top, line);