ioctl.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Linux/PA-RISC Project (http://www.parisc-linux.org/)
  3. * Copyright (C) 1999,2003 Matthew Wilcox < willy at debian . org >
  4. * portions from "linux/ioctl.h for Linux" by H.H. Bergman.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef _ASM_PARISC_IOCTL_H
  21. #define _ASM_PARISC_IOCTL_H
  22. /* ioctl command encoding: 32 bits total, command in lower 16 bits,
  23. * size of the parameter structure in the lower 14 bits of the
  24. * upper 16 bits.
  25. * Encoding the size of the parameter structure in the ioctl request
  26. * is useful for catching programs compiled with old versions
  27. * and to avoid overwriting user space outside the user buffer area.
  28. * The highest 2 bits are reserved for indicating the ``access mode''.
  29. * NOTE: This limits the max parameter size to 16kB -1 !
  30. */
  31. /*
  32. * Direction bits.
  33. */
  34. #define _IOC_NONE 0U
  35. #define _IOC_WRITE 2U
  36. #define _IOC_READ 1U
  37. #include <asm-generic/ioctl.h>
  38. #endif /* _ASM_PARISC_IOCTL_H */