Function report |
Source Code:fs\seq_file.c |
Create Date:2022-07-28 20:09:35 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:seq_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()
Proto:ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
char __user * | buf | |
size_t | size | |
loff_t * | ppos |
156 | copied = 0 |
159 | err = 0 |
161 | mutex_lock( & lock) |
180 | If ppos == 0 Then |
187 | If Value for the false possibility is greater at compile time( * ppos != read_pos) Then |
190 | If err Then |
197 | Else |
203 | If Not buf Then |
209 | If count Then |
223 | from = 0 |
225 | When 1 cycle |
230 | If err < 0 Then Break |
232 | If Value for the false possibility is greater at compile time(err) Then count = 0 |
242 | count = 0 |
243 | buf = seq_buf_alloc(size <<= 1) |
246 | version = 0 |
250 | count = 0 |
251 | Go to Done |
252 | Fill : |
254 | When 1 cycle |
271 | If Value is more likely to compile time(err <= 0) Then Break |
276 | n = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(count, size) |
277 | err = copy_to_user(buf, buf, n) |
283 | Done : |
286 | Else |
292 | Return copied |
293 | Enomem : |
295 | Go to Done |
296 | Efault : |
298 | Go to Done |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |