函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-27 12:45:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:The "str" argument may point to something like | grep xyz

函数原型:static void parse_grep(const char *str)

返回类型:void

参数:

类型参数名称
const char *str
825  cp等于str
828  如果cp不等于'|'则返回
830  cp自加
831 Note: isspace() must return false for %NUL-terminator ( * cp)循环
832  cp自加
833  如果非str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to
834  kdb_printf("invalid 'pipe', see grephelp\n")
835  返回
837  cp加等于5
838 Note: isspace() must return false for %NUL-terminator ( * cp)循环
839  cp自加
840  cp2等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
841  如果cp2cp2等于'\0'
843  len等于strlen - Find the length of a string*@s: The string to be sized
844  如果len恒等于0则
845  kdb_printf("invalid 'pipe', see grephelp\n")
846  返回
849  如果cp恒等于'"'则
852  cp自加
853  cp2等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
854  如果非cp2
855  kdb_printf("invalid quoted string, see grephelp\n")
856  返回
858  cp2等于'\0'
860  kdb_grep_leading等于0
861  如果cp恒等于'^'则
862  kdb_grep_leading等于1
863  cp自加
865  len等于strlen - Find the length of a string*@s: The string to be sized
866  kdb_grep_trailing等于0
867  如果*cplen减1的差恒等于'$'则
868  kdb_grep_trailing等于1
869  *cplen减1的差等于'\0'
871  len等于strlen - Find the length of a string*@s: The string to be sized
872  如果非len则返回
874  如果len大于等于KDB_GREP_STRLEN
875  kdb_printf("search string too long\n")
876  返回
878  strcpy(kdb_grep_string, cp)
879  kdb_grepping_flag自加
880  返回
调用者
名称描述
kdb_parse