1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
replace uses of deprecated libcontainer/configs.Device
Origin: backport, https://github.com/moby/moby/commit/d414c0c1e8c487170b1d2f5af4946771645c6564
Last-Update: 2021-10-11
Index: docker/engine/oci/devices_linux.go
===================================================================
--- docker.orig/engine/oci/devices_linux.go
+++ docker/engine/oci/devices_linux.go
@@ -6,13 +6,12 @@ import (
"path/filepath"
"strings"
- "github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/devices"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
// Device transforms a libcontainer configs.Device to a specs.LinuxDevice object.
-func Device(d *configs.Device) specs.LinuxDevice {
+func Device(d *devices.Device) specs.LinuxDevice {
return specs.LinuxDevice{
Type: string(d.Type),
Path: d.Path,
@@ -24,7 +23,7 @@ func Device(d *configs.Device) specs.Lin
}
}
-func deviceCgroup(d *configs.Device) specs.LinuxDeviceCgroup {
+func deviceCgroup(d *devices.Device) specs.LinuxDeviceCgroup {
return specs.LinuxDeviceCgroup{
Allow: true,
Type: string(d.Type),
|