Skip to content

Commit

Permalink
Merge pull request #1784 from pierrchen/master
Browse files Browse the repository at this point in the history
libcontainer/rootfs_linux: minor cleanup
  • Loading branch information
Mrunal Patel authored Apr 18, 2018
2 parents d56f6cc + 1b27db6 commit 63e6708
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcontainer/rootfs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ 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 @@ -65,6 +64,8 @@ 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 63e6708

Please sign in to comment.