summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-07 03:23:06 +0300
committerMaxim Devaev <[email protected]>2022-11-07 03:23:06 +0300
commit53f8b052de48843ece433362ba66633c8b16b7f6 (patch)
tree1d3ced9fd2f44bbb91c1604478eacd7bace1e6f5 /kvmd/plugins
parent648316931a8c5204945a5100a5530c15f7515a23 (diff)
common fstab and libc funcs
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/msd/otg/__init__.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py
index 7347a733..fa6c1fe9 100644
--- a/kvmd/plugins/msd/otg/__init__.py
+++ b/kvmd/plugins/msd/otg/__init__.py
@@ -38,12 +38,12 @@ from ....yamlconf import Option
from ....validators.basic import valid_bool
from ....validators.basic import valid_number
-from ....validators.os import valid_abs_dir
from ....validators.os import valid_printable_filename
from ....validators.os import valid_command
from .... import aiotools
from .... import aiohelpers
+from .... import fstab
from .. import MsdError
from .. import MsdIsBusyError
@@ -143,8 +143,6 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
write_chunk_size: int,
sync_chunk_size: int,
- storage_path: str,
-
remount_cmd: list[str],
initial: dict,
@@ -162,7 +160,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
self.__initial_cdrom: bool = initial["cdrom"]
self.__drive = Drive(gadget, instance=0, lun=0)
- self.__storage = Storage(storage_path)
+ self.__storage = Storage(fstab.find_storage("otgmsd").root_path)
self.__reader: (MsdFileReader | None) = None
self.__writer: (MsdFileWriter | None) = None
@@ -181,8 +179,6 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
"write_chunk_size": Option(65536, type=functools.partial(valid_number, min=1024)),
"sync_chunk_size": Option(4194304, type=functools.partial(valid_number, min=1024)),
- "storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"),
-
"remount_cmd": Option([
"/usr/bin/sudo", "--non-interactive",
"/usr/bin/kvmd-helper-otgmsd-remount", "{mode}",