函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_sys_open

函数原型:long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)

返回类型:long

参数:

类型参数名称
intdfd
const char __user *filename
intflags
umode_tmode
1085  fd等于build_open_flags(flags, mode, & op)
1088  如果fd则返回:fd
1091  tmp等于getname(filename)
1092  如果是错误则返回:错误
1095  fd等于get_unused_fd_flags(flags)
1096  如果fd大于等于0则
1097  f等于do_filp_open(dfd, tmp, & op)
1098  如果是错误
1099  put_unused_fd(fd)
1100  fd等于错误
1101  否则
1103  fd_install(fd, f)
1106  putname(tmp)
1107  返回:fd
调用者
名称描述
SYSCALL_DEFINE3
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE3Exactly like sys_open(), except that it doesn't set the* O_LARGEFILE flag.
COMPAT_SYSCALL_DEFINE4Exactly like sys_openat(), except that it doesn't set the* O_LARGEFILE flag.
ksys_open