aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go
blob: a400341e440f34a66bb31bad01bec88600ed6e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// +build !windows

package devices

import (
	"errors"

	"golang.org/x/sys/unix"
)

func (d *Rule) 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
}