Skip to content

Commit 6756263

Browse files
committed
Auto merge of #2311 - devnexen:netbsd_kinfo_lookup_data, r=JohnTitor
netbsd add proper flags for kinfo_vmentry lookups
2 parents 4d9390b + f7cfa2e commit 6756263

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

libc-test/semver/netbsd.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,15 @@ KERN_URND
507507
KERN_VERIEXEC
508508
KERN_VERSION
509509
KERN_VNODE
510+
KVME_FLAG_COW
511+
KVME_FLAG_GROWS_DOWN
512+
KVME_FLAG_GROWS_UP
513+
KVME_FLAG_NEEDS_COPY
514+
KVME_FLAG_NOCOREDUMP
515+
KVME_FLAG_PAGEABLE
516+
KVME_PROT_EXEC
517+
KVME_PROT_READ
518+
KVME_PROT_WRITE
510519
LC_ALL
511520
LC_ALL_MASK
512521
LC_COLLATE
@@ -904,6 +913,8 @@ UT_HOSTSIZE
904913
UT_LINESIZE
905914
UT_NAMESIZE
906915
VDSUSP
916+
VM_PROC
917+
VM_PROC_MAP
907918
VSTATUS
908919
WEXITED
909920
WNOWAIT

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,8 @@ pub const KERN_PROC_NARGV: ::c_int = 2;
17351735
pub const KERN_PROC_ENV: ::c_int = 3;
17361736
pub const KERN_PROC_NENV: ::c_int = 4;
17371737
pub const KERN_PROC_PATHNAME: ::c_int = 5;
1738+
pub const VM_PROC: ::c_int = 16;
1739+
pub const VM_PROC_MAP: ::c_int = 1;
17381740

17391741
pub const EAI_AGAIN: ::c_int = 2;
17401742
pub const EAI_BADFLAGS: ::c_int = 3;
@@ -1836,6 +1838,18 @@ pub const SF_SNAPSHOT: ::c_ulong = 0x00200000;
18361838
pub const SF_LOG: ::c_ulong = 0x00400000;
18371839
pub const SF_SNAPINVAL: ::c_ulong = 0x00800000;
18381840

1841+
// sys/sysctl.h
1842+
pub const KVME_PROT_READ: ::c_int = 0x00000001;
1843+
pub const KVME_PROT_WRITE: ::c_int = 0x00000002;
1844+
pub const KVME_PROT_EXEC: ::c_int = 0x00000004;
1845+
1846+
pub const KVME_FLAG_COW: ::c_int = 0x00000001;
1847+
pub const KVME_FLAG_NEEDS_COPY: ::c_int = 0x00000002;
1848+
pub const KVME_FLAG_NOCOREDUMP: ::c_int = 0x000000004;
1849+
pub const KVME_FLAG_PAGEABLE: ::c_int = 0x000000008;
1850+
pub const KVME_FLAG_GROWS_UP: ::c_int = 0x000000010;
1851+
pub const KVME_FLAG_GROWS_DOWN: ::c_int = 0x000000020;
1852+
18391853
const_fn! {
18401854
{const} fn _ALIGN(p: usize) -> usize {
18411855
(p + _ALIGNBYTES) & !_ALIGNBYTES

0 commit comments

Comments
 (0)