aboutsummaryrefslogtreecommitdiff
path: root/vendor/rustix/src/termios/ioctl.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
committerValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
commita990de90fe41456a23e58bd087d2f107d321f3a1 (patch)
tree15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/termios/ioctl.rs
parent3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff)
downloadfparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz
fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/termios/ioctl.rs')
-rw-r--r--vendor/rustix/src/termios/ioctl.rs53
1 files changed, 0 insertions, 53 deletions
diff --git a/vendor/rustix/src/termios/ioctl.rs b/vendor/rustix/src/termios/ioctl.rs
deleted file mode 100644
index 620ae4c..0000000
--- a/vendor/rustix/src/termios/ioctl.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-//! Terminal-related `ioctl` functions.
-
-#![allow(unsafe_code)]
-
-use crate::fd::AsFd;
-use crate::{backend, io, ioctl};
-use backend::c;
-
-/// `ioctl(fd, TIOCEXCL)`—Enables exclusive mode on a terminal.
-///
-/// # References
-/// - [Linux]
-/// - [FreeBSD]
-/// - [NetBSD]
-/// - [OpenBSD]
-///
-/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html
-/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=tty&sektion=4
-/// [NetBSD]: https://man.netbsd.org/tty.4
-/// [OpenBSD]: https://man.openbsd.org/tty.4
-#[cfg(not(any(windows, target_os = "redox", target_os = "wasi")))]
-#[inline]
-#[doc(alias = "TIOCEXCL")]
-pub fn ioctl_tiocexcl<Fd: AsFd>(fd: Fd) -> io::Result<()> {
- // SAFETY: TIOCEXCL is a no-argument setter opcode.
- unsafe {
- let ctl = ioctl::NoArg::<ioctl::BadOpcode<{ c::TIOCEXCL as _ }>>::new();
- ioctl::ioctl(fd, ctl)
- }
-}
-
-/// `ioctl(fd, TIOCNXCL)`—Disables exclusive mode on a terminal.
-///
-/// # References
-/// - [Linux]
-/// - [FreeBSD]
-/// - [NetBSD]
-/// - [OpenBSD]
-///
-/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html
-/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=tty&sektion=4
-/// [NetBSD]: https://man.netbsd.org/tty.4
-/// [OpenBSD]: https://man.openbsd.org/tty.4
-#[cfg(not(any(windows, target_os = "redox", target_os = "wasi")))]
-#[inline]
-#[doc(alias = "TIOCNXCL")]
-pub fn ioctl_tiocnxcl<Fd: AsFd>(fd: Fd) -> io::Result<()> {
- // SAFETY: TIOCNXCL is a no-argument setter opcode.
- unsafe {
- let ctl = ioctl::NoArg::<ioctl::BadOpcode<{ c::TIOCNXCL as _ }>>::new();
- ioctl::ioctl(fd, ctl)
- }
-}