diff --git a/src/header/sys_statvfs/mod.rs b/src/header/sys_statvfs/mod.rs index dee4415057..aa2a1172c8 100644 --- a/src/header/sys_statvfs/mod.rs +++ b/src/header/sys_statvfs/mod.rs @@ -1,11 +1,16 @@ -//! statvfs implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysstatvfs.h.html +//! `sys_statvfs.h` implementation. +//! +//! See . use crate::{ c_str::CStr, error::ResultExt, header::fcntl::O_PATH, out::Out, - platform::{Pal, Sys, types::*}, + platform::{ + Pal, Sys, + types::{c_char, c_int, c_ulong, fsblkcnt_t, fsfilcnt_t}, + }, }; //pub const ST_RDONLY @@ -27,12 +32,14 @@ pub struct statvfs { pub f_namemax: c_ulong, } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn fstatvfs(fildes: c_int, buf: *mut statvfs) -> c_int { let buf = Out::nonnull(buf); Sys::fstatvfs(fildes, buf).map(|()| 0).or_minus_one_errno() } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn statvfs(file: *const c_char, buf: *mut statvfs) -> c_int { let file = CStr::from_ptr(file);