diff options
author | Jamie Liu <jamieliu@google.com> | 2019-12-20 11:52:24 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-20 11:53:48 -0800 |
commit | 3eb489ed6c67b069bc135ab92cb031ce80b40d8f (patch) | |
tree | 45ea9d32e56eb282583838051ea08ef83a361731 /pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go | |
parent | 822d847ccaa1e6016b818bee289b5e33335f9fee (diff) |
Move VFS2 file description status flags to vfs.FileDescription.
PiperOrigin-RevId: 286616668
Diffstat (limited to 'pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go')
-rw-r--r-- | pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go b/pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go index 30c06baf0..51102ce48 100644 --- a/pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go +++ b/pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go @@ -65,17 +65,15 @@ type DynamicBytesFD struct { vfsfd vfs.FileDescription inode Inode - flags uint32 } // Init initializes a DynamicBytesFD. func (fd *DynamicBytesFD) Init(m *vfs.Mount, d *vfs.Dentry, data vfs.DynamicBytesSource, flags uint32) { m.IncRef() // DecRef in vfs.FileDescription.vd.DecRef on final ref. d.IncRef() // DecRef in vfs.FileDescription.vd.DecRef on final ref. - fd.flags = flags fd.inode = d.Impl().(*Dentry).inode fd.SetDataSource(data) - fd.vfsfd.Init(fd, m, d) + fd.vfsfd.Init(fd, flags, m, d, &vfs.FileDescriptionOptions{}) } // Seek implements vfs.FileDescriptionImpl.Seek. @@ -117,15 +115,3 @@ func (fd *DynamicBytesFD) SetStat(context.Context, vfs.SetStatOptions) error { // DynamicBytesFiles are immutable. return syserror.EPERM } - -// StatusFlags implements vfs.FileDescriptionImpl.StatusFlags. -func (fd *DynamicBytesFD) StatusFlags(ctx context.Context) (uint32, error) { - return fd.flags, nil -} - -// SetStatusFlags implements vfs.FileDescriptionImpl.SetStatusFlags. -func (fd *DynamicBytesFD) SetStatusFlags(ctx context.Context, flags uint32) error { - // None of the flags settable by fcntl(F_SETFL) are supported, so this is a - // no-op. - return nil -} |