函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\seq_file.c Create Date:2022-07-29 10:40:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:traverse

函数原型:static int traverse(struct seq_file *m, loff_t offset)

返回类型:int

参数:

类型参数名称
struct seq_file *m
loff_toffset
93  pos等于0
94  error等于0
97  version等于0
98  index等于0
99  count等于from等于0
100  如果非offset则返回:0
103  如果非buf
104  buf等于seq_buf_alloc(size = PAGE_SIZE)
105  如果非buf则返回:负ENOMEM
108  p等于start(m, & index)
109 p循环
110  error等于错误
111  如果是错误退出
113  error等于show(m, p)
114  如果error小于0则退出
117  error等于0
118  count等于0
120  如果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.则转到:Eoverflow
122  p等于next(m, p, & index)
123  如果poscount大于offset
124  from等于offsetpos
125  count减等于from
126  退出
128  pos加等于count
129  count等于0
130  如果pos恒等于offset退出
133  stop(m, p)
134  返回:error
136  Eoverflow :
137  stop(m, p)
138  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
139  count等于0
140  buf等于seq_buf_alloc(size <<= 1)
141  返回:如果非buf则负ENOMEM否则负EAGAIN
调用者
名称描述
seq_readseq_read - ->read() method for sequential files.*@file: the file to read from*@buf: the buffer to read to*@size: the maximum number of bytes to read*@ppos: the current position in the file* Ready-made ->f_op->read()
seq_lseekseq_lseek - ->llseek() method for sequential files.*@file: the file in question*@offset: new position*@whence: 0 for absolute, 1 for relative position* Ready-made ->f_op->llseek()