void-packages/srcpkgs/yaboot/patches/0007-wrong-path.patch

21 lines
747 B
Diff

Description: correct ofpath discovery on newer kernels
Author: Milan Kupcevic <milan@physics.harvard.edu>
Bug-Debian: http://bugs.debian.org/784387
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ybin/ofpath
+++ b/ybin/ofpath
@@ -220,7 +220,10 @@
IEEE1394_ID=`cat /sys/block/$DEVNODE/device/ieee1394_id 2>/dev/null`
IEEE1394_ID=${IEEE1394_ID%%:*}
- PLUG_ID=$(ls -dv $SYS_PATH/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ PLUG_ID=$(ls -dv $SYS_PATH/*/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ [ -z "$PLUG_ID" ] && {
+ PLUG_ID=$(ls -dv $SYS_PATH/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ }
PLUG_ID=$((${PLUG_ID%%:*}-1))
PART=${PARTITION:+:$PARTITION}