Skip to content

Commit d58f986

Browse files
cuishuanggopherbot
authored andcommitted
all: fix some typos in comment
Change-Id: I40f9866661bad30ee2f4be2e9d0beee54db860b3 Reviewed-on: https://go-review.googlesource.com/c/sys/+/611775 Reviewed-by: Dmitri Shuralyov <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 30de352 commit d58f986

14 files changed

+17
-17
lines changed

unix/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these
156156
into a common file for each OS.
157157

158158
The merge is performed in the following steps:
159-
1. Construct the set of common code that is idential in all architecture-specific files.
159+
1. Construct the set of common code that is identical in all architecture-specific files.
160160
2. Write this common code to the merged file.
161161
3. Remove the common code from all architecture-specific files.
162162

unix/internal/mkmerge/mkmerge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ func filterImports(fileSrc []byte) ([]byte, error) {
427427
}
428428

429429
// merge extracts duplicate code from archFiles and merges it to mergeFile.
430-
// 1. Construct commonSet: the set of code that is idential in all archFiles.
430+
// 1. Construct commonSet: the set of code that is identical in all archFiles.
431431
// 2. Write the code in commonSet to mergedFile.
432432
// 3. Remove the commonSet code from all archFiles.
433433
func merge(mergedFile string, archFiles ...string) error {

unix/mkpost.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func main() {
153153
b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))
154154

155155
// Remove fields that are added by glibc
156-
// Note that this is unstable as the identifers are private.
156+
// Note that this is unstable as the identifiers are private.
157157
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
158158
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
159159

unix/mksyscall_zos_s390x.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func processStream(s *bufio.Scanner, asm, go1 *bufio.Writer, m *map[string]int64
374374
}
375375
// Prepare arguments to Syscall.
376376
var args []string
377-
var fargs []string // for call fowarding
377+
var fargs []string // for call forwarding
378378
n := 0
379379
for _, param := range in {
380380
p := parseParam(param)

unix/syscall_aix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
360360
var status _C_int
361361
var r Pid_t
362362
err = ERESTART
363-
// AIX wait4 may return with ERESTART errno, while the processus is still
363+
// AIX wait4 may return with ERESTART errno, while the process is still
364364
// active.
365365
for err == ERESTART {
366366
r, err = wait4(Pid_t(pid), &status, options, rusage)

unix/syscall_solaris_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func TestEventPortErrors(t *testing.T) {
207207
defer port.Close()
208208
err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, nil)
209209
if err == nil {
210-
t.Errorf("unexpected success associating nonexistant file")
210+
t.Errorf("unexpected success associating nonexistent file")
211211
}
212212
err = port.DissociatePath(path)
213213
if err == nil {

unix/syscall_zos_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3350,7 +3350,7 @@ func TestCreat(t *testing.T) {
33503350
t.Fatal("Creat error: Cannot truncate file")
33513351
}
33523352
if string(b) != string(writeContent) {
3353-
t.Fatal("data missmatch: expect ", string(writeContent), " actual: ", string(b))
3353+
t.Fatal("data mismatch: expect ", string(writeContent), " actual: ", string(b))
33543354
}
33553355

33563356
// testing file create function
@@ -3375,7 +3375,7 @@ func TestCreat(t *testing.T) {
33753375
t.Fatal("Creat error: Cannot truncate file")
33763376
}
33773377
if string(b) != string(writeContent) {
3378-
t.Fatal("data missmatch: expect ", string(writeContent), " actual: ", string(b))
3378+
t.Fatal("data mismatch: expect ", string(writeContent), " actual: ", string(b))
33793379
}
33803380

33813381
}

unix/sysvshm_unix_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestSysvSharedMemory(t *testing.T) {
6666
}
6767

6868
if runtime.GOOS == "zos" {
69-
// The returned shared memory alligns with the pagesize.
69+
// The returned shared memory aligns with the pagesize.
7070
// If pagesize is not 1024 bytes, the shared memory could be larger
7171
if len(b2) < 1024 {
7272
t.Fatalf("b1 len = %v, less than 1024", len(b2))

unix/xattr_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func TestXattr(t *testing.T) {
119119

120120
err = unix.Lsetxattr(s, xattrName, []byte(xattrDataSet), 0)
121121
if err != nil {
122-
// Linux and Android doen't support xattrs on symlinks according
122+
// Linux and Android doesn't support xattrs on symlinks according
123123
// to xattr(7), so just test that we get the proper error.
124124
if (runtime.GOOS != "linux" && runtime.GOOS != "android") || err != unix.EPERM {
125125
t.Fatalf("Lsetxattr: %v", err)

windows/dll_windows.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
6565
return d, nil
6666
}
6767

68-
// MustLoadDLL is like LoadDLL but panics if load operation failes.
68+
// MustLoadDLL is like LoadDLL but panics if load operation fails.
6969
func MustLoadDLL(name string) *DLL {
7070
d, e := LoadDLL(name)
7171
if e != nil {

windows/registry/registry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func enumerateValues(t *testing.T, k registry.Key) {
214214
}
215215
}
216216
for n, v := range haveNames {
217-
t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v)
217+
t.Errorf("value %s (%v) is found while enumerating, but has not been created", n, v)
218218
}
219219
}
220220

windows/svc/mgr/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func toStringSlice(ps *uint16) []string {
6363
return r
6464
}
6565

66-
// Config retrieves service s configuration paramteres.
66+
// Config retrieves service s configuration parameters.
6767
func (s *Service) Config() (Config, error) {
6868
var p *windows.QUERY_SERVICE_CONFIG
6969
n := uint32(1024)

windows/svc/mgr/recovery.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (s *Service) RecoveryCommand() (string, error) {
137137
// SetRecoveryActionsOnNonCrashFailures sets the failure actions flag. If the
138138
// flag is set to false, recovery actions will only be performed if the service
139139
// terminates without reporting a status of SERVICE_STOPPED. If the flag is set
140-
// to true, recovery actions are also perfomed if the service stops with a
140+
// to true, recovery actions are also performed if the service stops with a
141141
// nonzero exit code.
142142
func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error {
143143
var setting windows.SERVICE_FAILURE_ACTIONS_FLAG
@@ -151,7 +151,7 @@ func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error {
151151
// actions flag. If the flag is set to false, recovery actions will only be
152152
// performed if the service terminates without reporting a status of
153153
// SERVICE_STOPPED. If the flag is set to true, recovery actions are also
154-
// perfomed if the service stops with a nonzero exit code.
154+
// performed if the service stops with a nonzero exit code.
155155
func (s *Service) RecoveryActionsOnNonCrashFailures() (bool, error) {
156156
b, err := s.queryServiceConfig2(windows.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)
157157
if err != nil {

windows/syscall_windows_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,9 @@ func FuzzComposeCommandLine(f *testing.F) {
830830
// If args[0] contains a space or control character, we must quote it
831831
// to avoid it being split into multiple arguments.
832832
// If args[0] already starts with a quote character, we have no way
833-
// to indicate that that character is part of the literal argument.
833+
// to indicate that character is part of the literal argument.
834834
// In either case, if the string already contains a quote character
835-
// we must avoid misinterpriting that character as the end of the
835+
// we must avoid misinterpreting that character as the end of the
836836
// quoted argument string.
837837
//
838838
// Unfortunately, ComposeCommandLine does not return an error, so we

0 commit comments

Comments
 (0)