Hi! The following three patches are required to get ofpathname to return proper OF paths on Apple Power Macs.
The first patch adds adding the partition number to the end of the OpenFirmware path when the logical device node points to a partition instead of the whole disk. The second patch adds support for differentiating between multiple plugs of a SATA host. This is necessary for differentiating multiple SATA drives on the Power Mac G5, for example. And the third patch omits the strings "disk" and "scsi" when printing OpenFirmware paths on a Power Mac. With these changes applied, ofpathname returns the same OF paths as Yaboot's ofpath script from the last Debian package which is known to produce OF pathnames understood by the OpenFirmware implemenation found on Power Macs. Thanks, Adrian