1picl_get_node_by_path(3PICL)PICL Library Functionspicl_get_node_by_path(3PICL)
2
3
4
6 picl_get_node_by_path - get handle of node specified by PICL tree path
7
9 cc [ flag... ] file... -lpicl [ library... ]
10 #include <picl.h>
11
12 int picl_get_node_by_path(const char *piclpath,
13 picl_nodehdl_t *nodeh);
14
15
17 The picl_get_node_by_path() function copies the handle of the node in
18 the PICL tree specified by the path given in piclpath into the location
19 nodeh.
20
21
22 The syntax of a PICL tree path is:
23
24 [<def_propname>:]/[<def_propval>[<match_cond>]... ]
25
26
27
28 where the <def_propname> prefix is a shorthand notation to specify the
29 name of the property whose value is specified in <def_propval>, and the
30 <match_cond> expression specifies the matching criteria for that node
31 in the form of one or more pairs of property names and values such as
32
33 [@<address>][?<prop_name>[=<prop_val>]... ]
34
35
36
37 where '@' is a shorthand notation to refer to the device address or a
38 FRU's location label and is followed by <address>, which gives the
39 device address or the location label.
40
41
42 For nodes under the /platform tree, the address value is matched with
43 the value of the property bus-addr, if it exists. If no bus-addr prop‐
44 erty exists, the address value is matched with the value of the prop‐
45 erty UnitAddress. To explicitly limit the comparison to bus-addr or
46 UnitAddress property, use the '?' notation described below.
47
48
49 For nodes under the /frutree tree, the <address> value is matched with
50 the value of the Label property.
51
52
53 The expression following '?' specifies matching property name and value
54 pairs, where <prop_name> specifies the property name and <prop_val>
55 specifies the property value for properties not of type
56 PICL_PTYPE_VOID. The values for properties of type PICL_PTYPE_TABLE,
57 PICL_PTYPE_BYTEARRAY, and PICL_PTYPE_REFERENCE cannot be specified in
58 the <match_cond> expression.
59
60
61 A _class property value of picl can be used to match nodes of any PICL
62 classes. The class picl is the base class of all the classes in PICL.
63
64
65 All valid paths must begin at the root node denoted by '/'.
66
67
68 If no prefix is specified for the path, the prefix defaults to the name
69 property.
70
72 Upon successful completion, 0 is returned. Otherwise a non-negative
73 integer is returned to indicate an error.
74
75
76 The value PICL_NOTNODE is returned if there is no node corresponding to
77 the specified path.
78
80 PICL_FAILURE General system failure
81
82
83 PICL_INVALIDARG Invalid argument
84
85
86 PICL_NOTNODE Not a node
87
88
90 See attributes(5) for descriptions of the following attributes:
91
92
93
94
95 ┌─────────────────────────────┬─────────────────────────────┐
96 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
97 ├─────────────────────────────┼─────────────────────────────┤
98 │Interface Stability │Evolving │
99 ├─────────────────────────────┼─────────────────────────────┤
100 │MT-Level │MT-Safe │
101 └─────────────────────────────┴─────────────────────────────┘
102
104 picl_get_propval_by_name(3PICL), attributes(5)
105
106
107
108SunOS 5.11 5 Feb 2004 picl_get_node_by_path(3PICL)