NAME

Solaris::DeviceTree::Filesystem::MinorNode - Minor node of the Solaris device filetree

SYNOPSIS

use Solaris::DeviceTree::Filesystem;
$tree = new Solaris::DeviceTree::Filesystem;
@disks = $tree->find_nodes( type => 'disk' );
@minor = @disks->minor_nodes;

DESCRIPTION

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

METHODS

The following methods are available:

$minor = new Solaris::DeviceTree::Libdevinfo::MinorNode($filepath, $devtree_node);

The constructor takes a string holding the absolute path to the device file and a backreference to the Solaris::DeviceTree::Filesystem object which generates this instance.

$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;

Return 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

Return 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 the scalar values $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::DevinfoTree node. One DevinfoTree node can (and usually does) have multiple minor nodes.

$slice = $minor->slice;

Returns the slice number associated with this minor node.

EXPORTS

$S_IFCHR
$S_IFBLK

AUTHOR

Copyright 1999-2003 Dagobert Michelsen.

SEE ALSO

L<Solaris::DeviceTree::Filesystem>