Skip to content

Commit 0cabd7b

Browse files
committed
Fix SC2155 & SC2012
1 parent de66b5c commit 0cabd7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/radxa-otgutils

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ start()
7373
;;
7474
esac
7575

76-
local UDC=$(ls /sys/class/udc/ | head -1)
76+
local UDC=
77+
UDC="$(basename "$(find /sys/class/udc -maxdepth 1 -mindepth 1 | sort | head -1)")"
7778
if [ -z "$UDC" ];
7879
then
7980
echo "No USB Device Controller was detected. Did you set your OTG port to host mode?"

0 commit comments

Comments
 (0)