Back to index

glibc  2.9
Functions
tcsetattr.c File Reference
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>

Go to the source code of this file.

Functions

int tcsetattr (int fd, int optional_actions, const struct termios *termios_p)

Function Documentation

int tcsetattr ( int  fd,
int  optional_actions,
const struct termios termios_p 
)

Definition at line 25 of file tcsetattr.c.

{
  unsigned long cmd;

  switch (optional_actions)
    {
    case TCSANOW:
      cmd = TCSETS;
      break;
    case TCSADRAIN:
      cmd = TCSETSW;
      break;
    case TCSAFLUSH:
      cmd = TCSETSF;
      break;
    default:
      __set_errno (EINVAL);
      return -1;
    }

  return __ioctl (fd, cmd, termios_p);
}

Here is the caller graph for this function: