system/cu: Disable echo if it's enabled to avoid double input character
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
4a9752ed3d
commit
96cd66cf51
@ -179,6 +179,10 @@ static int set_termios(int fd, int rate, enum parity_mode parity,
|
|||||||
tio.c_oflag |= ONLCR;
|
tio.c_oflag |= ONLCR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* disable echo if it's enabled to avoid double input character */
|
||||||
|
|
||||||
|
tio.c_iflag &= ~ECHO;
|
||||||
|
|
||||||
ret = tcsetattr(fd, TCSANOW, &tio);
|
ret = tcsetattr(fd, TCSANOW, &tio);
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user