函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksys_getdents64

函数原型:int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent, unsigned int count)

返回类型:int

参数:

类型参数名称
unsigned intfd
struct linux_dirent64 __user *dirent
unsigned intcount
357  struct getdents_callback64 buf = {actor = filldir64, count = count, current_dir = dirent}
364  如果非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, count)则返回:负EFAULT
367  f等于fdget_pos(fd)
368  如果非file则返回:负EBADF
371  error等于iterate_dir(file, & ctx)
372  如果error大于等于0则error等于error
374  如果prev_reclen
375  __userlastdirent
376  d_off等于pos
378  lastdirent等于current_dirprev_reclen
379  如果__put_user - Write a simple value into user space, with less checking(d_off, & d_off)则error等于负EFAULT
381  否则error等于countcount
384  fdput_pos(f)
385  返回:error
调用者
名称描述
SYSCALL_DEFINE3