nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3picl / picl_get_node_by_path.3picl
bloba9e762d61f613ffbde374311040ba441af73b4f1
1 '\" te
2 .\" Copyright (c) 2004, 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 PICL_GET_NODE_BY_PATH 3PICL "Feb 5, 2004"
7 .SH NAME
8 picl_get_node_by_path \- get handle of node specified by PICL tree path
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpicl\fR [ \fIlibrary\fR\&.\|.\|. ]
13 #include <picl.h>
15 \fBint\fR \fBpicl_get_node_by_path\fR(\fBconst char *\fR\fIpiclpath\fR,
16      \fBpicl_nodehdl_t *\fR\fInodeh\fR);
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The \fBpicl_get_node_by_path()\fR function copies the handle of the node in the
23 PICL tree specified by the path given in \fIpiclpath\fR into the location
24 \fInodeh\fR.
25 .sp
26 .LP
27 The syntax of a PICL tree path is:
28 .sp
29 .in +2
30 .nf
31 [<def_\fIpropname\fR>:]/[<\fIdef_propval\fR>[<\fImatch_cond\fR>]... ]
32 .fi
33 .in -2
35 .sp
36 .LP
37 where the <\fIdef_propname\fR> prefix is a shorthand notation to specify the
38 name of the property whose value is specified in <\fIdef_propval\fR>, and the
39 <\fImatch_cond\fR> expression specifies the matching criteria for that node in
40 the form of one or more pairs of property names and values such as
41 .sp
42 .in +2
43 .nf
44 [@<address>][?<prop_name>[=<prop_val>]... ]
45 .fi
46 .in -2
48 .sp
49 .LP
50 where '@' is a shorthand notation to refer to the device address or a FRU's
51 location label and is followed by <\fIaddress\fR>, which gives the device
52 address or the location label.
53 .sp
54 .LP
55 For nodes under the \fB/platform\fR tree, the address value is matched with the
56 value of the property \fBbus-addr\fR, if it exists. If no \fBbus-addr\fR
57 property exists, the address value is matched with the value of the property
58 \fBUnitAddress\fR. To explicitly limit the comparison to \fBbus-addr\fR or
59 \fBUnitAddress\fR property, use the '?' notation described below.
60 .sp
61 .LP
62 For nodes under the \fB/frutree\fR tree, the <\fIaddress\fR> value is matched
63 with the value of the \fBLabel\fR property.
64 .sp
65 .LP
66 The expression following '?' specifies matching property name and value pairs,
67 where <\fIprop_name\fR> specifies the property name and <\fIprop_val\fR>
68 specifies the property value for properties not of type \fBPICL_PTYPE_VOID\fR.
69 The values for properties of type \fBPICL_PTYPE_TABLE\fR,
70 \fBPICL_PTYPE_BYTEARRAY\fR, and \fBPICL_PTYPE_REFERENCE\fR cannot be specified
71 in the <\fImatch_cond\fR> expression.
72 .sp
73 .LP
74 A \fB_class\fR property value of \fBpicl\fR can be used to match nodes of any
75 \fBPICL\fR classes. The class \fBpicl\fR is the base class of all the classes
76 in \fBPICL\fR.
77 .sp
78 .LP
79 All valid paths must begin at the root node denoted by '/'.
80 .sp
81 .LP
82 If no prefix is specified for the path, the prefix defaults to the \fBname\fR
83 property.
84 .SH RETURN VALUES
85 .sp
86 .LP
87 Upon successful completion, 0 is returned. Otherwise a non-negative integer is
88 returned to indicate an error.
89 .sp
90 .LP
91 The value \fBPICL_NOTNODE\fR is returned if there is no node corresponding to
92 the specified path.
93 .SH ERRORS
94 .sp
95 .ne 2
96 .na
97 \fB\fBPICL_FAILURE\fR\fR
98 .ad
99 .RS 19n
100 General system failure
104 .ne 2
106 \fB\fBPICL_INVALIDARG\fR\fR
108 .RS 19n
109 Invalid argument
113 .ne 2
115 \fB\fBPICL_NOTNODE\fR\fR
117 .RS 19n
118 Not a node
121 .SH ATTRIBUTES
124 See \fBattributes\fR(5) for descriptions of the following attributes:
129 box;
130 c | c
131 l | l .
132 ATTRIBUTE TYPE  ATTRIBUTE VALUE
134 Interface Stability     Evolving
136 MT-Level        MT-Safe
139 .SH SEE ALSO
142 \fBpicl_get_propval_by_name\fR(3PICL), \fBattributes\fR(5)