diff options
author | bors <bors@rust-lang.org> | 2023-05-07 12:59:48 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-05-07 12:59:48 +0000 |
commit | 3b5109b3da613de31eb0d6bd42c9d6a6033360fb (patch) | |
tree | f3146865e33896ea7aed0ab21e7564da80e9ae10 /src/unix/bsd/freebsdlike/mod.rs | |
parent | ae2c94f09ac7e9ddec491f581abea19a38fec0be (diff) | |
parent | 86bfc4eb2645863010330c2d05558bbe99cc31b4 (diff) | |
download | rust-libc-3b5109b3da613de31eb0d6bd42c9d6a6033360fb.tar.gz |
Auto merge of #3238 - valpackett:bsd, r=JohnTitor
more bsd things: kenv, setlogin, reboot, SCM_ constants
Diffstat (limited to 'src/unix/bsd/freebsdlike/mod.rs')
-rw-r--r-- | src/unix/bsd/freebsdlike/mod.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 6a0f383bc0..f328f0dd76 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -1434,6 +1434,31 @@ pub const SHM_RND: ::c_int = 0o20000; pub const SHM_R: ::c_int = 0o400; pub const SHM_W: ::c_int = 0o200; +pub const KENV_GET: ::c_int = 0; +pub const KENV_SET: ::c_int = 1; +pub const KENV_UNSET: ::c_int = 2; +pub const KENV_DUMP: ::c_int = 3; +pub const KENV_MNAMELEN: ::c_int = 128; +pub const KENV_MVALLEN: ::c_int = 128; + +pub const RB_ASKNAME: ::c_int = 0x001; +pub const RB_SINGLE: ::c_int = 0x002; +pub const RB_NOSYNC: ::c_int = 0x004; +pub const RB_HALT: ::c_int = 0x008; +pub const RB_INITNAME: ::c_int = 0x010; +pub const RB_DFLTROOT: ::c_int = 0x020; +pub const RB_KDB: ::c_int = 0x040; +pub const RB_RDONLY: ::c_int = 0x080; +pub const RB_DUMP: ::c_int = 0x100; +pub const RB_MINIROOT: ::c_int = 0x200; +pub const RB_VERBOSE: ::c_int = 0x800; +pub const RB_SERIAL: ::c_int = 0x1000; +pub const RB_CDROM: ::c_int = 0x2000; +pub const RB_POWEROFF: ::c_int = 0x4000; +pub const RB_GDB: ::c_int = 0x8000; +pub const RB_MUTE: ::c_int = 0x10000; +pub const RB_SELFTEST: ::c_int = 0x20000; + safe_f! { pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { status == 0x13 @@ -1737,6 +1762,14 @@ extern "C" { pub fn eui64_hostton(hostname: *const ::c_char, id: *mut eui64) -> ::c_int; pub fn eaccess(path: *const ::c_char, mode: ::c_int) -> ::c_int; + + pub fn kenv( + action: ::c_int, + name: *const ::c_char, + value: *mut ::c_char, + len: ::c_int, + ) -> ::c_int; + pub fn reboot(howto: ::c_int) -> ::c_int; } #[link(name = "rt")] |