The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Solaris::DeviceTree::Libdevinfo::MinorNode - Minor node of the Solaris devicetree

SYNOPSIS

  use Solaris::DeviceTree::Libdevinfo;
  $tree = new Solaris::DeviceTree::Libdevinfo;
  @disks = $tree->find_nodes( type => 'disk' );
  @minor = @disks->minor_nodes;
  $name = $minor->name
  $path = $minor->devfs_path
  ($majnum,$minnum) = $minor->devt
  $type = $minor->nodetype
  $spectype = $minor->spectype
  if( $minor->is_raw_device ) { ... }
  if( $minor->is_block_device ) { ... }
  $treenode = $minor->node

DESCRIPTION

This class implements a minor node in the libdevinfo devicetree. This is an internal class to Solaris::DeviceTree::Libdevinfo. There should be no need to generate instances of this class in an application explicitly. Instances are generated only from Solaris::DeviceTree::Libdevinfo::minor_nodes().

METHODS

The following methods are available:

name

Return the name of the minor node. This is used e.g. as suffix of the device filename. For disks this is something like ':a' or ':a,raw'.

devfs_path

Return the complete physical path including the minor node

devt

Returns the major and minor device number as a list for the node. The major numbers should be the same for all minor nodes returned by a Solaris::DeviceTree::Libdevinfo node.

nodetype

Returns the nodetype of the minor node. Legal return values can be taken from <sys/sunddi.h>. With this call you can differentiate between pseudo nodes, displays and stuff.

spectype

Returns the type of the minor node. Returns raw for a raw device block for a block device

is_raw_device

Returns true if the minor node is a raw device.

is_block_device

Returns true if the minor node is a block device.

node

Returns the associated Solaris::DevinfoTree::Libdevinfo node. One treenode can (and usually does) have multiple minor nodes.

EXAMPLES

AUTHOR

Copyright 1999-2003 Dagobert Michelsen.

SEE ALSO

Solaris::DeviceTree::Libdevinfo, Solaris::DeviceTree::MinorNode.