Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\params.c Create Date:2022-07-28 09:29:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:parse_one

Proto: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))

Type:int

Parameter:

TypeParameterName
char *param
char *val
const char *doing
const struct kernel_param *params
unsignednum_params
s16min_level
s16max_level
void *arg
int (*handle_unknown
130  When i < num_params cycle
131  If parameq(param, name) Then
132  If level < min_level || level > max_level Then Return 0
136  If Not val && Not (flags & KERNEL_PARAM_OPS_FL_NOARG) Then Return -EINVAL
139  pr_debug("handling %s with %p\n", param, set)
142  If param_check_unsafe( & params[i]) Then err = set(val, & params[i])
144  Else err = -EPERM
147  Return err
151  If handle_unknown Then
152  pr_debug("doing %s: %s='%s'\n", doing, param, val)
153  Return handle_unknown(param, val, doing, arg)
156  pr_debug("Unknown argument '%s'\n", param)
157  Return -ENOENT
Caller
NameDescribe
parse_argsArgs looks like "foo=bar,bar2 baz=fuz wiz".