Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__parse_crashkernel

Proto:static int __init __parse_crashkernel(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base, const char *name, const char *suffix)

Type:int

Parameter:

TypeParameterName
char *cmdline
unsigned long longsystem_ram
unsigned long long *crash_size
unsigned long long *crash_base
const char *name
const char *suffix
237  BUG_ON(!crash_size || !crash_base)
238  crash_size = 0
239  crash_base = 0
241  ck_cmdline = get_last_crashkernel(cmdline, name, suffix)
243  If Not ck_cmdline Then Return -EINVAL
246  ck_cmdline += strlen - Find the length of a string*@s: The string to be sized
248  If suffix Then Return That function parses "suffix" crashkernel command lines like* crashkernel=size,[high|low]* It returns 0 on success and -EINVAL on failure.
255  first_colon = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
256  first_space = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
257  If first_colon && ( Not first_space || first_colon < first_space ) Then Return This function parses command lines in the format* crashkernel=ramsize-range:size[,...][@offset]* The function returns 0 on success and -EINVAL on failure.
261  Return That function parses "simple" (old) crashkernel command lines like* crashkernel=size[@offset]* It returns 0 on success and -EINVAL on failure.
Caller
NameDescribe
parse_crashkernelThat function is the entry point for command line parsing and should be* called from the arch-specific code.
parse_crashkernel_high
parse_crashkernel_low