2 .\" Copyright (c) 2004, Sun Microsystems, Inc.
3 .\" All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH DDI_GETIMINOR 9F "Nov 18, 2004"
9 ddi_getiminor \- get kernel internal minor number from an external dev_t
13 #include <sys/types.h>
14 #include <sys/mkdev.h>
19 \fBminor_t\fR \fBddi_getiminor\fR(\fBdev_t\fR \fIdev\fR);
25 This interface is obsolete. \fBgetminor\fR(9F) should be used instead.
29 The following parameters are supported:
42 \fBddi_getiminor()\fR extracts the minor number from a device number. This call
43 should be used only for device numbers that have been passed to the kernel from
44 the user space through opaque interfaces such as the contents of
45 \fBioctl\fR(9E) and \fBputmsg\fR(2). The device numbers passed in using
46 standard device entry points must continue to be interpreted using the
47 \fBgetminor\fR(9F) interface. This new interface is used to translate between
48 user visible device numbers and in kernel device numbers. The two numbers may
49 differ in a clustered system.
52 For certain bus types, you can call this \fBDDI\fR function from a
53 high-interrupt context. These types include \fBISA\fR and SBus buses. See
54 \fBsysbus\fR(4), \fBisa\fR(4), and \fBsbus\fR(4) for details.
58 \fBddi_getiminor()\fR can be called from user context only.
62 The minor number or \fBEMINOR_UNKNOWN\fR if the minor number of the device is
67 See \fBattributes\fR(5) for a description of the following attributes:
75 ATTRIBUTE TYPE ATTRIBUTE VALUE
77 Stability Level Obsolete
83 \fBattributes\fR(5), \fBgetmajor\fR(9F), \fBgetminor\fR(9F),
87 \fIWriting Device Drivers\fR
91 Drivers are required to replace calls to \fBddi_getminor.9f\fR by
92 \fBgetminor\fR(9F)) in order to compile under Solaris 10 and later versions.