oops, Please refer to another direction function devfs_dev_to_prom_name(). http://src.opensolaris.org/source/s?refs=devfs_dev_to_prom_name&project=/onnv Thanks Dan's reminder :)
Javen Dan Mick wrote: > Jon was asking about the other direction. > > Javen Wu wrote: >> Please refer to libdevinfo. There is a call devfs_prom_to_dev_name() >> you can use to do translation between PROM name to devfs name. >> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdevinfo/devfsinfo.c#939 >> >> >> http://src.opensolaris.org/source/s?refs=devfs_prom_to_dev_name&project=/onnv >> >> >> The function is actually provided by openprom(7D) driver. Or you can >> use ioctl() of openprom driver directly: >> /usr/src/uts/common/io/openprom.c OPROMPROM2DEVNAME >> >> Thanks >> Javen >> >> >> >> Jon Aimone wrote: >>> Hi, >>> >>> For a SPARC system is there a simple way to determine the OBP device >>> path for a disk given its /devices path in Solaris? The leaf of the >>> path on a running system is different than the path listed in the OBP. >>> >>> For example, here is the boot-device of a system as seen from the >>> OBP and then from Solaris: >>> >>> /pci at 400/pci at 0/pci at 8/scsi at 0/disk at 1,0:a >>> /devices/pci at 400/pci at 0/pci at 8/scsi at 0/sd at 0,0:a >>> >>> I can understand simply removing /devices, but what about the "disk" >>> -vs- "sd" bit? I presume "sd" represented the driver. Can I always >>> remove the prefix of the last word up to the @ (e.g. sd or ssd) and >>> replace it with "disk"? >>> >>> The installer must do this somehow to set the boot device... >>> >>> _______________________________________________ >>> on-discuss mailing list >>> on-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/on-discuss >>> >> >> _______________________________________________ >> on-discuss mailing list >> on-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/on-discuss > > >