函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:解析参数

函数原型:char *parse_args(const char *doing, char *args, const struct kernel_param *params, unsigned num, s16 min_level, s16 max_level, void *arg, int (*unknown)(char *param, char *val, const char *doing, void *arg))

返回类型:char

参数:

类型参数名称
const char *doing
char *args
const struct kernel_param *params
unsignednum
s16min_level
s16max_level
void *arg
int (*unknown
171  char * param, * val, * err = NULL
174  args等于字符串删除空格
176  如果argspr_debug("doing %s, parsing ARGS: '%s'\n", doing, args)
179 args循环
183  args等于Parse a string to get a param value pair.* You can use " around spaces, but can't escape ".* Hyphens and underscores equivalent in parameter names.
185  如果非val字符串比较恒等于0则返回:如果err否则args
187  irq_was_disabled等于已禁止中断()
188  ret等于parse_one(param, val, doing, params, num, min_level, max_level, arg, unknown)
190  如果irq_was_disabled且非已禁止中断()则打印警告信息("%s: option '%s' enabled irq's!\n", doing, param)
195  :ret恒等于0
196  继续下一循环
197  :ret恒等于负ENOENT
198  打印错误信息("%s: Unknown parameter `%s'\n", doing, param)
199  退出
200  :ret恒等于负ENOSPC
201  打印错误信息("%s: `%s' too large for parameter `%s'\n", doing, val ? : "", param)
203  退出
204  默认
205  打印错误信息("%s: `%s' invalid for parameter `%s'\n", doing, val ? : "", param)
207  退出
210  err等于错误号
213  返回:err
调用者
名称描述
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.
start_kernel启动内核
do_initcall_level
dynamic_debug_init
parse_early_options解析命令行选项