函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:argv_split - split a string at whitespace, returning an argv*@gfp: the GFP mask used to allocate memory*@str: the string to be split*@argcp: returned argument count* Returns an array of pointers to strings which are split out from*@str

函数原型:char **argv_split(gfp_t gfp, const char *str, int *argcp)

返回类型:char

参数:

类型参数名称
gfp_tgfp
const char *str
int *argcp
67  argv_str等于kstrndup(str, Maximum allocatable size - 1, gfp)
68  如果非argv_str则返回:NULL
71  argc等于count_argc(argv_str)
72  argv等于分配数组内存
73  如果非argv
74  释放内存
75  返回:NULL
78  argv等于argv_str
79  argv_ret等于argv先自加
80 argv_str循环
82  was_space = true
83  argv_str等于0
84  否则如果was_space
85  was_space = false
86  argv自加等于argv_str
89  * argv = NULL
91  如果argcpargcp等于argc
93  返回:argv_ret
调用者
名称描述
run_cmd
trace_run_command
call_usermodehelper_setup_file