summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-07-03 20:05:32 +0200
committerJakob Unterwurzacher2016-07-03 20:05:32 +0200
commit79851bf6cc391f1150be387631159d553d5426f3 (patch)
tree560f3228054ad8a5a37500de5aa21832c021a03e /internal/syscallcompat/sys_linux.go
parent9b725c15cf50cfb85ec6ec88c47843092775dedc (diff)
syscallcompat: OSX: add Renamat wrapper
Adds a poor man's renameat implementation for OSX.
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index ca6df95..e12d100 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -37,10 +37,14 @@ func EnospcPrealloc(fd int, off int64, len int64) (err error) {
}
}
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ return syscall.Fallocate(fd, mode, off, len)
+}
+
func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
return syscall.Openat(dirfd, path, flags, mode)
}
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- return syscall.Fallocate(fd, mode, off, len)
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ return syscall.Renameat(olddirfd, oldpath, newdirfd, newpath)
}