summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-08 16:05:12 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-09 11:02:28 -0400
commitb020d1ad13267bd71065457f83116af39c77f7e5 (patch)
tree076e8b6dd991ee3c4a50b141dcc2e68198417597 /vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
parent5c6002bf9d0c5f8ea0b4231e0d24f8e7a0994b30 (diff)
downloadpodman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.gz
podman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.bz2
podman-b020d1ad13267bd71065457f83116af39c77f7e5.zip
Vendor in new version of Buildah
This also pulls in latest runc and containers/common Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go')
-rw-r--r--vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
new file mode 100644
index 000000000..650c46848
--- /dev/null
+++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
@@ -0,0 +1,16 @@
+// +build !windows
+
+package configs
+
+import (
+ "errors"
+
+ "golang.org/x/sys/unix"
+)
+
+func (d *DeviceRule) Mkdev() (uint64, error) {
+ if d.Major == Wildcard || d.Minor == Wildcard {
+ return 0, errors.New("cannot mkdev() device with wildcards")
+ }
+ return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil
+}