NAME
Solaris::DeviceTree::Filesystem - Perl interface to /devices
SYNOPSIS
use Solaris::DeviceTree::Filesystem;
$node = new Solaris::DeviceTree::Filesystem;
@children = $node->child_nodes;
DESCRIPTION
The Solaris::DeviceTree::Filesystem
module implements access to the Solaris device configuration files below /devices
via a hierarchical tree structure. The API of this class contains all methods from Solaris::DeviceTree::Node
applicable to this context.
Additionally, the information from /dev/cfg
, /dev/dsk
, /dev/rdsk
and /dev/rmt
is used to identify controller numbers and recognize disk- and tape-devices for instance calculation.
Each directory represents a node in the devicetree, each block or character special file an associated minor node. Other types of files are not allowed below /devices
. A node in the devicetree always has the form
<node_name>@<bus_addr>:<device_arguments>
The bus address and the device arguments are optional.
METHODS
For a detailed description of the available methods and their meaning see the documentation of the base class Solaris::DeviceTree::Node.
The following methods returns values other than the defaults from the base class:
$node = new Solaris::DeviceTree::Filesystem;
This method contructs a new filesystem tree.
my $devfs_path = $node->devfs_path
This method returns the physical path for this node.
my $node_name = $node->node_name
This method returns the name of the node. It is undefined for the root node and defined for all other nodes.
my $bus_addr = $node->bus_addr
This method return the bus address of the node. The bus address can be undefined.
my @minor_nodes = @{$node->minor_nodes}
This method returns a reference to a list of all minor nodes associated with this node. For a detailed description for the return minor nodes see Solaris::DeviceTree::Filesystem::MinorNode.
my $instance = $node->instance
This method returns the instance number of the driver for this node. The instance number is calculated from the minor numbers of the minor nodes for the used driver. The type of the calculation depends on the implementation of the driver and is therefore specific to the driver.
EXAMPLES
AUTHOR
Copyright 1999-2003 Dagobert Michelsen.
SEE ALSO
L<Solaris::DeviceTree>