Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_io.c Create Date:2022-07-28 11:39:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:search arg1 to see if it contains arg2* (kdmain.c provides flags for ^pat and pat$)* return 1 for found, 0 for not found

Proto:static int kdb_search_string(char *searched, char *searchfor)

Type:int

Parameter:

TypeParameterName
char *searched
char *searchfor
521  len1 = strlen - Find the length of a string*@s: The string to be sized - 1
522  len2 = strlen - Find the length of a string*@s: The string to be sized
523  If len1 < len2 Then Return 0
525  If kdb_grep_leading && kdb_grep_trailing && len1 != len2 Then Return 0
527  If kdb_grep_leading Then
528  If Not strncmp(searched, searchfor, len2) Then Return 1
530  Else if kdb_grep_trailing Then
531  If Not strncmp(searched + len1 - len2, searchfor, len2) Then Return 1
533  Else
534  firstchar = searchfor
535  cp = searched
537  If Not strncmp(cp, searchfor, len2) Then Return 1
539  cp++
542  Return 0
Caller
NameDescribe
vkdb_printf