Move inotify to the linux and android sub-modules
This commit is contained in:
parent
917a20c4e3
commit
c217e2f9be
@ -1802,6 +1802,43 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
|
|||||||
pub const ALG_OP_DECRYPT: ::c_int = 0;
|
pub const ALG_OP_DECRYPT: ::c_int = 0;
|
||||||
pub const ALG_OP_ENCRYPT: ::c_int = 1;
|
pub const ALG_OP_ENCRYPT: ::c_int = 1;
|
||||||
|
|
||||||
|
// uapi/linux/inotify.h
|
||||||
|
pub const IN_ACCESS: ::uint32_t = 0x0000_0001;
|
||||||
|
pub const IN_MODIFY: ::uint32_t = 0x0000_0002;
|
||||||
|
pub const IN_ATTRIB: ::uint32_t = 0x0000_0004;
|
||||||
|
pub const IN_CLOSE_WRITE: ::uint32_t = 0x0000_0008;
|
||||||
|
pub const IN_CLOSE_NOWRITE: ::uint32_t = 0x0000_0010;
|
||||||
|
pub const IN_CLOSE: ::uint32_t = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
|
||||||
|
pub const IN_OPEN: ::uint32_t = 0x0000_0020;
|
||||||
|
pub const IN_MOVED_FROM: ::uint32_t = 0x0000_0040;
|
||||||
|
pub const IN_MOVED_TO: ::uint32_t = 0x0000_0080;
|
||||||
|
pub const IN_MOVE: ::uint32_t = (IN_MOVED_FROM | IN_MOVED_TO);
|
||||||
|
pub const IN_CREATE: ::uint32_t = 0x0000_0100;
|
||||||
|
pub const IN_DELETE: ::uint32_t = 0x0000_0200;
|
||||||
|
pub const IN_DELETE_SELF: ::uint32_t = 0x0000_0400;
|
||||||
|
pub const IN_MOVE_SELF: ::uint32_t = 0x0000_0800;
|
||||||
|
pub const IN_UNMOUNT: ::uint32_t = 0x0000_2000;
|
||||||
|
pub const IN_Q_OVERFLOW: ::uint32_t = 0x0000_4000;
|
||||||
|
pub const IN_IGNORED: ::uint32_t = 0x0000_8000;
|
||||||
|
pub const IN_ONLYDIR: ::uint32_t = 0x0100_0000;
|
||||||
|
pub const IN_DONT_FOLLOW: ::uint32_t = 0x0200_0000;
|
||||||
|
// pub const IN_EXCL_UNLINK: ::uint32_t = 0x0400_0000;
|
||||||
|
|
||||||
|
// pub const IN_MASK_CREATE: ::uint32_t = 0x1000_0000;
|
||||||
|
// pub const IN_MASK_ADD: ::uint32_t = 0x2000_0000;
|
||||||
|
pub const IN_ISDIR: ::uint32_t = 0x4000_0000;
|
||||||
|
pub const IN_ONESHOT: ::uint32_t = 0x8000_0000;
|
||||||
|
|
||||||
|
pub const IN_ALL_EVENTS: ::uint32_t = (
|
||||||
|
IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE |
|
||||||
|
IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM |
|
||||||
|
IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF |
|
||||||
|
IN_MOVE_SELF
|
||||||
|
);
|
||||||
|
|
||||||
|
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
|
||||||
|
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;
|
||||||
|
|
||||||
f! {
|
f! {
|
||||||
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
|
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
|
||||||
cmsg: *const cmsghdr) -> *mut cmsghdr {
|
cmsg: *const cmsghdr) -> *mut cmsghdr {
|
||||||
@ -2067,6 +2104,11 @@ extern {
|
|||||||
flags: ::c_int) -> ::c_int;
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
|
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
|
||||||
flags: ::c_int, timeout: *const ::timespec) -> ::c_int;
|
flags: ::c_int, timeout: *const ::timespec) -> ::c_int;
|
||||||
|
pub fn inotify_init() -> ::c_int;
|
||||||
|
pub fn inotify_init1(flags: ::c_int) -> ::c_int;
|
||||||
|
pub fn inotify_add_watch(fd: ::c_int,
|
||||||
|
path: *const ::c_char,
|
||||||
|
mask: ::uint32_t) -> ::c_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
@ -1812,6 +1812,43 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
|
|||||||
pub const ALG_OP_DECRYPT: ::c_int = 0;
|
pub const ALG_OP_DECRYPT: ::c_int = 0;
|
||||||
pub const ALG_OP_ENCRYPT: ::c_int = 1;
|
pub const ALG_OP_ENCRYPT: ::c_int = 1;
|
||||||
|
|
||||||
|
// uapi/linux/inotify.h
|
||||||
|
pub const IN_ACCESS: ::uint32_t = 0x0000_0001;
|
||||||
|
pub const IN_MODIFY: ::uint32_t = 0x0000_0002;
|
||||||
|
pub const IN_ATTRIB: ::uint32_t = 0x0000_0004;
|
||||||
|
pub const IN_CLOSE_WRITE: ::uint32_t = 0x0000_0008;
|
||||||
|
pub const IN_CLOSE_NOWRITE: ::uint32_t = 0x0000_0010;
|
||||||
|
pub const IN_CLOSE: ::uint32_t = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
|
||||||
|
pub const IN_OPEN: ::uint32_t = 0x0000_0020;
|
||||||
|
pub const IN_MOVED_FROM: ::uint32_t = 0x0000_0040;
|
||||||
|
pub const IN_MOVED_TO: ::uint32_t = 0x0000_0080;
|
||||||
|
pub const IN_MOVE: ::uint32_t = (IN_MOVED_FROM | IN_MOVED_TO);
|
||||||
|
pub const IN_CREATE: ::uint32_t = 0x0000_0100;
|
||||||
|
pub const IN_DELETE: ::uint32_t = 0x0000_0200;
|
||||||
|
pub const IN_DELETE_SELF: ::uint32_t = 0x0000_0400;
|
||||||
|
pub const IN_MOVE_SELF: ::uint32_t = 0x0000_0800;
|
||||||
|
pub const IN_UNMOUNT: ::uint32_t = 0x0000_2000;
|
||||||
|
pub const IN_Q_OVERFLOW: ::uint32_t = 0x0000_4000;
|
||||||
|
pub const IN_IGNORED: ::uint32_t = 0x0000_8000;
|
||||||
|
pub const IN_ONLYDIR: ::uint32_t = 0x0100_0000;
|
||||||
|
pub const IN_DONT_FOLLOW: ::uint32_t = 0x0200_0000;
|
||||||
|
// pub const IN_EXCL_UNLINK: ::uint32_t = 0x0400_0000;
|
||||||
|
|
||||||
|
// pub const IN_MASK_CREATE: ::uint32_t = 0x1000_0000;
|
||||||
|
// pub const IN_MASK_ADD: ::uint32_t = 0x2000_0000;
|
||||||
|
pub const IN_ISDIR: ::uint32_t = 0x4000_0000;
|
||||||
|
pub const IN_ONESHOT: ::uint32_t = 0x8000_0000;
|
||||||
|
|
||||||
|
pub const IN_ALL_EVENTS: ::uint32_t = (
|
||||||
|
IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE |
|
||||||
|
IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM |
|
||||||
|
IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF |
|
||||||
|
IN_MOVE_SELF
|
||||||
|
);
|
||||||
|
|
||||||
|
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
|
||||||
|
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;
|
||||||
|
|
||||||
f! {
|
f! {
|
||||||
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
|
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
|
||||||
cmsg: *const cmsghdr) -> *mut cmsghdr {
|
cmsg: *const cmsghdr) -> *mut cmsghdr {
|
||||||
@ -2397,6 +2434,11 @@ extern {
|
|||||||
stream: *mut ::FILE
|
stream: *mut ::FILE
|
||||||
) -> ::size_t;
|
) -> ::size_t;
|
||||||
pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int;
|
pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int;
|
||||||
|
pub fn inotify_init() -> ::c_int;
|
||||||
|
pub fn inotify_init1(flags: ::c_int) -> ::c_int;
|
||||||
|
pub fn inotify_add_watch(fd: ::c_int,
|
||||||
|
path: *const ::c_char,
|
||||||
|
mask: ::uint32_t) -> ::c_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
@ -1154,45 +1154,6 @@ pub const ARPHRD_IEEE802154: u16 = 804;
|
|||||||
pub const ARPHRD_VOID: u16 = 0xFFFF;
|
pub const ARPHRD_VOID: u16 = 0xFFFF;
|
||||||
pub const ARPHRD_NONE: u16 = 0xFFFE;
|
pub const ARPHRD_NONE: u16 = 0xFFFE;
|
||||||
|
|
||||||
// uapi/linux/inotify.h
|
|
||||||
pub const IN_ACCESS: ::uint32_t = 0x0000_0001;
|
|
||||||
pub const IN_MODIFY: ::uint32_t = 0x0000_0002;
|
|
||||||
pub const IN_ATTRIB: ::uint32_t = 0x0000_0004;
|
|
||||||
pub const IN_CLOSE_WRITE: ::uint32_t = 0x0000_0008;
|
|
||||||
pub const IN_CLOSE_NOWRITE: ::uint32_t = 0x0000_0010;
|
|
||||||
pub const IN_CLOSE: ::uint32_t = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
|
|
||||||
pub const IN_OPEN: ::uint32_t = 0x0000_0020;
|
|
||||||
pub const IN_MOVED_FROM: ::uint32_t = 0x0000_0040;
|
|
||||||
pub const IN_MOVED_TO: ::uint32_t = 0x0000_0080;
|
|
||||||
pub const IN_MOVE: ::uint32_t = (IN_MOVED_FROM | IN_MOVED_TO);
|
|
||||||
pub const IN_CREATE: ::uint32_t = 0x0000_0100;
|
|
||||||
pub const IN_DELETE: ::uint32_t = 0x0000_0200;
|
|
||||||
pub const IN_DELETE_SELF: ::uint32_t = 0x0000_0400;
|
|
||||||
pub const IN_MOVE_SELF: ::uint32_t = 0x0000_0800;
|
|
||||||
|
|
||||||
pub const IN_UNMOUNT: ::uint32_t = 0x0000_2000;
|
|
||||||
pub const IN_Q_OVERFLOW: ::uint32_t = 0x0000_4000;
|
|
||||||
pub const IN_IGNORED: ::uint32_t = 0x0000_8000;
|
|
||||||
|
|
||||||
pub const IN_ONLYDIR: ::uint32_t = 0x0100_0000;
|
|
||||||
pub const IN_DONT_FOLLOW: ::uint32_t = 0x0200_0000;
|
|
||||||
// pub const IN_EXCL_UNLINK: ::uint32_t = 0x0400_0000;
|
|
||||||
|
|
||||||
// pub const IN_MASK_CREATE: ::uint32_t = 0x1000_0000;
|
|
||||||
// pub const IN_MASK_ADD: ::uint32_t = 0x2000_0000;
|
|
||||||
pub const IN_ISDIR: ::uint32_t = 0x4000_0000;
|
|
||||||
pub const IN_ONESHOT: ::uint32_t = 0x8000_0000;
|
|
||||||
|
|
||||||
pub const IN_ALL_EVENTS: ::uint32_t = (
|
|
||||||
IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE |
|
|
||||||
IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM |
|
|
||||||
IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF |
|
|
||||||
IN_MOVE_SELF
|
|
||||||
);
|
|
||||||
|
|
||||||
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
|
|
||||||
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;
|
|
||||||
|
|
||||||
fn CMSG_ALIGN(len: usize) -> usize {
|
fn CMSG_ALIGN(len: usize) -> usize {
|
||||||
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)
|
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)
|
||||||
}
|
}
|
||||||
@ -1445,11 +1406,6 @@ extern {
|
|||||||
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
|
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
|
||||||
-> ::ssize_t;
|
-> ::ssize_t;
|
||||||
pub fn uname(buf: *mut ::utsname) -> ::c_int;
|
pub fn uname(buf: *mut ::utsname) -> ::c_int;
|
||||||
pub fn inotify_init() -> ::c_int;
|
|
||||||
pub fn inotify_init1(flags: ::c_int) -> ::c_int;
|
|
||||||
pub fn inotify_add_watch(fd: ::c_int,
|
|
||||||
path: *const ::c_char,
|
|
||||||
mask: ::uint32_t) -> ::c_int;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
Loading…
Reference in New Issue
Block a user