aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2011-06-25 13:37:05 +0000
committerokan2011-06-25 13:37:05 +0000
commit5d5f633410d9d7955ef1191e698425a45bcf6ec3 (patch)
treee17be286a2b72883f66900b18c171a90f96f2b35
parent5efa5057eb21ff95198872a1134e296d381f6e76 (diff)
downloadcwm-5d5f633410d9d7955ef1191e698425a45bcf6ec3.tar.gz
warn if we can't parse the config file on start, just like we do on reload.
part of a larger diff that was ok oga@
Diffstat (limited to '')
-rw-r--r--conf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index a87ef8d..975732c 100644
--- a/conf.c
+++ b/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: conf.c,v 1.85 2011/06/24 06:09:26 okan Exp $
+ * $OpenBSD: conf.c,v 1.86 2011/06/25 13:37:05 okan Exp $
*/
#include <sys/param.h>
@@ -283,7 +283,8 @@ conf_setup(struct conf *c, const char *conf_file)
conf_init(c);
- (void)parse_config(c->conf_path, c);
+ if (parse_config(c->conf_path, c) == -1)
+ warnx("config file %s has errors, not loading", c->conf_path);
}
void