Переглянути джерело

fix some typos from module contrib to man

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Aaron.L.Xu 8 роки тому
батько
коміт
e0577d5fe8

+ 1 - 1
contrib/syscall-test/ns.c

@@ -20,7 +20,7 @@ static int child_exec(void *stuff)
 {
 {
 	struct clone_args *args = (struct clone_args *)stuff;
 	struct clone_args *args = (struct clone_args *)stuff;
 	if (execvp(args->argv[0], args->argv) != 0) {
 	if (execvp(args->argv[0], args->argv) != 0) {
-		fprintf(stderr, "failed to execvp argments %s\n",
+		fprintf(stderr, "failed to execvp arguments %s\n",
 			strerror(errno));
 			strerror(errno));
 		exit(-1);
 		exit(-1);
 	}
 	}

+ 1 - 1
contrib/syscall-test/userns.c

@@ -20,7 +20,7 @@ static int child_exec(void *stuff)
 {
 {
 	struct clone_args *args = (struct clone_args *)stuff;
 	struct clone_args *args = (struct clone_args *)stuff;
 	if (execvp(args->argv[0], args->argv) != 0) {
 	if (execvp(args->argv[0], args->argv) != 0) {
-		fprintf(stderr, "failed to execvp argments %s\n",
+		fprintf(stderr, "failed to execvp arguments %s\n",
 			strerror(errno));
 			strerror(errno));
 		exit(-1);
 		exit(-1);
 	}
 	}

+ 1 - 1
daemon/cluster/convert/network.go

@@ -10,7 +10,7 @@ import (
 	gogotypes "github.com/gogo/protobuf/types"
 	gogotypes "github.com/gogo/protobuf/types"
 )
 )
 
 
-func networkAttachementFromGRPC(na *swarmapi.NetworkAttachment) types.NetworkAttachment {
+func networkAttachmentFromGRPC(na *swarmapi.NetworkAttachment) types.NetworkAttachment {
 	if na != nil {
 	if na != nil {
 		return types.NetworkAttachment{
 		return types.NetworkAttachment{
 			Network:   networkFromGRPC(na.Network),
 			Network:   networkFromGRPC(na.Network),

+ 1 - 1
daemon/cluster/convert/service.go

@@ -179,7 +179,7 @@ func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error) {
 		case types.UpdateFailureActionContinue:
 		case types.UpdateFailureActionContinue:
 			failureAction = swarmapi.UpdateConfig_CONTINUE
 			failureAction = swarmapi.UpdateConfig_CONTINUE
 		default:
 		default:
-			return swarmapi.ServiceSpec{}, fmt.Errorf("unrecongized update failure action %s", s.UpdateConfig.FailureAction)
+			return swarmapi.ServiceSpec{}, fmt.Errorf("unrecognized update failure action %s", s.UpdateConfig.FailureAction)
 		}
 		}
 		spec.Update = &swarmapi.UpdateConfig{
 		spec.Update = &swarmapi.UpdateConfig{
 			Parallelism:     s.UpdateConfig.Parallelism,
 			Parallelism:     s.UpdateConfig.Parallelism,

+ 1 - 1
daemon/cluster/convert/task.go

@@ -60,7 +60,7 @@ func TaskFromGRPC(t swarmapi.Task) types.Task {
 
 
 	// NetworksAttachments
 	// NetworksAttachments
 	for _, na := range t.Networks {
 	for _, na := range t.Networks {
-		task.NetworksAttachments = append(task.NetworksAttachments, networkAttachementFromGRPC(na))
+		task.NetworksAttachments = append(task.NetworksAttachments, networkAttachmentFromGRPC(na))
 	}
 	}
 
 
 	if t.Status.PortStatus == nil {
 	if t.Status.PortStatus == nil {

+ 1 - 1
daemon/graphdriver/counter.go

@@ -22,7 +22,7 @@ func NewRefCounter(c Checker) *RefCounter {
 	}
 	}
 }
 }
 
 
-// Increment increaes the ref count for the given id and returns the current count
+// Increment increases the ref count for the given id and returns the current count
 func (c *RefCounter) Increment(path string) int {
 func (c *RefCounter) Increment(path string) int {
 	c.mu.Lock()
 	c.mu.Lock()
 	m := c.counts[path]
 	m := c.counts[path]

+ 1 - 1
daemon/graphdriver/driver.go

@@ -30,7 +30,7 @@ var (
 
 
 	// ErrNotSupported returned when driver is not supported.
 	// ErrNotSupported returned when driver is not supported.
 	ErrNotSupported = errors.New("driver not supported")
 	ErrNotSupported = errors.New("driver not supported")
-	// ErrPrerequisites retuned when driver does not meet prerequisites.
+	// ErrPrerequisites returned when driver does not meet prerequisites.
 	ErrPrerequisites = errors.New("prerequisites for driver not satisfied (wrong filesystem?)")
 	ErrPrerequisites = errors.New("prerequisites for driver not satisfied (wrong filesystem?)")
 	// ErrIncompatibleFS returned when file system is not supported.
 	// ErrIncompatibleFS returned when file system is not supported.
 	ErrIncompatibleFS = fmt.Errorf("backing file system is unsupported for this graph driver")
 	ErrIncompatibleFS = fmt.Errorf("backing file system is unsupported for this graph driver")

+ 1 - 1
daemon/images.go

@@ -171,7 +171,7 @@ func (daemon *Daemon) Images(imageFilters filters.Args, all bool, withExtraAttrs
 		}
 		}
 
 
 		if withExtraAttrs {
 		if withExtraAttrs {
-			// lazyly init variables
+			// lazily init variables
 			if imagesMap == nil {
 			if imagesMap == nil {
 				allContainers = daemon.List()
 				allContainers = daemon.List()
 				allLayers = daemon.layerStore.Map()
 				allLayers = daemon.layerStore.Map()

+ 2 - 2
daemon/logger/gcplogs/gcplogging.go

@@ -87,7 +87,7 @@ func initGCP() {
 			// These will fail on instances if the metadata service is
 			// These will fail on instances if the metadata service is
 			// down or the client is compiled with an API version that
 			// down or the client is compiled with an API version that
 			// has been removed. Since these are not vital, let's ignore
 			// has been removed. Since these are not vital, let's ignore
-			// them and make their fields in the dockeLogEntry ,omitempty
+			// them and make their fields in the dockerLogEntry ,omitempty
 			projectID, _ = metadata.ProjectID()
 			projectID, _ = metadata.ProjectID()
 			zone, _ = metadata.Zone()
 			zone, _ = metadata.Zone()
 			instanceName, _ = metadata.InstanceName()
 			instanceName, _ = metadata.InstanceName()
@@ -111,7 +111,7 @@ func New(info logger.Info) (logger.Logger, error) {
 		project = projectID
 		project = projectID
 	}
 	}
 	if project == "" {
 	if project == "" {
-		return nil, fmt.Errorf("No project was specified and couldn't read project from the meatadata server. Please specify a project")
+		return nil, fmt.Errorf("No project was specified and couldn't read project from the metadata server. Please specify a project")
 	}
 	}
 
 
 	// Issue #29344: gcplogs segfaults (static binary)
 	// Issue #29344: gcplogs segfaults (static binary)

+ 1 - 1
daemon/logger/ring_test.go

@@ -104,7 +104,7 @@ func TestRingClose(t *testing.T) {
 		t.Fatal("expected empty queue")
 		t.Fatal("expected empty queue")
 	}
 	}
 	if m, err := r.Dequeue(); err == nil || m != nil {
 	if m, err := r.Dequeue(); err == nil || m != nil {
-		t.Fatal("exepcted err on Dequeue after close")
+		t.Fatal("expected err on Dequeue after close")
 	}
 	}
 
 
 	ls := r.Drain()
 	ls := r.Drain()

+ 1 - 1
daemon/logger/syslog/syslog.go

@@ -74,7 +74,7 @@ func rfc5424formatterWithAppNameAsTag(p syslog.Priority, hostname, tag, content
 }
 }
 
 
 // The timestamp field in rfc5424 is derived from rfc3339. Whereas rfc3339 makes allowances
 // The timestamp field in rfc5424 is derived from rfc3339. Whereas rfc3339 makes allowances
-// for multiple syntaxes, there are further restrictions in rfc5424, i.e., the maximium
+// for multiple syntaxes, there are further restrictions in rfc5424, i.e., the maximum
 // resolution is limited to "TIME-SECFRAC" which is 6 (microsecond resolution)
 // resolution is limited to "TIME-SECFRAC" which is 6 (microsecond resolution)
 func rfc5424microformatterWithAppNameAsTag(p syslog.Priority, hostname, tag, content string) string {
 func rfc5424microformatterWithAppNameAsTag(p syslog.Priority, hostname, tag, content string) string {
 	timestamp := time.Now().Format("2006-01-02T15:04:05.999999Z07:00")
 	timestamp := time.Now().Format("2006-01-02T15:04:05.999999Z07:00")

+ 1 - 1
daemon/volumes.go

@@ -253,7 +253,7 @@ func backportMountSpec(container *container.Container) error {
 			m.Type = mounttypes.TypeVolume
 			m.Type = mounttypes.TypeVolume
 			m.Spec.Type = mounttypes.TypeVolume
 			m.Spec.Type = mounttypes.TypeVolume
 
 
-			// make sure this is not an anyonmous volume before setting the spec source
+			// make sure this is not an anonymous volume before setting the spec source
 			if _, exists := container.Config.Volumes[target]; !exists {
 			if _, exists := container.Config.Volumes[target]; !exists {
 				m.Spec.Source = m.Name
 				m.Spec.Source = m.Name
 			}
 			}

+ 1 - 1
daemon/volumes_windows.go

@@ -12,7 +12,7 @@ import (
 // setupMounts configures the mount points for a container by appending each
 // setupMounts configures the mount points for a container by appending each
 // of the configured mounts on the container to the OCI mount structure
 // of the configured mounts on the container to the OCI mount structure
 // which will ultimately be passed into the oci runtime during container creation.
 // which will ultimately be passed into the oci runtime during container creation.
-// It also ensures each of the mounts are lexographically sorted.
+// It also ensures each of the mounts are lexicographically sorted.
 
 
 // BUGBUG TODO Windows containerd. This would be much better if it returned
 // BUGBUG TODO Windows containerd. This would be much better if it returned
 // an array of runtime spec mounts, not container mounts. Then no need to
 // an array of runtime spec mounts, not container mounts. Then no need to

+ 1 - 1
distribution/push_v2.go

@@ -585,7 +585,7 @@ func getMaxMountAndExistenceCheckAttempts(layer PushLayer) (maxMountAttempts, ma
 }
 }
 
 
 // getRepositoryMountCandidates returns an array of v2 metadata items belonging to the given registry. The
 // getRepositoryMountCandidates returns an array of v2 metadata items belonging to the given registry. The
-// array is sorted from youngest to oldest. If requireReigstryMatch is true, the resulting array will contain
+// array is sorted from youngest to oldest. If requireRegistryMatch is true, the resulting array will contain
 // only metadata entries having registry part of SourceRepository matching the part of repoInfo.
 // only metadata entries having registry part of SourceRepository matching the part of repoInfo.
 func getRepositoryMountCandidates(
 func getRepositoryMountCandidates(
 	repoInfo reference.Named,
 	repoInfo reference.Named,

+ 1 - 1
man/docker-run.1.md

@@ -679,7 +679,7 @@ Use `df <source-dir>` to figure out the source mount and then use
 `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation
 `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation
 properties of source mount. If `findmnt` utility is not available, then one
 properties of source mount. If `findmnt` utility is not available, then one
 can look at mount entry for source mount point in `/proc/self/mountinfo`. Look
 can look at mount entry for source mount point in `/proc/self/mountinfo`. Look
-at `optional fields` and see if any propagaion properties are specified.
+at `optional fields` and see if any propagation properties are specified.
 `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if
 `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if
 nothing is there that means mount is `private`.
 nothing is there that means mount is `private`.
 
 

+ 1 - 1
man/src/container/create-example.md

@@ -31,5 +31,5 @@ docker create --device-cgroup-rule='c 42:* rmw' -name my-container my-image
 Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 <minor>`
 Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 <minor>`
 the required device when it is added.
 the required device when it is added.
 
 
-NOTE: initially present devices still need to be explicitely added to
+NOTE: initially present devices still need to be explicitly added to
 the create/run command
 the create/run command

+ 1 - 1
man/src/container/create.md

@@ -60,7 +60,7 @@ Use `df <source-dir>` to figure out the source mount and then use
 `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation
 `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation
 properties of source mount. If `findmnt` utility is not available, then one
 properties of source mount. If `findmnt` utility is not available, then one
 can look at mount entry for source mount point in `/proc/self/mountinfo`. Look
 can look at mount entry for source mount point in `/proc/self/mountinfo`. Look
-at `optional fields` and see if any propagaion properties are specified.
+at `optional fields` and see if any propagation properties are specified.
 `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if
 `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if
 nothing is there that means mount is `private`.
 nothing is there that means mount is `private`.
 
 

+ 1 - 1
man/src/plugin/ls.md

@@ -36,7 +36,7 @@ Filter output based on these conditions:
     ID                  NAME                                    DESCRIPTION                         ENABLED
     ID                  NAME                                    DESCRIPTION                         ENABLED
     869080b57404        tiborvass/sample-volume-plugin:latest   A sample volume plugin for Docker   true
     869080b57404        tiborvass/sample-volume-plugin:latest   A sample volume plugin for Docker   true
 
 
-## Display plguins with `volumedriver` capability
+## Display plugins with `volumedriver` capability
 
 
     $ docker plugin ls --filter capability=volumedriver --format "table {{.ID}}\t{{.Name}}"
     $ docker plugin ls --filter capability=volumedriver --format "table {{.ID}}\t{{.Name}}"
     ID                  Name
     ID                  Name