mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 18:41:54 +08:00
common env variables
This commit is contained in:
@@ -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}",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user