ioctls.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef _ASM_PPC64_IOCTLS_H
  2. #define _ASM_PPC64_IOCTLS_H
  3. /*
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. */
  9. #include <asm/ioctl.h>
  10. #define FIOCLEX _IO('f', 1)
  11. #define FIONCLEX _IO('f', 2)
  12. #define FIOASYNC _IOW('f', 125, int)
  13. #define FIONBIO _IOW('f', 126, int)
  14. #define FIONREAD _IOR('f', 127, int)
  15. #define TIOCINQ FIONREAD
  16. #define FIOQSIZE _IOR('f', 128, loff_t)
  17. #define TIOCGETP _IOR('t', 8, struct sgttyb)
  18. #define TIOCSETP _IOW('t', 9, struct sgttyb)
  19. #define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
  20. #define TIOCSETC _IOW('t', 17, struct tchars)
  21. #define TIOCGETC _IOR('t', 18, struct tchars)
  22. #define TCGETS _IOR('t', 19, struct termios)
  23. #define TCSETS _IOW('t', 20, struct termios)
  24. #define TCSETSW _IOW('t', 21, struct termios)
  25. #define TCSETSF _IOW('t', 22, struct termios)
  26. #define TCGETA _IOR('t', 23, struct termio)
  27. #define TCSETA _IOW('t', 24, struct termio)
  28. #define TCSETAW _IOW('t', 25, struct termio)
  29. #define TCSETAF _IOW('t', 28, struct termio)
  30. #define TCSBRK _IO('t', 29)
  31. #define TCXONC _IO('t', 30)
  32. #define TCFLSH _IO('t', 31)
  33. #define TIOCSWINSZ _IOW('t', 103, struct winsize)
  34. #define TIOCGWINSZ _IOR('t', 104, struct winsize)
  35. #define TIOCSTART _IO('t', 110) /* start output, like ^Q */
  36. #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
  37. #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
  38. #define TIOCGLTC _IOR('t', 116, struct ltchars)
  39. #define TIOCSLTC _IOW('t', 117, struct ltchars)
  40. #define TIOCSPGRP _IOW('t', 118, int)
  41. #define TIOCGPGRP _IOR('t', 119, int)
  42. #define TIOCEXCL 0x540C
  43. #define TIOCNXCL 0x540D
  44. #define TIOCSCTTY 0x540E
  45. #define TIOCSTI 0x5412
  46. #define TIOCMGET 0x5415
  47. #define TIOCMBIS 0x5416
  48. #define TIOCMBIC 0x5417
  49. #define TIOCMSET 0x5418
  50. # define TIOCM_LE 0x001
  51. # define TIOCM_DTR 0x002
  52. # define TIOCM_RTS 0x004
  53. # define TIOCM_ST 0x008
  54. # define TIOCM_SR 0x010
  55. # define TIOCM_CTS 0x020
  56. # define TIOCM_CAR 0x040
  57. # define TIOCM_RNG 0x080
  58. # define TIOCM_DSR 0x100
  59. # define TIOCM_CD TIOCM_CAR
  60. # define TIOCM_RI TIOCM_RNG
  61. #define TIOCGSOFTCAR 0x5419
  62. #define TIOCSSOFTCAR 0x541A
  63. #define TIOCLINUX 0x541C
  64. #define TIOCCONS 0x541D
  65. #define TIOCGSERIAL 0x541E
  66. #define TIOCSSERIAL 0x541F
  67. #define TIOCPKT 0x5420
  68. # define TIOCPKT_DATA 0
  69. # define TIOCPKT_FLUSHREAD 1
  70. # define TIOCPKT_FLUSHWRITE 2
  71. # define TIOCPKT_STOP 4
  72. # define TIOCPKT_START 8
  73. # define TIOCPKT_NOSTOP 16
  74. # define TIOCPKT_DOSTOP 32
  75. #define TIOCNOTTY 0x5422
  76. #define TIOCSETD 0x5423
  77. #define TIOCGETD 0x5424
  78. #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
  79. #define TIOCSBRK 0x5427 /* BSD compatibility */
  80. #define TIOCCBRK 0x5428 /* BSD compatibility */
  81. #define TIOCGSID 0x5429 /* Return the session ID of FD */
  82. #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
  83. #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
  84. #define TIOCSERCONFIG 0x5453
  85. #define TIOCSERGWILD 0x5454
  86. #define TIOCSERSWILD 0x5455
  87. #define TIOCGLCKTRMIOS 0x5456
  88. #define TIOCSLCKTRMIOS 0x5457
  89. #define TIOCSERGSTRUCT 0x5458 /* For debugging only */
  90. #define TIOCSERGETLSR 0x5459 /* Get line status register */
  91. /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
  92. # define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
  93. #define TIOCSERGETMULTI 0x545A /* Get multiport config */
  94. #define TIOCSERSETMULTI 0x545B /* Set multiport config */
  95. #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
  96. #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
  97. #endif /* _ASM_PPC64_IOCTLS_H */