summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/command.c13
-rw-r--r--lib/command.h2
3 files changed, 16 insertions, 5 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 3da0dfed..22f60da8 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-08 Hasso Tepper <hasso at quagga.net>
+
+ * command.c, command.h: Make argument of cmd_make_strvec function
+ const.
+ * command.c: Make hostname commands usable in vtysh again.
+
2004-10-07 Hasso Tepper <hasso at quagga.net>
* command.c, pid_output.c, print_version.c, vty.c, vty.h: Make more
diff --git a/lib/command.c b/lib/command.c
index 330470e5..2766a357 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -167,9 +167,10 @@ sort_node ()
character is separated by a space character. Return value is a
vector which includes char ** data element. */
vector
-cmd_make_strvec (char *string)
+cmd_make_strvec (const char *string)
{
- char *cp, *start, *token;
+ const char *cp, *start;
+ char *token;
int strlen;
vector strvec;
@@ -3303,9 +3304,13 @@ cmd_init (int terminal)
install_element (ENABLE_NODE, &config_terminal_no_length_cmd);
install_default (CONFIG_NODE);
+ }
+
+ install_element (CONFIG_NODE, &hostname_cmd);
+ install_element (CONFIG_NODE, &no_hostname_cmd);
- install_element (CONFIG_NODE, &hostname_cmd);
- install_element (CONFIG_NODE, &no_hostname_cmd);
+ if (terminal)
+ {
install_element (CONFIG_NODE, &password_cmd);
install_element (CONFIG_NODE, &password_text_cmd);
install_element (CONFIG_NODE, &enable_password_cmd);
diff --git a/lib/command.h b/lib/command.h
index 66883fbb..9e727cfb 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -287,7 +287,7 @@ void install_element (enum node_type, struct cmd_element *);
void sort_node ();
char *argv_concat (char **, int, int);
-vector cmd_make_strvec (char *);
+vector cmd_make_strvec (const char *);
void cmd_free_strvec (vector);
vector cmd_describe_command ();
char **cmd_complete_command ();