mirror of
https://github.com/clearlinux/rkt.git
synced 2026-09-03 20:31:35 +00:00
As syncfs is neither provided by golang syscall package nor by golang.org/x/sys/unix adds a local syncfs syscall implementation. By now the syscall numbers for linux amd64, 386 and arm architectures are provided.
12 lines
183 B
Go
12 lines
183 B
Go
package sys
|
|
|
|
import "syscall"
|
|
|
|
func Syncfs(fd int) error {
|
|
_, _, err := syscall.RawSyscall(SYS_SYNCFS, uintptr(fd), 0, 0)
|
|
if err != 0 {
|
|
return syscall.Errno(err)
|
|
}
|
|
return nil
|
|
}
|