Function report |
Source Code:fs\fcntl.c |
Create Date:2022-07-28 20:05:49 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:fcntl_rw_hint
Proto:static long fcntl_rw_hint(struct file *file, unsigned int cmd, unsigned long arg)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| unsigned int | cmd | |
| unsigned long | arg |
| 279 | inode = file_inode(file) |
| 285 | Case cmd == F_GET_FILE_RW_HINT |
| 286 | h = file_write_hint(file) |
| 287 | If copy_to_user(argp, & h, size of argp ) Then Return -EFAULT |
| 289 | Return 0 |
| 290 | Case cmd == F_SET_FILE_RW_HINT |
| 291 | If copy_from_user( & h, argp, size of h ) Then Return -EFAULT |
| 294 | If Not rw_hint_valid(hint) Then Return -EINVAL |
| 298 | f_write_hint = hint |
| 300 | Return 0 |
| 306 | Case cmd == F_SET_RW_HINT |
| 307 | If copy_from_user( & h, argp, size of h ) Then Return -EFAULT |
| 310 | If Not rw_hint_valid(hint) Then Return -EINVAL |
| 313 | inode_lock(inode) |
| 314 | i_write_hint = hint |
| 315 | inode_unlock(inode) |
| 316 | Return 0 |
| 317 | Default |
| 318 | Return -EINVAL |
| Name | Describe |
|---|---|
| do_fcntl |
| 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 |