From af283b3f478efc57466a17432f14116697480684 Mon Sep 17 00:00:00 2001 From: Xiaodong Liu Date: Wed, 15 Jul 2020 16:22:07 +0800 Subject: [PATCH] remove redundant the parameter of chroot function Signed-off-by: Xiaodong Liu --- libcontainer/rootfs_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index b8e792fb..5073870d 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -110,7 +110,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) { } else if config.Namespaces.Contains(configs.NEWNS) { err = pivotRoot(config.Rootfs) } else { - err = chroot(config.Rootfs) + err = chroot() } if err != nil { return newSystemErrorWithCause(err, "jailing process inside rootfs") @@ -836,10 +836,10 @@ func msMoveRoot(rootfs string) error { if err := unix.Mount(rootfs, "/", "", unix.MS_MOVE, ""); err != nil { return err } - return chroot(rootfs) + return chroot() } -func chroot(rootfs string) error { +func chroot() error { if err := unix.Chroot("."); err != nil { return err }