Add PowerMac G5 SATA support to ofpath
[yaboot.git] / ybin / ofpath
index 387bf900659cd9570d271f5eeff84285223fe904..6763dfd97e631aff2e8f2a73d1a5039a0e33a3ab 100755 (executable)
@@ -27,7 +27,7 @@
 
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
 PRG="${0##*/}"
-VERSION=1.0.4
+VERSION=1.0.5-UNRELEASED_UNSUPPORTED
 DEBUG=0
 export LC_COLLATE=C
 
@@ -286,6 +286,12 @@ scsi_ofpath()
            DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
            echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
            ;;
+       ata_k2)
+           HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
+                       lgrep "$i" "k2-s-ata" ; done)"
+           DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+           echo "${DEVICE_PATH##*device-tree}/k2-sata@$DEVICE_ID/disk@0:$PARTITION"
+           ;;
        *)
            echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
            return 1