pal: add syncfs to Pal trait (default calls fsync)

This commit is contained in:
Red Bear OS
2026-07-09 11:36:25 +03:00
parent b0e4502b6e
commit 9eacf8efc4
+5
View File
@@ -140,6 +140,11 @@ pub trait Pal {
/// Platform implementation of [`fsync()`](crate::header::unistd::fsync) from [`unistd.h`](crate::header::unistd).
fn fsync(fildes: c_int) -> Result<()>;
/// Platform implementation of [`syncfs()`](crate::header::unistd::syncfs) from [`unistd.h`](crate::header::unistd).
fn syncfs(fd: c_int) -> Result<()> {
Self::fsync(fd)
}
/// Platform implementation of [`ftruncate()`](crate::header::unistd::ftruncate) from [`unistd.h`](crate::header::unistd).
fn ftruncate(fildes: c_int, length: off_t) -> Result<()>;