Function report |
Source Code:fs\readdir.c |
Create Date:2022-07-28 20:06:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:compat_filldir
Proto:static int compat_filldir(struct dir_context *ctx, const char *name, int namlen, loff_t offset, u64 ino, unsigned int d_type)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct dir_context * | ctx | |
const char * | name | |
int | namlen | |
loff_t | offset | |
u64 | ino | |
unsigned int | d_type |
486 | reclen = @a is a power of 2 value (offsetof(structcompat_linux_dirent, d_name) + namlen + 2, sizeof(compat_long_t)) |
498 | If dirent Then |
499 | If signal_pending(current process) Then Return -EINTR |
501 | If Write a simple value into user space, with less checking(offset, & d_off) Then Go to efault |
504 | dirent = current_dir |
505 | If Write a simple value into user space, with less checking(d_ino, & d_ino) Then Go to efault |
507 | If Write a simple value into user space, with less checking(reclen, & d_reclen) Then Go to efault |
509 | If copy_to_user(d_name, name, namlen) Then Go to efault |
511 | If Write a simple value into user space, with less checking(0, d_name + namlen) Then Go to efault |
513 | If Write a simple value into user space, with less checking(d_type, (char__user * )dirent + reclen - 1) Then Go to efault |
517 | current_dir = dirent |
519 | Return 0 |
520 | efault : |
522 | Return -EFAULT |
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 |