summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 21:46:23 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-16 12:53:00 +0200
commit62b346eefa1b9e09c9372f5b6376e1bca4162015 (patch)
tree2e3bc16d1d0765ab033c7ffd24ca58b3b5d35168 /lib/command.c
parent4c749d99dcdc7f0d811d0bbd2858b87f41e4feba (diff)
*: clean up cmd_node initializers
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c
index 8811b3a791..85ccbbf191 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -181,22 +181,30 @@ const char *cmd_domainname_get(void)
/* Standard command node structures. */
static struct cmd_node auth_node = {
- AUTH_NODE, "Password: ",
+ .node = AUTH_NODE,
+ .prompt = "Password: ",
};
static struct cmd_node view_node = {
- VIEW_NODE, "%s> ",
+ .node = VIEW_NODE,
+ .prompt = "%s> ",
};
static struct cmd_node auth_enable_node = {
- AUTH_ENABLE_NODE, "Password: ",
+ .node = AUTH_ENABLE_NODE,
+ .prompt = "Password: ",
};
static struct cmd_node enable_node = {
- ENABLE_NODE, "%s# ",
+ .node = ENABLE_NODE,
+ .prompt = "%s# ",
};
-static struct cmd_node config_node = {CONFIG_NODE, "%s(config)# ", 1};
+static struct cmd_node config_node = {
+ .node = CONFIG_NODE,
+ .prompt = "%s(config)# ",
+ .vtysh = 1,
+};
static const struct facility_map {
int facility;