xyz-modem: Allow to configure initial timeout for loadx and loady
Now when loadx and loady commands could be aborted / cancelled by CTRL+C,
allow to configure timeout for initial x/y-modem packet via env variable
$loadxy_timeout and by default use value from new compile-time config
option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means
infinite timeout. Default value is 90s which is the value used before this
change for loadx command.
Other load commands loadb and loads already waits infinitely. Same behavior
for loadx and loady commands can be achieved by setting $loadxy_timeout or
CONFIG_CMD_LOADXY_TIMEOUT to 0.
Signed-off-by: Pali Rohár <pali@kernel.org>
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 37bc64d..08821b0 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1194,6 +1194,13 @@
help
Load an S-Record file over serial line
+config CMD_LOADXY_TIMEOUT
+ int "loadxy_timeout"
+ range 0 2000
+ default 90
+ help
+ Initial timeout for loadx and loady commands. Zero means infinity.
+
config CMD_LSBLK
depends on BLK
bool "lsblk - list block drivers and devices"