Correct intuition for setupDev
Minor fix, the former setupDev=true means not setup dev, which is contrary to intuition, just correct it. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
3be7f87b1b
commit
34cff6f2f3
|
@ -29,7 +29,7 @@ func setupRootfs(config *configs.Config, console *linuxConsole) (err error) {
|
|||
return newSystemError(err)
|
||||
}
|
||||
|
||||
setupDev := len(config.Devices) == 0
|
||||
setupDev := len(config.Devices) != 0
|
||||
for _, m := range config.Mounts {
|
||||
for _, precmd := range m.PremountCmds {
|
||||
if err := mountCmd(precmd); err != nil {
|
||||
|
@ -46,7 +46,7 @@ func setupRootfs(config *configs.Config, console *linuxConsole) (err error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if !setupDev {
|
||||
if setupDev {
|
||||
if err := createDevices(config); err != nil {
|
||||
return newSystemError(err)
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ func setupRootfs(config *configs.Config, console *linuxConsole) (err error) {
|
|||
if err != nil {
|
||||
return newSystemError(err)
|
||||
}
|
||||
if !setupDev {
|
||||
if setupDev {
|
||||
if err := reOpenDevNull(); err != nil {
|
||||
return newSystemError(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue