mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: add Syncfs function on Linux
Syncfs is Linux-specific system call to synchronize to disk one filesystem specified by fd to any of its files. See http://man7.org/linux/man-pages/man2/syncfs.2.html for details. Change-Id: Ia2ad6208c3fa0e9c40d5112ce938edd5d374131d Reviewed-on: https://go-review.googlesource.com/51510 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
02a66801d9
commit
35ef4487ce
@@ -1234,6 +1234,16 @@ func Sync() {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Syncfs(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Sysinfo(info *Sysinfo_t) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
Reference in New Issue
Block a user