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.
/etc/path_to_inst
A line in the path_to_inst looks like this:
path_to_inst
"<devfs_path>" <instance> "<driver_name>"
The devfs_path is build out of the components
devfs_path
<node_name>@<bus_addr>/<node_name>@<bus_addr>/...
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.
filename
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.
undef
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.
Solaris::DeviceTree, Solaris::DeviceTree::Node, path_to_inst(4).
To install Solaris::DeviceTree::Libdevinfo::Impl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solaris::DeviceTree::Libdevinfo::Impl
CPAN shell
perl -MCPAN -e shell install Solaris::DeviceTree::Libdevinfo::Impl
For more information on module installation, please visit the detailed CPAN module installation guide.