Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Solaris::DeviceTree::Filesystem
Perl interface to C</dev> and C</devices>

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



NAME

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


SYNOPSIS


  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;


DESCRIPTION

The the Solaris::DeviceTree::Filesystem manpage 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 the Solaris::DeviceTree::Node manpage 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


  <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 the Solaris::DeviceTree::Node manpage.

The following methods returns values other than the defaults from the base class:

new

This method contructs a new filesystem tree.

child_nodes

This methods returns the child nodes below this node.

devfs_path

This method returns the physical path for this node.

node_name

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

bus_addr

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

minor_nodes

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 the Solaris::DeviceTree::Filesystem::MinorNode manpage.

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. 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.


AUTHOR

Copyright 1999-2003 Dagobert Michelsen.


SEE ALSO


  L<Solaris::DeviceTree>, L<Solaris::DeviceTree::Filesystem::MinorNode>
Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy