projects
/
linux-usb-otg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7beba14
)
remove gadget device
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 28 Aug 2017 05:56:44 +0000
(07:56 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 28 Aug 2017 05:56:44 +0000
(07:56 +0200)
usb-hid-stop.sh
patch
|
blob
|
history
diff --git
a/usb-hid-stop.sh
b/usb-hid-stop.sh
index
ad27613
..
da1e989
100755
(executable)
--- a/
usb-hid-stop.sh
+++ b/
usb-hid-stop.sh
@@
-1,10
+1,15
@@
#!/bin/bash
cd /sys/kernel/config/usb_gadget/g1
#!/bin/bash
cd /sys/kernel/config/usb_gadget/g1
-echo "" > UDC
-rm configs/c.1/hid.usb0
-rmdir configs/c.1/strings/0x409
-rmdir configs/c.1
-rmdir strings/0x409
-rmdir functions/hid.usb0
+echo '' > UDC
+find configs -type l -exec rm -v {} \;
+#rmdir configs/c.1/strings/0x409
+find configs -name 'strings' -exec rmdir -v {}/0x409 \;
+#rmdir configs/c.1
+ls -d configs/* | xargs rmdir -v
+#rmdir strings/0x409
+ls -d strings/* | xargs rmdir -v
+#rmdir functions/hid.usb0
+ls -d functions/* | xargs rmdir -v
+
cd ..
cd ..
-rmdir g1
+rmdir
-v
g1