All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] busybox_1.18.2.bb: slugos needs a modified version of usb.sh script
@ 2011-01-21  8:29 Khem Raj
  2011-01-21  8:58 ` Eric Bénard
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2011-01-21  8:29 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes/busybox/busybox-1.18.2/slugos/usb.sh |   33 ++++++++++++++++++++++++++
 recipes/busybox/busybox_1.18.2.bb            |    2 +-
 2 files changed, 34 insertions(+), 1 deletions(-)
 create mode 100644 recipes/busybox/busybox-1.18.2/slugos/usb.sh

diff --git a/recipes/busybox/busybox-1.18.2/slugos/usb.sh b/recipes/busybox/busybox-1.18.2/slugos/usb.sh
new file mode 100644
index 0000000..172fdc6
--- /dev/null
+++ b/recipes/busybox/busybox-1.18.2/slugos/usb.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+case "$ACTION" in
+  add|"")
+    for uevent in /sys/class/usb_endpoint/usbdev?.*/*/uevent; do
+      . $uevent
+      if [ ! -e /dev/bus/usb/$BUSNUM/$DEVNUM ]; then
+        mkdir -p /dev/bus/usb/$BUSNUM
+        mknod /dev/bus/usb/$BUSNUM/$DEVNUM c 189 $MINOR
+      fi
+    done
+    ;;
+  remove)
+    for device in /dev/bus/usb/*/*; do
+      REMOVED=1
+      dev=`basename $device`
+      bus=`basename $(dirname $device)`
+      for uevent in /sys/class/usb_endpoint/usbdev?.*/*/uevent; do
+        . $uevent
+        if [ $dev -eq $DEVNUM ] && [ $bus -eq $BUSNUM ]; then
+          REMOVED=0
+          break;
+        fi
+      done
+      if [ $REMOVED -eq 1 ]; then
+        rm /dev/bus/usb/$bus/$dev
+        if [ -z $(ls /dev/bus/usb/$bus/) ]; then
+          rmdir /dev/bus/usb/$bus/
+        fi
+      fi
+    done
+    ;;
+esac
diff --git a/recipes/busybox/busybox_1.18.2.bb b/recipes/busybox/busybox_1.18.2.bb
index e6d17d3..7c47ab4 100644
--- a/recipes/busybox/busybox_1.18.2.bb
+++ b/recipes/busybox/busybox_1.18.2.bb
@@ -1,5 +1,5 @@
 require busybox_1.1x.inc
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 
 SRC_URI += " \
 	http://busybox.net/downloads/fixes-1.18.2/busybox-1.18.2-modprobe-small.patch;name=patch01 \
-- 
1.7.2.3




^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-01-30 23:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-21  8:29 [PATCH 3/3] busybox_1.18.2.bb: slugos needs a modified version of usb.sh script Khem Raj
2011-01-21  8:58 ` Eric Bénard
2011-01-21 16:33   ` Khem Raj
2011-01-21 16:44     ` Eric Bénard
2011-01-21 18:07       ` Khem Raj
2011-01-22  1:25     ` Mike Westerhof
2011-01-23 18:27       ` Khem Raj
2011-01-23 22:57         ` Tom Rini
2011-01-30 23:18           ` Mike Westerhof
2011-01-24  9:03         ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.