From: Pali Rohár Date: Mon, 25 Oct 2021 13:12:53 +0000 (+0200) Subject: tools: kwboot: Fix initialization of tty device X-Git-Tag: baikal/mips/sdk5.9~15^2^2~60^2~18 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=c4c4cab413e683411fa9dcbcbf0ef50a0c2a7126;p=uboot.git 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 Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- 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;