Function report |
Source Code:fs\fsopen.c |
Create Date:2022-07-28 20:13:26 |
| Last Modify:2022-05-24 07:35:12 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Allow the user to read back any error, warning or informational messages.
Proto:static ssize_t fscontext_read(struct file *file, char __user *_buf, size_t len, loff_t *pos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| char __user * | _buf | |
| size_t | len | |
| loff_t * | pos |
| 35 | ret = mutex_lock_interruptible( & uapi_mutex) |
| 39 | If Insertion index in buffer[] == Removal index in buffer[] Then |
| 41 | Return -ENODATA |
| 44 | index = Removal index in buffer[] & logsize - 1 |
| 46 | need_free = Mask of kfree'able items in buffer[] & 1 << index |
| 48 | Mask of kfree'able items in buffer[] &= ~(1 << index) |
| 57 | If copy_to_user(_buf, p, n) != 0 Then Go to err_free |
| 61 | err_free : |
| 64 | Return ret |
| 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 |