[4.2] qubes-usb-proxy: fix usb reset with udevadm #75

Merged
ayakael merged 1 commit from qubes-usb-proxy/fix-usb-reset into r4.2 2024-07-27 22:55:28 +00:00
2 changed files with 15 additions and 1 deletions

View file

@ -38,5 +38,5 @@ package() {
}
sha512sums="
8083b49c913020e5f44b3b7f051773af0e98f3d4687186358b4f273dd3c8c62cb8eac31af2a6ffe4b9088e18ba92a94d89f5980997bad283026e654466202490 qubes-usb-proxy-v1.2.2.tar.gz
d0eb969122a41be8fa9647ca824aabf3cb3d39324b156b3e05872099e7c4b600dbc8060ab2a63186d84f60364c28c5db9da4d06e37ad36877a2222bdc2cdbd74 usb-import-alpine-udevadm.patch
c6519982f7eef8586ee823dc96efa7b1b90f489114edcc348bc5221837090d19a2a3533eac83e3269ba68c2cf24447c018e0ac850ed1423a1280ebae364223fa usb-import-alpine-udevadm.patch
"

View file

@ -11,3 +11,17 @@ index 7b17799..e718795 100755
}
wait_for_detached() {
diff --git a/src/usb-export.orig b/src/usb-export
index ad2ab2b..37cff16 100755
--- a/src/usb-export.orig
+++ b/src/usb-export
@@ -110,8 +110,7 @@ if [ -n "$attach_to_usbip" ]; then
echo "$busid" > "$SYS_USBIP_HOST/bind" || exit 1
# optionally reset the device to clear any state from previous driver
- reset_on_attach=$(udevadm info --query=property \
- --value --property=QUBES_USB_RESET --path="$devpath")
+ reset_on_attach=$(udevadm info --query=property --path="$devpath" | awk -F "=" '{if($1=="QUBES_USB_RESET"){print $2}}' )
if [ -f /run/qubes-service/usb-reset-on-attach ]; then
reset_on_attach=1
fi