summaryrefslogtreecommitdiffhomepage
path: root/pkg/marshal
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-06-14 02:27:51 +0000
committergVisor bot <gvisor-bot@google.com>2021-06-14 02:27:51 +0000
commit131eb876dab02998c7e5150bd13a831b6f03af2c (patch)
tree3453890561866bc90fb39af157670e0f1b44743a /pkg/marshal
parent5f0ebe52c8007470ed0e023d24932547befa4574 (diff)
parent5c9e84622305dc9fd4e9b81eeb7309b8a894f99e (diff)
Merge release-20210601.0-52-g5c9e84622 (automated)
Diffstat (limited to 'pkg/marshal')
-rw-r--r--pkg/marshal/primitive/primitive.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/marshal/primitive/primitive.go b/pkg/marshal/primitive/primitive.go
index 6f38992b7..1c49cf082 100644
--- a/pkg/marshal/primitive/primitive.go
+++ b/pkg/marshal/primitive/primitive.go
@@ -19,10 +19,8 @@ package primitive
import (
"io"
- "gvisor.dev/gvisor/pkg/context"
"gvisor.dev/gvisor/pkg/hostarch"
"gvisor.dev/gvisor/pkg/marshal"
- "gvisor.dev/gvisor/pkg/usermem"
)
// Int8 is a marshal.Marshallable implementation for int8.
@@ -400,26 +398,3 @@ func CopyStringOut(cc marshal.CopyContext, addr hostarch.Addr, src string) (int,
srcP := ByteSlice(src)
return srcP.CopyOut(cc, addr)
}
-
-// IOCopyContext wraps an object implementing hostarch.IO to implement
-// marshal.CopyContext.
-type IOCopyContext struct {
- Ctx context.Context
- IO usermem.IO
- Opts usermem.IOOpts
-}
-
-// CopyScratchBuffer implements marshal.CopyContext.CopyScratchBuffer.
-func (i *IOCopyContext) CopyScratchBuffer(size int) []byte {
- return make([]byte, size)
-}
-
-// CopyOutBytes implements marshal.CopyContext.CopyOutBytes.
-func (i *IOCopyContext) CopyOutBytes(addr hostarch.Addr, b []byte) (int, error) {
- return i.IO.CopyOut(i.Ctx, addr, b, i.Opts)
-}
-
-// CopyInBytes implements marshal.CopyContext.CopyInBytes.
-func (i *IOCopyContext) CopyInBytes(addr hostarch.Addr, b []byte) (int, error) {
- return i.IO.CopyIn(i.Ctx, addr, b, i.Opts)
-}