|
@@ -6,14 +6,13 @@ import (
|
|
"path/filepath"
|
|
"path/filepath"
|
|
"strings"
|
|
"strings"
|
|
|
|
|
|
- "github.com/opencontainers/runc/libcontainer/configs"
|
|
|
|
"github.com/opencontainers/runc/libcontainer/devices"
|
|
"github.com/opencontainers/runc/libcontainer/devices"
|
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
"golang.org/x/sys/unix"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
)
|
|
|
|
|
|
-// Device transforms a libcontainer configs.Device to a specs.LinuxDevice object.
|
|
|
|
-func Device(d *configs.Device) specs.LinuxDevice {
|
|
|
|
|
|
+// Device transforms a libcontainer devices.Device to a specs.LinuxDevice object.
|
|
|
|
+func Device(d *devices.Device) specs.LinuxDevice {
|
|
return specs.LinuxDevice{
|
|
return specs.LinuxDevice{
|
|
Type: string(d.Type),
|
|
Type: string(d.Type),
|
|
Path: d.Path,
|
|
Path: d.Path,
|
|
@@ -25,7 +24,7 @@ func Device(d *configs.Device) specs.LinuxDevice {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-func deviceCgroup(d *configs.Device) specs.LinuxDeviceCgroup {
|
|
|
|
|
|
+func deviceCgroup(d *devices.Device) specs.LinuxDeviceCgroup {
|
|
return specs.LinuxDeviceCgroup{
|
|
return specs.LinuxDeviceCgroup{
|
|
Allow: true,
|
|
Allow: true,
|
|
Type: string(d.Type),
|
|
Type: string(d.Type),
|