DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

geteminor(D3)


geteminor -- get external minor device number

Synopsis (Not in current DDI version)

   #include <sys/types.h>
   #include <sys/ddi.h>
   

minor_t geteminor(dev_t dev);

Description

geteminor returns the external minor number given a device number, dev.

Arguments


dev
External device number.

Return values

The external minor number.

Usage

External minor numbers are visible to the user. Internal minor numbers are only visible in the kernel. Since, on some architectures, a driver can support more than one external major device that maps to the same internal major device, the kernel keeps a mapping between external minor numbers and internal minor numbers to allow drivers to index arrays more easily. For example, a driver may support two devices, each with five minor numbers. The user may see each set of minor numbers numbered from zero to four, but the driver sees them as one set of minor numbers numbered from zero to nine.

All driver entry points are passed device numbers using external minor numbers.

Systems that map external major device numbers one-to-one with internal major numbers also map external minor numbers one-to-one with internal minor numbers.

Context and synchronization

All contexts.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp

Differences between versions

geteminor( ) is not supported in DDI 8; drivers can access similar information through the resmgr key and channel number. See ``Device number'' in HDK Technical Reference.

References

etoimajor(D3), getemajor(D3), getmajor(D3), getminor(D3), makedevice(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005