diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-09-13 00:47:41 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-13 00:47:41 +0000 |
commit | c65b5a8d44c27127001097108af9032ad6bb4286 (patch) | |
tree | 4dea9b46753220163901cf3b6e591d18fa7bf46c /pkg/sentry/fs/file_operations.go | |
parent | 0c071bcbb200129890af02123fb3eaf117303172 (diff) | |
parent | 7c6ab6a219f37a1d4c18ced4a602458fcf363f85 (diff) |
Merge release-20190806.1-142-g7c6ab6a (automated)
Diffstat (limited to 'pkg/sentry/fs/file_operations.go')
-rw-r--r-- | pkg/sentry/fs/file_operations.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/sentry/fs/file_operations.go b/pkg/sentry/fs/file_operations.go index d86f5bf45..b88303f17 100644 --- a/pkg/sentry/fs/file_operations.go +++ b/pkg/sentry/fs/file_operations.go @@ -15,6 +15,8 @@ package fs import ( + "io" + "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/sentry/context" "gvisor.dev/gvisor/pkg/sentry/memmap" @@ -105,8 +107,11 @@ type FileOperations interface { // on the destination, following by a buffered copy with standard Read // and Write operations. // + // If dup is set, the data should be duplicated into the destination + // and retained. + // // The same preconditions as Read apply. - WriteTo(ctx context.Context, file *File, dst *File, opts SpliceOpts) (int64, error) + WriteTo(ctx context.Context, file *File, dst io.Writer, count int64, dup bool) (int64, error) // Write writes src to file at offset and returns the number of bytes // written which must be greater than or equal to 0. Like Read, file @@ -126,7 +131,7 @@ type FileOperations interface { // source. See WriteTo for details regarding how this is called. // // The same preconditions as Write apply; FileFlags.Write must be set. - ReadFrom(ctx context.Context, file *File, src *File, opts SpliceOpts) (int64, error) + ReadFrom(ctx context.Context, file *File, src io.Reader, count int64) (int64, error) // Fsync writes buffered modifications of file and/or flushes in-flight // operations to backing storage based on syncType. The range to sync is |