Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int seq_buf_putmem_hex(struct seq_buf *s, const void *mem, unsigned int len)

Type:int

Parameter:

TypeParameterName
struct seq_buf *s
const void *mem
unsigned intlen
225  data = mem
229  WARN_ON(size == 0)
231  When len cycle
232  start_len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, HEX_CHARS - 1)
236  When i >= 0 cycle
238  hex[j++] = hex_asc_hi(data[i])
239  hex[j++] = hex_asc_lo(data[i])
241  If WARN_ON_ONCE(j == 0 || j / 2 > len) Then Break
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  If seq_buf have a buffer that might overflow. When this happens* the len and size are set to be equal. Then Return -1
252  Return 0