Operating System - HP-UX
1825764 Members
2105 Online
109687 Solutions
New Discussion

max value for a disk section.

 
CAS_2
Valued Contributor

max value for a disk section.

Hi

I'm typing a C program to print the current queue depth of a SCSI disk (not the maximum queue depth).

I get that info from PST_DISKINFO struct. But disk file (/dev/dsk/c3t2d4) is not given. Instead, I must use a device number (32-bit word). Its first byte is major number.
Its 3 remaining bytes are minor number.

I have to decode the minor number to get a CARD number (C), a TARGET number (T), a UNIT number (D) and a SECTION number (S) in order to display a disk device file name (as c3t2d4).

By looking in header files (usr/include), I know that:

0 <= T <= 15
0 <= D <= 7

But what about C and S ?

By inspecting minor number of device files in /dev/dsk dir on HP-UX 11.23, I think that

0 <= C <= 255 # first byte of minor number
0 <= S <= 15 # lowest nibble in last byte of minor number

Am I right ?

For example, if minor is 0x34250a
0x34 is the card number
0x2 is the target number
0x5 is the unit number
0xa is the section number

The highest nibble in last byte of minor number is 0 (zero), what is for ?
Instead, may a section number be greater than 15 (0xf) ?