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"
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
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);
23 \fBint\fR \fBdi_path_prop_lookup_int64s\fR(\fBdi_path_t\fR \fIpath\fR,
24 \fBconst char *\fR\fIprop_name\fR);
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);
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);
46 The handle to a path node in a \fBdi_init\fR(3DEVINFO).
55 The name of property for which to search.
64 For \fBdi_path_prop_lookup_bytes()\fR, the address to a pointer to an array of
65 unsigned characters containing the property data.
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.
70 For \fBdi_path_prop_lookup_ints()\fR, the address to a pointer to an array of
71 integers containing the property data.
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
81 These functions return the value of a known property name and type.
84 All memory allocated by these functions is managed by the library and must not
85 be freed by the caller.
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.
94 These functions will fail if:
101 One of the arguments is invalid.
110 The snapshot contains no property information.
119 The path property does not exist.
125 See \fBattributes\fR(5) for descriptions of the following attributes:
133 ATTRIBUTE TYPE ATTRIBUTE VALUE
135 Interface Stability Committed
143 \fBdi_init\fR(3DEVINFO), \fBlibdevinfo\fR(3LIB), \fBattributes\fR(5)
146 \fIWriting Device Drivers\fR