Sign in
◑
Theme
gbmc
/
meta-gbmc-staging
/
d5a1f57b8f3336a06bad75aa8f61a0d82c54abb2
/
.
/
recipes-connectivity
/
mctp-controller-init
/
mctp-controller-init-v3
/
mctpusb-rename.sh
blob: e105955f5ae1aed1df2839baef9fe1034620d6aa [
file
]
#!/bin/sh
# Safely extracts the USB topology string for udev.
# Input Example: platform-1e6a3000.usb-usb-0:1.2.2.1:1.0
# Output Example: 1_2_2_1
if
[
-
z
"$1"
];
then
exit
1
fi
echo
"$1"
|
cut
-
d
:
-
f2
|
tr
-
d
'.'