ioctl.h 467 B

123456789101112131415161718
  1. #ifndef _ASM_GENERIC_IOCTL_H
  2. #define _ASM_GENERIC_IOCTL_H
  3. #include <uapi/asm-generic/ioctl.h>
  4. #ifdef __CHECKER__
  5. #define _IOC_TYPECHECK(t) (sizeof(t))
  6. #else
  7. /* provoke compile error for invalid uses of size argument */
  8. extern unsigned int __invalid_size_argument_for_IOC;
  9. #define _IOC_TYPECHECK(t) \
  10. ((sizeof(t) == sizeof(t[1]) && \
  11. sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
  12. sizeof(t) : __invalid_size_argument_for_IOC)
  13. #endif
  14. #endif /* _ASM_GENERIC_IOCTL_H */