powerpc-utils/powerpc-utils-multieth.patch
2010-06-09 16:28:59 +00:00

27 lines
758 B
Diff

Index: powerpc-utils/scripts/ofpathname
===================================================================
--- powerpc-utils.orig/scripts/ofpathname 2010-05-05 08:57:48.000000000 -0500
+++ powerpc-utils/scripts/ofpathname 2010-05-18 08:15:43.000000000 -0500
@@ -386,14 +386,15 @@
#
l2of_ethernet()
{
- local sysfs_eth=`$FIND /sys -name $DEVICE 2> /dev/null`
- if [[ -z $sysfs_eth ]]; then
- err $ERR_NOT_CONFIG
- fi
+ for syspath in `$FIND /sys -name $DEVICE 2> /dev/null`; do
+ if [[ -e $syspath/device/devspec ]]; then
+ OF_PATH=`$CAT $syspath/device/devspec`
+ break
+ fi
+ done
- OF_PATH=`$CAT $sysfs_eth/device/devspec`
if [[ -z $OF_PATH ]]; then
- err $ERR_NO_OFPATH
+ err $ERR_NO_OFPATH
fi
}