ioctl.c 652 B

12345678910111213141516171819202122232425262728293031
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * ioctl() for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include "syscalls.h"
  10. #include <stdarg.h>
  11. #include <sys/ioctl.h>
  12. libc_hidden_proto(ioctl)
  13. #define __NR___syscall_ioctl __NR_ioctl
  14. static inline
  15. _syscall3(int, __syscall_ioctl, int, fd, int, request, void *, arg);
  16. int ioctl(int fd, unsigned long int request, ...)
  17. {
  18. void *arg;
  19. va_list list;
  20. va_start(list, request);
  21. arg = va_arg(list, void *);
  22. va_end(list);
  23. return __syscall_ioctl(fd, request, arg);
  24. }
  25. libc_hidden_def(ioctl)