summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-29 14:54:26 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-30 13:08:55 +0200
commitf4762eb5e7d321da75911e2fcb156e4e6334f171 (patch)
tree37ed09fef89d9130e08274678437cf82159afc02 /common
parent87681170f5e16e579326fabbb09e468c3164bda0 (diff)
downloadbarebox-f4762eb5e7d321da75911e2fcb156e4e6334f171.tar.gz
barebox-f4762eb5e7d321da75911e2fcb156e4e6334f171.tar.xz
hush: pass GLOB_NOCHECK to glob
By doing so glob will not return GLOB_NOMATCH anymore but instead just does what fake_glob would do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/hush.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/common/hush.c b/common/hush.c
index ea6e53b7c8..d7ed624006 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -962,11 +962,6 @@ static int xglob(o_string *dest, int flags, glob_t *pglob)
} else if (glob_needed(dest->data)) {
gr = glob(dest->data, flags, NULL, pglob);
debug("glob returned %d\n",gr);
- if (gr == GLOB_NOMATCH) {
- /* quote removal, or more accurately, backslash removal */
- gr = fake_glob(dest->data, flags, NULL, pglob);
- debug("globhack returned %d\n",gr);
- }
} else {
gr = fake_glob(dest->data, flags, NULL, pglob);
debug("globhack returned %d\n",gr);
@@ -1172,7 +1167,7 @@ static int done_word(o_string *dest, struct p_context *ctx)
{
struct child_prog *child = ctx->child;
glob_t *glob_target;
- int gr, flags = 0;
+ int gr, flags = GLOB_NOCHECK;
debug("%s: %s %p\n", __func__, dest->data, child);
if (dest->length == 0 && !dest->nonnull) {