Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Args looks like "foo=bar,bar2 baz=fuz wiz".

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

Type:char

Parameter:

TypeParameterName
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 = skip_spaces - Removes leading whitespace from @str.*@str: The string to be stripped.* Returns a pointer to the first non-whitespace character in @str.
176  If args Then pr_debug("doing %s, parsing ARGS: '%s'\n", doing, args)
179  When args cycle
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  If Not val && strcmp(param, "--") == 0 Then Return If err Else args
187  irq_was_disabled = Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.()
188  ret = parse_one(param, val, doing, params, num, min_level, max_level, arg, unknown)
190  If irq_was_disabled && Not Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.() Then pr_warn("%s: option '%s' enabled irq's!\n", doing, param)
195  Case ret == 0
196  Continue
197  Case ret == -ENOENT
198  pr_err("%s: Unknown parameter `%s'\n", doing, param)
199  Break
200  Case ret == -ENOSPC
201  pr_err("%s: `%s' too large for parameter `%s'\n", doing, val ? : "", param)
203  Break
204  Default
205  pr_err("%s: `%s' invalid for parameter `%s'\n", doing, val ? : "", param)
207  Break
210  err = ERR_PTR(ret)
213  Return err
Caller
NameDescribe
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