fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io> Upstream-commit: c1be45fa38e82054dcad606d71446a662524f2d5 Component: engine
This commit is contained in:
@ -123,7 +123,7 @@ func init() {
|
||||
drivers = make(map[string]InitFunc)
|
||||
}
|
||||
|
||||
// Register registers a InitFunc for the driver.
|
||||
// Register registers an InitFunc for the driver.
|
||||
func Register(name string, initFunc InitFunc) error {
|
||||
if _, exists := drivers[name]; exists {
|
||||
return fmt.Errorf("Name already registered %s", name)
|
||||
|
||||
@ -94,7 +94,7 @@ func cleanup(t *testing.T, d *Driver) {
|
||||
os.RemoveAll(d.root)
|
||||
}
|
||||
|
||||
// GetDriver create a new driver with given name or return a existing driver with the name updating the reference count.
|
||||
// GetDriver create a new driver with given name or return an existing driver with the name updating the reference count.
|
||||
func GetDriver(t *testing.T, name string) graphdriver.Driver {
|
||||
if drv == nil {
|
||||
drv = newDriver(t, name)
|
||||
@ -172,7 +172,7 @@ func readDir(dir string) ([]os.FileInfo, error) {
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// DriverTestCreateEmpty creates an new image and verifies it is empty and the right metadata
|
||||
// DriverTestCreateEmpty creates a new image and verifies it is empty and the right metadata
|
||||
func DriverTestCreateEmpty(t *testing.T, drivername string) {
|
||||
driver := GetDriver(t, drivername)
|
||||
defer PutDriver(t)
|
||||
|
||||
@ -74,8 +74,8 @@ func (d *naiveDiffDriverWithApply) ApplyDiff(id, parent string, diff archive.Rea
|
||||
// layer in the overlay. The overlay itself is mounted in the "merged"
|
||||
// directory, and the "work" dir is needed for overlay to work.
|
||||
|
||||
// When a overlay layer is created there are two cases, either the
|
||||
// parent has a "root" dir, then we start out with a empty "upper"
|
||||
// When an overlay layer is created there are two cases, either the
|
||||
// parent has a "root" dir, then we start out with an empty "upper"
|
||||
// directory overlaid on the parents root. This is typically the
|
||||
// case with the init layer of a container which is based on an image.
|
||||
// If there is no "root" in the parent, we inherit the lower-id from
|
||||
@ -103,7 +103,7 @@ func init() {
|
||||
|
||||
// Init returns the NaiveDiffDriver, a native diff driver for overlay filesystem.
|
||||
// If overlay filesystem is not supported on the host, graphdriver.ErrNotSupported is returned as error.
|
||||
// If a overlay filesystem is not supported over a existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
|
||||
// If an overlay filesystem is not supported over an existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
|
||||
func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
|
||||
|
||||
if err := supportsOverlay(); err != nil {
|
||||
@ -265,7 +265,7 @@ func (d *Driver) Create(id, parent, mountLabel string, storageOpt map[string]str
|
||||
return err
|
||||
}
|
||||
|
||||
// If parent has a root, just do a overlay to it
|
||||
// If parent has a root, just do an overlay to it
|
||||
parentRoot := path.Join(parentDir, "root")
|
||||
|
||||
if s, err := os.Lstat(parentRoot); err == nil {
|
||||
@ -386,7 +386,7 @@ func (d *Driver) Put(id string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ApplyDiff applies the new layer on top of the root, if parent does not exist with will return a ErrApplyDiffFallback error.
|
||||
// ApplyDiff applies the new layer on top of the root, if parent does not exist with will return an ErrApplyDiffFallback error.
|
||||
func (d *Driver) ApplyDiff(id string, parent string, diff archive.Reader) (size int64, err error) {
|
||||
dir := d.dir(id)
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ func (*Logger) Log(cmd []string) {
|
||||
}
|
||||
|
||||
// Init returns a new ZFS driver.
|
||||
// It takes base mount path and a array of options which are represented as key value pairs.
|
||||
// It takes base mount path and an array of options which are represented as key value pairs.
|
||||
// Each option is in the for key=value. 'zfs.fsname' is expected to be a valid key in the options.
|
||||
func Init(base string, opt []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
|
||||
var err error
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
// 3. logman stop -ets DockerContainerLogs
|
||||
// 4. You can then convert the etl log file to XML using: tracerpt -y trace.etl
|
||||
//
|
||||
// Each container log message generates a ETW event that also contains:
|
||||
// Each container log message generates an ETW event that also contains:
|
||||
// the container name and ID, the timestamp, and the stream type.
|
||||
package etwlogs
|
||||
|
||||
|
||||
@ -305,7 +305,7 @@ func setNamespaces(daemon *Daemon, s *specs.Spec, c *container.Container) error
|
||||
ns.Path = fmt.Sprintf("/proc/%d/ns/pid", pc.State.GetPID())
|
||||
setNamespace(s, ns)
|
||||
if userNS {
|
||||
// to share an PID namespace, they must also share a user namespace
|
||||
// to share a PID namespace, they must also share a user namespace
|
||||
nsUser := specs.Namespace{Type: "user"}
|
||||
nsUser.Path = fmt.Sprintf("/proc/%d/ns/user", pc.State.GetPID())
|
||||
setNamespace(s, nsUser)
|
||||
|
||||
Reference in New Issue
Block a user