Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mknod(4) — HP-UX 5.50

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mknod(1M)

mknod(2)

MKNOD(4)  —  HP-UX

NAME

mknod − create a special file entry

SYNOPSIS

#include <sys/mknod.h>

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). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026