diff options
author | Devaev Maxim <[email protected]> | 2020-10-05 07:35:11 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-05 07:35:11 +0300 |
commit | 6c167f121b82c391384fe1ecd99b651896ddf03d (patch) | |
tree | 3983a532bf2a3911abf1a0428c6b05aee30c7b34 | |
parent | 9bd129f70b1837517cf16f14e104e59d6f4fe12c (diff) |
more options
-rw-r--r-- | kvmd/apps/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/apps/otg/__init__.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index b65a5775..10a331da 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -385,6 +385,7 @@ def _get_config_scheme() -> Dict: "max_power": Option(250, type=functools.partial(valid_number, min=0, max=500)), "gadget": Option("kvmd", type=valid_otg_gadget), + "config": Option("Pi-KVM device", type=valid_stripped_string_not_empty), "udc": Option("", type=valid_stripped_string), "init_delay": Option(3.0, type=valid_float_f01), diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py index e14dd895..50c5b836 100644 --- a/kvmd/apps/otg/__init__.py +++ b/kvmd/apps/otg/__init__.py @@ -189,7 +189,7 @@ def _cmd_start(config: Section) -> None: config_path = join(gadget_path, "configs/c.1") _mkdir(config_path) _mkdir(join(config_path, "strings/0x409")) - _write(join(config_path, "strings/0x409/configuration"), "Config 1: Pi-KVM device") + _write(join(config_path, "strings/0x409/configuration"), f"Config 1: {config.otg.config}") _write(join(config_path, "MaxPower"), str(config.otg.max_power)) if config.otg.devices.serial.enabled: |