devices_unsupported.go 725 B

1234567891011121314151617181920
  1. // +build !linux
  2. package oci
  3. import (
  4. "errors"
  5. "github.com/opencontainers/runc/libcontainer/configs"
  6. specs "github.com/opencontainers/runtime-spec/specs-go"
  7. )
  8. // Device transforms a libcontainer configs.Device to a specs.Device object.
  9. // Not implemented
  10. func Device(d *configs.Device) specs.LinuxDevice { return specs.LinuxDevice{} }
  11. // DevicesFromPath computes a list of devices and device permissions from paths (pathOnHost and pathInContainer) and cgroup permissions.
  12. // Not implemented
  13. func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (devs []specs.LinuxDevice, devPermissions []specs.LinuxDeviceCgroup, err error) {
  14. return nil, nil, errors.New("oci/devices: unsupported platform")
  15. }