summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/file_description.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-05-26 21:42:07 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-26 21:43:26 -0700
commitaf3121a52383fb60579d769994be5d91bd788015 (patch)
tree7ab26ef04f70f2bfa25433c262cfd0564a083af1 /pkg/sentry/vfs/file_description.go
parent8e2c5d951ea04f47ad1d37bab196a99fc56f5521 (diff)
Implement splice(2) and tee(2) for VFS2.
Updates #138 PiperOrigin-RevId: 313326354
Diffstat (limited to 'pkg/sentry/vfs/file_description.go')
-rw-r--r--pkg/sentry/vfs/file_description.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go
index cfabd936c..bb294563d 100644
--- a/pkg/sentry/vfs/file_description.go
+++ b/pkg/sentry/vfs/file_description.go
@@ -210,6 +210,11 @@ func (fd *FileDescription) VirtualDentry() VirtualDentry {
return fd.vd
}
+// Options returns the options passed to fd.Init().
+func (fd *FileDescription) Options() FileDescriptionOptions {
+ return fd.opts
+}
+
// StatusFlags returns file description status flags, as for fcntl(F_GETFL).
func (fd *FileDescription) StatusFlags() uint32 {
return atomic.LoadUint32(&fd.statusFlags)