mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-05 15:37:47 +00:00
pinky: implement short format
This commit is contained in:
parent
b0588e482e
commit
967babd1e6
1 changed files with 9 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
pub use self::utmpx::{DEFAULT_FILE,USER_PROCESS,BOOT_TIME,c_utmp};
|
pub use self::utmpx::{UT_NAMESIZE,UT_LINESIZE,DEFAULT_FILE,USER_PROCESS,BOOT_TIME,c_utmp};
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
mod utmpx {
|
mod utmpx {
|
||||||
use super::libc;
|
use super::libc;
|
||||||
|
@ -25,6 +25,12 @@ mod utmpx {
|
||||||
pub const DEAD_PROCESS: libc::c_short = 8;
|
pub const DEAD_PROCESS: libc::c_short = 8;
|
||||||
pub const ACCOUNTING: libc::c_short = 9;
|
pub const ACCOUNTING: libc::c_short = 9;
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
|
pub struct timeval {
|
||||||
|
pub tv_sec: libc::int32_t,
|
||||||
|
pub tv_usec: libc::int32_t,
|
||||||
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct c_exit_status {
|
pub struct c_exit_status {
|
||||||
pub e_termination: libc::c_short,
|
pub e_termination: libc::c_short,
|
||||||
|
@ -41,8 +47,8 @@ mod utmpx {
|
||||||
pub ut_user: [libc::c_char; UT_NAMESIZE],
|
pub ut_user: [libc::c_char; UT_NAMESIZE],
|
||||||
pub ut_host: [libc::c_char; UT_HOSTSIZE],
|
pub ut_host: [libc::c_char; UT_HOSTSIZE],
|
||||||
pub ut_exit: c_exit_status,
|
pub ut_exit: c_exit_status,
|
||||||
pub ut_session: libc::c_long,
|
pub ut_session: libc::int32_t,
|
||||||
pub ut_tv: libc::timeval,
|
pub ut_tv: timeval,
|
||||||
|
|
||||||
pub ut_addr_v6: [libc::int32_t; 4],
|
pub ut_addr_v6: [libc::int32_t; 4],
|
||||||
pub __unused: [libc::c_char; 20],
|
pub __unused: [libc::c_char; 20],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue