summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-01 02:19:47 +0000
committerbors <bors@rust-lang.org>2022-04-01 02:19:47 +0000
commitf59a9703842b6536e7cadea08146bcf889fc0fb3 (patch)
treef660ae4dc5222542751d8d507832449bd14214d4
parent4297ad14bf7a897e890c2d5d94f2fc34e40a5dde (diff)
parent5fbf1bd7c7380a64bbf3ac15dc05685f077c4c7e (diff)
downloadrust-libc-f59a9703842b6536e7cadea08146bcf889fc0fb3.tar.gz
Auto merge of #2736 - devnexen:obsd_kve_flags_followup, r=Amanieu
following up on openbsd's kinfo_vmentry flags
-rw-r--r--libc-test/semver/openbsd.txt17
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs24
2 files changed, 41 insertions, 0 deletions
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index aa0e163737..30813314d1 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -412,6 +412,23 @@ KERN_TTYCOUNT
KERN_USERMOUNT
KERN_VERSION
KERN_WATCHDOG
+KVE_ADV_NORMAL
+KVE_ADV_RANDOM
+KVE_ADV_SEQUENTIAL
+KVE_ET_CONCEAL
+KVE_ET_COPYONWRITE
+KVE_ET_FREEMAPPED
+KVE_ET_OBJ
+KVE_ET_STACK
+KVE_ET_SUBMAP
+KVE_ET_SYSCALL
+KVE_ET_WC
+KVE_F_KMEM
+KVE_F_STATIC
+KVE_INH_COPY
+KVE_INH_NONE
+KVE_INH_SHARE
+KVE_INH_ZERO
KVE_PROT_EXEC
KVE_PROT_NONE
KVE_PROT_READ
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 545aff43fd..02b242a696 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1372,11 +1372,35 @@ pub const KI_WMESGLEN: ::c_int = 8;
pub const KI_MAXLOGNAME: ::c_int = 32;
pub const KI_EMULNAMELEN: ::c_int = 8;
+pub const KVE_ET_OBJ: ::c_int = 0x00000001;
+pub const KVE_ET_SUBMAP: ::c_int = 0x00000002;
+pub const KVE_ET_COPYONWRITE: ::c_int = 0x00000004;
+pub const KVE_ET_NEEDSCOPY: ::c_int = 0x00000008;
+pub const KVE_ET_HOLE: ::c_int = 0x00000010;
+pub const KVE_ET_NOFAULT: ::c_int = 0x00000020;
+pub const KVE_ET_STACK: ::c_int = 0x00000040;
+pub const KVE_ET_WC: ::c_int = 0x000000080;
+pub const KVE_ET_CONCEAL: ::c_int = 0x000000100;
+pub const KVE_ET_SYSCALL: ::c_int = 0x000000200;
+pub const KVE_ET_FREEMAPPED: ::c_int = 0x000000800;
+
pub const KVE_PROT_NONE: ::c_int = 0x00000000;
pub const KVE_PROT_READ: ::c_int = 0x00000001;
pub const KVE_PROT_WRITE: ::c_int = 0x00000002;
pub const KVE_PROT_EXEC: ::c_int = 0x00000004;
+pub const KVE_ADV_NORMAL: ::c_int = 0x00000000;
+pub const KVE_ADV_RANDOM: ::c_int = 0x00000001;
+pub const KVE_ADV_SEQUENTIAL: ::c_int = 0x00000002;
+
+pub const KVE_INH_SHARE: ::c_int = 0x00000000;
+pub const KVE_INH_COPY: ::c_int = 0x00000010;
+pub const KVE_INH_NONE: ::c_int = 0x00000020;
+pub const KVE_INH_ZERO: ::c_int = 0x00000030;
+
+pub const KVE_F_STATIC: ::c_int = 0x1;
+pub const KVE_F_KMEM: ::c_int = 0x2;
+
pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS;
pub const OLCUC: ::tcflag_t = 0x20;
pub const ONOCR: ::tcflag_t = 0x40;