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

Function doSetupDev

libcontainer/rootfs_linux.go:100–111  ·  view source on GitHub ↗
(rootFd *os.File, config *configs.Config)

Source from the content-addressed store, hash-verified

98}
99
100func doSetupDev(rootFd *os.File, config *configs.Config) error {
101 if err := createDevices(rootFd, config); err != nil {
102 return fmt.Errorf("error creating device nodes: %w", err)
103 }
104 if err := setupPtmx(rootFd); err != nil {
105 return fmt.Errorf("error setting up ptmx: %w", err)
106 }
107 if err := setupDevSymlinks(rootFd); err != nil {
108 return fmt.Errorf("error setting up /dev symlinks: %w", err)
109 }
110 return nil
111}
112
113// setupAndMountToRootfs sets up the mount for a single mount point and mounts it to the rootfs.
114func setupAndMountToRootfs(pipe *syncSocket, config *configs.Config, mountConfig *mountConfig, m *configs.Mount) error {

Callers 1

prepareRootfsFunction · 0.85

Calls 3

setupPtmxFunction · 0.85
setupDevSymlinksFunction · 0.85
createDevicesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…