Fix misspellings

PiperOrigin-RevId: 195742598
Change-Id: Ibd4a8e4394e268c87700b6d1e50b4b37dfce5182
This commit is contained in:
Ian Gudger
2018-05-07 16:38:01 -07:00
committed by Shentubot
parent a445b17933
commit 7c8c3705ea
14 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -720,7 +720,7 @@ func HostID(axArg, cxArg uint32) (ax, bx, cx, dx uint32)
// HostFeatureSet uses cpuid to get host values and construct a feature set
// that matches that of the host machine. Note that there are several places
// where there appear to be some unecessary assignments between register names
// where there appear to be some unnecessary assignments between register names
// (ax, bx, cx, or dx) and featureBlockN variables. This is to explicitly show
// where the different feature blocks come from, to make the code easier to
// inspect and read.
+1 -1
View File
@@ -94,7 +94,7 @@ func unwrapError(err error) error {
// TryOpen uses a NonBlockingOpener to try to open a host pipe, respecting the fs.FileFlags.
func (p *pipeOpenState) TryOpen(ctx context.Context, opener NonBlockingOpener, flags fs.FileFlags) (*pipeOperations, error) {
switch {
// Reject invalid configurations so they don't accidently succeed below.
// Reject invalid configurations so they don't accidentally succeed below.
case !flags.Read && !flags.Write:
return nil, syscall.EINVAL
+1 -1
View File
@@ -151,7 +151,7 @@ func (f *overlayFileOperations) Seek(ctx context.Context, file *File, whence See
// If this was a seek on a directory, we must update the cursor.
if seekDir && whence == SeekSet && offset == 0 {
// Currenly only seeking to 0 on a directory is supported.
// Currently only seeking to 0 on a directory is supported.
// FIXME: Lift directory seeking limitations.
f.dirCursor = ""
}
+1 -1
View File
@@ -26,7 +26,7 @@ import (
"gvisor.googlesource.com/gvisor/pkg/tcpip/transport/unix"
)
// Inode is a file system object that can be simulatenously referenced by different
// Inode is a file system object that can be simultaneously referenced by different
// components of the VFS (Dirent, fs.File, etc).
type Inode struct {
// AtomicRefCount is our reference count.
+1 -1
View File
@@ -316,7 +316,7 @@ func (i *Inotify) RmWatch(wd int32) error {
// The watch is now isolated and we can safely drop the instance lock. We
// need to do so because watch.destroy() acquires Watch.mu, which cannot be
// aquired with Inotify.mu held.
// acquired with Inotify.mu held.
i.mu.Unlock()
// Generate the event for the removal.
+1 -1
View File
@@ -126,7 +126,7 @@ func NewUserCredentials(kuid KUID, kgid KGID, extraKGIDs []KGID, capabilities *T
creds.InheritableCaps = capabilities.InheritableCaps
// // TODO: Support ambient capabilities.
} else {
// If no capabilities are specified, grant the same capabilites
// If no capabilities are specified, grant the same capabilities
// that NewRootCredentials does.
creds.PermittedCaps = AllCapabilities
creds.EffectiveCaps = AllCapabilities
+1 -1
View File
@@ -284,7 +284,7 @@ func (p *Pipe) rReadinessLocked() waiter.EventMask {
ready |= waiter.EventIn
}
if !p.HasWriters() && p.hadWriter {
// POLLHUP must be supressed until the pipe has had at least one writer
// POLLHUP must be suppressed until the pipe has had at least one writer
// at some point. Otherwise a reader thread may poll and immediately get
// a POLLHUP before the writer ever opens the pipe, which the reader may
// interpret as the writer opening then closing the pipe.
+1 -1
View File
@@ -118,7 +118,7 @@ func allocStack(ctx context.Context, m *mm.MemoryManager, a arch.Context) (*arch
const (
// maxLoaderAttempts is the maximum number of attempts to try to load
// an interpreter scripts, to prevent loops. 6 (inital + 5 changes) is
// an interpreter scripts, to prevent loops. 6 (initial + 5 changes) is
// what the Linux kernel allows (fs/exec.c:search_binary_handler).
maxLoaderAttempts = 6
)
+1 -1
View File
@@ -178,7 +178,7 @@ func (as *addressSpace) MapFile(addr usermem.Addr, fd int, fr platform.FileRange
// we create distinct mappings for each address space. Unfortunately,
// there's not a better way to manage this here. The file underlying
// this fd can change at any time, so we can't actually index the file
// and share between address space. Oh well. It's all refering to the
// and share between address space. Oh well. It's all referring to the
// same physical pages, hopefully we don't run out of address space.
if fd != int(as.filemem.File().Fd()) {
// N.B. precommit is ignored for host files.
@@ -44,18 +44,18 @@ type PageTables struct {
// root is the pagetable root.
root *Node
// translater is the translater passed at creation.
translater Translater
// translator is the translator passed at creation.
translator Translator
// archPageTables includes architecture-specific features.
archPageTables
// allNodes is a set of nodes indexed by translater address.
// allNodes is a set of nodes indexed by translator address.
allNodes map[uintptr]*Node
}
// Translater translates to guest physical addresses.
type Translater interface {
// Translator translates to guest physical addresses.
type Translator interface {
// TranslateToPhysical translates the given pointer object into a
// "physical" address. We do not require that it translates back, the
// reverse mapping is maintained internally.
@@ -63,9 +63,9 @@ type Translater interface {
}
// New returns new PageTables.
func New(t Translater, opts Opts) *PageTables {
func New(t Translator, opts Opts) *PageTables {
p := &PageTables{
translater: t,
translator: t,
allNodes: make(map[uintptr]*Node),
}
p.root = p.allocNode()
@@ -80,7 +80,7 @@ func New(t Translater, opts Opts) *PageTables {
// managing multiple sets of pagetables.
func (p *PageTables) New() *PageTables {
np := &PageTables{
translater: p.translater,
translator: p.translator,
allNodes: make(map[uintptr]*Node),
}
np.root = np.allocNode()
@@ -90,7 +90,7 @@ func (p *PageTables) New() *PageTables {
// setPageTable sets the given index as a page table.
func (p *PageTables) setPageTable(n *Node, index int, child *Node) {
phys := p.translater.TranslateToPhysical(child.PTEs())
phys := p.translator.TranslateToPhysical(child.PTEs())
p.allNodes[phys] = child
pte := &n.PTEs()[index]
pte.setPageTable(phys)
@@ -188,6 +188,6 @@ func (p *PageTables) Lookup(addr usermem.Addr) (physical uintptr, accessType use
// allocNode allocates a new page.
func (p *PageTables) allocNode() *Node {
n := new(Node)
n.physical = p.translater.TranslateToPhysical(n.PTEs())
n.physical = p.translator.TranslateToPhysical(n.PTEs())
return n
}
@@ -301,7 +301,7 @@ func (p *PageTables) iterateRange(startAddr, endAddr uintptr, alloc bool, fn fun
}
// This level has 2-MB huge pages. If this
// region is contined in a single PMD entry?
// region is contained in a single PMD entry?
// As above, we can skip allocating a new page.
if start&(pmdSize-1) == 0 && end-start >= pmdSize {
pmdEntry.SetSuper()
+1 -1
View File
@@ -95,7 +95,7 @@ type MemoryStats struct {
// categories not backed by platform memory. For details about how this works,
// see the memory accounting docs.
//
// N.B. Please keep the struct in sync with the API. Noteably, changes to this
// N.B. Please keep the struct in sync with the API. Notably, changes to this
// struct requires a version bump and addition of compatibility logic in the
// control server. As a special-case, adding fields without re-ordering existing
// ones do not require a version bump because the mapped page we use is
+1 -1
View File
@@ -81,7 +81,7 @@ const (
// IPv4ProtocolNumber is IPv4's network protocol number.
IPv4ProtocolNumber tcpip.NetworkProtocolNumber = 0x0800
// IPv4Version is the version of the ipv4 procotol.
// IPv4Version is the version of the ipv4 protocol.
IPv4Version = 4
)
+1 -1
View File
@@ -131,7 +131,7 @@ func waitForProcessList(s *sandbox.Sandbox, expected []*control.Process) error {
return fmt.Errorf("sandbox got process list: %s, want: %s", procListToString(got), procListToString(expected))
}
// TestLifecycle tests the basic Create/Start/Signal/Destory sandbox lifecycle.
// TestLifecycle tests the basic Create/Start/Signal/Destroy sandbox lifecycle.
// It verifies after each step that the sandbox can be loaded from disk, and
// has the correct status.
func TestLifecycle(t *testing.T) {