Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\seq_file.c Create Date:2022-07-28 20:09:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:A complete analogue of print_hex_dump()

Proto:void seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type, int rowsize, int groupsize, const void *buf, size_t len, bool ascii)

Type:void

Parameter:

TypeParameterName
struct seq_file *m
const char *prefix_str
intprefix_type
introwsize
intgroupsize
const void *buf
size_tlen
boolascii
861  ptr = buf
862  remaining = len
867  If rowsize != 16 && rowsize != 32 Then rowsize = 16
870  When i < len && Not seq_has_overflowed - check if the buffer has overflowed*@m: the seq_file handle* seq_files have a buffer which may overflow. When this happens a larger* buffer is reallocated and all the data will be printed again. cycle
871  linelen = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(remaining, rowsize)
872  remaining -= rowsize
876  seq_printf(m, "%s%p: ", prefix_str, ptr + i)
877  Break
879  seq_printf(m, "%s%.8x: ", prefix_str, i)
880  Break
881  Default
882  seq_printf(m, "%s", prefix_str)
883  Break
886  size = seq_get_buf - get buffer to write arbitrary data to*@m: the seq_file handle*@bufp: the beginning of the buffer is stored here* Return the number of bytes available in the buffer, or zero if* there's no space.
887  ret = hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory*@buf: data blob to dump*@len: number of bytes in the @buf*@rowsize: number of bytes to print per line; must be 16 or 32*@groupsize: number of bytes to print at a time (1, 2, 4, 8;
889  seq_commit - commit data to the buffer*@m: the seq_file handle*@num: the number of bytes to commit* Commit @num bytes of data written to a buffer previously acquired* by seq_buf_get. To signal an error condition, or that the data
891  seq_putc(m, '\n')