summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-03-10 18:58:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-03-10 18:58:40 +0000
commit81013f6bbecf5177ae472d01365c066504ccbdb8 (patch)
treea005fc185f7c3e9d7b43272528ea0952da1c6a88 /scripts
parent5ef90f65403de9e9f532e0f2ffb26b0937460c78 (diff)
downloadmtk-20170518-81013f6bbecf5177ae472d01365c066504ccbdb8.zip
mtk-20170518-81013f6bbecf5177ae472d01365c066504ccbdb8.tar.gz
mtk-20170518-81013f6bbecf5177ae472d01365c066504ccbdb8.tar.bz2
scripts/config: make wildcard include with no results non-fatal
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39862
Diffstat (limited to 'scripts')
-rw-r--r--scripts/config/zconf.l7
-rw-r--r--scripts/config/zconf.lex.c_shipped7
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/config/zconf.l b/scripts/config/zconf.l
index bce3da6..3aef459 100644
--- a/scripts/config/zconf.l
+++ b/scripts/config/zconf.l
@@ -345,6 +345,13 @@ void zconf_nextfile(const char *name)
int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl);
+
+ /* ignore wildcard patterns that return no result */
+ if (err == GLOB_NOMATCH && strchr(name, '*')) {
+ err = 0;
+ gl.gl_pathc = 0;
+ }
+
if (err) {
const char *reason = "unknown error";
diff --git a/scripts/config/zconf.lex.c_shipped b/scripts/config/zconf.lex.c_shipped
index aae2842..766549f 100644
--- a/scripts/config/zconf.lex.c_shipped
+++ b/scripts/config/zconf.lex.c_shipped
@@ -2401,6 +2401,13 @@ void zconf_nextfile(const char *name)
int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl);
+
+ /* ignore wildcard patterns that return no result */
+ if (err == GLOB_NOMATCH && strchr(name, '*')) {
+ err = 0;
+ gl.gl_pathc = 0;
+ }
+
if (err) {
const char *reason = "unknown error";