summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runc/libcontainer/devices
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-06-25 10:02:34 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-06-29 15:58:32 -0400
commit05f39af5bd716ce8d02a41e5c0aa1a2d632dab07 (patch)
treee9d2d0c43f3aa65dae28d71950b2824bd091b2be /vendor/github.com/opencontainers/runc/libcontainer/devices
parent793063e086d2a7fe15833be5456af95bc9b6ba24 (diff)
downloadpodman-05f39af5bd716ce8d02a41e5c0aa1a2d632dab07.tar.gz
podman-05f39af5bd716ce8d02a41e5c0aa1a2d632dab07.tar.bz2
podman-05f39af5bd716ce8d02a41e5c0aa1a2d632dab07.zip
Bump github.com/containers/storage from 1.32.3 to 1.32.5
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.32.3 to 1.32.5. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.32.3...v1.32.5) --- updated-dependencies: - dependency-name: github.com/containers/storage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/opencontainers/runc/libcontainer/devices')
-rw-r--r--vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go b/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go
index acb816998..6d5b3d09d 100644
--- a/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go
+++ b/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go
@@ -11,10 +11,8 @@ import (
"golang.org/x/sys/unix"
)
-var (
- // ErrNotADevice denotes that a file is not a valid linux device.
- ErrNotADevice = errors.New("not a device node")
-)
+// ErrNotADevice denotes that a file is not a valid linux device.
+var ErrNotADevice = errors.New("not a device node")
// Testing dependencies
var (
@@ -29,8 +27,9 @@ func mkDev(d *Rule) (uint64, error) {
return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil
}
-// Given the path to a device and its cgroup_permissions(which cannot be easily queried) look up the
-// information about a linux device and return that information as a Device struct.
+// DeviceFromPath takes the path to a device and its cgroup_permissions (which
+// cannot be easily queried) to look up the information about a linux device
+// and returns that information as a Device struct.
func DeviceFromPath(path, permissions string) (*Device, error) {
var stat unix.Stat_t
err := unixLstat(path, &stat)