Skip to content

Commit 36566a7

Browse files
committed
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
2 parents 43cb5b3 + d21f903 commit 36566a7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
938938
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
939939
pub const MSG_FMASK: ::c_int = 0xFFFF0000;
940940

941+
// utmpx entry types
941942
pub const EMPTY: ::c_short = 0;
942943
pub const RUN_LVL: ::c_short = 1;
943944
pub const BOOT_TIME: ::c_short = 2;
@@ -947,6 +948,13 @@ pub const INIT_PROCESS: ::c_short = 5;
947948
pub const LOGIN_PROCESS: ::c_short = 6;
948949
pub const USER_PROCESS: ::c_short = 7;
949950
pub const DEAD_PROCESS: ::c_short = 8;
951+
pub const ACCOUNTING: ::c_short = 9;
952+
pub const SIGNATURE: ::c_short = 10;
953+
pub const DOWNTIME: ::c_short = 11;
954+
// utmpx database types
955+
pub const UTX_DB_UTMPX: ::c_uint = 0;
956+
pub const UTX_DB_WTMPX: ::c_uint = 1;
957+
pub const UTX_DB_LASTLOG: ::c_uint = 2;
950958

951959
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
952960
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);

src/unix/bsd/freebsdlike/freebsd/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ pub const MSG_COMPAT: ::c_int = 0x00008000;
10091009
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
10101010
pub const MSG_NOSIGNAL: ::c_int = 0x20000;
10111011

1012+
// utmpx entry types
10121013
pub const EMPTY: ::c_short = 0;
10131014
pub const BOOT_TIME: ::c_short = 1;
10141015
pub const OLD_TIME: ::c_short = 2;
@@ -1018,6 +1019,10 @@ pub const INIT_PROCESS: ::c_short = 5;
10181019
pub const LOGIN_PROCESS: ::c_short = 6;
10191020
pub const DEAD_PROCESS: ::c_short = 7;
10201021
pub const SHUTDOWN_TIME: ::c_short = 8;
1022+
// utmp database types
1023+
pub const UTXDB_ACTIVE: ::c_int = 0;
1024+
pub const UTXDB_LASTLOGIN: ::c_int = 1;
1025+
pub const UTXDB_LOG: ::c_int = 2;
10211026

10221027
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
10231028
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);

0 commit comments

Comments
 (0)