summaryrefslogtreecommitdiff
path: root/kvmd/usb.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-04-01 02:53:10 +0300
committerMaxim Devaev <[email protected]>2022-04-01 02:53:10 +0300
commit17e140729e1cb20d3684cdf590be712647c3d98e (patch)
tree6df21503fd474426dd1e8e2989247eed93b9e73e /kvmd/usb.py
parentb775239d7265a1bcbb6e32f06546e53d389802d6 (diff)
refactoring
Diffstat (limited to 'kvmd/usb.py')
-rw-r--r--kvmd/usb.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/kvmd/usb.py b/kvmd/usb.py
index 4a5a130d..42156e44 100644
--- a/kvmd/usb.py
+++ b/kvmd/usb.py
@@ -38,6 +38,15 @@ def find_udc(udc: str) -> str:
return udc # fe980000.usb
+# =====
+U_STATE = "state"
+
+
+def get_udc_path(udc: str, *parts: str) -> str:
+ return os.path.join(f"{env.SYSFS_PREFIX}/sys/class/udc", udc, *parts)
+
+
+# =====
G_UDC = "UDC"
G_FUNCTIONS = "functions"
G_PROFILE_NAME = "c.1"