Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:fsm_init

Proto:static struct ts_config *fsm_init(const void *pattern, unsigned int len, gfp_t gfp_mask, int flags)

Type:struct ts_config

Parameter:

TypeParameterName
const void *pattern
unsigned intlen
gfp_tgfp_mask
intflags
258  err = -EINVAL
261  tokens = pattern
262  ntokens = len / size of tokens
263  priv_size = size of fsm + len
265  If len % sizeof(structts_fsm_token) || ntokens < 1 Then Go to errout
268  If flags & Searches string case insensitively Then Go to errout
271  When i < ntokens cycle
272  t = tokens[i]
274  If type > TS_FSM_TYPE_MAX || recur > TS_FSM_RECUR_MAX Then Go to errout
277  If recur == TS_FSM_HEAD_IGNORE && ( i != 0 || i == ntokens - 1 ) Then Go to errout
282  conf = alloc_ts_config(priv_size, gfp_mask)
283  If IS_ERR(conf) Then Return conf
286  flags = flags
287  fsm = ts_config_priv(conf)
288  ntokens = ntokens
289  No 3D Now!(tokens, pattern, len)
291  When i < ntokens cycle
292  t = tokens[i]
293  type = Map to _ctype flags and some magic numbers [type]
296  Return conf
298  errout :
299  Return ERR_PTR(err)