The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Solaris::DeviceTree::OBP - Utility functions for OBP access

SYNOPSIS

Value access:

  $tree = Solaris::DeviceTree::Libdevinfo->new;

  $aliases = obp_aliases($tree);
  my $disk = $aliases->{'disk'};
  $chosen_boot_device = obp_chosen_boot_device($tree);
  @boot_devices = obp_boot_devices($tree);
  @diag_devices = obp_diag_devices($tree);

Path transformation:

  $resolved_path = obp_resolve_path( aliases => $aliases, path => "disk:c" );

DESCRIPTION

The Solaris::DeviceTree::OBP module implements functions for manipulating OBP pathes according to IEEE 1275. For most of the functions you need to specify a devicetree containing PROM property nodes, which are most likely to find in an Solaris::DeviceTree::Libdevinfo tree.

EXPORT

The following functions are exported on demand:

obp_resolve_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.

aliases

This method returns a reference to a hash which maps all aliases to their corresponding values.

obp_chosen_boot_device

This method returns the device from which the system has most recently booted.

obp_boot_devices

This method returns a list with all boot devices entered in the OBP.

obp_diag_devices

This method returns a list with all diag devices entered in the OBP.

The following export tags are defined:

boot
  L</obp_chosen_boot_device>, L</obp_boot_devices>, L</obp_diag_devices>.
alias
  L</obp_aliases>.
path
  L</obp_resolve_path>.

EXAMPLES

In the following example the resolved physical pathname of the device last booted from is printed:

  use Solaris::DeviceTree::OBP;
  use Solaris::DeviceTree::Libdevinfo;
  my $tree = Solaris::DeviceTree::Libdevinfo->new;
  $bootpath = $tree->find_prop( devfs_path => "/chosen", prom_prop_name => "bootpath" );
  $resolved_path = obp_resolve_path( aliases => $tree->aliases, path => $bootpath->string );
  print "Last boot from $resolved_path\n";

AUTHOR

Dagobert Michelsen, <dam@baltic-online.de>

SEE ALSO

Open Firmware Homepage http://playground.sun.com/1275/home.html, eeprom(1m).

1 POD Error

The following errors were encountered while parsing the POD:

Around line 236:

=back doesn't take any parameters, but you said =back 4