summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/file_description.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2019-10-15 18:39:16 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-15 18:40:45 -0700
commit0457a4c4cb67537b09f47e58764f22434dbeff02 (patch)
treef2891b2aa3e1d7e6ded35a951b9a913d99b55d57 /pkg/sentry/vfs/file_description.go
parentf98c3ee32c592417aa84f5c302b9db49f12ba129 (diff)
Minor vfs.FileDescriptionImpl fixes.
- Pass context.Context to OnClose(). - Pass memmap.MMapOpts to ConfigureMMap() by pointer so that implementations can actually mutate it as required. PiperOrigin-RevId: 274934967
Diffstat (limited to 'pkg/sentry/vfs/file_description.go')
-rw-r--r--pkg/sentry/vfs/file_description.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go
index 7eb2b2821..3a9665800 100644
--- a/pkg/sentry/vfs/file_description.go
+++ b/pkg/sentry/vfs/file_description.go
@@ -102,7 +102,7 @@ type FileDescriptionImpl interface {
// OnClose is called when a file descriptor representing the
// FileDescription is closed. Note that returning a non-nil error does not
// prevent the file descriptor from being closed.
- OnClose() error
+ OnClose(ctx context.Context) error
// StatusFlags returns file description status flags, as for
// fcntl(F_GETFL).
@@ -180,7 +180,7 @@ type FileDescriptionImpl interface {
// ConfigureMMap mutates opts to implement mmap(2) for the file. Most
// implementations that support memory mapping can call
// GenericConfigureMMap with the appropriate memmap.Mappable.
- ConfigureMMap(ctx context.Context, opts memmap.MMapOpts) error
+ ConfigureMMap(ctx context.Context, opts *memmap.MMapOpts) error
// Ioctl implements the ioctl(2) syscall.
Ioctl(ctx context.Context, uio usermem.IO, args arch.SyscallArguments) (uintptr, error)