Back to index

glibc  2.9
Functions
ioctl.c File Reference
#include <stdarg.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sysdep.h>

Go to the source code of this file.

Functions

int __ioctl (int fd, unsigned long int request,...)

Function Documentation

int __ioctl ( int  fd,
unsigned long int  request,
  ... 
)

Definition at line 29 of file ioctl.c.

{
  void *arg;
  va_list ap;
  int result;

  va_start (ap, request);
  arg = va_arg (ap, void *);

  switch (request)
    {
    case TCGETS:
      result = __tcgetattr (fd, (struct termios *) arg);
      break;

    case TCSETS:
      result = tcsetattr (fd, TCSANOW, (struct termios *) arg);
      break;

    case TCSETSW:
      result = tcsetattr (fd, TCSADRAIN, (struct termios *) arg);
      break;

    case TCSETSF:
      result = tcsetattr (fd, TCSAFLUSH, (struct termios *) arg);
      break;

    default:
      result = INLINE_SYSCALL (ioctl, 3, fd, request, arg);
      break;
    }

  va_end (ap);

  return result;
}

Here is the call graph for this function: