NAME
Solaris::DeviceTree::MinorNode - Generic minor node of the devicetree
SYNOPSIS
use Solaris::DeviceTree;
$tree = new Solaris::DeviceTree( uses => qw( libdevinfo filesystem ) );
@disks = $tree->find_nodes( type => 'disk' );
@minor = @disks->minor_nodes;
DESCRIPTION
This class implements generic minor nodes which are generated from Solaris::DeviceTree
. The data from all configured data sources containing minor nodes are unified through this class. This is an internal class to Solaris::DeviceTree
. There should be no need to generate instances of this class in an application explicitly. Instances are generated only from Solaris::DeviceTree::minor_nodes()
.
METHODS
The following methods are available:
$name = $minor->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'.
$path = $minor->devfs_path;
Return the complete physical path including the minor node
($majnum,$minnum) = $minor->devt;
Returns the major and minor device number as a pair for the node. The major numbers should be the same for all minor nodes return by a Solaris::DeviceTree::Libdevinfo node.
$type = $minor->nodetype
Returns the nodetype of the minor node. Because we can't find that out by looking at the filesystem we always return 'undef'.
$spectype = $minor->spectype
Returns the type of the minor node. Returns $S_IFCHR for a raw device $S_IFBLK for a block device Both scalars are exported by default.
if( $minor->is_raw_device ) { ... }
Returns true if the minor node is a raw device
if( $minor->is_block_device ) { ... }
Returns true if the minor node is a block device
$node = $minor->node;
Returns the associated Solaris::DeviceTree
node. One DeviceTree
node can (and usually does) have multiple minor nodes.
$slice = $minor->slice;
Returns the slice number associated with this minor node if it represents a block device.
EXAMPLES
AUTHOR
Copyright 1999-2003 Dagobert Michelsen.
SEE ALSO
L<Solaris::DeviceTree::Filesystem>