Skip to content

Commit f9850af

Browse files
authored
Merge pull request #2518 from XiaodongLoong/redundant_chroot_param
remove redundant parameter of chroot function
2 parents b7d8f3b + af283b3 commit f9850af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcontainer/rootfs_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
110110
} else if config.Namespaces.Contains(configs.NEWNS) {
111111
err = pivotRoot(config.Rootfs)
112112
} else {
113-
err = chroot(config.Rootfs)
113+
err = chroot()
114114
}
115115
if err != nil {
116116
return newSystemErrorWithCause(err, "jailing process inside rootfs")
@@ -836,10 +836,10 @@ func msMoveRoot(rootfs string) error {
836836
if err := unix.Mount(rootfs, "/", "", unix.MS_MOVE, ""); err != nil {
837837
return err
838838
}
839-
return chroot(rootfs)
839+
return chroot()
840840
}
841841

842-
func chroot(rootfs string) error {
842+
func chroot() error {
843843
if err := unix.Chroot("."); err != nil {
844844
return err
845845
}

0 commit comments

Comments
 (0)