Add docs for pty.h and utmp.h

This commit is contained in:
Peter Limkilde Svendsen
2024-11-13 18:19:22 +01:00
parent a45c7b26d9
commit 66eb440d79
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,6 @@
//! pty.h implementation, not POSIX specified
//! `pty.h` implementation.
//!
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
use core::{mem, ptr, slice};
@@ -15,6 +17,7 @@ mod imp;
#[path = "redox.rs"]
mod imp;
/// See <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
#[no_mangle]
pub unsafe extern "C" fn openpty(
amaster: *mut c_int,
@@ -49,6 +52,7 @@ pub unsafe extern "C" fn openpty(
return 0;
}
/// See <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
#[no_mangle]
pub unsafe extern "C" fn forkpty(
pm: *mut c_int,
+4 -1
View File
@@ -1,10 +1,13 @@
//! utmp.h implementation, not POSIX specified
//! `utmp.h` implementation.
//!
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
use crate::{
header::{sys_ioctl, unistd},
platform::types::*,
};
/// See <https://www.man7.org/linux/man-pages/man3/openpty.3.html>.
#[no_mangle]
pub unsafe extern "C" fn login_tty(fd: c_int) -> c_int {
// Create a new session