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:
Michael Crosby 2014-04-02 13:12:52 +00:00
parent cba2eef566
commit f1e3abf694

View file

@ -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 {