diff options
author | Pali Rohár <pali@kernel.org> | 2021-10-25 15:12:53 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-11-03 06:45:26 +0100 |
commit | 2ecca3d0d76023f219ac4350b0112cd19fbdda2e (patch) | |
tree | 86332ddce168972b911c27027c5270dc2eb591f8 | |
parent | 0a14341cf8f60e6a9ba2edb0802507cbb073e806 (diff) | |
download | u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.zip u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.tar.gz u-boot-2ecca3d0d76023f219ac4350b0112cd19fbdda2e.tar.bz2 |
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>
-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 695d433..c55b410 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; |