From 5fbf1bd7c7380a64bbf3ac15dc05685f077c4c7e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 31 Mar 2022 18:15:50 +0100 Subject: [PATCH] following up on openbsd's kinfo_vmentry flags --- libc-test/semver/openbsd.txt | 17 +++++++++++++++++ src/unix/bsd/netbsdlike/openbsd/mod.rs | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index aa0e163737041..30813314d197c 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 545aff43fd644..02b242a69674b 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;