document termios functions

This commit is contained in:
auronandace
2026-07-06 11:26:04 +01:00
parent 9930a90de0
commit 3683a14ab4
3 changed files with 199 additions and 72 deletions
+7
View File
@@ -21,6 +21,13 @@ pub struct sgttyb {
sg_flags: c_ushort,
}
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man2/ioctl.2.html>.
///
/// Manipulates the underlying device parameters of special files.
///
/// Upon success, usually returns `0`. A few operations use the return value
/// as an output parameter and returns a nonnegative value on success. Upon
/// failure, `-1` is returned and errno set to indicate the error.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) -> c_int {
// TODO: Somehow support varargs to syscall??