containerd/vendor/github.com/stevvooe/continuity/devices_linux.go
Derek McGowan 5f08e609c0 Vendor continuity
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-02-03 11:27:40 -08:00

15 lines
243 B
Go

package continuity
// from /usr/include/linux/kdev_t.h
func getmajor(dev uint64) uint64 {
return dev >> 8
}
func getminor(dev uint64) uint64 {
return dev & 0xff
}
func makedev(major int, minor int) int {
return ((major << 8) | minor)
}