From 20543f3f24246f0306502898124dea1c26d2c225 Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Fri, 23 Apr 2021 09:28:35 +0000 Subject: [PATCH] linux: add syncfs(2) This adds binding for `syncfs` on Linux, which is implemented by all supported libraries. Ref: https://man7.org/linux/man-pages/man2/syncfs.2.html --- libc-test/semver/linux.txt | 1 + src/unix/linux_like/linux/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 30269b3d..c21d15ee 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -3007,6 +3007,7 @@ swapoff swapon sync sync_file_range +syncfs syscall sysinfo tee diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index ec75521a..bb93d624 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -3257,6 +3257,7 @@ extern "C" { pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; pub fn vhangup() -> ::c_int; pub fn sync(); + pub fn syncfs(fd: ::c_int) -> ::c_int; pub fn syscall(num: ::c_long, ...) -> ::c_long; pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, cpuset: *mut cpu_set_t) -> ::c_int;