diff options
author | hasso <hasso> | 2004-10-07 21:32:14 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-10-07 21:32:14 +0000 |
commit | ea8e9d972e8775f3e1c4e03fbacb18a42e8c4177 (patch) | |
tree | 0762c5ca1ae795080fb5ec9bc6cb54bffcc02748 /lib | |
parent | e561a8eb365a77beb0dd1c4ac406f9de21543a74 (diff) |
Even more const strings and fix to bugfix.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ChangeLog | 6 | ||||
-rw-r--r-- | lib/command.c | 13 | ||||
-rw-r--r-- | lib/command.h | 2 |
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 (); |