January 2004
Intermediate to advanced
432 pages
11h 1m
English
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 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 ...
Read now
Unlock full access