aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/vty/command.c')
-rw-r--r--openbsc/src/vty/command.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c
index 94a5c2af2..44bdf26e4 100644
--- a/openbsc/src/vty/command.c
+++ b/openbsc/src/vty/command.c
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include <time.h>
#include <sys/time.h>
+#include <sys/stat.h>
//#include "memory.h"
//#include "log.h"
@@ -45,6 +46,7 @@ Boston, MA 02111-1307, USA. */
//#include "workqueue.h"
#include <openbsc/gsm_data.h>
+#include <openbsc/gsm_subscriber.h>
/* Command vector which includes some level of command lists. Normally
each daemon maintains each own cmdvec. */
@@ -473,6 +475,7 @@ void install_element(enum node_type ntype, struct cmd_element *cmd)
cmd->cmdsize = cmd_cmdsize(cmd->strvec);
}
+#ifdef VTY_CRYPT_PW
static unsigned char itoa64[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -498,6 +501,7 @@ static char *zencrypt(const char *passwd)
return crypt(passwd, salt);
}
+#endif
/* This function write configuration of this host. */
static int config_write_host(struct vty *vty)
@@ -2215,7 +2219,6 @@ cmd_execute_command_strict(vector vline, struct vty *vty,
return (*matched_element->func) (matched_element, vty, argc, argv);
}
-#if 0
/* Configration make from file. */
int config_from_file(struct vty *vty, FILE * fp)
{
@@ -2247,7 +2250,6 @@ int config_from_file(struct vty *vty, FILE * fp)
}
return CMD_SUCCESS;
}
-#endif
/* Configration from terminal */
DEFUN(config_terminal,
@@ -2444,7 +2446,6 @@ DEFUN(config_list, config_list_cmd, "list", "Print command list\n")
return CMD_SUCCESS;
}
-#if 0
/* Write current configuration into file. */
DEFUN(config_write_file,
config_write_file_cmd,
@@ -2548,7 +2549,7 @@ DEFUN(config_write_file,
if (chmod(config_file, CONFIGFILE_MASK) != 0) {
vty_out(vty, "Can't chmod configuration file %s: %s (%d).%s",
- config_file, safe_strerror(errno), errno, VTY_NEWLINE);
+ config_file, strerror(errno), errno, VTY_NEWLINE);
return CMD_WARNING;
}
@@ -2639,7 +2640,6 @@ ALIAS(config_write_terminal,
return CMD_SUCCESS;
}
-#endif
/* Hostname configuration */
DEFUN(config_hostname,
@@ -3328,13 +3328,11 @@ void install_default(enum node_type node)
install_element(node, &config_help_cmd);
install_element(node, &config_list_cmd);
-#if 0
install_element(node, &config_write_terminal_cmd);
install_element(node, &config_write_file_cmd);
install_element(node, &config_write_memory_cmd);
install_element(node, &config_write_cmd);
install_element(node, &show_running_config_cmd);
-#endif
}
/* Initialize command interface. Install basic nodes and commands. */
@@ -3378,9 +3376,9 @@ void cmd_init(int terminal)
install_default(ENABLE_NODE);
install_element(ENABLE_NODE, &config_disable_cmd);
install_element(ENABLE_NODE, &config_terminal_cmd);
- //install_element (ENABLE_NODE, &copy_runningconfig_startupconfig_cmd);
+ install_element (ENABLE_NODE, &copy_runningconfig_startupconfig_cmd);
}
- //install_element (ENABLE_NODE, &show_startup_config_cmd);
+ install_element (ENABLE_NODE, &show_startup_config_cmd);
install_element(ENABLE_NODE, &show_version_cmd);
if (terminal) {