getconf: don't include xpg4 bits, gcc7 includes xpg6 bits for us
[unleashed.git] / share / man / man3devinfo / di_path_prop_lookup_bytes.3devinfo
blob1b102b2e6f52b8a0a4f07dda1217cfee8d1e750b
1 '\" te
2 .\" Copyright (c) 2008, 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_PATH_PROP_LOOKUP_BYTES 3DEVINFO "May 15, 2008"
7 .SH NAME
8 di_path_prop_lookup_bytes, di_path_prop_lookup_int64s,
9 di_path_prop_lookup_ints, di_path_prop_lookup_strings \- search for a path
10 property
11 .SH SYNOPSIS
12 .LP
13 .nf
14 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldevinfo\fR [ \fIlibrary\fR... ]
15 #include <libdevinfo.h>
17 \fBint\fR \fBdi_path_prop_lookup_bytes\fR(\fBdi_path_t\fR \fIpath\fR,
18      \fBconst char *\fR\fIprop_name\fR);
19 .fi
21 .LP
22 .nf
23 \fBint\fR \fBdi_path_prop_lookup_int64s\fR(\fBdi_path_t\fR \fIpath\fR,
24      \fBconst char *\fR\fIprop_name\fR);
25 .fi
27 .LP
28 .nf
29 \fBint\fR \fBdi_path_prop_lookup_ints\fR(\fBdi_path_t\fR \fIpath\fR,
30      \fBconst char *\fR\fIprop_name\fR, \fBchar **\fR\fIprop_data\fR);
31 .fi
33 .LP
34 .nf
35 \fBint\fR \fBdi_path_prop_lookup_strings\fR(\fBdi_path_t\fR \fIpath\fR,
36      \fBconst char *\fR\fIprop_name\fR, \fBchar **\fR\fIprop_data\fR);
37 .fi
39 .SH PARAMETERS
40 .sp
41 .ne 2
42 .na
43 \fB\fIpath\fR\fR
44 .ad
45 .RS 13n
46 The handle to a path node in a \fBdi_init\fR(3DEVINFO).
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fIprop_name\fR\fR
53 .ad
54 .RS 13n
55 The name of property for which to search.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fIprop_data\fR\fR
62 .ad
63 .RS 13n
64 For \fBdi_path_prop_lookup_bytes()\fR, the address to a pointer to an array of
65 unsigned characters containing the property data.
66 .sp
67 For \fBdi_path_prop_lookup_int64()\fR, the address to a pointer to an array of
68 64-bit integers containing the property data.
69 .sp
70 For \fBdi_path_prop_lookup_ints()\fR, the address to a pointer to an array of
71 integers containing the property data.
72 .sp
73 For \fBdi_path_prop_lookup_strings()\fR, the address to a pointer to a buffer
74 containing a concatenation of null-terminated strings containing the property
75 data.
76 .RE
78 .SH DESCRIPTION
79 .sp
80 .LP
81 These functions return the value of a known property name and type.
82 .sp
83 .LP
84 All memory allocated by these functions is managed by the library and must not
85 be freed by the caller.
86 .SH RETURN VALUES
87 .sp
88 .LP
89 If the property is found, the number of entries in \fIprop_data\fR is returned.
90 Otherwise, -1 is returned and \fBerrno\fR is set to indicate the error.
91 .SH ERRORS
92 .sp
93 .LP
94 These functions will fail if:
95 .sp
96 .ne 2
97 .na
98 \fB\fBEINVAL\fR\fR
99 .ad
100 .RS 11n
101 One of the arguments is invalid.
105 .ne 2
107 \fB\fBENOTSUP\fR\fR
109 .RS 11n
110 The snapshot contains no property information.
114 .ne 2
116 \fB\fBENXIO\fR\fR
118 .RS 11n
119 The path property does not exist.
122 .SH ATTRIBUTES
125 See \fBattributes\fR(5)  for descriptions of the following attributes:
130 box;
131 c | c
132 l | l .
133 ATTRIBUTE TYPE  ATTRIBUTE VALUE
135 Interface Stability     Committed
137 MT-Level        Safe
140 .SH SEE ALSO
143 \fBdi_init\fR(3DEVINFO), \fBlibdevinfo\fR(3LIB), \fBattributes\fR(5)
146 \fIWriting Device Drivers\fR