summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/linux_raw/fs/inotify.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/fs/inotify.rs')
-rw-r--r--vendor/rustix/src/backend/linux_raw/fs/inotify.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/fs/inotify.rs b/vendor/rustix/src/backend/linux_raw/fs/inotify.rs
index cb9d87b82..ef205ffdf 100644
--- a/vendor/rustix/src/backend/linux_raw/fs/inotify.rs
+++ b/vendor/rustix/src/backend/linux_raw/fs/inotify.rs
@@ -17,6 +17,9 @@ bitflags! {
const CLOEXEC = linux_raw_sys::general::IN_CLOEXEC;
/// `IN_NONBLOCK`
const NONBLOCK = linux_raw_sys::general::IN_NONBLOCK;
+
+ /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
+ const _ = !0;
}
}
@@ -71,6 +74,9 @@ bitflags! {
const ONESHOT = linux_raw_sys::general::IN_ONESHOT;
/// `IN_ONLYDIR`
const ONLYDIR = linux_raw_sys::general::IN_ONLYDIR;
+
+ /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
+ const _ = !0;
}
}
@@ -99,14 +105,13 @@ pub fn inotify_add_watch<P: crate::path::Arg>(
path: P,
flags: WatchFlags,
) -> io::Result<i32> {
- let path = path.as_cow_c_str().unwrap();
- syscalls::inotify_add_watch(inot, &path, flags)
+ path.into_with_c_str(|path| syscalls::inotify_add_watch(inot, path, flags))
}
/// `inotify_rm_watch(self, wd)`—Removes a watch from this inotify
///
-/// The watch descriptor provided should have previously been returned
-/// by [`inotify_add_watch`] and not previously have been removed.
+/// The watch descriptor provided should have previously been returned by
+/// [`inotify_add_watch`] and not previously have been removed.
#[doc(alias = "inotify_rm_watch")]
#[inline]
pub fn inotify_remove_watch(inot: BorrowedFd<'_>, wd: i32) -> io::Result<()> {