Fix a few typos

It is an idea of running codespell as part of our presubmit checks.
Before enabling it for new changes, let's fix what it has found.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Andrei Vagin
2023-10-25 12:13:42 -07:00
parent d4973670c3
commit 5f4abad306
155 changed files with 232 additions and 232 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ const (
CAP_CHECKPOINT_RESTORE = Capability(40)
// CAP_LAST_CAP is the highest-numbered capability.
// Seach for "CAP_LAST_CAP" to find other places that need to change.
// Search for "CAP_LAST_CAP" to find other places that need to change.
CAP_LAST_CAP = CAP_CHECKPOINT_RESTORE
)
+2 -2
View File
@@ -139,7 +139,7 @@ type FUSEHeaderOut struct {
var SizeOfFUSEHeaderOut = uint32((*FUSEHeaderOut)(nil).SizeBytes())
// FUSE_INIT flags, consistent with the ones in include/uapi/linux/fuse.h.
// Our taget version is 7.23 but we have few implemented in advance.
// Our target version is 7.23 but we have few implemented in advance.
const (
FUSE_ASYNC_READ = 1 << 0
FUSE_POSIX_LOCKS = 1 << 1
@@ -299,7 +299,7 @@ type FUSEGetAttrIn struct {
Fh uint64
}
// FUSEAttr is the struct used in the reponse FUSEGetAttrOut.
// FUSEAttr is the struct used in the response FUSEGetAttrOut.
//
// +marshal
type FUSEAttr struct {
+1 -1
View File
@@ -43,7 +43,7 @@ const (
NOTIFY_COOKIE_LEN = 32
)
// MqAttr is equivelant to struct mq_attr. Source: include/uapi/linux/mqueue.h
// MqAttr is equivalent to struct mq_attr. Source: include/uapi/linux/mqueue.h
//
// +marshal
type MqAttr struct {
+3 -3
View File
@@ -50,7 +50,7 @@ const (
MSGSEG = 0xffff
)
// MsqidDS is equivelant to struct msqid64_ds. Source:
// MsqidDS is equivalent to struct msqid64_ds. Source:
// include/uapi/asm-generic/shmbuf.h
//
// +marshal
@@ -68,7 +68,7 @@ type MsqidDS struct {
unused5 uint64
}
// MsgBuf is equivelant to struct msgbuf. Source: include/uapi/linux/msg.h
// MsgBuf is equivalent to struct msgbuf. Source: include/uapi/linux/msg.h
//
// +marshal dynamic
type MsgBuf struct {
@@ -93,7 +93,7 @@ func (b *MsgBuf) UnmarshalBytes(src []byte) []byte {
return b.Text.UnmarshalBytes(src)
}
// MsgInfo is equivelant to struct msginfo. Source: include/uapi/linux/msg.h
// MsgInfo is equivalent to struct msginfo. Source: include/uapi/linux/msg.h
//
// +marshal
type MsgInfo struct {
+1 -1
View File
@@ -236,7 +236,7 @@ const (
IP6T_F_PROTO = 0x01
// Whether to match the TOS field.
IP6T_F_TOS = 0x02
// Indicates that the jump target is an aboslute GOTO, not an offset.
// Indicates that the jump target is an absolute GOTO, not an offset.
IP6T_F_GOTO = 0x04
// Enables all flags.
IP6T_F_MASK = 0x07
+1 -1
View File
@@ -32,7 +32,7 @@ const (
SEM_STAT_ANY = 20
)
// Information about system-wide sempahore limits and parameters.
// Information about system-wide semaphore limits and parameters.
//
// Source: include/uapi/linux/sem.h
const (
+1 -1
View File
@@ -349,7 +349,7 @@ const SizeOfLinger = 8
// TCPInfo is a collection of TCP statistics.
//
// From uapi/linux/tcp.h. Newer versions of Linux continue to add new fields to
// the end of this struct or within existing unusued space, so its size grows
// the end of this struct or within existing unused space, so its size grows
// over time. The current iteration is based on linux v4.17. New versions are
// always backwards compatible.
//
+1 -1
View File
@@ -572,7 +572,7 @@ func (b *Buffer) readByte() (byte, error) {
return bt, nil
}
// AsBufferReader returns the Buffer as a BufferReader capabable of io methods.
// AsBufferReader returns the Buffer as a BufferReader capable of io methods.
// The new BufferReader takes ownership of b.
func (b *Buffer) AsBufferReader() BufferReader {
return BufferReader{b}
+1 -1
View File
@@ -27,7 +27,7 @@ const (
// number and passing the result to MostSignificantOne64.
baseChunkSizeLog2 = 6
// This is the size of the buffers in the first pool. Each subsquent pool
// This is the size of the buffers in the first pool. Each subsequent pool
// creates payloads 2^(pool index) times larger than the first pool's
// payloads.
baseChunkSize = 1 << baseChunkSizeLog2 // 64
+1 -1
View File
@@ -125,7 +125,7 @@ func doTest(t harness, opts testOpts) {
return
}
if _, err := io.Copy(&decompressed, r); (err != nil) != opts.CorruptData {
t.Errorf("%s: decompress got err %v unexpectly", opts.Name, err)
t.Errorf("%s: decompress got err %v unexpectedly", opts.Name, err)
return
}
}
+1 -1
View File
@@ -124,7 +124,7 @@ func (r *SimpleReader) Read(p []byte) (int, error) {
}
toRead := uint32(len(p))
// can't read more than whats left
// can't read more than what's left
if toRead > r.chunkSize-r.done {
toRead = r.chunkSize - r.done
}
+1 -1
View File
@@ -309,7 +309,7 @@ func (fs FeatureSet) HasFeature(feature Feature) bool {
// a minimal /proc/cpuinfo, it is missing some fields like "microcode" that are
// not always printed in Linux. The bogomips field is simply made up.
func (fs FeatureSet) WriteCPUInfoTo(cpu uint, w io.Writer) {
// Avoid many redunant calls here, since this can occasionally appear
// Avoid many redundant calls here, since this can occasionally appear
// in the hot path. Read all basic information up front, see above.
ax, _, _, _ := fs.query(featureInfo)
ef, em, _, f, m, _ := signatureSplit(ax)
+1 -1
View File
@@ -252,7 +252,7 @@ var errorSlice = []*errors.Error{
errno.ENODATA: ENODATA,
errno.ETIME: ETIME,
errno.ENOSR: ENOSR,
errno.ENOSR + 1: errNotValidError, // No valid errno betweeen ENOSR and ENOPKG.
errno.ENOSR + 1: errNotValidError, // No valid errno between ENOSR and ENOPKG.
errno.ENOPKG: ENOPKG,
errno.EREMOTE: EREMOTE,
errno.ENOLINK: ENOLINK,
+1 -1
View File
@@ -138,7 +138,7 @@ func (r *ReadWriter) String() string {
//
// It is similar to os.File, with a few important distinctions:
//
// FD provies a Release() method which relinquishes ownership. Like os.File,
// FD provides a Release() method which relinquishes ownership. Like os.File,
// FD adds a finalizer to close the backing FD. However, the finalizer cannot
// be removed from os.File, forever pinning the lifetime of an FD to its
// os.File.
+2 -2
View File
@@ -120,9 +120,9 @@ func (c *Client) StartChannels() error {
c.availableChannels = make([]*channel, 0, maxChans)
c.channelsMu.Unlock()
// Create channels parallely so that channels can be used to create more
// Create channels parallelly so that channels can be used to create more
// channels and costly initialization like flipcall.Endpoint.Connect can
// proceed parallely.
// proceed parallelly.
var channelsWg sync.WaitGroup
for i := 0; i < maxChans; i++ {
channelsWg.Add(1)
+1 -1
View File
@@ -574,7 +574,7 @@ type OpenFDImpl interface {
// On the server, Stat has a read concurrency guarantee.
Stat() (linux.Statx, error)
// Sync is simialr to fsync(2).
// Sync is similar to fsync(2).
//
// On the server, Sync has a read concurrency guarantee.
Sync() error
+1 -1
View File
@@ -48,7 +48,7 @@ import (
// because a malicious encoder could have manipulated payload bytes to make the
// unchecked unmarshal variants panic due to the lack of bound checking.
// Marshalling code does not need additional bound checking because the caller
// itself intializes the struct being marshalled, so it is trusted.
// itself initializes the struct being marshalled, so it is trusted.
//
// String() implementations must ensure that the message struct doesn't escape.
// For instance, directly passing the struct to fmt.Sprintf() escapes it
+1 -1
View File
@@ -92,7 +92,7 @@ type Node struct {
// upto numStaticChildren children using hardcoded pointers. If more children
// are inserted then move to a map. Use dynamicChildren iff it is non-nil.
// The folowing fields are protected by childrenMu.
// The following fields are protected by childrenMu.
childrenMu sync.Mutex
staticChildren [numStaticChildren]struct {
name string
+1 -1
View File
@@ -78,7 +78,7 @@ func TestDelete(t *testing.T) {
for i := 0; i < numChildren; i++ {
name := fmt.Sprintf("%d", i)
if got, want := root.removeChildLocked(name), truth[name]; got != want {
t.Errorf("root deleted incorrect ndoe: want %p, got %p", want, got)
t.Errorf("root deleted incorrect node: want %p, got %p", want, got)
}
}
})
+1 -1
View File
@@ -540,7 +540,7 @@ func testWalk(ctx context.Context, t *testing.T, tester Tester, root lisafs.Clie
closeFD(ctx, t, root.Client().NewFD(inode.ControlFD))
}
// Test WalkStat which additonally returns Statx for root because the first
// Test WalkStat which additionally returns Statx for root because the first
// path component is "".
dirNames = append([]string{""}, dirNames...)
gotStats := walkStat(ctx, t, root, dirNames)

Some files were not shown because too many files have changed in this diff Show More