Function report |
Source Code:fs\notify\fanotify\fanotify_user.c |
Create Date:2022-07-28 20:18:36 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:anotify syscalls
Proto:SYSCALL_DEFINE2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags)
Type:
Parameter:Nothing
| 773 | pr_debug("%s: flags=%x event_f_flags=%x\n", __func__, flags, event_f_flags) |
| 776 | If Not Check operation authority Then Return -EPERM |
| 782 | If flags & ~FANOTIFY_INIT_FLAGS Then Return -EINVAL |
| 786 | If event_f_flags & ~All flags that may be specified in parameter event_f_flags of fanotify_init Then Return -EINVAL |
| 790 | Case & == O_RDONLY |
| 791 | Case & == O_RDWR |
| 792 | Case & == O_WRONLY |
| 793 | Break |
| 794 | Default |
| 795 | Return -EINVAL |
| 798 | If flags & Report unique file id && (flags & Flags allowed to be passed from/to userspace) != These are NOT bitwise flags. Both bits are used together. Then Return -EINVAL |
| 802 | user = get_current_user - Get the current task's user_struct* Get the user record of the current task, pinning it so that it can't go* away.() |
| 803 | If atomic_read( & fanotify_listeners) > FANOTIFY_DEFAULT_MAX_LISTENERS Then |
| 809 | If flags & lags used for fanotify_init() Then f_flags |= O_CLOEXEC |
| 811 | If flags & FAN_NONBLOCK Then f_flags |= O_NONBLOCK |
| 823 | atomic_inc( & fanotify_listeners) |
| 826 | oevent = fanotify_alloc_event(group, NULL, Event queued overflowed , NULL, when calling fsnotify tell it if the data is a path or inode , NULL) |
| 830 | Go to out_destroy_group |
| 834 | If force_o_largefile() Then event_f_flags |= O_LARGEFILE |
| 836 | f_flags = event_f_flags |
| 837 | init_waitqueue_head( & access_waitq) |
| 842 | Break |
| 843 | Case & == FAN_CLASS_CONTENT |
| 845 | Break |
| 846 | Case & == FAN_CLASS_PRE_CONTENT |
| 848 | Break |
| 849 | Default |
| 851 | Go to out_destroy_group |
| 854 | If flags & FAN_UNLIMITED_QUEUE Then |
| 856 | If Not Check operation authority Then Go to out_destroy_group |
| 859 | Else |
| 863 | If flags & FAN_UNLIMITED_MARKS Then |
| 865 | If Not Check operation authority Then Go to out_destroy_group |
| 868 | Else |
| 872 | If flags & FAN_ENABLE_AUDIT Then |
| 874 | If Not Check operation authority Then Go to out_destroy_group |
| 879 | If fd < 0 Then Go to out_destroy_group |
| 882 | Return fd |
| 884 | out_destroy_group : |
| 886 | Return fd |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |