diff options
author | Maxim Devaev <[email protected]> | 2022-03-31 16:17:52 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-03-31 16:17:52 +0300 |
commit | b775239d7265a1bcbb6e32f06546e53d389802d6 (patch) | |
tree | 98c7112425e79e0075c5e3859567b085bf9bab17 /kvmd/usb.py | |
parent | ab09f88d80ac67c76f012b2fcb853f2d69ab6b7d (diff) |
refactoring
Diffstat (limited to 'kvmd/usb.py')
-rw-r--r-- | kvmd/usb.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kvmd/usb.py b/kvmd/usb.py index 4242b1cb..4a5a130d 100644 --- a/kvmd/usb.py +++ b/kvmd/usb.py @@ -36,3 +36,13 @@ def find_udc(udc: str) -> str: elif udc not in candidates: raise RuntimeError(f"Can't find selected UDC: {udc}") return udc # fe980000.usb + + +G_UDC = "UDC" +G_FUNCTIONS = "functions" +G_PROFILE_NAME = "c.1" +G_PROFILE = f"configs/{G_PROFILE_NAME}" + + +def get_gadget_path(gadget: str, *parts: str) -> str: + return os.path.join(f"{env.SYSFS_PREFIX}/sys/kernel/config/usb_gadget", gadget, *parts) |