函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:COMPAT_SYSCALL_DEFINE3

函数原型:COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd, struct compat_linux_dirent __user *, dirent, unsigned int, count)

返回类型:

参数:

529  __userlastdirent
530  struct compat_getdents_callback buf = {actor = compat_filldir, current_dir = dirent, count = () counts the number of strings in array ARGV.}
537  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(dirent, () counts the number of strings in array ARGV.)则返回:负EFAULT
540  f等于fdget_pos(fd)
541  如果非file则返回:负EBADF
544  error等于iterate_dir(file, & ctx)
545  如果error大于等于0则error等于error
547  lastdirent等于previous
548  如果lastdirent
549  如果put_user - Write a simple value into user space(pos, & d_off)则error等于负EFAULT
551  否则error等于() counts the number of strings in array ARGV.count
554  fdput_pos(f)
555  返回:error