summaryrefslogtreecommitdiff
path: root/components/drivers/tty/tty_ioctl.c
diff options
context:
space:
mode:
authorTennn11 <[email protected]>2023-06-29 19:01:16 +0800
committerGitHub <[email protected]>2023-06-29 19:01:16 +0800
commit148ae53cf8d3abc2c2e11c94c171b123b950b2fc (patch)
tree76793abfa92e851bba01731875f3c45f76d7c082 /components/drivers/tty/tty_ioctl.c
parent69ec7981c34014402465da1dbcdde5668a248bf7 (diff)
[tty] add TCGETA/TCSETAF/TCSETAW/TCSETA commands (#7739)
Diffstat (limited to 'components/drivers/tty/tty_ioctl.c')
-rw-r--r--components/drivers/tty/tty_ioctl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/drivers/tty/tty_ioctl.c b/components/drivers/tty/tty_ioctl.c
index e1982ee3ea..4a537f2e53 100644
--- a/components/drivers/tty/tty_ioctl.c
+++ b/components/drivers/tty/tty_ioctl.c
@@ -80,6 +80,7 @@ int n_tty_ioctl_extend(struct tty_struct *tty, int cmd, void *args)
switch(cmd)
{
case TCGETS:
+ case TCGETA:
{
struct termios *tio = (struct termios *)p;
if (tio == RT_NULL)
@@ -102,6 +103,18 @@ int n_tty_ioctl_extend(struct tty_struct *tty, int cmd, void *args)
{
return set_termios(real_tty, p, TERMIOS_OLD);
}
+ case TCSETAF:
+ {
+ return set_termios(real_tty, p, TERMIOS_FLUSH | TERMIOS_WAIT | TERMIOS_TERMIO);
+ }
+ case TCSETAW:
+ {
+ return set_termios(real_tty, p, TERMIOS_WAIT | TERMIOS_TERMIO);
+ }
+ case TCSETA:
+ {
+ return set_termios(real_tty, p, TERMIOS_TERMIO);
+ }
default:
break;
}