summary refs log tree commit diff
path: root/bin/usb2sys
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-02-10 12:32:48 +0100
committerRobert Günzler <r@gnzler.io>2026-02-10 12:41:25 +0100
commit63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch)
tree41cd5d2d1ec36e74e464caab722cc9b460153f04 /bin/usb2sys
parent5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff)
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/usb2sys')
-rwxr-xr-xbin/usb2sys36
1 files changed, 0 insertions, 36 deletions
diff --git a/bin/usb2sys b/bin/usb2sys
deleted file mode 100755
index d810431..0000000
--- a/bin/usb2sys
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# usb2sys - find lsusb device in /sys file system
-#
-# https://superuser.com/a/1253083
-#
-
-die()
-{
-    echo "$@"
-    exit 1
-}
-
-[[ $# -lt 1 ]] && die "need vendor and product ids (from lsusb) as dddd:dddd"
-
-vendor=${1%:*}
-product=${1##*:}
-
-sys=/sys/bus/usb/devices/
-cd $sys
-
-for d in *; do
-    path=$sys/$d
-    if [ -f $path/idProduct ]; then
-      prod=$( cat $path/idProduct )
-      vend=$( cat $path/idVendor )
-
-      if [ $prod = $product -a $vend = $vendor ]; then
-        echo prod = $prod
-        echo vend = $vend
-        echo /sys device is $path
-        cat $path/power/wakeup
-        echo ""
-      fi
-    fi
-done