From a1d509759b9195a1c022f2eb9585b74d07a0f084 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Fri, 13 Feb 2015 19:06:17 -0500 Subject: [PATCH] Fixed some typos and tried to make comments read better. Signed-off-by: Mrunal Patel --- linux_container.go | 2 +- linux_init.go | 6 +++--- linux_network.go | 2 +- linux_rootfs.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linux_container.go b/linux_container.go index 73aaa441..78996d78 100644 --- a/linux_container.go +++ b/linux_container.go @@ -168,7 +168,7 @@ func (c *linuxContainer) newInitProcess(p *Process, cmd *exec.Cmd, parentPipe, c cloneFlags := c.config.Namespaces.CloneFlags() if cloneFlags&syscall.CLONE_NEWUSER != 0 { if err := c.addUidGidMappings(cmd.SysProcAttr); err != nil { - // mappings is not supported + // user mappings are not supported return nil, err } // Default to root user when user namespaces are enabled. diff --git a/linux_init.go b/linux_init.go index 9ed27e89..0fbda641 100644 --- a/linux_init.go +++ b/linux_init.go @@ -40,7 +40,7 @@ type network struct { TempVethPeerName string `json:"temp_veth_peer_name"` } -// Process is used for transferring parameters from Exec() to Init() +// initConfig is used for transferring parameters from Exec() to Init() type initConfig struct { Args []string `json:"args"` Env []string `json:"env"` @@ -99,7 +99,7 @@ func populateProcessEnvironment(env []string) error { } // finalizeNamespace drops the caps, sets the correct user -// and working dir, and closes any leaky file descriptors +// and working dir, and closes any leaked file descriptors // before execing the command inside the namespace func finalizeNamespace(config *initConfig) error { // Ensure that all non-standard fds we may have accidentally @@ -229,7 +229,7 @@ func setupRlimits(config *configs.Config) error { return nil } -// killCgroupProcesses freezes then itterates over all the processes inside the +// killCgroupProcesses freezes then iterates over all the processes inside the // manager's cgroups sending a SIGKILL to each process then waiting for them to // exit. func killCgroupProcesses(m cgroups.Manager) error { diff --git a/linux_network.go b/linux_network.go index e720dade..0325e97b 100644 --- a/linux_network.go +++ b/linux_network.go @@ -98,7 +98,7 @@ func (l *loopback) initialize(config *network) error { } // veth is a network strategy that uses a bridge and creates -// a veth pair, one that stays outside on the host and the other +// a veth pair, one that is attached to the bridge on the host and the other // is placed inside the container's namespace type veth struct { } diff --git a/linux_rootfs.go b/linux_rootfs.go index 5bfe4018..5e3e51d7 100644 --- a/linux_rootfs.go +++ b/linux_rootfs.go @@ -161,8 +161,8 @@ func setupDevSymlinks(rootfs string) error { return nil } -// Is stdin, stdout or stderr were to be pointing to '/dev/null', -// this method will make them point to '/dev/null' from within this namespace. +// If stdin, stdout or stderr are pointing to '/dev/null' in the global mount namespace, +// this method will make them point to '/dev/null' in this namespace. func reOpenDevNull(rootfs string) error { var stat, devNullStat syscall.Stat_t file, err := os.Open(filepath.Join(rootfs, "/dev/null"))