mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ba13c173d1
Signed-off-by: Akash Gupta <akagup@microsoft.com>
15 lines
266 B
Go
15 lines
266 B
Go
package devices
|
|
|
|
// from /usr/include/sys/types.h
|
|
|
|
func getmajor(dev int32) uint64 {
|
|
return (uint64(dev) >> 24) & 0xff
|
|
}
|
|
|
|
func getminor(dev int32) uint64 {
|
|
return uint64(dev) & 0xffffff
|
|
}
|
|
|
|
func makedev(major int, minor int) int {
|
|
return ((major << 24) | minor)
|
|
}
|