X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Ftextsearch.c;h=4b7c6075256f60e02cbf144029f00142e7411fa4;hb=49997d75152b3d23c53b0fa730599f2f74c92c65;hp=be8bda3862f5f34595dcdbeb6284e30071ef7409;hpb=03bbe082cffc4533f6557bf23f0c672307067246;p=mv-sheeva.git diff --git a/lib/textsearch.c b/lib/textsearch.c index be8bda3862f..4b7c6075256 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c @@ -54,10 +54,13 @@ * USAGE * * Before a search can be performed, a configuration must be created - * by calling textsearch_prepare() specyfing the searching algorithm and - * the pattern to look for. The returned configuration may then be used - * for an arbitary amount of times and even in parallel as long as a - * separate struct ts_state variable is provided to every instance. + * by calling textsearch_prepare() specifying the searching algorithm, + * the pattern to look for and flags. As a flag, you can set TS_IGNORECASE + * to perform case insensitive matching. But it might slow down + * performance of algorithm, so you should use it at own your risk. + * The returned configuration may then be used for an arbitary + * amount of times and even in parallel as long as a separate struct + * ts_state variable is provided to every instance. * * The actual search is performed by either calling textsearch_find_- * continuous() for linear data or by providing an own get_next_block() @@ -89,7 +92,6 @@ * panic("Oh my god, dancing chickens at %d\n", pos); * * textsearch_destroy(conf); - * * ========================================================================== */ @@ -97,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -279,7 +282,7 @@ struct ts_config *textsearch_prepare(const char *algo, const void *pattern, if (ops == NULL) goto errout; - conf = ops->init(pattern, len, gfp_mask); + conf = ops->init(pattern, len, gfp_mask, flags); if (IS_ERR(conf)) { err = PTR_ERR(conf); goto errout;