MCPcopy
hub / github.com/opencontainers/runc / needsSetupDev

Function needsSetupDev

libcontainer/rootfs_linux.go:91–98  ·  view source on GitHub ↗

needsSetupDev returns true if /dev needs to be set up.

(config *configs.Config)

Source from the content-addressed store, hash-verified

89
90// needsSetupDev returns true if /dev needs to be set up.
91func 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
100func doSetupDev(rootFd *os.File, config *configs.Config) error {
101 if err := createDevices(rootFd, config); err != nil {

Callers 5

prepareRootfsFunction · 0.85
TestNeedsSetupDevFunction · 0.85

Calls 1

LexicallyCleanPathFunction · 0.92

Tested by 4

TestNeedsSetupDevFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…