Skip to content

Commit

Permalink
all: fix some typos in comment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cuishuang authored and gopherbot committed Sep 9, 2024
1 parent 30de352 commit d58f986
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion unix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these
into a common file for each OS.

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

Expand Down
2 changes: 1 addition & 1 deletion unix/internal/mkmerge/mkmerge.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ func filterImports(fileSrc []byte) ([]byte, error) {
}

// merge extracts duplicate code from archFiles and merges it to mergeFile.
// 1. Construct commonSet: the set of code that is idential in all archFiles.
// 1. Construct commonSet: the set of code that is identical in all archFiles.
// 2. Write the code in commonSet to mergedFile.
// 3. Remove the commonSet code from all archFiles.
func merge(mergedFile string, archFiles ...string) error {
Expand Down
2 changes: 1 addition & 1 deletion unix/mkpost.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func main() {
b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))

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

Expand Down
2 changes: 1 addition & 1 deletion unix/mksyscall_zos_s390x.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func processStream(s *bufio.Scanner, asm, go1 *bufio.Writer, m *map[string]int64
}
// Prepare arguments to Syscall.
var args []string
var fargs []string // for call fowarding
var fargs []string // for call forwarding
n := 0
for _, param := range in {
p := parseParam(param)
Expand Down
2 changes: 1 addition & 1 deletion unix/syscall_aix.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
var status _C_int
var r Pid_t
err = ERESTART
// AIX wait4 may return with ERESTART errno, while the processus is still
// AIX wait4 may return with ERESTART errno, while the process is still
// active.
for err == ERESTART {
r, err = wait4(Pid_t(pid), &status, options, rusage)
Expand Down
2 changes: 1 addition & 1 deletion unix/syscall_solaris_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestEventPortErrors(t *testing.T) {
defer port.Close()
err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, nil)
if err == nil {
t.Errorf("unexpected success associating nonexistant file")
t.Errorf("unexpected success associating nonexistent file")
}
err = port.DissociatePath(path)
if err == nil {
Expand Down
4 changes: 2 additions & 2 deletions unix/syscall_zos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3350,7 +3350,7 @@ func TestCreat(t *testing.T) {
t.Fatal("Creat error: Cannot truncate file")
}
if string(b) != string(writeContent) {
t.Fatal("data missmatch: expect ", string(writeContent), " actual: ", string(b))
t.Fatal("data mismatch: expect ", string(writeContent), " actual: ", string(b))
}

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

}
Expand Down
2 changes: 1 addition & 1 deletion unix/sysvshm_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestSysvSharedMemory(t *testing.T) {
}

if runtime.GOOS == "zos" {
// The returned shared memory alligns with the pagesize.
// The returned shared memory aligns with the pagesize.
// If pagesize is not 1024 bytes, the shared memory could be larger
if len(b2) < 1024 {
t.Fatalf("b1 len = %v, less than 1024", len(b2))
Expand Down
2 changes: 1 addition & 1 deletion unix/xattr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func TestXattr(t *testing.T) {

err = unix.Lsetxattr(s, xattrName, []byte(xattrDataSet), 0)
if err != nil {
// Linux and Android doen't support xattrs on symlinks according
// Linux and Android doesn't support xattrs on symlinks according
// to xattr(7), so just test that we get the proper error.
if (runtime.GOOS != "linux" && runtime.GOOS != "android") || err != unix.EPERM {
t.Fatalf("Lsetxattr: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion windows/dll_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) {
return d, nil
}

// MustLoadDLL is like LoadDLL but panics if load operation failes.
// MustLoadDLL is like LoadDLL but panics if load operation fails.
func MustLoadDLL(name string) *DLL {
d, e := LoadDLL(name)
if e != nil {
Expand Down
2 changes: 1 addition & 1 deletion windows/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func enumerateValues(t *testing.T, k registry.Key) {
}
}
for n, v := range haveNames {
t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v)
t.Errorf("value %s (%v) is found while enumerating, but has not been created", n, v)
}
}

Expand Down
2 changes: 1 addition & 1 deletion windows/svc/mgr/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func toStringSlice(ps *uint16) []string {
return r
}

// Config retrieves service s configuration paramteres.
// Config retrieves service s configuration parameters.
func (s *Service) Config() (Config, error) {
var p *windows.QUERY_SERVICE_CONFIG
n := uint32(1024)
Expand Down
4 changes: 2 additions & 2 deletions windows/svc/mgr/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (s *Service) RecoveryCommand() (string, error) {
// SetRecoveryActionsOnNonCrashFailures sets the failure actions flag. If the
// flag is set to false, recovery actions will only be performed if the service
// terminates without reporting a status of SERVICE_STOPPED. If the flag is set
// to true, recovery actions are also perfomed if the service stops with a
// to true, recovery actions are also performed if the service stops with a
// nonzero exit code.
func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error {
var setting windows.SERVICE_FAILURE_ACTIONS_FLAG
Expand All @@ -151,7 +151,7 @@ func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error {
// actions flag. If the flag is set to false, recovery actions will only be
// performed if the service terminates without reporting a status of
// SERVICE_STOPPED. If the flag is set to true, recovery actions are also
// perfomed if the service stops with a nonzero exit code.
// performed if the service stops with a nonzero exit code.
func (s *Service) RecoveryActionsOnNonCrashFailures() (bool, error) {
b, err := s.queryServiceConfig2(windows.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions windows/syscall_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,9 @@ func FuzzComposeCommandLine(f *testing.F) {
// If args[0] contains a space or control character, we must quote it
// to avoid it being split into multiple arguments.
// If args[0] already starts with a quote character, we have no way
// to indicate that that character is part of the literal argument.
// to indicate that character is part of the literal argument.
// In either case, if the string already contains a quote character
// we must avoid misinterpriting that character as the end of the
// we must avoid misinterpreting that character as the end of the
// quoted argument string.
//
// Unfortunately, ComposeCommandLine does not return an error, so we
Expand Down

0 comments on commit d58f986

Please sign in to comment.