aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / libc / src / new / netbsd / utmp_.rs
| 1 | //! Header: `utmp.h` |
| 2 | //! |
| 3 | //! <https://github.com/NetBSD/src/blob/master/include/utmp.h> |
| 4 | |
| 5 | use crate::prelude::*; |
| 6 | |
| 7 | pub const UT_NAMESIZE: usize = 8; |
| 8 | pub const UT_LINESIZE: usize = 8; |
| 9 | pub const UT_HOSTSIZE: usize = 16; |
| 10 | |
| 11 | s! { |
| 12 | pub struct lastlog { |
| 13 | pub ll_time: crate::time_t, |
| 14 | pub ll_line: [c_char; UT_LINESIZE], |
| 15 | pub ll_host: [c_char; UT_HOSTSIZE], |
| 16 | } |
| 17 | |
| 18 | pub struct utmp { |
| 19 | pub ut_line: [c_char; UT_LINESIZE], |
| 20 | pub ut_name: [c_char; UT_NAMESIZE], |
| 21 | pub ut_host: [c_char; UT_HOSTSIZE], |
| 22 | pub ut_time: crate::time_t, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | #[link(name = "util")] |
| 27 | extern "C" { |
| 28 | pub fn utmpname(file: *const c_char) -> c_int; |
| 29 | pub fn setutent(); |
| 30 | #[link_name = "__getutent50"] |
| 31 | pub fn getutent() -> *mut utmp; |
| 32 | pub fn endutent(); |
| 33 | } |