fixeria has uploaded this change for review.

View Change

vty: remove broken 'show startup-config' command

Saving the current configuration by doing 'write file [FILE]' breaks
the 'show startup-config' command. If write succeeds, this command
will be showing contents of the new (potentially modified) file.
If write fails, this command will yield nothing.

Change-Id: If0b4a79052c060cad963e6458b29000a979f95ba
Fixes: OS#6440
---
M src/vty/command.c
1 file changed, 0 insertions(+), 31 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/40187/1
diff --git a/src/vty/command.c b/src/vty/command.c
index 8594290..0292ef1 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -3605,36 +3605,6 @@
show_running_config_cmd,
"show running-config", SHOW_STR "running configuration\n")

-/* Write startup configuration into the terminal. */
-DEFUN(show_startup_config,
- show_startup_config_cmd,
- "show startup-config", SHOW_STR "Contentes of startup configuration\n")
-{
- char buf[BUFSIZ];
- FILE *confp;
-
- confp = fopen(host.config, "r");
- if (confp == NULL) {
- vty_out(vty, "Can't open configuration file [%s]%s",
- host.config, VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- while (fgets(buf, BUFSIZ, confp)) {
- char *cp = buf;
-
- while (*cp != '\r' && *cp != '\n' && *cp != '\0')
- cp++;
- *cp = '\0';
-
- vty_out(vty, "%s%s", buf, VTY_NEWLINE);
- }
-
- fclose(confp);
-
- return CMD_SUCCESS;
-}
-
/* Hostname configuration */
DEFUN(config_hostname,
hostname_cmd,
@@ -4447,7 +4417,6 @@
install_lib_element(ENABLE_NODE, &copy_runningconfig_startupconfig_cmd);
install_lib_element(ENABLE_NODE, &shutdown_cmd);
}
- install_lib_element(ENABLE_NODE, &show_startup_config_cmd);
install_lib_element(ENABLE_NODE, &show_version_cmd);
install_lib_element(ENABLE_NODE, &show_online_help_cmd);


To view, visit change 40187. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If0b4a79052c060cad963e6458b29000a979f95ba
Gerrit-Change-Number: 40187
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>