diff options
author | Pali Rohár <pali@kernel.org> | 2021-10-25 16:12:53 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-11-03 08:45:26 +0300 |
commit | 2ecca3d0d76023f219ac4350b0112cd19fbdda2e (patch) | |
tree | 86332ddce168972b911c27027c5270dc2eb591f8 /tools | |
parent | 0a14341cf8f60e6a9ba2edb0802507cbb073e806 (diff) | |
download | u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.tar.xz |
tools: kwboot: Fix initialization of tty device
Explicitly disable 2 stop bits by clearing CSTOPB flag, disable modem
control flow by clearing CRTSCTS flag and do not send hangup after closing
device by clearing HUPCL flag.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kwboot.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c index 695d433b96..c55b41025b 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -657,6 +657,7 @@ kwboot_open_tty(const char *path, int baudrate) cfmakeraw(&tio); tio.c_cflag |= CREAD | CLOCAL; + tio.c_cflag &= ~(CSTOPB | HUPCL | CRTSCTS); tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; |