- config.c:config_load(): improved error reporting if fopen() fails
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 1 Jan 2015 13:57:07 +0000 (13:57 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 1 Jan 2015 13:57:07 +0000 (13:57 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5254 82007160-df01-0410-b94d-b575c5fd34c7

src/config.c

index 48984a69c262a0144d6528f3ea7de4f443d0de11..ad7fbf2f697a8f07b114ca2057fabc26dc5ff298 100644 (file)
@@ -23,7 +23,9 @@
 
 #include "setup.h"
 
+
 #include <stdio.h>
+#include <errno.h>
 #include <string.h>
 
 #include "config.h"
@@ -62,7 +64,7 @@ config_load(const char *filename)
 
   if ((yyin = fopen(filename, "r")) == NULL)
   {
-    log_printf("CONFIG -> Error opening %s", filename);
+    log_printf("CONFIG -> Error opening %s: %s", filename, strerror(errno));
     exit(EXIT_FAILURE);
   }