2012-06-16 01:52:53 +00:00
|
|
|
#ifndef _SYS_SYSMACROS_H
|
|
|
|
#define _SYS_SYSMACROS_H
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2013-05-15 20:15:50 +00:00
|
|
|
#define major(x) \
|
2013-06-29 17:57:13 +00:00
|
|
|
((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
|
2013-05-15 20:15:50 +00:00
|
|
|
#define minor(x) \
|
|
|
|
((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
|
|
|
|
|
|
|
|
#define makedev(x,y) ( \
|
|
|
|
(((x)&0xfffff000ULL) << 32) | \
|
|
|
|
(((x)&0x00000fffULL) << 8) | \
|
|
|
|
(((y)&0xffffff00ULL) << 12) | \
|
|
|
|
(((y)&0x000000ffULL)) )
|
2011-02-12 05:22:29 +00:00
|
|
|
|
|
|
|
#endif
|