diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-21 00:12:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-21 00:12:29 +0000 |
commit | 6eb74f33650b4b55e8bc7679145e9293c4b43f2f (patch) | |
tree | 667601f859e4780ad32c1bb9b02de3804c76c10b /sysdeps/unix/sysv/linux/tcsetattr.c | |
parent | 0585697658a4f4afd4b9811b7a3f73ff820a20d8 (diff) | |
download | glibc-6eb74f33650b4b55e8bc7679145e9293c4b43f2f.tar.gz glibc-6eb74f33650b4b55e8bc7679145e9293c4b43f2f.tar.xz glibc-6eb74f33650b4b55e8bc7679145e9293c4b43f2f.zip |
Update.
2003-02-20 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Remove obsolete patch to check for system call errors.
Diffstat (limited to 'sysdeps/unix/sysv/linux/tcsetattr.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/tcsetattr.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c index a5eab4df2a..0b0189485a 100644 --- a/sysdeps/unix/sysv/linux/tcsetattr.c +++ b/sysdeps/unix/sysv/linux/tcsetattr.c @@ -56,7 +56,6 @@ tcsetattr (fd, optional_actions, termios_p) { struct __kernel_termios k_termios; unsigned long int cmd; - int retval; switch (optional_actions) { @@ -88,35 +87,6 @@ tcsetattr (fd, optional_actions, termios_p) memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], __KERNEL_NCCS * sizeof (cc_t)); - retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); - - if (retval == 0 && cmd == TCSETS) - { - /* The Linux kernel has a bug which silently ignore the invalid - c_cflag on pty. We have to check it here. */ - int save = errno; - retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); - if (retval) - { - /* We cannot verify if the setting is ok. We don't return - an error (?). */ - __set_errno (save); - retval = 0; - } - else if ((termios_p->c_cflag & (PARENB | CREAD)) - != (k_termios.c_cflag & (PARENB | CREAD)) - || ((termios_p->c_cflag & CSIZE) - && ((termios_p->c_cflag & CSIZE) - != (k_termios.c_cflag & CSIZE)))) - { - /* It looks like the Linux kernel silently changed the - PARENB/CREAD/CSIZE bits in c_cflag. Report it as an - error. */ - __set_errno (EINVAL); - retval = -1; - } - } - - return retval; + return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); } libc_hidden_def (tcsetattr) |