summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-07-25 09:06:22 +0100
committerDavid Carlier <devnexen@gmail.com>2021-07-25 12:34:42 +0100
commite0cb075f7cb53a1bb85dbd3f89dbd49fa174b1ac (patch)
treef6c834a41d5dff63a270fe283ba3bd758f1d3fcc
parent880d2942b277fde22306d7f98d7c563a73d0b599 (diff)
downloadrust-libc-e0cb075f7cb53a1bb85dbd3f89dbd49fa174b1ac.tar.gz
netbsd kinfo_getvmmap addition
-rw-r--r--libc-test/semver/netbsd.txt2
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs25
2 files changed, 27 insertions, 0 deletions
diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt
index afde29b658..483c780416 100644
--- a/libc-test/semver/netbsd.txt
+++ b/libc-test/semver/netbsd.txt
@@ -1146,6 +1146,8 @@ ipc_perm
kevent
key_t
killpg
+kinfo_vmentry
+kinfo_getvmmap
kqueue
kqueue1
labs
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 02e05ba7c6..9d47c0ac1f 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -468,6 +468,29 @@ s! {
pub struct sched_param {
pub sched_priority: ::c_int,
}
+
+ pub struct kinfo_vmentry {
+ pub kve_start: u64,
+ pub kve_end: u64,
+ pub kve_offset: u64,
+ pub kve_type: u32,
+ pub kve_flags: u32,
+ pub kve_count: u32,
+ pub kve_wired_count: u32,
+ pub kve_advice: u32,
+ pub kve_attributes: u32,
+ pub kve_protection: u32,
+ pub kve_max_protection: u32,
+ pub kve_ref_count: u32,
+ pub kve_inheritance: u32,
+ pub kve_vn_fileid: u64,
+ pub kve_vn_size: u64,
+ pub kve_vn_fsid: u64,
+ pub kve_vn_rdev: u64,
+ pub kve_vn_type: u32,
+ pub kve_vn_mode: u32,
+ pub kve_path: [[::c_char; 32]; 32],
+ }
}
s_no_extra_traits! {
@@ -2298,6 +2321,8 @@ extern "C" {
pub fn login(ut: *const utmp);
pub fn logout(line: *const ::c_char);
pub fn logwtmp(line: *const ::c_char, name: *const ::c_char, host: *const ::c_char);
+
+ pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry;
}
cfg_if! {