Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:msg_print_text

Proto:static size_t msg_print_text(const struct printk_log *msg, bool syslog, bool time, char *buf, size_t size)

Type:size_t

Parameter:

TypeParameterName
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  Do
1319  next = memchr(text, '\n', text_size)
1322  If next Then
1323  text_len = next - text
1324  next++
1325  text_size -= next - text
1326  Else
1327  text_len = text_size
1330  If buf Then
1331  If prefix_len + text_len + 1 >= size - len Then Break
1335  len += prefix_len
1337  len += text_len
1338  buf[len++] = '\n'
1339  Else
1341  len += prefix_len + text_len + 1
1344  text = next
1345  When text cycle
1347  Return len
Caller
NameDescribe
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