函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:seq_buf_putmem_hex - write raw memory into the buffer in ASCII hex*@s: seq_buf descriptor*@mem: The raw memory to write its hex ASCII representation of*@len: The length of the raw memory to copy (in bytes)* This is similar to seq_buf_putmem() except

函数原型:int seq_buf_putmem_hex(struct seq_buf *s, const void *mem, unsigned int len)

返回类型:int

参数:

类型参数名称
struct seq_buf *s
const void *mem
unsigned intlen
225  data等于mem
229  WARN_ON(size == 0)
231 len循环
232  start_len等于两数取小(len, HEX_CHARS - 1)
236 i大于等于0循环
238  hex[j++]等于hex_asc_hi(data[i])
239  hex[j++]等于hex_asc_lo(data[i])
241  如果WARN_ON_ONCE(j == 0 || j / 2 > len)则退出
245  len减等于j除2
246  hex[j++]等于' '
248  seq_buf_putmem - write raw data into the sequenc buffer*@s: seq_buf descriptor*@mem: The raw memory to copy into the buffer*@len: The length of the raw memory to copy (in bytes)* There may be cases where raw memory needs to be written into the
249  如果seq_buf have a buffer that might overflow. When this happens* the len and size are set to be equal.则返回:负1
252  返回:0
调用者
名称描述
trace_seq_putmem_hexrace_seq_putmem_hex - write raw memory into the buffer in ASCII hex*@s: trace sequence descriptor*@mem: The raw memory to write its hex ASCII representation of*@len: The length of the raw memory to copy (in bytes)* This is similar to trace_seq_putmem()