Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/backend/linux_raw/termios/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ pub(crate) fn tcgetattr(fd: BorrowedFd<'_>) -> io::Result<Termios> {
// `TCGETS2`, for example a seccomp environment or WSL that only
// knows about `TCGETS`. Fall back to the old `TCGETS`.
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) => tcgetattr_fallback(fd),
Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) | Err(io::Errno::INVAL) => {
tcgetattr_fallback(fd)
}

Err(err) => Err(err),
}
Expand Down Expand Up @@ -148,7 +150,7 @@ pub(crate) fn tcsetattr(
// Similar to `tcgetattr_fallback`, `NOTTY` or `ACCESS` might mean
// the OS doesn't support `TCSETS2`. Fall back to the old `TCSETS`.
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) => {
Err(io::Errno::NOTTY) | Err(io::Errno::ACCESS) | Err(io::Errno::INVAL) => {
tcsetattr_fallback(fd, optional_actions, termios)
}

Expand Down
Loading