needsSetupDev returns true if /dev needs to be set up.
(config *configs.Config)
| 89 | |
| 90 | // needsSetupDev returns true if /dev needs to be set up. |
| 91 | func needsSetupDev(config *configs.Config) bool { |
| 92 | for _, m := range config.Mounts { |
| 93 | if m.Device == "bind" && pathrs.LexicallyCleanPath(m.Destination) == "/dev" { |
| 94 | return false |
| 95 | } |
| 96 | } |
| 97 | return true |
| 98 | } |
| 99 | |
| 100 | func doSetupDev(rootFd *os.File, config *configs.Config) error { |
| 101 | if err := createDevices(rootFd, config); err != nil { |
searching dependent graphs…