Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversddi_getiminor(9F)


NAME

 ddi_getiminor - get kernel internal minor number from an external dev_t

SYNOPSIS

 
#include <sys/types.h>
#include <sys/mkdev.h>
#include <sys/ddi.h>
minor_t ddi_getiminor(dev_t dev);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

PARAMETERS

 

The following parameters are supported:

dev
Device number.

DESCRIPTION

 

ddi_getiminor() extracts the minor number from a device number. This call should be used only for device numbers that have been passed to the kernel from the user space through opaque interfaces such as the contents of ioctl(9E) and putmsg(2). The device numbers passed in using standard device entry points must continue to be interpreted using the getminor(9F) interface. This new interface is used to translate between user visible device numbers and in kernel device numbers. The two numbers may differ in a clustered system.

For certain bus types, you can call this DDI function from a high-interrupt context. These types include ISA, EISA, and SBus buses. See sysbus(4), isa(4), eisa(4), and sbus(4) for details.

CONTEXT

 

ddi_getiminor() can be called from user context only.

RETURN VALUES

 

The minor number or EMINOR_UNKNOWN if the minor number of the device is invalid.

SEE ALSO

 

getmajor(9F), getminor(9F), makedevice(9F)

Writing Device Drivers

WARNINGS

 

Validity checking is performed. If dev is invalid, EMINOR_UNKNOWN is returned. This behavior differs from getminor(9F).


SunOS 5.9Go To TopLast Changed 25 Feb 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.