Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:That function parses "simple" (old) crashkernel command lines like* crashkernel=size[@offset]* It returns 0 on success and -EINVAL on failure.

Proto:static int __init parse_crashkernel_simple(char *cmdline, unsigned long long *crash_size, unsigned long long *crash_base)

Type:int

Parameter:

TypeParameterName
char *cmdline
unsigned long long *crash_size
unsigned long long *crash_base
126  cur = cmdline
128  crash_size = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
129  If cmdline == cur Then
130  pr_warn("crashkernel: memory value expected\n")
131  Return -EINVAL
134  If cur == '@' Then crash_base = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
136  Else if cur != ' ' && cur != '\0' Then
137  pr_warn("crashkernel: unrecognized char: %c\n", * cur)
138  Return -EINVAL
141  Return 0
Caller
NameDescribe
__parse_crashkernel