summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 22:00:24 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-16 12:53:00 +0200
commit249a771b63505b24d2a8c05158d7692384811533 (patch)
tree20d587dfca7061a129f479e7a96208453cfc3941 /lib/command.c
parent62b346eefa1b9e09c9372f5b6376e1bca4162015 (diff)
*: remove cmd_node->vtysh
The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/command.c b/lib/command.c
index 85ccbbf191..a26ec1a266 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -203,7 +203,6 @@ static struct cmd_node enable_node = {
static struct cmd_node config_node = {
.node = CONFIG_NODE,
.prompt = "%s(config)# ",
- .vtysh = 1,
};
static const struct facility_map {
@@ -1724,8 +1723,7 @@ static int vty_write_config(struct vty *vty)
vty_out(vty, "!\n");
for (i = 0; i < vector_active(cmdvec); i++)
- if ((node = vector_slot(cmdvec, i)) && node->func
- && (node->vtysh || vty->type != VTY_SHELL)) {
+ if ((node = vector_slot(cmdvec, i)) && node->func) {
if ((*node->func)(vty))
vty_out(vty, "!\n");
}