Dagobert Michelsen


Solaris::DeviceTree::Filesystem - Perl interface to /dev and /devices


  use Solaris::DeviceTree::Filesystem;
  $tree = Solaris::DeviceTree::Filesystem->new;
  @children = $node->child_nodes;
  $devfs_path = $node->devfs_path;
  $node_name = $node->node_name;
  $bus_addr = $node->bus_addr;
  @minor_nodes = @{$node->minor_nodes}
  $instance = $node->instance;


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 name of a special file in the devicetree always has the form


The bus address and the device arguments are optional.


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:


This method contructs a new filesystem tree.


This methods returns the child nodes below this node.


This method returns the physical path for this node.


This method returns the name of the node. It is undefined for the root node and guaranteed to be defined for all other nodes.


This method return the bus address of the node. The bus address may be undefined.


This method returns a reference to a list of the minor nodes associated with this node. For a detailed description of the methods available to access the returned minor nodes see Solaris::DeviceTree::Filesystem::MinorNode.


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. If the mapping of minor numbers to instances is not known in this method undef is returned. Currently undef is returned for all minor numbers for all drivers.


Copyright 1999-2003 Dagobert Michelsen.


  L<Solaris::DeviceTree>, L<Solaris::DeviceTree::Filesystem::MinorNode>