mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
[syserror] Split usermem package
Split usermem package to help remove syserror dependency in go_marshal. New hostarch package contains code not dependent on syserror. PiperOrigin-RevId: 365651233
This commit is contained in:
committed by
gVisor bot
parent
b125afba41
commit
8a2f7e716d
@@ -15,6 +15,7 @@ go_library(
|
||||
"//pkg/context",
|
||||
"//pkg/cpuid",
|
||||
"//pkg/fspath",
|
||||
"//pkg/hostarch",
|
||||
"//pkg/memutil",
|
||||
"//pkg/sentry/fsbridge",
|
||||
"//pkg/sentry/fsimpl/tmpfs",
|
||||
|
||||
@@ -30,6 +30,8 @@ import (
|
||||
"gvisor.dev/gvisor/pkg/sentry/vfs"
|
||||
"gvisor.dev/gvisor/pkg/sync"
|
||||
"gvisor.dev/gvisor/pkg/usermem"
|
||||
|
||||
"gvisor.dev/gvisor/pkg/hostarch"
|
||||
)
|
||||
|
||||
// System represents the context for a single test.
|
||||
@@ -105,7 +107,7 @@ func (s *System) Destroy() {
|
||||
|
||||
// ReadToEnd reads the contents of fd until EOF to a string.
|
||||
func (s *System) ReadToEnd(fd *vfs.FileDescription) (string, error) {
|
||||
buf := make([]byte, usermem.PageSize)
|
||||
buf := make([]byte, hostarch.PageSize)
|
||||
bufIOSeq := usermem.BytesIOSequence(buf)
|
||||
opts := vfs.ReadOptions{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user