[oe-commits] : slugos-init: leds: Apply patch for varying input event number ( from Gordon Farquharson)

OE GIT Trial gittrial at amethyst.openembedded.net
Sun Sep 21 09:00:04 UTC 2008


Module: OE.dev
Branch: master
Commit: 94b3ca2442676b26bbc649745ac1031fec10e929
URL:    http://gitweb.openembedded.net//OE.dev.git/?a=commit;h=94b3ca2442676b26bbc649745ac1031fec10e929

Author:  <rwhitby at nslu2-linux.org>
Date:   Sun Sep 21 08:41:43 2008 +0000

slugos-init: leds: Apply patch for varying input event number (from Gordon Farquharson)

---

 packages/slugos-init/files/leds |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/packages/slugos-init/files/leds b/packages/slugos-init/files/leds
index 7a51a24..c5ce299 100644
--- a/packages/slugos-init/files/leds
+++ b/packages/slugos-init/files/leds
@@ -180,12 +180,22 @@ sysled(){
 #  does nothing if there is no beep executable, is very
 #  quiet in the presence of errors
 beep(){
-	local arg
+	local arg devices module
 	arg=
 	test "$1" = beep && shift
 	if test -x /bin/beep
 	then
-		test -c /dev/buzzer && arg="-e /dev/buzzer"
+		devices=`ls -d /sys/class/input/event*`
+		for device in $devices
+		do
+			module=`egrep PHYSDEVDRIVER $device'/uevent' | cut -d '=' -f 2`
+			if test "$module" = "ixp4xx-beeper";
+			then
+				devnode=`echo "$device" | cut -d '/' -f 5`
+				arg="-e /dev/input/"$devnode
+				break
+			fi
+		done
 		/bin/beep $arg "$@" 2>/dev/null
 	fi
 	return 0





More information about the Openembedded-commits mailing list