Solaris::DeviceTree::OBP - Manipulation of OBP pathes
use Solaris::DeviceTree::OBP( :DEFAULT ); my $tree = new Solaris::DeviceTree; $bootpath = $tree->find_prop( devfs_path => '/chosen', prom_prop_name => 'bootpath' ); $resolved_path = resolve_path( aliases => $tree->aliases, $bootpath->data( type => 'string' ) );
The Solaris::DeviceTree::OBP module implements functions for manipulating OBP pathes according to "IEEE 1275".
Solaris::DeviceTree::OBP
The following functions are exported on demand:
$resolved_path = resolve_path( aliases => $aliases, path => "/path" );
This functions transforms the specified path in an alias-free path using the path resolution procedure described in 1275.pdf - 4.3.1 Path resolution procedure according to the specified reference to an alias mapping.
1275.pdf - 4.3.1 Path resolution procedure
In the following example the resolved physical pathname of the device last booted from is printed:
use Solaris::DeviceTree::OBP( :DEFAULT ); my $tree = new Solaris::DeviceTree; $bootpath = $tree->find_prop( devfs_path => '/chosen', prom_prop_name => 'bootpath' ); $resolved_path = resolve_path( aliases => $tree->aliases, $bootpath->data( type => 'string' ) ); print "Last boot from $resolved_path\n";
Dagobert Michelsen, <dam@baltic-online.de>
http://playground.sun.com/1275/home.html
4 POD Errors
The following errors were encountered while parsing the POD:
You can't have =items (as at line 83) unless the first thing after the =over is an =item
You forgot a '=back' before '=head1'
=over without closing =back
=cut found outside a pod block. Skipping to next block.
To install Solaris::DeviceTree, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solaris::DeviceTree
CPAN shell
perl -MCPAN -e shell install Solaris::DeviceTree
For more information on module installation, please visit the detailed CPAN module installation guide.