diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-06-28 00:31:52 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-28 00:31:52 +0000 |
commit | e3abe5ebdf5e0c98429faee7d57d126d452f7293 (patch) | |
tree | 607552989592a141c1fb317008208015b95363f5 /pkg/sentry/fs/file_operations.go | |
parent | 91dcb2483b56eeb8083cdff90ed8e8f0a1665d13 (diff) | |
parent | b2907595e5e974d2b011ea011033aa06d796e090 (diff) |
Merge b2907595 (automated)
Diffstat (limited to 'pkg/sentry/fs/file_operations.go')
-rw-r--r-- | pkg/sentry/fs/file_operations.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg/sentry/fs/file_operations.go b/pkg/sentry/fs/file_operations.go index 2c5bd1b19..d86f5bf45 100644 --- a/pkg/sentry/fs/file_operations.go +++ b/pkg/sentry/fs/file_operations.go @@ -155,5 +155,16 @@ type FileOperations interface { // refer. // // Preconditions: The AddressSpace (if any) that io refers to is activated. - Ioctl(ctx context.Context, io usermem.IO, args arch.SyscallArguments) (uintptr, error) + Ioctl(ctx context.Context, file *File, io usermem.IO, args arch.SyscallArguments) (uintptr, error) +} + +// FifoSizer is an interface for setting and getting the size of a pipe. +type FifoSizer interface { + // FifoSize returns the pipe capacity in bytes. + FifoSize(ctx context.Context, file *File) (int64, error) + + // SetFifoSize sets the new pipe capacity in bytes. + // + // The new size is returned (which may be capped). + SetFifoSize(size int64) (int64, error) } |