summaryrefslogtreecommitdiff
path: root/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-09-28 12:12:48 +0000
committerGitHub <noreply@github.com>2022-09-28 12:12:48 +0000
commitba70dd5ecf6b4e5e55f55bcf966c513c3ce944be (patch)
tree977567eeee737d2c1f41e721f14ea104f0a8b353 /vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go
parentdca5ead2d7ad8ac3b14fed6736c102b571d8baf1 (diff)
downloadpodman-ba70dd5ecf6b4e5e55f55bcf966c513c3ce944be.tar.gz
podman-ba70dd5ecf6b4e5e55f55bcf966c513c3ce944be.tar.bz2
podman-ba70dd5ecf6b4e5e55f55bcf966c513c3ce944be.zip
build(deps): bump github.com/container-orchestrated-devices/container-device-interface
Bumps [github.com/container-orchestrated-devices/container-device-interface](https://github.com/container-orchestrated-devices/container-device-interface) from 0.5.1 to 0.5.2. - [Release notes](https://github.com/container-orchestrated-devices/container-device-interface/releases) - [Commits](https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.1...v0.5.2) --- updated-dependencies: - dependency-name: github.com/container-orchestrated-devices/container-device-interface dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go')
-rw-r--r--vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go b/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go
index 1295f75e9..9fcecf849 100644
--- a/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go
+++ b/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits.go
@@ -27,8 +27,6 @@ import (
"github.com/container-orchestrated-devices/container-device-interface/specs-go"
oci "github.com/opencontainers/runtime-spec/specs-go"
ocigen "github.com/opencontainers/runtime-tools/generate"
-
- runc "github.com/opencontainers/runc/libcontainer/devices"
)
const (
@@ -289,37 +287,6 @@ func ensureOCIHooks(spec *oci.Spec) {
}
}
-// fillMissingInfo fills in missing mandatory attributes from the host device.
-func (d *DeviceNode) fillMissingInfo() error {
- if d.HostPath == "" {
- d.HostPath = d.Path
- }
-
- if d.Type != "" && (d.Major != 0 || d.Type == "p") {
- return nil
- }
-
- hostDev, err := runc.DeviceFromPath(d.HostPath, "rwm")
- if err != nil {
- return errors.Wrapf(err, "failed to stat CDI host device %q", d.HostPath)
- }
-
- if d.Type == "" {
- d.Type = string(hostDev.Type)
- } else {
- if d.Type != string(hostDev.Type) {
- return errors.Errorf("CDI device (%q, %q), host type mismatch (%s, %s)",
- d.Path, d.HostPath, d.Type, string(hostDev.Type))
- }
- }
- if d.Major == 0 && d.Type != "p" {
- d.Major = hostDev.Major
- d.Minor = hostDev.Minor
- }
-
- return nil
-}
-
// sortMounts sorts the mounts in the given OCI Spec.
func sortMounts(specgen *ocigen.Generator) {
mounts := specgen.Mounts()