diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2008-06-14 21:51:01 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2008-06-14 21:51:01 +0000 |
commit | e8e685547f862de636ba1ba3e9c03650b78e10ea (patch) | |
tree | b60c00dcd5d3735e9d8481884d52c4395a16178f /app/cwm/parse.y | |
parent | 96d8374599b2da907e83e72675c75934b48dc831 (diff) |
slightly alter the semantics of config files:
- if no config file, continue silently and apply defaults
- if config file, parse and move on
- if config file specified but not found, error out
ok oga@
Diffstat (limited to 'app/cwm/parse.y')
-rw-r--r-- | app/cwm/parse.y | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/cwm/parse.y b/app/cwm/parse.y index dd2a45ba2..e344e1100 100644 --- a/app/cwm/parse.y +++ b/app/cwm/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.10 2008/06/14 21:48:54 okan Exp $ */ +/* $OpenBSD: parse.y,v 1.11 2008/06/14 21:51:00 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -441,7 +441,8 @@ pushfile(const char *name) nfile->name = xstrdup(name); if ((nfile->stream = fopen(nfile->name, "r")) == NULL) { - warn("%s", nfile->name); + if (errno != ENOENT) + warn("%s", nfile->name); free(nfile->name); free(nfile); return (NULL); |