函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:parse_one

函数原型:static int parse_one(char *param, char *val, const char *doing, const struct kernel_param *params, unsigned num_params, s16 min_level, s16 max_level, void *arg, int (*handle_unknown)(char *param, char *val, const char *doing, void *arg))

返回类型:int

参数:

类型参数名称
char *param
char *val
const char *doing
const struct kernel_param *params
unsignednum_params
s16min_level
s16max_level
void *arg
int (*handle_unknown
130 i小于num_params循环
131  如果检查参数名称匹配
132  如果level小于min_levellevel大于max_level则返回:0
136  如果非val且非flags按位与KERNEL_PARAM_OPS_FL_NOARG的值则返回:负EINVAL
139  pr_debug("handling %s with %p\n", param, set)
142  如果param_check_unsafe( & params[i])则err等于set(val, & params[i])
144  否则err等于负EPERM
147  返回:err
151  如果handle_unknown
152  pr_debug("doing %s: %s='%s'\n", doing, param, val)
153  返回:handle_unknown(param, val, doing, arg)
156  pr_debug("Unknown argument '%s'\n", param)
157  返回:负ENOENT
调用者
名称描述
parse_args解析参数