From a334319f6530564d22e775935d9c91663623a1b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Dec 2004 20:10:10 +0000 Subject: (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. --- sysdeps/unix/sysv/linux/tcsetattr.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'sysdeps/unix/sysv/linux/tcsetattr.c') diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c index 21e6ab2ede..f73ec8883e 100644 --- a/sysdeps/unix/sysv/linux/tcsetattr.c +++ b/sysdeps/unix/sysv/linux/tcsetattr.c @@ -49,7 +49,6 @@ tcsetattr (fd, optional_actions, termios_p) { struct __kernel_termios k_termios; unsigned long int cmd; - int retval; switch (optional_actions) { @@ -81,35 +80,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) -- cgit 1.4.1