I/O Odds and Ends

There are a few I/O topics that don't really fit into the categories we've talked about so far, but they are worth knowing about.

Device Files and the Device Switch Table

Device files in HP-UX are represented by two numbers: a major number and a minor number. Within the kernel, these two numbers are concatenated to form a single 32-bit value known as a dev_t. The first 8 bits of the dev_t are the major number, and the remaining 24 bits are the minor number. The major number is associated with a driver through the device switch tables, which we talked about earlier. The minor number is passed as an argument to that device driver's routines.

As an example, let's say we want to do an open() system call to a tape device called ...

Get HP-UX 11i Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.