summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-09-13 20:01:35 +0000
committerbors <bors@rust-lang.org>2019-09-13 20:01:35 +0000
commit36566a772071ae4460565fd145a8d8855aed75a6 (patch)
tree7ac3bf96aa0adae1da6200596d77243f9fbca3fd
parent43cb5b3af75b3e4fb43452347d963a170579649a (diff)
parentd21f9031e23077cdd2442031074fdbc333569692 (diff)
downloadrust-libc-36566a772071ae4460565fd145a8d8855aed75a6.tar.gz
Auto merge of #1493 - lucab:ups/bsd-utmpx, r=gnzlbg
freebsdlike: add several utmpx constants This adds several `utmpx.h` constants for FreeBSD and DragonflyBSD. Ref: https://github.com/freebsd/freebsd/blob/a1d2b5187332a366a897689c5fb41d38d7e1b0d8/include/utmpx.h Ref: http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/include/utmpx.h
-rw-r--r--src/unix/bsd/freebsdlike/dragonfly/mod.rs8
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs5
2 files changed, 13 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index ae03a95c69..63ca4db082 100644
--- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -938,6 +938,7 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
pub const MSG_FMASK: ::c_int = 0xFFFF0000;
+// utmpx entry types
pub const EMPTY: ::c_short = 0;
pub const RUN_LVL: ::c_short = 1;
pub const BOOT_TIME: ::c_short = 2;
@@ -947,6 +948,13 @@ pub const INIT_PROCESS: ::c_short = 5;
pub const LOGIN_PROCESS: ::c_short = 6;
pub const USER_PROCESS: ::c_short = 7;
pub const DEAD_PROCESS: ::c_short = 8;
+pub const ACCOUNTING: ::c_short = 9;
+pub const SIGNATURE: ::c_short = 10;
+pub const DOWNTIME: ::c_short = 11;
+// utmpx database types
+pub const UTX_DB_UTMPX: ::c_uint = 0;
+pub const UTX_DB_WTMPX: ::c_uint = 1;
+pub const UTX_DB_LASTLOG: ::c_uint = 2;
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index afceb51de0..9acc3fcc33 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -1009,6 +1009,7 @@ pub const MSG_COMPAT: ::c_int = 0x00008000;
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
pub const MSG_NOSIGNAL: ::c_int = 0x20000;
+// utmpx entry types
pub const EMPTY: ::c_short = 0;
pub const BOOT_TIME: ::c_short = 1;
pub const OLD_TIME: ::c_short = 2;
@@ -1018,6 +1019,10 @@ pub const INIT_PROCESS: ::c_short = 5;
pub const LOGIN_PROCESS: ::c_short = 6;
pub const DEAD_PROCESS: ::c_short = 7;
pub const SHUTDOWN_TIME: ::c_short = 8;
+// utmp database types
+pub const UTXDB_ACTIVE: ::c_int = 0;
+pub const UTXDB_LASTLOGIN: ::c_int = 1;
+pub const UTXDB_LOG: ::c_int = 2;
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);