MKNOD(5)
NAME
mknod − create a special file entry
SYNOPSIS
#include <mknod.h>
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: HP
DESCRIPTION
Mknod.h provides utilities to pack and unpack device names as used by mknod(2). It contains the macro dev = makedev(major, minor) which packs the major and minor fields into a form suitable for mknod(2). It also contains major(dev) and minor(dev) which extract the corresponding fields.
The macro MINOR_FORMAT is a printf specification that prints the minor field in the format best suited to the particular implementation. The specification given by MINOR_FORMAT must cause the resulting string to indicate the base of the number in the same format as that used for C: no leading zero for decimal, leading zero for octal, and leading zero and ’x’ for hexadecimal.
When a minor field is printed in the format specified by MINOR_FORMAT, each sub-field contained in the minor will be wholly contained in the mininum possible number of digits of the resulting string. (Splitting a field across unnecessary digits for the sake of packing is not done.)
SEE ALSO
mknod(1M), mknod(2), section 4.
WARNING
All of the macros defined in <mknod.h> are also defined in <sys/sysmacros.h> for Bell System V compatibility. Mknod.h only exists for compatibility with previous releases of HP-UX, and should not be used for new development.
Hewlett-Packard — last mod. May 11, 2021