summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-09 19:59:58 +0200
committerGitHub <noreply@github.com>2020-07-09 19:59:58 +0200
commitd9cd0032f7478e625329326d7593162a9f1e8c1e (patch)
tree7479f96d73dae9dc186bffbb3cb203a3f1ae7558 /vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
parent059bd37511e917f860e784307ee1f2766d8d4ec3 (diff)
parentb020d1ad13267bd71065457f83116af39c77f7e5 (diff)
downloadpodman-d9cd0032f7478e625329326d7593162a9f1e8c1e.tar.gz
podman-d9cd0032f7478e625329326d7593162a9f1e8c1e.tar.bz2
podman-d9cd0032f7478e625329326d7593162a9f1e8c1e.zip
Merge pull request #6906 from rhatdan/VENDOR
Vendor in new version of Buildah
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
+}