PICL Library Functions picl_get_node_by_path(3PICL)
NAME
picl_get_node_by_path - get handle of node specified by PICL
tree pathSYNOPSIS
cc [ flag... ] file... -lpicl [ library... ]
#include
int picl_get_node_by_path(const char *piclpath,
picl_nodehdl_t *nodeh);
DESCRIPTION
The picl_get_node_by_path() function copies the handle of
the node in the PICL tree specified by the path given in piclpath into the location nodeh. The syntax of a PICL tree path is:[
:]/[ [ ]... ] where the
specify the name of the property whose value is specified inprefix is a shorthand notation to matching criteria for that node in the form of one or more pairs of property names and values such as
, and the expression specifies the [@
][?[= ]... ] where '@' is a shorthand notation to refer to the device address or a FRU's location label and is followed by , which gives the device address or the location label. For nodes under the /platform tree, the address value is matched with the value of the property bus-addr, if it
exists. If no bus-addr property exists, the address value is
matched with the value of the property UnitAddress. Toexplicitly limit the comparison to bus-addr or UnitAddress
property, use the '?' notation described below. For nodes under the /frutree tree, the value is matched with the value of the Label property.SunOS 5.11 Last change: 5 Feb 2004 1
PICL Library Functions picl_get_node_by_path(3PICL)
The expression following '?' specifies matching propertyname and value pairs, where
specifies the pro- perty name and
specifies the property value for properties not of type PICL_PTYPE_VOID. The values for pro-
perties of type PICL_PTYPE_TABLE, PICL_PTYPE_BYTEARRAY, and
PICL_PTYPE_REFERENCE cannot be specified in the
expression.A _class property value of picl can be used to match nodes
of any PICL classes. The class picl is the base class of all the classes in PICL. All valid paths must begin at the root node denoted by '/'. If no prefix is specified for the path, the prefix defaults to the name property.RETURN VALUES
Upon successful completion, 0 is returned. Otherwise a non-
negative integer is returned to indicate an error.The value PICL_NOTNODE is returned if there is no node
corresponding to the specified path.ERRORS
PICL_FAILURE General system failure
PICL_INVALIDARG Invalid argument
PICL_NOTNODE Not a node
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 5 Feb 2004 2
PICL Library Functions picl_get_node_by_path(3PICL)
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
picl_get_propval_by_name(3PICL), attributes(5)
SunOS 5.11 Last change: 5 Feb 2004 3