all: fix some typos in comment

Change-Id: I40f9866661bad30ee2f4be2e9d0beee54db860b3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/611775
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
cuishuang 2024-09-09 15:02:35 +08:00 коммит произвёл Gopher Robot
Родитель 30de3524c2
Коммит d58f986c89
14 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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("_"))

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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
@ -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))
}
}

Просмотреть файл

@ -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))

Просмотреть файл

@ -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)

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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)
}
}

Просмотреть файл

@ -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)

Просмотреть файл

@ -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
@ -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 {

Просмотреть файл

@ -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