Skip to content

Commit

Permalink
Auto merge of #2311 - devnexen:netbsd_kinfo_lookup_data, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd add proper flags for kinfo_vmentry lookups
  • Loading branch information
bors committed Aug 3, 2021
2 parents 4d9390b + f7cfa2e commit 6756263
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libc-test/semver/netbsd.txt
Expand Up @@ -507,6 +507,15 @@ KERN_URND
KERN_VERIEXEC
KERN_VERSION
KERN_VNODE
KVME_FLAG_COW
KVME_FLAG_GROWS_DOWN
KVME_FLAG_GROWS_UP
KVME_FLAG_NEEDS_COPY
KVME_FLAG_NOCOREDUMP
KVME_FLAG_PAGEABLE
KVME_PROT_EXEC
KVME_PROT_READ
KVME_PROT_WRITE
LC_ALL
LC_ALL_MASK
LC_COLLATE
Expand Down Expand Up @@ -904,6 +913,8 @@ UT_HOSTSIZE
UT_LINESIZE
UT_NAMESIZE
VDSUSP
VM_PROC
VM_PROC_MAP
VSTATUS
WEXITED
WNOWAIT
Expand Down
14 changes: 14 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -1735,6 +1735,8 @@ pub const KERN_PROC_NARGV: ::c_int = 2;
pub const KERN_PROC_ENV: ::c_int = 3;
pub const KERN_PROC_NENV: ::c_int = 4;
pub const KERN_PROC_PATHNAME: ::c_int = 5;
pub const VM_PROC: ::c_int = 16;
pub const VM_PROC_MAP: ::c_int = 1;

pub const EAI_AGAIN: ::c_int = 2;
pub const EAI_BADFLAGS: ::c_int = 3;
Expand Down Expand Up @@ -1836,6 +1838,18 @@ pub const SF_SNAPSHOT: ::c_ulong = 0x00200000;
pub const SF_LOG: ::c_ulong = 0x00400000;
pub const SF_SNAPINVAL: ::c_ulong = 0x00800000;

// sys/sysctl.h
pub const KVME_PROT_READ: ::c_int = 0x00000001;
pub const KVME_PROT_WRITE: ::c_int = 0x00000002;
pub const KVME_PROT_EXEC: ::c_int = 0x00000004;

pub const KVME_FLAG_COW: ::c_int = 0x00000001;
pub const KVME_FLAG_NEEDS_COPY: ::c_int = 0x00000002;
pub const KVME_FLAG_NOCOREDUMP: ::c_int = 0x000000004;
pub const KVME_FLAG_PAGEABLE: ::c_int = 0x000000008;
pub const KVME_FLAG_GROWS_UP: ::c_int = 0x000000010;
pub const KVME_FLAG_GROWS_DOWN: ::c_int = 0x000000020;

const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
Expand Down

0 comments on commit 6756263

Please sign in to comment.