Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_filter.c Create Date:2022-07-28 12:24:42
Last Modify:2022-05-22 20:19:57 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lter_parse_regex - parse a basic regex*@buff: the raw regex*@len: length of the regex*@search: will point to the beginning of the string to compare*@not: tell whether the match will have to be inverted* This passes in a buffer containing a regex and this

Proto:enum regex_type filter_parse_regex(char *buff, int len, char **search, int *not)

Type:enum regex_type

Parameter:

TypeParameterName
char *buff
intlen
char **search
int *not
823  type = MATCH_FULL
826  If buff[0] == '!' Then
827  not = 1
828  buff++
829  len--
830  Else not = 0
833  search = buff
835  If isdigit(buff[0]) Then Return MATCH_INDEX
838  When i < len cycle
839  If buff[i] == '*' Then
840  If Not i Then
842  Else if i == len - 1 Then
845  Else type = MATCH_FRONT_ONLY
847  buff[i] = 0
848  Break
849  Else
850  Return MATCH_GLOB
853  Return MATCH_GLOB
856  If buff[0] == '*' Then search = buff + 1
859  Return type
Caller
NameDescribe
filter_build_regex