summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-04-06 09:34:33 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-04-06 20:07:27 -0400
commit1db63918b2478bc37b12aff584071085c51e6294 (patch)
tree0f9c3b9eee8a17b62b8338543b807cb5dd0022e0 /lib/command.c
parent0f48374b387d423d037fae779da06cd1dd90bf10 (diff)
lib, vtysh: Return actual problem further up
When we encounter a problem loading a config file quantify to the end user what has gone wrong, with a combination of err output as well as return codes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 05fc9b9e27..4e8e24f491 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -3254,8 +3254,8 @@ DEFUN (show_startup_config,
confp = fopen (host.config, "r");
if (confp == NULL)
{
- vty_out (vty, "Can't open configuration file [%s]%s",
- host.config, VTY_NEWLINE);
+ vty_out (vty, "Can't open configuration file [%s] due to '%s'%s",
+ host.config, safe_strerror(errno), VTY_NEWLINE);
return CMD_WARNING;
}