ioctl.c 599 B

12345678910111213141516171819202122232425262728
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * ioctl() for uClibc
  4. *
  5. * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
  6. *
  7. * GNU Library General Public License (LGPL) version 2 or later.
  8. */
  9. #include "syscalls.h"
  10. #include <stdarg.h>
  11. #include <sys/ioctl.h>
  12. #define __NR___syscall_ioctl __NR_ioctl
  13. _syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
  14. int ioctl(int fd, unsigned long int request, ...)
  15. {
  16. void *arg;
  17. va_list list;
  18. va_start(list, request);
  19. arg = va_arg(list, void *);
  20. va_end(list);
  21. return __syscall_ioctl(fd, request, arg);
  22. }