NAME
Solaris::DeviceTree::Filesystem::MinorNode - Minor node of the Solaris device filetree
SYNOPSIS
Construction:
$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 ) {
"I knew that!"
; }
$spectype
=
$minor
->spectype
if
(
$minor
->is_raw_device ) { ... }
if
(
$minor
->is_block_device ) { ... }
$treenode
=
$minor
->node;
$slice
=
$minor
->slice;
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:
name
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'.
devfs_path
Return the complete physical path including the minor node
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 returned by a Solaris::DeviceTree::Libdevinfo node.
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
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.
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::Filesystem node. A treenode can (and usually does) have multiple minor nodes.
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>