[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1214034855-1358-1-git-send-email-joonwpark81@gmail.com>
Date: Sat, 21 Jun 2008 00:54:15 -0700
From: Joonwoo Park <joonwpark81@...il.com>
To: Thomas Graf <tgraf@...g.ch>, Patrick McHardy <kaber@...sh.net>
Cc: netdev <netdev@...r.kernel.org>,
netfilter-devel <netfilter-devel@...r.kernel.org>,
Joonwoo Park <joonwpark81@...il.com>
Subject: [PATCH 5/8] textsearch: fix finite state machine textsearch for handling case insensitive searching
For fsm text search, handle case insensitive parameter as -EINVAL.
Signed-off-by: Joonwoo Park <joonwpark81@...il.com>
---
lib/ts_fsm.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index af575b6..88edffe 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -257,7 +257,7 @@ found_match:
}
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
- gfp_t gfp_mask)
+ u8 icase, gfp_t gfp_mask)
{
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 (icase)
+ 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->icase = icase;
fsm = ts_config_priv(conf);
fsm->ntokens = ntokens;
memcpy(fsm->tokens, pattern, len);
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists