-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FMO-92: fmo-tool, add ability to passthrough with vendorid
- Allow passthrough device with exactly-matched vendorid and regex-matched productid - Update fmo-tool version with vendorname in ddp, allow passthrough device with vendorname using fmo-tool option -vn - Add default passthrough for device with vendorid "1050" Signed-off-by: Anh Huy Bui <[email protected]>
- Loading branch information
1 parent
3686159
commit 8b9ecac
Showing
5 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ pkgs.python3Packages.buildPythonApplication { | |
|
||
src = builtins.fetchGit { | ||
url = "[email protected]:tiiuae/fmo-tool.git"; | ||
rev = "4cdb772a104893ecf2d15333bad0f335040c3be9"; | ||
rev = "ed1ba0debd766a07efb14b59401d9ae8b2c5093e"; | ||
ref = "refs/heads/main"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/vhotplug/config.py b/vhotplug/config.py | ||
index 689d243..c1e7300 100644 | ||
--- a/vhotplug/config.py | ||
+++ b/vhotplug/config.py | ||
@@ -32,7 +32,7 @@ class Config: | ||
logger.debug(f"Rule {usb_description}") | ||
logger.debug(f"Checking {vid}:{pid} against {usb_vid}:{usb_pid}") | ||
vidMatch = usb_vid and vid.casefold() == usb_vid.casefold() | ||
- pidMatch = usb_pid and pid.casefold() == usb_pid.casefold() | ||
+ pidMatch = (usb_pid and pid.casefold() == usb_pid.casefold()) or re.match(usb_pid, pid, re.IGNORECASE) | ||
if vidMatch and pidMatch: | ||
logger.info(f"Found VM {vm_name} by vendor id / product id, description: {usb_description}") | ||
matches = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters