summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/termios/tty.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
commit4547b622d8d29df964fa2914213088b148c498fc (patch)
tree9fc6b25f3c3add6b745be9a2400a6e96140046e9 /vendor/rustix/src/termios/tty.rs
parentReleasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz
rustc-4547b622d8d29df964fa2914213088b148c498fc.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/termios/tty.rs')
-rw-r--r--vendor/rustix/src/termios/tty.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/rustix/src/termios/tty.rs b/vendor/rustix/src/termios/tty.rs
index 1651a3c3b..9a1692330 100644
--- a/vendor/rustix/src/termios/tty.rs
+++ b/vendor/rustix/src/termios/tty.rs
@@ -1,19 +1,20 @@
//! Functions which operate on file descriptors which might be terminals.
-use crate::imp;
+use crate::backend;
#[cfg(any(
all(linux_raw, feature = "procfs"),
all(libc, not(any(target_os = "fuchsia", target_os = "wasi"))),
))]
#[cfg_attr(doc_cfg, doc(cfg(feature = "procfs")))]
use crate::io;
-use imp::fd::AsFd;
+use backend::fd::AsFd;
#[cfg(any(
all(linux_raw, feature = "procfs"),
all(libc, not(any(target_os = "fuchsia", target_os = "wasi"))),
))]
use {
- crate::ffi::CString, crate::path::SMALL_PATH_BUFFER_SIZE, alloc::vec::Vec, imp::fd::BorrowedFd,
+ crate::ffi::CString, crate::path::SMALL_PATH_BUFFER_SIZE, alloc::vec::Vec,
+ backend::fd::BorrowedFd,
};
/// `isatty(fd)`—Tests whether a file descriptor refers to a terminal.
@@ -26,7 +27,7 @@ use {
/// [Linux]: https://man7.org/linux/man-pages/man3/isatty.3.html
#[inline]
pub fn isatty<Fd: AsFd>(fd: Fd) -> bool {
- imp::termios::syscalls::isatty(fd.as_fd())
+ backend::termios::syscalls::isatty(fd.as_fd())
}
/// `ttyname_r(fd)`
@@ -57,7 +58,7 @@ fn _ttyname(dirfd: BorrowedFd<'_>, mut buffer: Vec<u8>) -> io::Result<CString> {
buffer.resize(buffer.capacity(), 0_u8);
loop {
- match imp::termios::syscalls::ttyname(dirfd, &mut buffer) {
+ match backend::termios::syscalls::ttyname(dirfd, &mut buffer) {
Err(io::Errno::RANGE) => {
buffer.reserve(1); // use `Vec` reallocation strategy to grow capacity exponentially
buffer.resize(buffer.capacity(), 0_u8);