- SEE ALSO
Solaris::DeviceTree::PathToInst - Perl interface to /etc/path_to_inst
use Solaris::DeviceTree::PathToInst; $tree = new Solaris::DeviceTree::PathToInst; $tree = new Solaris::DeviceTree::PathToInst( filename => '/a/etc/path_to_inst' ); $root = $node->root_node; $path = $node->devfs_path; $nodename = $node->node_name; $busaddr = $node->bus_addr; $instance = $node->instance; $drivername = $node->driver_name;
This module implements the Solaris::DeviceTree::Node interface and allows access to the Solaris driver configuration file
/etc/path_to_inst via a hierarchical tree structure. The API of this class overwrites methods from the base class applicable to this context.
A line in the
path_to_inst looks like this:
"<devfs_path>" <instance> "<driver_name>"
devfs_path is build out of the components
and it is split at the
/ to build the node hierarchy.
The following methods are available:
The constructor takes an optional named option
filename to a location of a
path_to_inst file and returns a reference to the root node object. If no filename is given the file from the running system at
/etc/path_to_inst is used.
Returns the root node of the tree.
Returns the physical path assocatiated with this node.
Returns the name of the node. The value is derived from the "devfs_path" path. It is undefined for the root node and guaranteed to be defined for all other nodes.
Returns the driver name for the node.
Returns the address on the bus for this node.
undef is returned if a bus address has not been assigned to the device. A zero-length string may be returned and is considered a valid bus address.
Returns the instance number for this node of the bound driver.
undef is returned if no instance number has been assigned.
Copyright 1999-2003 Dagobert Michelsen.