1570af302Sopenharmony_ci#ifndef _SYS_SYSMACROS_H
2570af302Sopenharmony_ci#define _SYS_SYSMACROS_H
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#define major(x) \
5570af302Sopenharmony_ci	((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
6570af302Sopenharmony_ci#define minor(x) \
7570af302Sopenharmony_ci	((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
8570af302Sopenharmony_ci
9570af302Sopenharmony_ci#define makedev(x,y) ( \
10570af302Sopenharmony_ci        (((x)&0xfffff000ULL) << 32) | \
11570af302Sopenharmony_ci	(((x)&0x00000fffULL) << 8) | \
12570af302Sopenharmony_ci        (((y)&0xffffff00ULL) << 12) | \
13570af302Sopenharmony_ci	(((y)&0x000000ffULL)) )
14570af302Sopenharmony_ci
15570af302Sopenharmony_ci#endif
16