- NetBSD Manual Pages
MAKEDEV(3) NetBSD Library Functions Manual MAKEDEV(3)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
makedev, major, minor -- device number conversion
makedev(int major, int minor);
The makedev() macro allows a unique device number to be generated based
on its major and minor number. The major() and minor() macros can be
used to obtain the original numbers from the device number dev.
All block and character devices are uniquely identified by a pair of
major and minor numbers. The major number refers to a certain device
class (e.g. disks, TTYs) while the minor number identifies an instance
within the device class.
The major() macro returns a device major number that has a value between
0 and 255. The minor() macro returns a device minor number whose value
can span the complete range of an int.
mknod(2), devname(3), MAKEDEV(8)
NetBSD 9.0 April 1, 2011 NetBSD 9.0