summaryrefslogtreecommitdiff
path: root/test-cli/test/scripts/usb.sh
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-03-09 19:16:08 +0100
committerHector Fernandez <hector@iatec.biz>2020-03-09 19:16:08 +0100
commitd38c92bfd7b6abe3a52b51b87b1a2949b857d9b4 (patch)
treec1ee6a472e8acb779f016471e11e32ed64fc4355 /test-cli/test/scripts/usb.sh
parentc685367cbd6abf1c6ae442df759e39b25a907d3b (diff)
downloadboard-d38c92bfd7b6abe3a52b51b87b1a2949b857d9b4.zip
board-d38c92bfd7b6abe3a52b51b87b1a2949b857d9b4.tar.gz
board-d38c92bfd7b6abe3a52b51b87b1a2949b857d9b4.tar.bz2
Created function to flash the eeprom memory.
Diffstat (limited to 'test-cli/test/scripts/usb.sh')
-rwxr-xr-xtest-cli/test/scripts/usb.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test-cli/test/scripts/usb.sh b/test-cli/test/scripts/usb.sh
new file mode 100755
index 0000000..52ea4b2
--- /dev/null
+++ b/test-cli/test/scripts/usb.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
+ (
+ syspath="${sysdevpath%/dev}"
+ devname="$(udevadm info -q name -p $syspath)"
+ [[ "$devname" == "bus/"* ]] && continue
+ eval "$(udevadm info -q property --export -p $syspath)"
+ [[ -z "$ID_SERIAL" ]] && continue
+ echo "/dev/$devname - $ID_SERIAL"
+ )
+done
+
+exit 0