summaryrefslogtreecommitdiffstats
path: root/zebra/client_main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-04-06 15:34:33 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-04-07 02:07:27 +0200
commit1db63918b2478bc37b12aff584071085c51e6294 (patch)
tree0f9c3b9eee8a17b62b8338543b807cb5dd0022e0 /zebra/client_main.c
parentlib: Initialize variable (diff)
downloadfrr-1db63918b2478bc37b12aff584071085c51e6294.tar.xz
frr-1db63918b2478bc37b12aff584071085c51e6294.zip
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 'zebra/client_main.c')
-rw-r--r--zebra/client_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/client_main.c b/zebra/client_main.c
index 51a553ae0..24bfa56d0 100644
--- a/zebra/client_main.c
+++ b/zebra/client_main.c
@@ -212,7 +212,8 @@ main (int argc, char **argv)
fp = fopen (argv[1], "r");
if (fp == NULL)
{
- fprintf (stderr, "can't open %s\n", argv[1]);
+ fprintf (stderr,"%% Can't open configuration file %s due to '%s'\n",
+ argv[1], safe_strerror(errno));
exit (1);
}