Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fanotify\fanotify_user.c Create Date:2022-07-28 20:18:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fanotify_ioctl

Proto:static long fanotify_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

Type:long

Parameter:

TypeParameterName
struct file *file
unsigned intcmd
unsigned longarg
497  __user * p
498  ret = -ENOTTY
499  send_len = 0
501  group = needed for tty driver, and maybe others
503  p = arg
506  Case cmd == FIONREAD
507  spin_lock( & protect the notification_list )
508  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(fsn_event, & list of event_holder this group needs to send to userspace , list)
509  send_len += Helper functions to deal with fanotify_event_metadata buffers
510  spin_unlock( & protect the notification_list )
511  ret = Write a simple value into user space(send_len, (int__user * )p)
512  Break
515  Return ret