Copyright (c) 2004, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/types.h> #include <sys/mkdev.h> #include <sys/ddi.h> minor_t ddi_getiminor(dev_t dev);
This interface is obsolete. getminor(9F) should be used instead.
The following parameters are supported:
dev
Device number.
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 and SBus buses. See sysbus(4), isa(4), and sbus(4) for details.
ddi_getiminor() can be called from user context only.
The minor number or EMINOR_UNKNOWN if the minor number of the device is invalid.
See attributes(5) for a description of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Stability Level | Obsolete |
attributes(5), getmajor(9F), getminor(9F), makedevice(9F)
Writing Device Drivers
Drivers are required to replace calls to ddi_getminor.9f by getminor(9F)) in order to compile under Solaris 10 and later versions.