summaryrefslogtreecommitdiff
path: root/bgpd/bgp_btoa.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 /bgpd/bgp_btoa.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 'bgpd/bgp_btoa.c')
-rw-r--r--bgpd/bgp_btoa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c
index b9ff67c547..a6c16d8c2d 100644
--- a/bgpd/bgp_btoa.c
+++ b/bgpd/bgp_btoa.c
@@ -160,7 +160,8 @@ main (int argc, char **argv)
fp = fopen (argv[1], "r");
if (!fp)
{
- perror ("fopen");
+ fprintf (stdout,"%% Can't open configuration file %s due to '%s'.\n",
+ argv[1], safe_strerror(errno));
exit (1);
}