函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:msg_print_text

函数原型:static size_t msg_print_text(const struct printk_log *msg, bool syslog, bool time, char *buf, size_t size)

返回类型:size_t

参数:

类型参数名称
const struct printk_log *msg
boolsyslog
booltime
char *buf
size_tsize
1312  text等于human readable text of the record
1313  text_size等于 length of text buffer
1314  len等于0
1316  prefix_len等于print_prefix(msg, syslog, time, prefix)
1318  循环
1319  next等于memchr(text, '\n', text_size)
1322  如果next
1323  text_len等于nexttext
1324  next自加
1325  text_size减等于nexttext
1326  否则
1327  text_len等于text_size
1330  如果buf
1331  如果prefix_lentext_len加1大于等于sizelen退出
1335  len加等于prefix_len
1337  len加等于text_len
1338  buf[len++]等于'\n'
1339  否则
1341  len加等于prefix_lentext_len加1
1344  text等于next
1345 text循环
1347  返回:len
调用者
名称描述
syslog_print
syslog_print_all
do_syslog
console_unlocksole_unlock - unlock the console system* Releases the console_lock which the caller holds on the console system* and the console driver list.* While the console_lock was held, console output may have been buffered* by printk()
kmsg_dump_get_line_nolockkmsg_dump_get_line_nolock - retrieve one kmsg log line (unlocked version)*@dumper: registered kmsg dumper*@syslog: include the "<4>" prefixes*@line: buffer to copy the line to*@size: maximum size of the buffer*@len: length of line placed into buffer*
kmsg_dump_get_bufferkmsg_dump_get_buffer - copy kmsg log lines*@dumper: registered kmsg dumper*@syslog: include the "<4>" prefixes*@buf: buffer to copy the line to*@size: maximum size of the buffer*@len: length of line placed into buffer* Start at the end of the kmsg buffer