函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fanotify_write

函数原型:static ssize_t fanotify_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tcount
loff_t *pos
416  struct fanotify_response response = {fd = - 1, response = - 1}
420  如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_FANOTIFY_ACCESS_PERMISSIONS)则返回:负EINVAL
423  group等于 needed for tty driver, and maybe others
425  如果count大于response的长度则count等于response的长度
428  pr_debug("%s: group=%p count=%zu\n", __func__, group, count)
430  如果copy_from_user( & response, buf, count)则返回:负EFAULT
433  ret等于process_access_response(group, & response)
434  如果ret小于0则count等于ret
437  返回:count