summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/host/util.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-17 18:36:46 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-17 18:36:46 +0000
commitf189edb900b72e76eab4c8aca47c92833ef50091 (patch)
treeebc5bb39c8a8521213430f4858559247e07c9465 /pkg/sentry/fsimpl/host/util.go
parent253c71e6df0b25eef4f6edcfa070de857ed5e661 (diff)
parente5d97cbcc1e64185b8fab1cf563c8754edd2e52e (diff)
Merge release-20200608.0-71-ge5d97cbcc (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/host/util.go')
-rw-r--r--pkg/sentry/fsimpl/host/util.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/pkg/sentry/fsimpl/host/util.go b/pkg/sentry/fsimpl/host/util.go
index 2bc757b1a..412bdb2eb 100644
--- a/pkg/sentry/fsimpl/host/util.go
+++ b/pkg/sentry/fsimpl/host/util.go
@@ -49,16 +49,6 @@ func wouldBlock(fileType uint32) bool {
return fileType == syscall.S_IFIFO || fileType == syscall.S_IFCHR || fileType == syscall.S_IFSOCK
}
-// canMap returns true if a file with fileType is allowed to be memory mapped.
-// This is ported over from VFS1, but it's probably not the best way for us
-// to check if a file can be memory mapped.
-func canMap(fileType uint32) bool {
- // TODO(gvisor.dev/issue/1672): Also allow "special files" to be mapped (see fs/host:canMap()).
- //
- // TODO(b/38213152): Some obscure character devices can be mapped.
- return fileType == syscall.S_IFREG
-}
-
// isBlockError checks if an error is EAGAIN or EWOULDBLOCK.
// If so, they can be transformed into syserror.ErrWouldBlock.
func isBlockError(err error) bool {