Update code post codereview

Add specific types for Required and Optional DeviceNodes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-05-21 00:36:50 +00:00
parent 7fb3f86fec
commit 3d95e5cf7b
4 changed files with 20 additions and 23 deletions

View file

@ -48,11 +48,11 @@ func InitializeMountNamespace(rootfs, console string, container *libcontainer.Co
if err := setupBindmounts(rootfs, container.Mounts); err != nil {
return fmt.Errorf("bind mounts %s", err)
}
if err := nodes.CopyN(rootfs, container.DeviceNodes["required"], true); err != nil {
if err := nodes.CopyN(rootfs, container.RequiredDeviceNodes, true); err != nil {
return fmt.Errorf("copy required dev nodes %s", err)
}
if err := nodes.CopyN(rootfs, container.DeviceNodes["additional"], false); err != nil {
return fmt.Errorf("copy additional dev nodes %s", err)
if err := nodes.CopyN(rootfs, container.OptionalDeviceNodes, false); err != nil {
return fmt.Errorf("copy optional dev nodes %s", err)
}
if err := SetupPtmx(rootfs, console, container.Context["mount_label"]); err != nil {
return err