From d72c05e266c175566dd3f12b86666e60cca01ff6 Mon Sep 17 00:00:00 2001 From: Joonwoo Park Date: Tue, 8 Jul 2008 02:38:27 -0700 Subject: [PATCH] --- yaml --- r: 103329 b: refs/heads/master c: 43138833ee9af07e865a4dcbfe81684c9c2f2262 h: refs/heads/master i: 103327: 65f35b5df50051118765392e11a35094df80190f v: v3 --- [refs] | 2 +- trunk/lib/ts_fsm.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index fe0351d699b7..67c18783954b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2523c3fc2bc9e34c06a71517844d55353f1f904a +refs/heads/master: 43138833ee9af07e865a4dcbfe81684c9c2f2262 diff --git a/trunk/lib/ts_fsm.c b/trunk/lib/ts_fsm.c index af575b61526b..5696a35184e4 100644 --- a/trunk/lib/ts_fsm.c +++ b/trunk/lib/ts_fsm.c @@ -257,7 +257,7 @@ static unsigned int fsm_find(struct ts_config *conf, struct ts_state *state) } static struct ts_config *fsm_init(const void *pattern, unsigned int len, - gfp_t gfp_mask) + gfp_t gfp_mask, int flags) { int i, err = -EINVAL; struct ts_config *conf; @@ -269,6 +269,9 @@ static struct ts_config *fsm_init(const void *pattern, unsigned int len, if (len % sizeof(struct ts_fsm_token) || ntokens < 1) goto errout; + if (flags & TS_IGNORECASE) + goto errout; + for (i = 0; i < ntokens; i++) { struct ts_fsm_token *t = &tokens[i]; @@ -284,6 +287,7 @@ static struct ts_config *fsm_init(const void *pattern, unsigned int len, if (IS_ERR(conf)) return conf; + conf->flags = flags; fsm = ts_config_priv(conf); fsm->ntokens = ntokens; memcpy(fsm->tokens, pattern, len);