Skip to content

Commit

Permalink
Revert "libcontainer/rootfs_linux: minor cleanup"
Browse files Browse the repository at this point in the history
This reverts commit 1b27db6.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
  • Loading branch information
mrunalp committed Aug 14, 2018
1 parent beadf0e commit 26ec8a9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libcontainer/rootfs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
return newSystemErrorWithCause(err, "preparing rootfs")
}

setupDev := needsSetupDev(config)
for _, m := range config.Mounts {
for _, precmd := range m.PremountCmds {
if err := mountCmd(precmd); err != nil {
Expand All @@ -64,8 +65,6 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
}
}

setupDev := needsSetupDev(config)

if setupDev {
if err := createDevices(config); err != nil {
return newSystemErrorWithCause(err, "creating device nodes")
Expand Down

0 comments on commit 26ec8a9

Please # to comment.