pal: add syncfs to Pal trait (default calls fsync)
This commit is contained in:
@@ -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<()>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user