Main index | Section 3 | Options |
#include <sys/types.h>
dev == makedev(major(dev), minor(dev))
ma == major(makedev(ma, mi))
mi == minor(makedev(ma, mi))
are valid.
In previous implementations of FreeBSD all block and character devices were uniquely identified by a pair of stable major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of FreeBSD automatically generate a unique device number for each character device visible in /dev/. These numbers are not divided in device classes and are not guaranteed to be stable upon reboot or driver reload.
On FreeBSD these macros are only used by utilities that need to exchange numbers with other operating systems that may use different encodings for dev_t, but also applications that present these numbers to the user in a more conventional way.
MAKEDEV (3) | August 3, 2017 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | The Unix phenomenon is scary. It doesn't go away. | ” |
— Steve Ballmer |