From 0d34c229ff1b47b574983b61d0c33a3635924a48 Mon Sep 17 00:00:00 2001 From: auronandace Date: Thu, 9 Oct 2025 17:02:54 +0100 Subject: [PATCH 1/3] update and add spec links --- src/header/sys_statvfs/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/header/sys_statvfs/mod.rs b/src/header/sys_statvfs/mod.rs index dee4415057..d89429b9c2 100644 --- a/src/header/sys_statvfs/mod.rs +++ b/src/header/sys_statvfs/mod.rs @@ -1,4 +1,6 @@ -//! 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, @@ -27,12 +29,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); From 159b6dcdde499c053409a04ac93b902b6bcd5563 Mon Sep 17 00:00:00 2001 From: auronandace Date: Thu, 9 Oct 2025 17:08:43 +0100 Subject: [PATCH 2/3] only import what is needed --- src/header/sys_statvfs/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/header/sys_statvfs/mod.rs b/src/header/sys_statvfs/mod.rs index d89429b9c2..fc1f3c066d 100644 --- a/src/header/sys_statvfs/mod.rs +++ b/src/header/sys_statvfs/mod.rs @@ -7,7 +7,7 @@ use crate::{ 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 From 900e27538bec268f4a30e648fe9cd606f18c903d Mon Sep 17 00:00:00 2001 From: auronandace Date: Thu, 9 Oct 2025 17:14:26 +0100 Subject: [PATCH 3/3] fix formatting --- src/header/sys_statvfs/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/header/sys_statvfs/mod.rs b/src/header/sys_statvfs/mod.rs index fc1f3c066d..aa2a1172c8 100644 --- a/src/header/sys_statvfs/mod.rs +++ b/src/header/sys_statvfs/mod.rs @@ -7,7 +7,10 @@ use crate::{ error::ResultExt, header::fcntl::O_PATH, out::Out, - platform::{Pal, Sys, types::{c_char, c_int, c_ulong, fsblkcnt_t, fsfilcnt_t}}, + platform::{ + Pal, Sys, + types::{c_char, c_int, c_ulong, fsblkcnt_t, fsfilcnt_t}, + }, }; //pub const ST_RDONLY