Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\textsearch.c Create Date:2022-07-28 07:10:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:xtsearch_prepare - Prepare a search*@algo: name of search algorithm*@pattern: pattern data*@len: length of pattern*@gfp_mask: allocation mask*@flags: search flags* Looks up the search algorithm module and creates a new textsearch

Proto:struct ts_config *textsearch_prepare(const char *algo, const void *pattern, unsigned int len, gfp_t gfp_mask, int flags)

Type:struct ts_config

Parameter:

TypeParameterName
const char *algo
const void *pattern
unsigned intlen
gfp_tgfp_mask
intflags
266  err = -ENOENT
270  If len == 0 Then Return ERR_PTR( - EINVAL)
273  ops = lookup_ts_algo(algo)
280  If ops == NULL && flags & Automatically load textsearch modules when needed Then
281  try to load a kernel module("ts_%s", algo)
282  ops = lookup_ts_algo(algo)
286  If (ops == NULL) Then Go to errout
289  conf = init(pattern, len, gfp_mask, flags)
290  If IS_ERR(conf) Then
291  err = PTR_ERR(conf)
292  Go to errout
295  ops = ops
296  Return conf
298  errout :
299  If ops Then module_put(owner)
302  Return ERR_PTR(err)