mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-06 16:07:09 +08:00
Cleanup unused func arguments
Signed-off-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
@@ -75,7 +75,7 @@ func (c *linuxConsole) Close() error {
|
|||||||
|
|
||||||
// mount initializes the console inside the rootfs mounting with the specified mount label
|
// mount initializes the console inside the rootfs mounting with the specified mount label
|
||||||
// and applying the correct ownership of the console.
|
// and applying the correct ownership of the console.
|
||||||
func (c *linuxConsole) mount(rootfs, mountLabel string, uid, gid int) error {
|
func (c *linuxConsole) mount(rootfs, mountLabel string) error {
|
||||||
oldMask := syscall.Umask(0000)
|
oldMask := syscall.Umask(0000)
|
||||||
defer syscall.Umask(oldMask)
|
defer syscall.Umask(oldMask)
|
||||||
if err := label.SetFileLabel(c.slavePath, mountLabel); err != nil {
|
if err := label.SetFileLabel(c.slavePath, mountLabel); err != nil {
|
||||||
|
@@ -68,7 +68,7 @@ func setupRootfs(config *configs.Config, console *linuxConsole) (err error) {
|
|||||||
return newSystemError(err)
|
return newSystemError(err)
|
||||||
}
|
}
|
||||||
if !setupDev {
|
if !setupDev {
|
||||||
if err := reOpenDevNull(config.Rootfs); err != nil {
|
if err := reOpenDevNull(); err != nil {
|
||||||
return newSystemError(err)
|
return newSystemError(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,7 @@ func setupDevSymlinks(rootfs string) error {
|
|||||||
// this method will make them point to `/dev/null` in this container's rootfs. This
|
// this method will make them point to `/dev/null` in this container's rootfs. This
|
||||||
// needs to be called after we chroot/pivot into the container's rootfs so that any
|
// needs to be called after we chroot/pivot into the container's rootfs so that any
|
||||||
// symlinks are resolved locally.
|
// symlinks are resolved locally.
|
||||||
func reOpenDevNull(rootfs string) error {
|
func reOpenDevNull() error {
|
||||||
var stat, devNullStat syscall.Stat_t
|
var stat, devNullStat syscall.Stat_t
|
||||||
file, err := os.Open("/dev/null")
|
file, err := os.Open("/dev/null")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -433,7 +433,7 @@ func setupPtmx(config *configs.Config, console *linuxConsole) error {
|
|||||||
return fmt.Errorf("symlink dev ptmx %s", err)
|
return fmt.Errorf("symlink dev ptmx %s", err)
|
||||||
}
|
}
|
||||||
if console != nil {
|
if console != nil {
|
||||||
return console.mount(config.Rootfs, config.MountLabel, 0, 0)
|
return console.mount(config.Rootfs, config.MountLabel)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user