/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Inode based directory notification for Linux * * Copyright (C) 2005 John McCutchan */ #ifndef _UAPI_LINUX_INOTIFY_H #define _UAPI_LINUX_INOTIFY_H /* For O_CLOEXEC and O_NONBLOCK */ #include <linux/fcntl.h> #include <linux/types.h> /* * struct inotify_event - structure read from the inotify device for each event * * When you are watching a directory, you will receive the filename for events * such as IN_CREATE, IN_DELETE, IN_OPEN, IN_CLOSE, ..., relative to the wd. */ struct inotify_event { … }; /* the following are legal, implemented events that user-space can watch for */ #define IN_ACCESS … #define IN_MODIFY … #define IN_ATTRIB … #define IN_CLOSE_WRITE … #define IN_CLOSE_NOWRITE … #define IN_OPEN … #define IN_MOVED_FROM … #define IN_MOVED_TO … #define IN_CREATE … #define IN_DELETE … #define IN_DELETE_SELF … #define IN_MOVE_SELF … /* the following are legal events. they are sent as needed to any watch */ #define IN_UNMOUNT … #define IN_Q_OVERFLOW … #define IN_IGNORED … /* helper events */ #define IN_CLOSE … #define IN_MOVE … /* special flags */ #define IN_ONLYDIR … #define IN_DONT_FOLLOW … #define IN_EXCL_UNLINK … #define IN_MASK_CREATE … #define IN_MASK_ADD … #define IN_ISDIR … #define IN_ONESHOT … /* * All of the events - we build the list by hand so that we can add flags in * the future and not break backward compatibility. Apps will get only the * events that they originally wanted. Be sure to add new events here! */ #define IN_ALL_EVENTS … /* Flags for sys_inotify_init1. */ #define IN_CLOEXEC … #define IN_NONBLOCK … /* * ioctl numbers: inotify uses 'I' prefix for all ioctls, * except historical FIONREAD, which is based on 'T'. * * INOTIFY_IOC_SETNEXTWD: set desired number of next created * watch descriptor. */ #define INOTIFY_IOC_SETNEXTWD … #endif /* _UAPI_LINUX_INOTIFY_H */