@@ -1802,6 +1802,43 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
1802
1802
pub const ALG_OP_DECRYPT : :: c_int = 0 ;
1803
1803
pub const ALG_OP_ENCRYPT : :: c_int = 1 ;
1804
1804
1805
+ // uapi/linux/inotify.h
1806
+ pub const IN_ACCESS : :: uint32_t = 0x0000_0001 ;
1807
+ pub const IN_MODIFY : :: uint32_t = 0x0000_0002 ;
1808
+ pub const IN_ATTRIB : :: uint32_t = 0x0000_0004 ;
1809
+ pub const IN_CLOSE_WRITE : :: uint32_t = 0x0000_0008 ;
1810
+ pub const IN_CLOSE_NOWRITE : :: uint32_t = 0x0000_0010 ;
1811
+ pub const IN_CLOSE : :: uint32_t = ( IN_CLOSE_WRITE | IN_CLOSE_NOWRITE ) ;
1812
+ pub const IN_OPEN : :: uint32_t = 0x0000_0020 ;
1813
+ pub const IN_MOVED_FROM : :: uint32_t = 0x0000_0040 ;
1814
+ pub const IN_MOVED_TO : :: uint32_t = 0x0000_0080 ;
1815
+ pub const IN_MOVE : :: uint32_t = ( IN_MOVED_FROM | IN_MOVED_TO ) ;
1816
+ pub const IN_CREATE : :: uint32_t = 0x0000_0100 ;
1817
+ pub const IN_DELETE : :: uint32_t = 0x0000_0200 ;
1818
+ pub const IN_DELETE_SELF : :: uint32_t = 0x0000_0400 ;
1819
+ pub const IN_MOVE_SELF : :: uint32_t = 0x0000_0800 ;
1820
+ pub const IN_UNMOUNT : :: uint32_t = 0x0000_2000 ;
1821
+ pub const IN_Q_OVERFLOW : :: uint32_t = 0x0000_4000 ;
1822
+ pub const IN_IGNORED : :: uint32_t = 0x0000_8000 ;
1823
+ pub const IN_ONLYDIR : :: uint32_t = 0x0100_0000 ;
1824
+ pub const IN_DONT_FOLLOW : :: uint32_t = 0x0200_0000 ;
1825
+ // pub const IN_EXCL_UNLINK: ::uint32_t = 0x0400_0000;
1826
+
1827
+ // pub const IN_MASK_CREATE: ::uint32_t = 0x1000_0000;
1828
+ // pub const IN_MASK_ADD: ::uint32_t = 0x2000_0000;
1829
+ pub const IN_ISDIR : :: uint32_t = 0x4000_0000 ;
1830
+ pub const IN_ONESHOT : :: uint32_t = 0x8000_0000 ;
1831
+
1832
+ pub const IN_ALL_EVENTS : :: uint32_t = (
1833
+ IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE |
1834
+ IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM |
1835
+ IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF |
1836
+ IN_MOVE_SELF
1837
+ ) ;
1838
+
1839
+ pub const IN_CLOEXEC : :: c_int = O_CLOEXEC ;
1840
+ pub const IN_NONBLOCK : :: c_int = O_NONBLOCK ;
1841
+
1805
1842
f ! {
1806
1843
pub fn CMSG_NXTHDR ( mhdr: * const msghdr,
1807
1844
cmsg: * const cmsghdr) -> * mut cmsghdr {
@@ -2067,6 +2104,11 @@ extern {
2067
2104
flags : :: c_int ) -> :: c_int ;
2068
2105
pub fn recvmmsg ( sockfd : :: c_int , msgvec : * mut :: mmsghdr , vlen : :: c_uint ,
2069
2106
flags : :: c_int , timeout : * const :: timespec ) -> :: c_int ;
2107
+ pub fn inotify_init ( ) -> :: c_int ;
2108
+ pub fn inotify_init1 ( flags : :: c_int ) -> :: c_int ;
2109
+ pub fn inotify_add_watch ( fd : :: c_int ,
2110
+ path : * const :: c_char ,
2111
+ mask : :: uint32_t ) -> :: c_int ;
2070
2112
}
2071
2113
2072
2114
cfg_if ! {
0 commit comments