Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man3devinfo / di_prom_prop_data.3devinfo
blob78f793a0080bbe190f8bfe3683ff5eeda23920a5
1 '\" te
2 .\" Copyright (c) 1998, 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.
4 .\" 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.
5 .\" 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]
6 .TH DI_PROM_PROP_DATA 3DEVINFO "Dec 1, 1998"
7 .SH NAME
8 di_prom_prop_data, di_prom_prop_next, di_prom_prop_name \- access PROM device
9 information
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldevinfo\fR [ \fIlibrary\fR... ]
14 #include <libdevinfo.h>
16 \fBdi_prom_prop_t\fR \fBdi_prom_prop_next\fR(\fBdi_prom_handle_t\fR \fIph\fR, \fBdi_node_t\fR \fInode\fR,
17      \fBdi_prom_prop_t\fR \fIprom_prop\fR);
18 .fi
20 .LP
21 .nf
22 \fBchar *\fR\fBdi_prom_prop_name\fR(\fBdi_prom_prop_t\fR \fIprom_prop\fR);
23 .fi
25 .LP
26 .nf
27 \fBint\fR \fBdi_prom_prop_data\fR(\fBdi_prom_prop_t\fR \fIprom_prop\fR, \fBuchar_t **\fR\fIprop_data\fR);
28 .fi
30 .SH PARAMETERS
31 .sp
32 .ne 2
33 .na
34 \fB\fInode\fR\fR
35 .ad
36 .RS 13n
37 Handle to a device node in the snapshot of kernel device tree.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fIph\fR\fR
44 .ad
45 .RS 13n
46 \fBPROM\fR handle
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fIprom_prop\fR\fR
53 .ad
54 .RS 13n
55 Handle to a \fBPROM\fR property.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fIprop_data\fR\fR
62 .ad
63 .RS 13n
64 Address of a pointer.
65 .RE
67 .SH DESCRIPTION
68 .sp
69 .LP
70 The \fBdi_prom_prop_next()\fR function obtains a handle to the next property on
71 the \fBPROM\fR property list associated with \fInode\fR. If \fIprom_prop\fR is
72 \fBDI_PROM_PROP_NIL\fR, the first property associated with \fInode\fR is
73 returned.
74 .sp
75 .LP
76 The \fBdi_prom_prop_name()\fR function returns the name of the \fIprom_prop\fR
77 property.
78 .sp
79 .LP
80 The \fBdi_prom_prop_data()\fR function returns the value of the \fIprom_prop\fR
81 property. The return value is a non-negative integer specifying the size in
82 number of bytes in \fIprop_data\fR.
83 .sp
84 .LP
85 All memory allocated by these functions is managed by the library and must not
86 be freed by the caller.
87 .SH RETURN VALUES
88 .sp
89 .LP
90 The \fBdi_prom_prop_data()\fR function returns the number of bytes in
91 \fIprop_data\fR and \fIprop_data\fR is updated to point to a byte array
92 containing the property value. If  0 is returned, the property is a boolean
93 property and the existence of this property indicates the value is true.
94 .sp
95 .LP
96 The \fBdi_prom_prop_name()\fR function returns a pointer to a string that
97 contains the name of \fIprom_prop\fR.
98 .sp
99 .LP
100 The \fBdi_prom_prop_next()\fR function returns a handle to the next \fBPROM\fR
101 property. \fBDI_PROM_PROP_NIL\fR is returned if no additional properties exist.
102 .SH ERRORS
105 See \fBopenprom\fR(7D) for a description of possible errors.
106 .SH ATTRIBUTES
109 See \fBattributes\fR(5) for descriptions of the following attributes:
114 box;
115 c | c
116 l | l .
117 ATTRIBUTE TYPE  ATTRIBUTE VALUE
119 Interface Stability     Evolving
121 MT-Level        Safe
124 .SH SEE ALSO
127 \fBattributes\fR(5), \fBopenprom\fR(7D)
130 \fIWriting Device Drivers\fR