aboutsummaryrefslogtreecommitdiffstats
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
commit3de070394456df1a80addd7d043554a9302bfe65 (patch)
treec8878338a12d407da49a7a7249add0bdec66156d /scripts
parent22af96eb9cd9e3a406585f81ce7e8b4babf20f00 (diff)
downloadupstream-3de070394456df1a80addd7d043554a9302bfe65.tar.gz
upstream-3de070394456df1a80addd7d043554a9302bfe65.tar.bz2
upstream-3de070394456df1a80addd7d043554a9302bfe65.zip
scripts/config: make wildcard include with no results non-fatal
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39862 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 bce3da6653..3aef45983a 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 aae284229c..766549fbfe 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";
a id='n183' href='#n183'>183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259