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

getemajor(D3)


getemajor -- get external major device number

Synopsis (Not in current DDI version)

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

major_t getemajor(dev_t dev);

Description

getemajor returns the external major number given a device number, dev.

Arguments


dev
External device number.

Return values

The external major number.

Usage

External major numbers are visible to the user. Internal major numbers are only visible in the kernel. Since, on some architectures, the range of major numbers may be large and sparsely populated, the kernel keeps a mapping between external and internal major numbers to save space.

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

Usually, a driver with more than one external major number will have only one internal major number. However, some system implementations map one-to-one between external and internal major numbers. Here, the internal major number is the same as the external major number and the driver may have more than one internal major number.

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

getemajor( ) 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), geteminor(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