Solaris::DeviceTree::Filesystem::MinorNode - Minor node of the Solaris device filetree
Construction:
use Solaris::DeviceTree::Filesystem; $tree = Solaris::DeviceTree::Filesystem->new; @disks = $tree->find_nodes( type => 'disk' ); @minor = $disk[0]->minor_nodes;
Data access methods:
$name = $minor->name; $devfs_path = $minor->devfs_path; ($major_num,$minor_num) = $minor->devt; if( !defined $minor->nodetype ) { print "I knew that!"; } $spectype = $minor->spectype if( $minor->is_raw_device ) { ... } if( $minor->is_block_device ) { ... } $treenode = $minor->node; $slice = $minor->slice;
This class implements a minor node for a device file in the Solaris filesystem devicetree.
This is an internal class to Solaris::DeviceTree::Filesystem. There should be no need to generate instances of this class in an application explicitly. Instances are generated only from Solaris::DeviceTree::Filesystem::minor_nodes.
The following methods are available:
This method returns 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'.
Return the complete physical path including the minor node
Return the major and minor device number as a pair for the node. The major numbers should be the same for all minor nodes returned by a Solaris::DeviceTree::Libdevinfo node.
Return the nodetype of the minor node. Because we can't find that out by looking at the filesystem we always return undef.
undef
Returns the type of the minor node. The return values $S_IFCHR for a raw device $S_IFBLK for a block device are possible. Both scalars are exported by default.
Returns true if the minor node is a raw device.
Returns true if the minor node is a block device.
Returns the associated Solaris::DevinfoTree::Filesystem node. A treenode can (and usually does) have multiple minor nodes.
Returns the slice number associated with this minor node.
$S_IFCHR $S_IFBLK
Copyright 1999-2003 Dagobert Michelsen.
L<Solaris::DeviceTree::Filesystem>
To install Solaris::DeviceTree::Libdevinfo::Impl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solaris::DeviceTree::Libdevinfo::Impl
CPAN shell
perl -MCPAN -e shell install Solaris::DeviceTree::Libdevinfo::Impl
For more information on module installation, please visit the detailed CPAN module installation guide.