Commit c960bde13c2f9c807beb1c4e8c16cfde769e136a
1 parent
148f5058
correct ioctls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1679 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
84 additions
and
69 deletions
linux-user/mips/termbits.h
... | ... | @@ -137,78 +137,93 @@ struct target_termios { |
137 | 137 | |
138 | 138 | /* ioctls */ |
139 | 139 | |
140 | -#define TARGET_TCGETS 0x5401 | |
141 | -#define TARGET_TCSETS 0x5402 | |
142 | -#define TARGET_TCSETSW 0x5403 | |
143 | -#define TARGET_TCSETSF 0x5404 | |
144 | -#define TARGET_TCGETA 0x5405 | |
145 | -#define TARGET_TCSETA 0x5406 | |
146 | -#define TARGET_TCSETAW 0x5407 | |
147 | -#define TARGET_TCSETAF 0x5408 | |
148 | -#define TARGET_TCSBRK 0x5409 | |
149 | -#define TARGET_TCXONC 0x540A | |
150 | -#define TARGET_TCFLSH 0x540B | |
151 | - | |
152 | -#define TARGET_TIOCEXCL 0x540C | |
153 | -#define TARGET_TIOCNXCL 0x540D | |
154 | -#define TARGET_TIOCSCTTY 0x540E | |
155 | -#define TARGET_TIOCGPGRP 0x540F | |
156 | -#define TARGET_TIOCSPGRP 0x5410 | |
157 | -#define TARGET_TIOCOUTQ 0x5411 | |
158 | -#define TARGET_TIOCSTI 0x5412 | |
159 | -#define TARGET_TIOCGWINSZ 0x5413 | |
160 | -#define TARGET_TIOCSWINSZ 0x5414 | |
161 | -#define TARGET_TIOCMGET 0x5415 | |
162 | -#define TARGET_TIOCMBIS 0x5416 | |
163 | -#define TARGET_TIOCMBIC 0x5417 | |
164 | -#define TARGET_TIOCMSET 0x5418 | |
165 | -#define TARGET_TIOCGSOFTCAR 0x5419 | |
166 | -#define TARGET_TIOCSSOFTCAR 0x541A | |
167 | -#define TARGET_FIONREAD 0x541B | |
140 | +#define TARGET_TCGETA 0x5401 | |
141 | +#define TARGET_TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ | |
142 | +#define TARGET_TCSETAW 0x5403 | |
143 | +#define TARGET_TCSETAF 0x5404 | |
144 | + | |
145 | +#define TARGET_TCSBRK 0x5405 | |
146 | +#define TARGET_TCXONC 0x5406 | |
147 | +#define TARGET_TCFLSH 0x5407 | |
148 | + | |
149 | +#define TARGET_TCGETS 0x540d | |
150 | +#define TARGET_TCSETS 0x540e | |
151 | +#define TARGET_TCSETSW 0x540f | |
152 | +#define TARGET_TCSETSF 0x5410 | |
153 | + | |
154 | +#define TARGET_TIOCEXCL 0x740d /* set exclusive use of tty */ | |
155 | +#define TARGET_TIOCNXCL 0x740e /* reset exclusive use of tty */ | |
156 | +#define TARGET_TIOCOUTQ 0x7472 /* output queue size */ | |
157 | +#define TARGET_TIOCSTI 0x5472 /* simulate terminal input */ | |
158 | +#define TARGET_TIOCMGET 0x741d /* get all modem bits */ | |
159 | +#define TARGET_TIOCMBIS 0x741b /* bis modem bits */ | |
160 | +#define TARGET_TIOCMBIC 0x741c /* bic modem bits */ | |
161 | +#define TARGET_TIOCMSET 0x741a /* set all modem bits */ | |
162 | +#define TARGET_TIOCPKT 0x5470 /* pty: set/clear packet mode */ | |
163 | +#define TARGET_TIOCPKT_DATA 0x00 /* data packet */ | |
164 | +#define TARGET_TIOCPKT_FLUSHREAD 0x01 /* flush packet */ | |
165 | +#define TARGET_TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ | |
166 | +#define TARGET_TIOCPKT_STOP 0x04 /* stop output */ | |
167 | +#define TARGET_TIOCPKT_START 0x08 /* start output */ | |
168 | +#define TARGET_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | |
169 | +#define TARGET_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | |
170 | +/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */ | |
171 | +#define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct winsize) /* set window size */ | |
172 | +#define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct winsize) /* get window size */ | |
173 | +#define TARGET_TIOCNOTTY 0x5471 /* void tty association */ | |
174 | +#define TARGET_TIOCSETD 0x7401 | |
175 | +#define TARGET_TIOCGETD 0x7400 | |
176 | + | |
177 | +#define TARGET_FIOCLEX 0x6601 | |
178 | +#define TARGET_FIONCLEX 0x6602 | |
179 | +#define TARGET_FIOASYNC 0x667d | |
180 | +#define TARGET_FIONBIO 0x667e | |
181 | +#define TARGET_FIOQSIZE 0x667f | |
182 | + | |
183 | +#define TARGET_TIOCGLTC 0x7474 /* get special local chars */ | |
184 | +#define TARGET_TIOCSLTC 0x7475 /* set special local chars */ | |
185 | +#define TARGET_TIOCSPGRP TARGET_IOW('t', 118, int) /* set pgrp of tty */ | |
186 | +#define TARGET_TIOCGPGRP TARGET_IOR('t', 119, int) /* get pgrp of tty */ | |
187 | +#define TARGET_TIOCCONS TARGET_IOW('t', 120, int) /* become virtual console */ | |
188 | + | |
189 | +#define TARGET_FIONREAD 0x467f | |
168 | 190 | #define TARGET_TIOCINQ TARGET_FIONREAD |
169 | -#define TARGET_TIOCLINUX 0x541C | |
170 | -#define TARGET_TIOCCONS 0x541D | |
171 | -#define TARGET_TIOCGSERIAL 0x541E | |
172 | -#define TARGET_TIOCSSERIAL 0x541F | |
173 | -#define TARGET_TIOCPKT 0x5420 | |
174 | -#define TARGET_FIONBIO 0x5421 | |
175 | -#define TARGET_TIOCNOTTY 0x5422 | |
176 | -#define TARGET_TIOCSETD 0x5423 | |
177 | -#define TARGET_TIOCGETD 0x5424 | |
178 | -#define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | |
179 | -#define TARGET_TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | |
191 | + | |
192 | +#define TARGET_TIOCGETP 0x7408 | |
193 | +#define TARGET_TIOCSETP 0x7409 | |
194 | +#define TARGET_TIOCSETN 0x740a /* TIOCSETP wo flush */ | |
195 | + | |
196 | +/* #define TARGET_TIOCSETA TARGET_IOW('t', 20, struct termios) set termios struct */ | |
197 | +/* #define TARGET_TIOCSETAW TARGET_IOW('t', 21, struct termios) drain output, set */ | |
198 | +/* #define TARGET_TIOCSETAF TARGET_IOW('t', 22, struct termios) drn out, fls in, set */ | |
199 | +/* #define TARGET_TIOCGETD TARGET_IOR('t', 26, int) get line discipline */ | |
200 | +/* #define TARGET_TIOCSETD TARGET_IOW('t', 27, int) set line discipline */ | |
201 | + /* 127-124 compat */ | |
202 | + | |
180 | 203 | #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ |
181 | 204 | #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ |
182 | -#define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ | |
205 | +#define TARGET_TIOCGSID 0x7416 /* Return the session ID of FD */ | |
183 | 206 | #define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
184 | 207 | #define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ |
185 | 208 | |
186 | -#define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | |
187 | -#define TARGET_FIOCLEX 0x5451 | |
188 | -#define TARGET_FIOASYNC 0x5452 | |
189 | -#define TARGET_TIOCSERCONFIG 0x5453 | |
190 | -#define TARGET_TIOCSERGWILD 0x5454 | |
191 | -#define TARGET_TIOCSERSWILD 0x5455 | |
192 | -#define TARGET_TIOCGLCKTRMIOS 0x5456 | |
193 | -#define TARGET_TIOCSLCKTRMIOS 0x5457 | |
194 | -#define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ | |
195 | -#define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ | |
196 | -#define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ | |
197 | -#define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ | |
198 | - | |
199 | -#define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | |
200 | -#define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | |
201 | -#define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ | |
202 | -#define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ | |
203 | - | |
204 | -/* Used for packet mode */ | |
205 | -#define TARGET_TIOCPKT_DATA 0 | |
206 | -#define TARGET_TIOCPKT_FLUSHREAD 1 | |
207 | -#define TARGET_TIOCPKT_FLUSHWRITE 2 | |
208 | -#define TARGET_TIOCPKT_STOP 4 | |
209 | -#define TARGET_TIOCPKT_START 8 | |
210 | -#define TARGET_TIOCPKT_NOSTOP 16 | |
211 | -#define TARGET_TIOCPKT_DOSTOP 32 | |
212 | - | |
213 | -#define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | |
214 | - | |
209 | +/* I hope the range from 0x5480 on is free ... */ | |
210 | +#define TARGET_TIOCSCTTY 0x5480 /* become controlling tty */ | |
211 | +#define TARGET_TIOCGSOFTCAR 0x5481 | |
212 | +#define TARGET_TIOCSSOFTCAR 0x5482 | |
213 | +#define TARGET_TIOCLINUX 0x5483 | |
214 | +#define TARGET_TIOCGSERIAL 0x5484 | |
215 | +#define TARGET_TIOCSSERIAL 0x5485 | |
216 | +#define TARGET_TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ | |
217 | +#define TARGET_TIOCSERCONFIG 0x5488 | |
218 | +#define TARGET_TIOCSERGWILD 0x5489 | |
219 | +#define TARGET_TIOCSERSWILD 0x548a | |
220 | +#define TARGET_TIOCGLCKTRMIOS 0x548b | |
221 | +#define TARGET_TIOCSLCKTRMIOS 0x548c | |
222 | +#define TARGET_TIOCSERGSTRUCT 0x548d /* For debugging only */ | |
223 | +#define TARGET_TIOCSERGETLSR 0x548e /* Get line status register */ | |
224 | +#define TARGET_TIOCSERGETMULTI 0x548f /* Get multiport config */ | |
225 | +#define TARGET_TIOCSERSETMULTI 0x5490 /* Set multiport config */ | |
226 | +#define TARGET_TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ | |
227 | +#define TARGET_TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ | |
228 | +#define TARGET_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */ | |
229 | +#define TARGET_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */ | ... | ... |