cputlb: Hoist timestamp outside of loops over tlbs
[qemu/ar7.git] / linux-user / ioctls.h
blobc6b9d6ad6653482a6e3c4594fd5992ba481e9e63
1 /* emulated ioctl list */
3 IOCTL(TCGETS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
4 IOCTL(TCSETS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
5 IOCTL(TCSETSF, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
6 IOCTL(TCSETSW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
7 IOCTL(TIOCGWINSZ, IOC_R, MK_PTR(MK_STRUCT(STRUCT_winsize)))
8 IOCTL(TIOCSWINSZ, IOC_W, MK_PTR(MK_STRUCT(STRUCT_winsize)))
9 IOCTL(FIONREAD, IOC_R, MK_PTR(TYPE_INT))
10 IOCTL(TCGETA, IOC_R, MK_PTR(TYPE_INT))
11 IOCTL(TCSETA, IOC_W, MK_PTR(TYPE_INT))
12 IOCTL(TCSETAW, IOC_W, MK_PTR(TYPE_INT))
13 IOCTL(TCSETAF, IOC_W, MK_PTR(TYPE_INT))
14 IOCTL(TCSBRK, 0, TYPE_INT)
15 IOCTL(TCSBRKP, 0, TYPE_INT)
16 IOCTL(TCXONC, 0, TYPE_INT)
17 IOCTL(TCFLSH, 0, TYPE_INT)
18 IOCTL(TIOCEXCL, 0, TYPE_NULL)
19 IOCTL(TIOCNXCL, 0, TYPE_NULL)
20 IOCTL(TIOCSCTTY, 0, TYPE_INT)
21 IOCTL(TIOCGPGRP, IOC_R, MK_PTR(TYPE_INT))
22 IOCTL(TIOCSPGRP, IOC_W, MK_PTR(TYPE_INT))
23 IOCTL(TIOCGSID, IOC_W, MK_PTR(TYPE_INT))
24 IOCTL(TIOCOUTQ, IOC_R, MK_PTR(TYPE_INT))
25 IOCTL(TIOCSTI, IOC_W, MK_PTR(TYPE_INT))
26 IOCTL(TIOCMGET, IOC_R, MK_PTR(TYPE_INT))
27 IOCTL(TIOCMBIS, IOC_W, MK_PTR(TYPE_INT))
28 IOCTL(TIOCMBIC, IOC_W, MK_PTR(TYPE_INT))
29 IOCTL(TIOCMSET, IOC_W, MK_PTR(TYPE_INT))
30 IOCTL(TIOCGSOFTCAR, IOC_R, MK_PTR(TYPE_INT))
31 IOCTL(TIOCSSOFTCAR, IOC_W, MK_PTR(TYPE_INT))
32 IOCTL(TIOCLINUX, IOC_R | IOC_W, MK_PTR(TYPE_INT))
33 IOCTL(TIOCCONS, 0, TYPE_NULL)
34 IOCTL(TIOCGSERIAL, IOC_R, MK_PTR(TYPE_INT))
35 IOCTL(TIOCSSERIAL, IOC_W, MK_PTR(TYPE_INT))
36 IOCTL(TIOCPKT, IOC_W, MK_PTR(TYPE_INT))
37 IOCTL(FIONBIO, IOC_W, MK_PTR(TYPE_INT))
38 IOCTL(TIOCNOTTY, 0, TYPE_NULL)
39 IOCTL(TIOCGETD, IOC_R, MK_PTR(TYPE_INT))
40 IOCTL(TIOCSETD, IOC_W, MK_PTR(TYPE_INT))
41 IOCTL(TIOCGPTN, IOC_R, MK_PTR(TYPE_INT))
42 IOCTL(TIOCSPTLCK, IOC_W, MK_PTR(TYPE_INT))
43 #ifdef TIOCGPTPEER
44 IOCTL_SPECIAL(TIOCGPTPEER, 0, do_ioctl_tiocgptpeer, TYPE_INT)
45 #endif
46 IOCTL(FIOCLEX, 0, TYPE_NULL)
47 IOCTL(FIONCLEX, 0, TYPE_NULL)
48 IOCTL(FIOASYNC, IOC_W, MK_PTR(TYPE_INT))
49 IOCTL(TIOCGLCKTRMIOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
50 IOCTL(TIOCSLCKTRMIOS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
51 IOCTL(TIOCSERCONFIG, 0, TYPE_NULL)
52 IOCTL(TIOCSERGETLSR, IOC_R, MK_PTR(TYPE_INT))
53 IOCTL(TIOCSERGETMULTI, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
54 IOCTL(TIOCSERSETMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
55 IOCTL(TIOCMIWAIT, 0, TYPE_INT)
56 IOCTL(TIOCGICOUNT, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_icounter_struct)))
58 IOCTL(KIOCSOUND, 0, TYPE_INT)
59 IOCTL(KDMKTONE, 0, TYPE_INT)
60 IOCTL(KDSETMODE, 0, TYPE_INT)
61 IOCTL(KDGKBTYPE, IOC_R, MK_PTR(TYPE_CHAR))
62 IOCTL(KDGKBMODE, IOC_R, MK_PTR(TYPE_INT))
63 IOCTL(KDSKBMODE, 0, TYPE_INT)
64 IOCTL(KDGKBENT, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_kbentry)))
65 IOCTL(KDGKBSENT, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_kbsentry)))
66 IOCTL(KDGKBLED, 0, TYPE_INT)
67 IOCTL(KDSKBLED, 0, TYPE_INT)
68 IOCTL(KDGETLED, 0, TYPE_INT)
69 IOCTL(KDSETLED, 0, TYPE_INT)
70 IOCTL_SPECIAL(KDSIGACCEPT, 0, do_ioctl_kdsigaccept, TYPE_INT)
72 IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT))
73 IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT))
74 IOCTL(BLKRRPART, 0, TYPE_NULL)
75 IOCTL(BLKGETSIZE, IOC_R, MK_PTR(TYPE_ULONG))
76 #ifdef BLKGETSIZE64
77 IOCTL(BLKGETSIZE64, IOC_R, MK_PTR(TYPE_ULONGLONG))
78 #endif
79 IOCTL(BLKFLSBUF, 0, TYPE_NULL)
80 IOCTL(BLKRASET, 0, TYPE_INT)
81 IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG))
82 IOCTL(BLKSSZGET, IOC_R, MK_PTR(TYPE_INT))
83 IOCTL(BLKBSZGET, IOC_R, MK_PTR(TYPE_INT))
84 IOCTL_SPECIAL(BLKPG, IOC_W, do_ioctl_blkpg,
85 MK_PTR(MK_STRUCT(STRUCT_blkpg_ioctl_arg)))
87 #ifdef BLKDISCARD
88 IOCTL(BLKDISCARD, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
89 #endif
90 #ifdef BLKIOMIN
91 IOCTL(BLKIOMIN, IOC_R, MK_PTR(TYPE_INT))
92 #endif
93 #ifdef BLKIOOPT
94 IOCTL(BLKIOOPT, IOC_R, MK_PTR(TYPE_INT))
95 #endif
96 #ifdef BLKALIGNOFF
97 IOCTL(BLKALIGNOFF, IOC_R, MK_PTR(TYPE_INT))
98 #endif
99 #ifdef BLKPBSZGET
100 IOCTL(BLKPBSZGET, IOC_R, MK_PTR(TYPE_INT))
101 #endif
102 #ifdef BLKDISCARDZEROES
103 IOCTL(BLKDISCARDZEROES, IOC_R, MK_PTR(TYPE_INT))
104 #endif
105 #ifdef BLKSECDISCARD
106 IOCTL(BLKSECDISCARD, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
107 #endif
108 #ifdef BLKROTATIONAL
109 IOCTL(BLKROTATIONAL, IOC_R, MK_PTR(TYPE_SHORT))
110 #endif
111 #ifdef BLKZEROOUT
112 IOCTL(BLKZEROOUT, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
113 #endif
115 IOCTL(FDMSGON, 0, TYPE_NULL)
116 IOCTL(FDMSGOFF, 0, TYPE_NULL)
117 IOCTL(FDFLUSH, 0, TYPE_NULL)
118 IOCTL(FDRESET, 0, TYPE_NULL)
119 IOCTL(FDRAWCMD, 0, TYPE_NULL)
120 IOCTL(FDTWADDLE, 0, TYPE_NULL)
121 IOCTL(FDEJECT, 0, TYPE_NULL)
123 #ifdef FIBMAP
124 IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG))
125 #endif
126 #ifdef FICLONE
127 IOCTL(FICLONE, IOC_W, TYPE_INT)
128 IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range)))
129 #endif
131 #ifdef FIGETBSZ
132 IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
133 #endif
134 #ifdef CONFIG_FIEMAP
135 IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap,
136 MK_PTR(MK_STRUCT(STRUCT_fiemap)))
137 #endif
139 IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT))
140 IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT))
142 #ifdef CONFIG_USBFS
143 /* USB ioctls */
144 IOCTL(USBDEVFS_CONTROL, IOC_RW,
145 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_ctrltransfer)))
146 IOCTL(USBDEVFS_BULK, IOC_RW,
147 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_bulktransfer)))
148 IOCTL(USBDEVFS_RESETEP, IOC_W, MK_PTR(TYPE_INT))
149 IOCTL(USBDEVFS_SETINTERFACE, IOC_W,
150 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_setinterface)))
151 IOCTL(USBDEVFS_SETCONFIGURATION, IOC_W, MK_PTR(TYPE_INT))
152 IOCTL(USBDEVFS_GETDRIVER, IOC_R,
153 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_getdriver)))
154 IOCTL_SPECIAL(USBDEVFS_SUBMITURB, IOC_W, do_ioctl_usbdevfs_submiturb,
155 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
156 IOCTL_SPECIAL(USBDEVFS_DISCARDURB, IOC_RW, do_ioctl_usbdevfs_discardurb,
157 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
158 IOCTL_SPECIAL(USBDEVFS_REAPURB, IOC_R, do_ioctl_usbdevfs_reapurb,
159 MK_PTR(TYPE_PTRVOID))
160 IOCTL_SPECIAL(USBDEVFS_REAPURBNDELAY, IOC_R, do_ioctl_usbdevfs_reapurb,
161 MK_PTR(TYPE_PTRVOID))
162 IOCTL(USBDEVFS_DISCSIGNAL, IOC_W,
163 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_disconnectsignal)))
164 IOCTL(USBDEVFS_CLAIMINTERFACE, IOC_W, MK_PTR(TYPE_INT))
165 IOCTL(USBDEVFS_RELEASEINTERFACE, IOC_W, MK_PTR(TYPE_INT))
166 IOCTL(USBDEVFS_CONNECTINFO, IOC_R,
167 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_connectinfo)))
168 IOCTL(USBDEVFS_IOCTL, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_usbdevfs_ioctl)))
169 IOCTL(USBDEVFS_HUB_PORTINFO, IOC_R,
170 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_hub_portinfo)))
171 IOCTL(USBDEVFS_RESET, 0, TYPE_NULL)
172 IOCTL(USBDEVFS_CLEAR_HALT, IOC_W, MK_PTR(TYPE_INT))
173 IOCTL(USBDEVFS_DISCONNECT, 0, TYPE_NULL)
174 IOCTL(USBDEVFS_CONNECT, 0, TYPE_NULL)
175 IOCTL(USBDEVFS_CLAIM_PORT, IOC_W, MK_PTR(TYPE_INT))
176 IOCTL(USBDEVFS_RELEASE_PORT, IOC_W, MK_PTR(TYPE_INT))
177 IOCTL(USBDEVFS_GET_CAPABILITIES, IOC_R, MK_PTR(TYPE_INT))
178 IOCTL(USBDEVFS_DISCONNECT_CLAIM, IOC_W,
179 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_disconnect_claim)))
180 #ifdef USBDEVFS_DROP_PRIVILEGES
181 IOCTL(USBDEVFS_DROP_PRIVILEGES, IOC_W, MK_PTR(TYPE_INT))
182 #endif
183 #ifdef USBDEVFS_GET_SPEED
184 IOCTL(USBDEVFS_GET_SPEED, 0, TYPE_NULL)
185 #endif
186 #endif /* CONFIG_USBFS */
188 IOCTL(FIOGETOWN, IOC_R, MK_PTR(TYPE_INT))
189 IOCTL(FIOSETOWN, IOC_W, MK_PTR(TYPE_INT))
190 IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
191 IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
192 IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
193 IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
194 IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
195 IOCTL(SIOCSIFADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
196 IOCTL(SIOCGIFBRDADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
197 IOCTL(SIOCSIFBRDADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
198 IOCTL(SIOCGIFDSTADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
199 IOCTL(SIOCSIFDSTADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
200 IOCTL(SIOCGIFNETMASK, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
201 IOCTL(SIOCSIFNETMASK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
202 IOCTL(SIOCGIFHWADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
203 IOCTL(SIOCSIFHWADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
204 IOCTL(SIOCGIFTXQLEN, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
205 IOCTL(SIOCSIFTXQLEN, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
206 IOCTL(SIOCGIFMETRIC, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
207 IOCTL(SIOCSIFMETRIC, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
208 IOCTL(SIOCGIFMTU, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
209 IOCTL(SIOCSIFMTU, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
210 IOCTL(SIOCGIFMAP, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
211 IOCTL(SIOCSIFMAP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
212 IOCTL(SIOCGIFSLAVE, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
213 IOCTL(SIOCSIFSLAVE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
214 IOCTL(SIOCGIFMEM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
215 IOCTL(SIOCSIFMEM, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
216 IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
217 IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
218 IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
219 IOCTL(SIOCSIFPFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
220 IOCTL(SIOCGIFPFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
221 IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
222 IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
223 MK_PTR(MK_STRUCT(STRUCT_ifconf)))
224 IOCTL(SIOCGIFENCAP, IOC_RW, MK_PTR(TYPE_INT))
225 IOCTL(SIOCSIFENCAP, IOC_W, MK_PTR(TYPE_INT))
226 IOCTL(SIOCDARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
227 IOCTL(SIOCSARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
228 IOCTL(SIOCGARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
229 IOCTL(SIOCDRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
230 IOCTL(SIOCSRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
231 IOCTL(SIOCGRARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
232 IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
233 IOCTL(SIOCSPGRP, IOC_W, MK_PTR(TYPE_INT)) /* pid_t */
234 IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
237 * We can't use IOCTL_SPECIAL() because it will set
238 * host_cmd to XXX_OLD and XXX_NEW and these macros
239 * are not defined with kernel prior to 5.2.
240 * We must set host_cmd to the same value as in target_cmd
241 * otherwise the consistency check in syscall_init()
242 * will trigger an error.
243 * host_cmd is ignored by the do_ioctl_XXX() helpers.
244 * FIXME: create a macro to define this kind of entry
246 { TARGET_SIOCGSTAMP_OLD, TARGET_SIOCGSTAMP_OLD,
247 "SIOCGSTAMP_OLD", IOC_R, do_ioctl_SIOCGSTAMP },
248 { TARGET_SIOCGSTAMPNS_OLD, TARGET_SIOCGSTAMPNS_OLD,
249 "SIOCGSTAMPNS_OLD", IOC_R, do_ioctl_SIOCGSTAMPNS },
250 { TARGET_SIOCGSTAMP_NEW, TARGET_SIOCGSTAMP_NEW,
251 "SIOCGSTAMP_NEW", IOC_R, do_ioctl_SIOCGSTAMP },
252 { TARGET_SIOCGSTAMPNS_NEW, TARGET_SIOCGSTAMPNS_NEW,
253 "SIOCGSTAMPNS_NEW", IOC_R, do_ioctl_SIOCGSTAMPNS },
255 IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT))
256 IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT))
257 IOCTL(RNDZAPENTCNT, 0, TYPE_NULL)
258 IOCTL(RNDCLEARPOOL, 0, TYPE_NULL)
259 #ifdef RNDRESEEDCRNG
260 IOCTL(RNDRESEEDCRNG, 0, TYPE_NULL)
261 #endif
263 IOCTL(CDROMPAUSE, 0, TYPE_NULL)
264 IOCTL(CDROMSTART, 0, TYPE_NULL)
265 IOCTL(CDROMSTOP, 0, TYPE_NULL)
266 IOCTL(CDROMRESUME, 0, TYPE_NULL)
267 IOCTL(CDROMEJECT, 0, TYPE_NULL)
268 IOCTL(CDROMEJECT_SW, 0, TYPE_INT)
269 IOCTL(CDROMCLOSETRAY, 0, TYPE_NULL)
270 IOCTL(CDROMRESET, 0, TYPE_NULL)
271 IOCTL(CDROMPLAYMSF, IOC_W, MK_PTR(TYPE_INT))
272 IOCTL(CDROMPLAYTRKIND, IOC_W, MK_PTR(TYPE_INT))
273 IOCTL(CDROMREADTOCHDR, IOC_R, MK_PTR(TYPE_INT))
274 IOCTL(CDROMREADTOCENTRY, IOC_RW, MK_PTR(TYPE_INT))
275 IOCTL(CDROMVOLCTRL, IOC_W, MK_PTR(TYPE_INT))
276 IOCTL(CDROMSUBCHNL, IOC_RW, MK_PTR(TYPE_INT))
277 /* XXX: incorrect (need specific handling) */
278 IOCTL(CDROMREADAUDIO, IOC_W, MK_PTR(MK_STRUCT(STRUCT_cdrom_read_audio)))
279 IOCTL(CDROMREADCOOKED, IOC_RW, MK_PTR(TYPE_INT))
280 IOCTL(CDROMREADRAW, IOC_RW, MK_PTR(TYPE_INT))
281 IOCTL(CDROMREADMODE1, IOC_RW, MK_PTR(TYPE_INT))
282 IOCTL(CDROMREADMODE2, IOC_RW, MK_PTR(TYPE_INT))
283 IOCTL(CDROMREADALL, IOC_RW, MK_PTR(TYPE_INT))
284 IOCTL(CDROMMULTISESSION, IOC_RW, MK_PTR(TYPE_INT))
285 IOCTL(CDROM_GET_UPC, IOC_R, MK_PTR(TYPE_INT))
286 IOCTL(CDROMVOLREAD, IOC_R, MK_PTR(TYPE_INT))
287 IOCTL(CDROMSEEK, IOC_W, MK_PTR(TYPE_INT))
288 IOCTL(CDROMPLAYBLK, IOC_W, MK_PTR(TYPE_INT))
289 IOCTL(CDROM_MEDIA_CHANGED, 0, TYPE_NULL)
290 IOCTL(CDROM_SET_OPTIONS, 0, TYPE_INT)
291 IOCTL(CDROM_CLEAR_OPTIONS, 0, TYPE_INT)
292 IOCTL(CDROM_SELECT_SPEED, 0, TYPE_INT)
293 IOCTL(CDROM_SELECT_DISC, 0, TYPE_INT)
294 IOCTL(CDROM_DRIVE_STATUS, 0, TYPE_NULL)
295 IOCTL(CDROM_DISC_STATUS, 0, TYPE_NULL)
296 IOCTL(CDROMAUDIOBUFSIZ, 0, TYPE_INT)
298 #if 0
299 IOCTL(SNDCTL_COPR_HALT, IOC_RW, MK_PTR(TYPE_INT))
300 IOCTL(SNDCTL_COPR_LOAD, IOC_RW, MK_PTR(TYPE_INT))
301 IOCTL(SNDCTL_COPR_RCODE, IOC_RW, MK_PTR(TYPE_INT))
302 IOCTL(SNDCTL_COPR_RCVMSG, IOC_R, MK_PTR(TYPE_INT))
303 IOCTL(SNDCTL_COPR_RDATA, IOC_RW, MK_PTR(TYPE_INT))
304 IOCTL(SNDCTL_COPR_RESET, 0, TYPE_NULL)
305 IOCTL(SNDCTL_COPR_RUN, IOC_RW, MK_PTR(TYPE_INT))
306 IOCTL(SNDCTL_COPR_SENDMSG, IOC_RW, MK_PTR(TYPE_INT))
307 IOCTL(SNDCTL_COPR_WCODE, IOC_W, MK_PTR(TYPE_INT))
308 IOCTL(SNDCTL_COPR_WDATA, IOC_W, MK_PTR(TYPE_INT))
309 #endif
310 IOCTL(SNDCTL_DSP_CHANNELS, IOC_RW, MK_PTR(TYPE_INT))
311 IOCTL(SNDCTL_DSP_GETBLKSIZE, IOC_RW, MK_PTR(TYPE_INT))
312 IOCTL(SNDCTL_DSP_GETCAPS, IOC_R, MK_PTR(TYPE_INT))
313 IOCTL(SNDCTL_DSP_GETFMTS, IOC_R, MK_PTR(TYPE_INT))
314 IOCTL(SNDCTL_DSP_GETIPTR, IOC_R, MK_PTR(MK_STRUCT(STRUCT_count_info)))
315 IOCTL(SNDCTL_DSP_GETOPTR, IOC_R, MK_PTR(MK_STRUCT(STRUCT_count_info)))
316 IOCTL(SNDCTL_DSP_GETISPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
317 IOCTL(SNDCTL_DSP_GETOSPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
318 IOCTL(SNDCTL_DSP_GETTRIGGER, IOC_R, MK_PTR(TYPE_INT))
319 IOCTL(SNDCTL_DSP_MAPINBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
320 IOCTL(SNDCTL_DSP_MAPOUTBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
321 IOCTL(SNDCTL_DSP_NONBLOCK, 0, TYPE_NULL)
322 IOCTL(SNDCTL_DSP_POST, 0, TYPE_NULL)
323 IOCTL(SNDCTL_DSP_RESET, 0, TYPE_NULL)
324 IOCTL(SNDCTL_DSP_SETDUPLEX, 0, TYPE_NULL)
325 IOCTL(SNDCTL_DSP_SETFMT, IOC_RW, MK_PTR(TYPE_INT))
326 IOCTL(SNDCTL_DSP_SETFRAGMENT, IOC_RW, MK_PTR(TYPE_INT))
327 IOCTL(SNDCTL_DSP_SETSYNCRO, 0, TYPE_NULL)
328 IOCTL(SNDCTL_DSP_SETTRIGGER, IOC_W, MK_PTR(TYPE_INT))
329 IOCTL(SNDCTL_DSP_SPEED, IOC_RW, MK_PTR(TYPE_INT))
330 IOCTL(SNDCTL_DSP_STEREO, IOC_RW, MK_PTR(TYPE_INT))
331 IOCTL(SNDCTL_DSP_SUBDIVIDE, IOC_RW, MK_PTR(TYPE_INT))
332 IOCTL(SNDCTL_DSP_SYNC, 0, TYPE_NULL)
333 #if 0
334 IOCTL(SNDCTL_FM_4OP_ENABLE, IOC_W, MK_PTR(TYPE_INT))
335 IOCTL(SNDCTL_FM_LOAD_INSTR, IOC_W, MK_PTR(TYPE_INT))
336 IOCTL(SNDCTL_MIDI_INFO, IOC_RW, MK_PTR(TYPE_INT))
337 IOCTL(SNDCTL_MIDI_MPUCMD, IOC_RW, MK_PTR(TYPE_INT))
338 IOCTL(SNDCTL_MIDI_MPUMODE, IOC_RW, MK_PTR(TYPE_INT))
339 IOCTL(SNDCTL_MIDI_PRETIME, IOC_RW, MK_PTR(TYPE_INT))
340 IOCTL(SNDCTL_SEQ_CTRLRATE, IOC_RW, MK_PTR(TYPE_INT))
341 IOCTL(SNDCTL_SEQ_GETINCOUNT, IOC_R, MK_PTR(TYPE_INT))
342 IOCTL(SNDCTL_SEQ_GETOUTCOUNT, IOC_R, MK_PTR(TYPE_INT))
343 IOCTL(SNDCTL_SEQ_NRMIDIS, IOC_R, MK_PTR(TYPE_INT))
344 IOCTL(SNDCTL_SEQ_NRSYNTHS, IOC_R, MK_PTR(TYPE_INT))
345 IOCTL(SNDCTL_SEQ_OUTOFBAND, IOC_W, MK_PTR(TYPE_INT))
346 IOCTL(SNDCTL_SEQ_PANIC, 0, TYPE_NULL)
347 IOCTL(SNDCTL_SEQ_PERCMODE, IOC_W, MK_PTR(TYPE_INT))
348 IOCTL(SNDCTL_SEQ_RESET, 0, TYPE_NULL)
349 IOCTL(SNDCTL_SEQ_RESETSAMPLES, IOC_W, MK_PTR(TYPE_INT))
350 IOCTL(SNDCTL_SEQ_SYNC, 0, TYPE_NULL)
351 IOCTL(SNDCTL_SEQ_TESTMIDI, IOC_W, MK_PTR(TYPE_INT))
352 IOCTL(SNDCTL_SEQ_THRESHOLD, IOC_W, MK_PTR(TYPE_INT))
353 IOCTL(SNDCTL_SYNTH_INFO, IOC_RW, MK_PTR(TYPE_INT))
354 IOCTL(SNDCTL_SYNTH_MEMAVL, IOC_RW, MK_PTR(TYPE_INT))
355 IOCTL(SNDCTL_TMR_CONTINUE, 0, TYPE_NULL)
356 IOCTL(SNDCTL_TMR_METRONOME, IOC_W, MK_PTR(TYPE_INT))
357 IOCTL(SNDCTL_TMR_SELECT, IOC_W, MK_PTR(TYPE_INT))
358 IOCTL(SNDCTL_TMR_SOURCE, IOC_RW, MK_PTR(TYPE_INT))
359 #if 0
360 /* we invalidate these defines because they have a same number as
361 termios ioctls */
362 IOCTL(SNDCTL_TMR_START, 0, TYPE_NULL)
363 IOCTL(SNDCTL_TMR_STOP, 0, TYPE_NULL)
364 #endif
365 IOCTL(SNDCTL_TMR_TEMPO, IOC_RW, MK_PTR(TYPE_INT))
366 IOCTL(SNDCTL_TMR_TIMEBASE, IOC_RW, MK_PTR(TYPE_INT))
368 IOCTL(SOUND_PCM_WRITE_FILTER, IOC_W | IOC_R, MK_PTR(TYPE_INT))
369 IOCTL(SOUND_PCM_READ_RATE, IOC_R, MK_PTR(TYPE_INT))
370 IOCTL(SOUND_PCM_READ_CHANNELS, IOC_R, MK_PTR(TYPE_INT))
371 IOCTL(SOUND_PCM_READ_BITS, IOC_R, MK_PTR(TYPE_INT))
372 IOCTL(SOUND_PCM_READ_FILTER, IOC_R, MK_PTR(TYPE_INT))
373 #endif
374 IOCTL(SOUND_MIXER_INFO, IOC_R, MK_PTR(TYPE_INT))
375 IOCTL(SOUND_MIXER_ACCESS, 0, TYPE_PTRVOID)
376 IOCTL(SOUND_MIXER_PRIVATE1, IOC_RW, MK_PTR(TYPE_INT))
377 IOCTL(SOUND_MIXER_PRIVATE2, IOC_RW, MK_PTR(TYPE_INT))
378 IOCTL(SOUND_MIXER_PRIVATE3, IOC_RW, MK_PTR(TYPE_INT))
379 IOCTL(SOUND_MIXER_PRIVATE4, IOC_RW, MK_PTR(TYPE_INT))
380 IOCTL(SOUND_MIXER_PRIVATE5, IOC_RW, MK_PTR(TYPE_INT))
381 IOCTL(SOUND_MIXER_READ_VOLUME, IOC_R, MK_PTR(TYPE_INT))
382 IOCTL(SOUND_MIXER_READ_BASS, IOC_R, MK_PTR(TYPE_INT))
383 IOCTL(SOUND_MIXER_READ_TREBLE, IOC_R, MK_PTR(TYPE_INT))
384 IOCTL(SOUND_MIXER_READ_SYNTH, IOC_R, MK_PTR(TYPE_INT))
385 IOCTL(SOUND_MIXER_READ_PCM, IOC_R, MK_PTR(TYPE_INT))
386 IOCTL(SOUND_MIXER_READ_SPEAKER, IOC_R, MK_PTR(TYPE_INT))
387 IOCTL(SOUND_MIXER_READ_LINE, IOC_R, MK_PTR(TYPE_INT))
388 IOCTL(SOUND_MIXER_READ_MIC, IOC_R, MK_PTR(TYPE_INT))
389 IOCTL(SOUND_MIXER_READ_CD, IOC_R, MK_PTR(TYPE_INT))
390 IOCTL(SOUND_MIXER_READ_IMIX, IOC_R, MK_PTR(TYPE_INT))
391 IOCTL(SOUND_MIXER_READ_ALTPCM, IOC_R, MK_PTR(TYPE_INT))
392 IOCTL(SOUND_MIXER_READ_RECLEV, IOC_R, MK_PTR(TYPE_INT))
393 IOCTL(SOUND_MIXER_READ_IGAIN, IOC_R, MK_PTR(TYPE_INT))
394 IOCTL(SOUND_MIXER_READ_OGAIN, IOC_R, MK_PTR(TYPE_INT))
395 IOCTL(SOUND_MIXER_READ_LINE1, IOC_R, MK_PTR(TYPE_INT))
396 IOCTL(SOUND_MIXER_READ_LINE2, IOC_R, MK_PTR(TYPE_INT))
397 IOCTL(SOUND_MIXER_READ_LINE3, IOC_R, MK_PTR(TYPE_INT))
398 IOCTL(SOUND_MIXER_READ_MUTE, IOC_R, MK_PTR(TYPE_INT))
399 IOCTL(SOUND_MIXER_READ_ENHANCE, IOC_R, MK_PTR(TYPE_INT))
400 IOCTL(SOUND_MIXER_READ_LOUD, IOC_R, MK_PTR(TYPE_INT))
401 IOCTL(SOUND_MIXER_READ_RECSRC, IOC_R, MK_PTR(TYPE_INT))
402 IOCTL(SOUND_MIXER_READ_DEVMASK, IOC_R, MK_PTR(TYPE_INT))
403 IOCTL(SOUND_MIXER_READ_RECMASK, IOC_R, MK_PTR(TYPE_INT))
404 IOCTL(SOUND_MIXER_READ_STEREODEVS, IOC_R, MK_PTR(TYPE_INT))
405 IOCTL(SOUND_MIXER_READ_CAPS, IOC_R, MK_PTR(TYPE_INT))
407 IOCTL(SOUND_MIXER_WRITE_VOLUME, IOC_W, MK_PTR(TYPE_INT))
408 IOCTL(SOUND_MIXER_WRITE_BASS, IOC_W, MK_PTR(TYPE_INT))
409 IOCTL(SOUND_MIXER_WRITE_TREBLE, IOC_W, MK_PTR(TYPE_INT))
410 IOCTL(SOUND_MIXER_WRITE_SYNTH, IOC_W, MK_PTR(TYPE_INT))
411 IOCTL(SOUND_MIXER_WRITE_PCM, IOC_W, MK_PTR(TYPE_INT))
412 IOCTL(SOUND_MIXER_WRITE_SPEAKER, IOC_W, MK_PTR(TYPE_INT))
413 IOCTL(SOUND_MIXER_WRITE_LINE, IOC_W, MK_PTR(TYPE_INT))
414 IOCTL(SOUND_MIXER_WRITE_MIC, IOC_W, MK_PTR(TYPE_INT))
415 IOCTL(SOUND_MIXER_WRITE_CD, IOC_W, MK_PTR(TYPE_INT))
416 IOCTL(SOUND_MIXER_WRITE_IMIX, IOC_W, MK_PTR(TYPE_INT))
417 IOCTL(SOUND_MIXER_WRITE_ALTPCM, IOC_W, MK_PTR(TYPE_INT))
418 IOCTL(SOUND_MIXER_WRITE_RECLEV, IOC_W, MK_PTR(TYPE_INT))
419 IOCTL(SOUND_MIXER_WRITE_IGAIN, IOC_W, MK_PTR(TYPE_INT))
420 IOCTL(SOUND_MIXER_WRITE_OGAIN, IOC_W, MK_PTR(TYPE_INT))
421 IOCTL(SOUND_MIXER_WRITE_LINE1, IOC_W, MK_PTR(TYPE_INT))
422 IOCTL(SOUND_MIXER_WRITE_LINE2, IOC_W, MK_PTR(TYPE_INT))
423 IOCTL(SOUND_MIXER_WRITE_LINE3, IOC_W, MK_PTR(TYPE_INT))
424 IOCTL(SOUND_MIXER_WRITE_MUTE, IOC_W, MK_PTR(TYPE_INT))
425 IOCTL(SOUND_MIXER_WRITE_ENHANCE, IOC_W, MK_PTR(TYPE_INT))
426 IOCTL(SOUND_MIXER_WRITE_LOUD, IOC_W, MK_PTR(TYPE_INT))
427 IOCTL(SOUND_MIXER_WRITE_RECSRC, IOC_W, MK_PTR(TYPE_INT))
429 IOCTL(HDIO_GETGEO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_hd_geometry)))
430 IOCTL(HDIO_GET_UNMASKINTR, IOC_R, MK_PTR(TYPE_INT))
431 IOCTL(HDIO_GET_MULTCOUNT, IOC_R, MK_PTR(TYPE_INT))
432 IOCTL(HDIO_GET_IDENTITY, IOC_R, MK_PTR(TYPE_INT))
433 IOCTL(HDIO_GET_KEEPSETTINGS, IOC_R, MK_PTR(TYPE_INT))
434 IOCTL(HDIO_GET_NOWERR, IOC_R, MK_PTR(TYPE_INT))
435 IOCTL(HDIO_GET_DMA, IOC_R, MK_PTR(TYPE_INT))
436 IOCTL(HDIO_GET_32BIT, IOC_R, MK_PTR(TYPE_INT))
437 IOCTL(HDIO_DRIVE_CMD, IOC_R, MK_PTR(TYPE_INT))
438 IOCTL(HDIO_SET_UNMASKINTR, 0, TYPE_INT)
439 IOCTL(HDIO_SET_MULTCOUNT, 0, TYPE_INT)
440 IOCTL(HDIO_SET_KEEPSETTINGS, 0, TYPE_INT)
441 IOCTL(HDIO_SET_NOWERR, 0, TYPE_INT)
442 IOCTL(HDIO_SET_DMA, 0, TYPE_INT)
443 IOCTL(HDIO_SET_32BIT, 0, TYPE_INT)
444 IOCTL(HDIO_SET_PIO_MODE, 0, TYPE_INT)
446 IOCTL(VFAT_IOCTL_READDIR_BOTH, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2)))
447 IOCTL(VFAT_IOCTL_READDIR_SHORT, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2)))
449 IOCTL(LOOP_SET_FD, 0, TYPE_INT)
450 IOCTL(LOOP_CLR_FD, 0, TYPE_INT)
451 IOCTL(LOOP_SET_STATUS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
452 IOCTL(LOOP_GET_STATUS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
453 IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
454 IOCTL(LOOP_GET_STATUS64, IOC_R, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
455 IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT)
457 IOCTL(LOOP_CTL_ADD, 0, TYPE_INT)
458 IOCTL(LOOP_CTL_REMOVE, 0, TYPE_INT)
459 IOCTL(LOOP_CTL_GET_FREE, 0, TYPE_NULL)
461 IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop)))
462 IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget)))
463 IOCTL(MTIOCPOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtpos)))
465 IOCTL(FBIOGET_FSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_fix_screeninfo)))
466 IOCTL(FBIOGET_VSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
467 IOCTL(FBIOPUT_VSCREENINFO, IOC_W, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
468 IOCTL(FBIOGETCMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
469 IOCTL(FBIOPUTCMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
470 IOCTL(FBIOPAN_DISPLAY, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
471 IOCTL(FBIOGET_CON2FBMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
472 IOCTL(FBIOPUT_CON2FBMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
474 IOCTL(VT_OPENQRY, IOC_R, MK_PTR(TYPE_INT))
475 IOCTL(VT_GETSTATE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_vt_stat)))
476 IOCTL(VT_ACTIVATE, 0, TYPE_INT)
477 IOCTL(VT_WAITACTIVE, 0, TYPE_INT)
478 IOCTL(VT_LOCKSWITCH, 0, TYPE_INT)
479 IOCTL(VT_UNLOCKSWITCH, 0, TYPE_INT)
480 IOCTL(VT_GETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
481 IOCTL(VT_SETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
482 IOCTL(VT_RELDISP, 0, TYPE_INT)
483 IOCTL(VT_DISALLOCATE, 0, TYPE_INT)
485 IOCTL(DM_VERSION, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
486 IOCTL_SPECIAL(DM_REMOVE_ALL, IOC_RW, do_ioctl_dm,
487 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
488 IOCTL_SPECIAL(DM_LIST_DEVICES, IOC_RW, do_ioctl_dm,
489 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
490 IOCTL_SPECIAL(DM_DEV_CREATE, IOC_RW, do_ioctl_dm,
491 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
492 IOCTL_SPECIAL(DM_DEV_REMOVE, IOC_RW, do_ioctl_dm,
493 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
494 IOCTL_SPECIAL(DM_DEV_RENAME, IOC_RW, do_ioctl_dm,
495 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
496 IOCTL_SPECIAL(DM_DEV_SUSPEND, IOC_RW, do_ioctl_dm,
497 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
498 IOCTL_SPECIAL(DM_DEV_STATUS, IOC_RW, do_ioctl_dm,
499 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
500 IOCTL_SPECIAL(DM_DEV_WAIT, IOC_RW, do_ioctl_dm,
501 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
502 IOCTL_SPECIAL(DM_TABLE_LOAD, IOC_RW, do_ioctl_dm,
503 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
504 IOCTL_SPECIAL(DM_TABLE_CLEAR, IOC_RW, do_ioctl_dm,
505 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
506 IOCTL_SPECIAL(DM_TABLE_DEPS, IOC_RW, do_ioctl_dm,
507 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
508 IOCTL_SPECIAL(DM_TABLE_STATUS, IOC_RW, do_ioctl_dm,
509 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
510 IOCTL_SPECIAL(DM_LIST_VERSIONS,IOC_RW, do_ioctl_dm,
511 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
512 IOCTL_SPECIAL(DM_TARGET_MSG, IOC_RW, do_ioctl_dm,
513 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
514 IOCTL_SPECIAL(DM_DEV_SET_GEOMETRY, IOC_RW, do_ioctl_dm,
515 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
516 IOCTL_SPECIAL(SIOCADDRT, IOC_W, do_ioctl_rt,
517 MK_PTR(MK_STRUCT(STRUCT_rtentry)))
518 IOCTL_SPECIAL(SIOCDELRT, IOC_W, do_ioctl_rt,
519 MK_PTR(MK_STRUCT(STRUCT_rtentry)))
521 #ifdef TARGET_TIOCSTART
522 IOCTL_IGNORE(TIOCSTART)
523 IOCTL_IGNORE(TIOCSTOP)
524 #endif