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>
This commit is contained in:
Pali Rohár
2022-08-27 16:37:55 +02:00
committed by Tom Rini
parent 56ce22c0cd
commit 1b3e68203c
2 changed files with 45 additions and 2 deletions

View File

@@ -1194,6 +1194,13 @@ config CMD_LOADS
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"