9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / ldi_ident_from_dev.9f
blob43ab488821610e46b17e9941f2761edd87a4598b
1 '\" te
2 .\"  Copyright (c) 2009, Sun Microsystems, Inc.,  All Rights Reserved
3 .\" 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.
4 .\"  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
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LDI_IDENT_FROM_DEV 9F "Mar 26, 2009"
7 .SH NAME
8 ldi_ident_from_dev, ldi_ident_from_stream, ldi_ident_from_dip,
9 ldi_ident_release \- ldi cookie management
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/sunldi.h>
15 \fBint\fR \fBldi_ident_from_dip\fR(\fBdev_info_t *\fR\fIdip\fR, \fBldi_ident_t *\fR\fIlip\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBldi_ident_from_dev\fR(\fBdev_t\fR \fIdev\fR, \fBldi_ident_t *\fR\fIlip\fR);
21 .fi
23 .LP
24 .nf
25 \fBint\fR \fBldi_ident_from_stream\fR(\fBstruct queue *\fR\fIsq\fR, \fBldi_ident_t *\fR\fIlip\fR);
26 .fi
28 .LP
29 .nf
30 \fBvoid\fR \fBldi_ident_release\fR(\fBldi_ident_t\fR \fIli\fR);
31 .fi
33 .SH PARAMETERS
34 .sp
35 .ne 2
36 .na
37 \fB\fIli\fR\fR
38 .ad
39 .RS 7n
40 ldi identifier
41 .RE
43 .sp
44 .ne 2
45 .na
46 \fB\fIlip\fR\fR
47 .ad
48 .RS 7n
49 ldi identifier pointer
50 .RE
52 .sp
53 .ne 2
54 .na
55 \fB\fIdip\fR\fR
56 .ad
57 .RS 7n
58 pointer to device info node
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fIdev\fR\fR
65 .ad
66 .RS 7n
67 device number
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fIsq\fR\fR
74 .ad
75 .RS 7n
76 pointer to a stream queue
77 .RE
79 .SH DESCRIPTION
80 .sp
81 .LP
82 The \fBldi_ident_from_dev()\fR function allocates and  returns an ldi
83 identifier  that  is  associated with the device number specified by \fIdev\fR.
84 The new ldi identifier is returned in the ldi identifier pointer parameter
85 \fIlip\fR.
86 .sp
87 .LP
88 The \fBldi_ident_from_dip()\fR function allocates and  returns an ldi
89 identifier that is associated with the device info node pointed to by dip. The
90 new ldi identifier is  returned in the ldi identifier pointer parameter
91 \fIlip\fR.
92 .sp
93 .LP
94 The \fBldi_ident_from_stream()\fR function allocates and returns an ldi
95 identifier that is associated with the stream pointed to by \fIqueue\fR. The
96 new ldi identifier is returned in the ldi identifier pointer parameter
97 \fIlip\fR.
98 .sp
99 .LP
100 The \fBldi_ident_release()\fR function releases an identifier that was
101 allocated by one of the \fBldi_ident_from_*()\fR functions.
102 .SH RETURN VALUES
105 The \fBldi_ident_from_dev()\fR, \fBldi_ident_from_dip()\fR, and
106 \fBldi_ident_from_stream()\fR functions return \fB0\fR upon success.
109 All of these functions return \fBEINVAL\fR for invalid input parameters.
110 .SH CONTEXT
113 These functions can be called from user or kernel context.