Skip to content

Commit

Permalink
openbsd: add getmntinfo(3) and getfsstat(2) support
Browse files Browse the repository at this point in the history
  • Loading branch information
semarie committed Sep 13, 2022
1 parent a74954e commit cecfb38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/semver/openbsd.txt
Expand Up @@ -497,6 +497,9 @@ MSG_CMSG_CLOEXEC
MSG_DONTWAIT
MSG_MCAST
MSG_NOSIGNAL
MNT_LAZY
MNT_NOWAIT
MNT_WAIT
NET_RT_DUMP
NET_RT_FLAGS
NET_RT_IFLIST
Expand Down Expand Up @@ -999,6 +1002,7 @@ futimes
getdomainname
getdtablesize
getentropy
getfsstat
getgrent
getgrgid
getgrgid_r
Expand All @@ -1010,6 +1014,7 @@ getifaddrs
getitimer
getline
getloadavg
getmntinfo
getnameinfo
getpeereid
getpriority
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/netbsdlike/openbsd/mod.rs
Expand Up @@ -1639,6 +1639,10 @@ pub const SF_ARCHIVED: ::c_uint = 0x00010000;
pub const SF_IMMUTABLE: ::c_uint = 0x00020000;
pub const SF_APPEND: ::c_uint = 0x00040000;

pub const MNT_WAIT: ::c_int = 1;
pub const MNT_NOWAIT: ::c_int = 2;
pub const MNT_LAZY: ::c_int = 3;

const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
Expand Down Expand Up @@ -1848,6 +1852,9 @@ extern "C" {
pub fn hdestroy();
pub fn hsearch(entry: ::ENTRY, action: ::ACTION) -> *mut ::ENTRY;

pub fn getmntinfo(mntbufp: *mut *mut ::statfs, flags: ::c_int) -> ::c_int;
pub fn getfsstat(buf: *mut statfs, bufsize: ::size_t, flags: ::c_int) -> ::c_int;

// futex.h
pub fn futex(
uaddr: *mut u32,
Expand Down

0 comments on commit cecfb38

Please sign in to comment.