ioctl.c 659 B

1234567891011121314151617181920212223242526272829
  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. static inline
  14. _syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
  15. int attribute_hidden __ioctl(int fd, unsigned long int request, ...)
  16. {
  17. void *arg;
  18. va_list list;
  19. va_start(list, request);
  20. arg = va_arg(list, void *);
  21. va_end(list);
  22. return __syscall_ioctl(fd, request, arg);
  23. }
  24. strong_alias(__ioctl,ioctl)