Remove loopback setup for native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
cba2eef566
commit
f1e3abf694
1 changed files with 0 additions and 15 deletions
|
@ -55,8 +55,6 @@ func setupNewMountNamespace(rootfs string, bindMounts []libcontainer.Mount, cons
|
||||||
if err := copyDevNodes(rootfs); err != nil {
|
if err := copyDevNodes(rootfs); err != nil {
|
||||||
return fmt.Errorf("copy dev nodes %s", err)
|
return fmt.Errorf("copy dev nodes %s", err)
|
||||||
}
|
}
|
||||||
// In non-privileged mode, this fails. Discard the error.
|
|
||||||
setupLoopbackDevices(rootfs)
|
|
||||||
if err := setupPtmx(rootfs, console, mountLabel); err != nil {
|
if err := setupPtmx(rootfs, console, mountLabel); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -142,19 +140,6 @@ func copyDevNodes(rootfs string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupLoopbackDevices(rootfs string) error {
|
|
||||||
for i := 0; ; i++ {
|
|
||||||
if err := copyDevNode(rootfs, fmt.Sprintf("loop%d", i)); err != nil {
|
|
||||||
if !os.IsNotExist(err) {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func copyDevNode(rootfs, node string) error {
|
func copyDevNode(rootfs, node string) error {
|
||||||
stat, err := os.Stat(filepath.Join("/dev", node))
|
stat, err := os.Stat(filepath.Join("/dev", node))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue