HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man5/!!!intro.5
________________________________________________________________
___ ___
m
mknod(5) mknod(5)
NAME
mknod.h - header file of macros for handling device numbers
SYNOPSIS
#include <sys/mknod.h>
DESCRIPTION
The header file <sys/mknod.h> defines macros to create and interpret device identification numbers for
use with the mknod() system call (see mknod(2)).
The use of these macros is architecture-dependent. See the System Administration Manual for your system
for information on how to select major and minor device numbers.
mknod.h contains the macro
dev_t makedev(int major, int minor)
which packs the major and minor components into a device identification number suitable for the dev argu-
ment of mknod(), and the two macros:
int major(dev_t dev)
int minor(dev_t dev)
which extract the major and minor number components, respectively, from a device identification number,
dev.
The macro MINOR_FORMAT is a printf() specification (see printf(3S)) that prints the minor number in
the format best suited to the particular implementation; it is used by the long format of the
ls command
(see ls(1)) to show the minor numbers for device files.
The base of the number is indicated in the same way as in the C programming language: no leading zero
for decimal, leading zero for octal, and leading
0x for hexadecimal.
SEE ALSO
ls(1), mknod(1M), mknod(2), printf(3S).
Section 5−−94 − 1 − HP-UX Release 11i: December 2000
___
___