summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_darwin.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-12-03 17:53:14 +0100
committerJakob Unterwurzacher2017-12-03 19:32:59 +0100
commite33593d30d9dee6fd6b0e7c0d01832e478815d88 (patch)
tree5070656829a7215bd4fe01404f208798cd073a2b /internal/syscallcompat/sys_darwin.go
parent441e796e7034977c15dc9402a880ef4061b471a7 (diff)
syscallcompat: add Fstatat + emulation + test
Fstatat has recently been added to x/sys/unix. Make it available for use in gocryptfs.
Diffstat (limited to 'internal/syscallcompat/sys_darwin.go')
-rw-r--r--internal/syscallcompat/sys_darwin.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index 6238940..7f2c541 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -3,6 +3,10 @@ package syscallcompat
import (
"log"
"syscall"
+
+ "golang.org/x/sys/unix"
+
+ "github.com/hanwen/go-fuse/fuse"
)
// Sorry, fallocate is not available on OSX at all and
@@ -60,3 +64,11 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
return emulateMkdirat(dirfd, path, mode)
}
+
+func Fstatat(dirfd int, path string, stat *unix.Stat_t, flags int) (err error) {
+ return emulateFstatat(dirfd, path, stat, flags)
+}
+
+func Getdents(fd int) ([]fuse.DirEntry, error) {
+ return emulateGetdents(fd)
+}