diff options
author | Zach Koopmans <zkoopmans@google.com> | 2020-07-01 13:13:04 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-01 13:14:44 -0700 |
commit | 6a90c88b97481a6d81b05f09d5c8ed7158225dd5 (patch) | |
tree | e22db333e636d2dae96bcbf4f36d48eb81df3d0d /pkg/sentry/socket/hostinet/socket_vfs2.go | |
parent | 68e1c870d3ef5db71226927aee703f2fba61cab7 (diff) |
Port fallocate to VFS2.
PiperOrigin-RevId: 319283715
Diffstat (limited to 'pkg/sentry/socket/hostinet/socket_vfs2.go')
-rw-r--r-- | pkg/sentry/socket/hostinet/socket_vfs2.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/sentry/socket/hostinet/socket_vfs2.go b/pkg/sentry/socket/hostinet/socket_vfs2.go index ad5f64799..8f192c62f 100644 --- a/pkg/sentry/socket/hostinet/socket_vfs2.go +++ b/pkg/sentry/socket/hostinet/socket_vfs2.go @@ -96,7 +96,12 @@ func (s *socketVFS2) Ioctl(ctx context.Context, uio usermem.IO, args arch.Syscal return ioctl(ctx, s.fd, uio, args) } -// PRead implements vfs.FileDescriptionImpl. +// Allocate implements vfs.FileDescriptionImpl.Allocate. +func (s *socketVFS2) Allocate(ctx context.Context, mode, offset, length uint64) error { + return syserror.ENODEV +} + +// PRead implements vfs.FileDescriptionImpl.PRead. func (s *socketVFS2) PRead(ctx context.Context, dst usermem.IOSequence, offset int64, opts vfs.ReadOptions) (int64, error) { return 0, syserror.ESPIPE } |