diff options
author | Devaev Maxim <[email protected]> | 2020-10-03 03:34:55 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-03 05:02:14 +0300 |
commit | cccf44655aadc80d2d535033951e7af9ac65a271 (patch) | |
tree | 1ea9607e91e0189a0d73e87bed39b14c29213585 /kvmd/plugins/msd/otg/drive.py | |
parent | 872145590a3227b799ae7f5e7731dfc15967d63c (diff) |
common env variables
Diffstat (limited to 'kvmd/plugins/msd/otg/drive.py')
-rw-r--r-- | kvmd/plugins/msd/otg/drive.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kvmd/plugins/msd/otg/drive.py b/kvmd/plugins/msd/otg/drive.py index ff91afcf..a0a0d82b 100644 --- a/kvmd/plugins/msd/otg/drive.py +++ b/kvmd/plugins/msd/otg/drive.py @@ -23,6 +23,8 @@ import os import errno +from .... import env + from .. import MsdOperationError @@ -34,9 +36,9 @@ class MsdDriveLockedError(MsdOperationError): # ===== class Drive: - def __init__(self, prefix: str, gadget: str, instance: int, lun: int) -> None: + def __init__(self, gadget: str, instance: int, lun: int) -> None: self.__path = os.path.join( - f"{prefix}/sys/kernel/config/usb_gadget", + f"{env.SYSFS_PREFIX}/sys/kernel/config/usb_gadget", gadget, f"functions/mass_storage.usb{instance}/lun.{lun}", ) |