函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Set up a console. Called via do_early_param() in init/main.c* for each "console=" parameter in the boot command line.

函数原型:static int __init console_setup(char *str)

返回类型:int

参数:

类型参数名称
char *str
2165  char * s, * options, * brl_options = NULL
2168  如果_braille_console_setup( & str, & brl_options)则返回:1
2174  如果str[0]大于等于'0'且str[0]小于等于'9'则
2175  strcpy(buf, "ttyS")
2176  strncpy(buf + 4, str, buf的长度 - 5)
2177  否则
2178  strncpy(buf, str, buf的长度 - 1)
2180  buf[buf的长度 - 1]等于0
2181  options等于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
2182  如果options则*options自加等于0
2190 s循环如果是数字s恒等于','则
2192  退出
2193  idx等于转换字符串为无符号整形
2194  s等于0
2196  __add_preferred_console(buf, idx, options, brl_options)
2197  console_set_on_cmdline等于1
2198  返回:1