Configuring HP-UX For Peripherals

272 AppendixC
Major and Minor Numbers
Understanding the Construction of Device Special Files
Understanding the Construction of Device
Special Files
A long listing (ls -l) of a typical device special file might look like this:
crw- 2 bin bin 193 0x010200 Jul 12 02:19 tty1p2
The two shaded fields are the major (193, decimal) and minor (0x010200,
hexadecimal) numbers.
Both major and minor number are encoded into a numerical designation
of the device driver, called the dev_t format. This is shown in Figure C-2,
“Driver Number (dev_t) Format.” (Note, PA-RISC uses "Big-Endian" byte
ordering; that is, the bit labelled 0 is the most significant (high-order)
bit.)
Figure C-2 Driver Number (dev_t) Format
Bits 0 through 7 of an HP-UX device special file are used to encode the
major number.
Bits 8 through 31 are used to encode the minor number. The hexadecimal
notation for the minor number follows the format 0xNNNNNN, in which
each four bits (shown as N or "nibble") is represented by a hexadecimal
digit (0 through F, in which 0 means no bits are set, F means all bits are
set).
Bits 8 through 15 encode the card instance of the interface card, that is,
the number representing the order that HP-UX encounters the specific