函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:We break the rule and mangle the string.

函数原型:static int param_array(struct module *mod, const char *name, const char *val, unsigned int min, unsigned int max, void *elem, int elemsize, int (*set)(const char *, const struct kernel_param *kp), s16 level, unsigned int *num)

返回类型:int

参数:

类型参数名称
struct module *mod
const char *name
const char *val
unsigned intmin
unsigned intmax
void *elem
intelemsize
int (*set
s16level
unsigned int *num
408  name等于name
409  arg等于elem
410  level等于level
412  num等于0
414  循环
417  如果num恒等于max
418  打印错误信息("%s: can only take %i arguments\n", name, max)
419  返回:负EINVAL
421  len等于strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject*@s: The string to be searched*@reject: The string to avoid
424  save等于val[len]
425  ) = '\0'
426  check_kparam_locked(mod)
427  ret等于set(val, & kp)
429  如果ret不等于0则返回:ret
431  arg加等于elemsize
432  val加等于len加1
433  num自加
434 save恒等于','循环
436  如果num小于min
437  打印错误信息("%s: needs at least %i arguments\n", name, min)
438  返回:负EINVAL
440  返回:0
调用者
名称描述
param_array_set