Add termios constant for VDISABLE

_POSIX_VDISABLE is an extension that disables terminal special
characters.

See:
* redox-os/termios!3
* redox-os/base!27
This commit is contained in:
Josh Megnauth
2025-08-11 02:43:25 -04:00
parent f5bc50f104
commit c3c9e3f619
10 changed files with 71 additions and 6 deletions
+2 -4
View File
@@ -5,10 +5,8 @@ use crate::{
};
pub(super) unsafe fn openpty(name: &mut [u8]) -> Result<(c_int, c_int), ()> {
const O_NOCTTY: c_int = 0x100;
//TODO: wrap in auto-close struct
let master = fcntl::open(c"/dev/ptmx".as_ptr(), fcntl::O_RDWR | O_NOCTTY, 0);
let master = fcntl::open(c"/dev/ptmx".as_ptr(), fcntl::O_RDWR | fcntl::O_NOCTTY, 0);
if master < 0 {
return Err(());
}
@@ -40,7 +38,7 @@ pub(super) unsafe fn openpty(name: &mut [u8]) -> Result<(c_int, c_int), ()> {
let slave = fcntl::open(
cursor.get_ref().as_ptr() as *const c_char,
fcntl::O_RDWR | O_NOCTTY,
fcntl::O_RDWR | fcntl::O_NOCTTY,
0,
);
if slave < 0 {