The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
sysmacros.h File Reference

device numbers: a major (the driver) and a minor (the device), packed as Linux packs them in 32 bits. More...

Go to the source code of this file.

Macros

#define major(dev)
#define minor(dev)
#define makedev(ma, mi)

Detailed Description

device numbers: a major (the driver) and a minor (the device), packed as Linux packs them in 32 bits.

Macro Definition Documentation

◆ major

#define major ( dev)
Value:
((unsigned int)(((dev) >> 8) & 0xfff))

◆ minor

#define minor ( dev)
Value:
((unsigned int)(((dev) & 0xff) | (((dev) >> 12) & 0xfff00)))

◆ makedev

#define makedev ( ma,
mi )
Value:
((((ma) & 0xfff) << 8) | ((mi) & 0xff) | (((mi) & 0xfff00) << 12))