summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/host/util_unsafe.go
diff options
context:
space:
mode:
authorHaibo Xu <haibo.xu@arm.com>2019-11-11 09:15:45 +0000
committerHaibo Xu <haibo.xu@arm.com>2019-11-13 06:46:02 +0000
commitc5d9b5b8816e99507661e1d39ec51033fb69e212 (patch)
tree747dfc72c53c5edcf5d24a57647c49e3deaf1f9d /pkg/sentry/fs/host/util_unsafe.go
parent2c6c9af904c99371fe4381517375cd114917db59 (diff)
Enable sentry/fs/host support on arm64.
newfstatat() syscall is not supported on arm64, so we resort to use the fstatat() syscall. Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: Iea95550ea53bcf85c01f7b3b95da70ad0952177d
Diffstat (limited to 'pkg/sentry/fs/host/util_unsafe.go')
-rw-r--r--pkg/sentry/fs/host/util_unsafe.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/pkg/sentry/fs/host/util_unsafe.go b/pkg/sentry/fs/host/util_unsafe.go
index 2b76f1065..3ab36b088 100644
--- a/pkg/sentry/fs/host/util_unsafe.go
+++ b/pkg/sentry/fs/host/util_unsafe.go
@@ -116,22 +116,3 @@ func setTimestamps(fd int, ts fs.TimeSpec) error {
}
return nil
}
-
-func fstatat(fd int, name string, flags int) (syscall.Stat_t, error) {
- var stat syscall.Stat_t
- namePtr, err := syscall.BytePtrFromString(name)
- if err != nil {
- return stat, err
- }
- _, _, errno := syscall.Syscall6(
- syscall.SYS_NEWFSTATAT,
- uintptr(fd),
- uintptr(unsafe.Pointer(namePtr)),
- uintptr(unsafe.Pointer(&stat)),
- uintptr(flags),
- 0, 0)
- if errno != 0 {
- return stat, errno
- }
- return stat, nil
-}