retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);  if (retval == 0 && cmd == TCSETS) {  int save = errno; retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); if (retval) {  __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)))) {  __set_errno (EINVAL); retval = -1; } }  return retval;
return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
tcsetattr (fd, optional_actions, termios_p)     int fd;     int optional_actions;     const struct termios *termios_p;{  struct __kernel_termios k_termios;  unsigned long int cmd;  int retval;  switch (optional_actions)    {    case TCSANOW:      cmd = TCSETS;      break;    case TCSADRAIN:      cmd = TCSETSW;      break;    case TCSAFLUSH:      cmd = TCSETSF;      break;    default:      __set_errno (EINVAL);      return -1;    }  k_termios.c_iflag = termios_p->c_iflag & ~IBAUD0;  k_termios.c_oflag = termios_p->c_oflag;  k_termios.c_cflag = termios_p->c_cflag;  k_termios.c_lflag = termios_p->c_lflag;  k_termios.c_line = termios_p->c_line;#ifdef _HAVE_C_ISPEED  k_termios.c_ispeed = termios_p->c_ispeed;#endif#ifdef _HAVE_C_OSPEED  k_termios.c_ospeed = termios_p->c_ospeed;#endif  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;}