ioctl.c 638 B

123456789101112131415161718192021222324252627282930
  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 <sys/syscall.h>
  10. #include <stdarg.h>
  11. #include <sys/ioctl.h>
  12. #define __NR___syscall_ioctl __NR_ioctl
  13. static __always_inline
  14. _syscall3(int, __syscall_ioctl, int, fd, int, request, void *, arg)
  15. int 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. libc_hidden_def(ioctl)