linux-user: Add support for two btrfs ioctls used for subvolume
[qemu.git] / linux-user / ioctls.h
1 /* emulated ioctl list */
2
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)))
57
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)
71
72 IOCTL(RTC_AIE_ON, 0, TYPE_NULL)
73 IOCTL(RTC_AIE_OFF, 0, TYPE_NULL)
74 IOCTL(RTC_UIE_ON, 0, TYPE_NULL)
75 IOCTL(RTC_UIE_OFF, 0, TYPE_NULL)
76 IOCTL(RTC_PIE_ON, 0, TYPE_NULL)
77 IOCTL(RTC_PIE_OFF, 0, TYPE_NULL)
78 IOCTL(RTC_WIE_ON, 0, TYPE_NULL)
79 IOCTL(RTC_WIE_OFF, 0, TYPE_NULL)
80 IOCTL(RTC_ALM_READ, IOC_R, MK_PTR(MK_STRUCT(STRUCT_rtc_time)))
81 IOCTL(RTC_ALM_SET, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtc_time)))
82 IOCTL(RTC_RD_TIME, IOC_R, MK_PTR(MK_STRUCT(STRUCT_rtc_time)))
83 IOCTL(RTC_SET_TIME, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtc_time)))
84 IOCTL(RTC_IRQP_READ, IOC_R, MK_PTR(TYPE_ULONG))
85 IOCTL(RTC_IRQP_SET, IOC_W, TYPE_ULONG)
86 IOCTL(RTC_EPOCH_READ, IOC_R, MK_PTR(TYPE_ULONG))
87 IOCTL(RTC_EPOCH_SET, IOC_W, TYPE_ULONG)
88 IOCTL(RTC_WKALM_RD, IOC_R, MK_PTR(MK_STRUCT(STRUCT_rtc_wkalrm)))
89 IOCTL(RTC_WKALM_SET, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtc_wkalrm)))
90 IOCTL(RTC_PLL_GET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_rtc_pll_info)))
91 IOCTL(RTC_PLL_SET, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtc_pll_info)))
92 IOCTL(RTC_VL_READ, IOC_R, MK_PTR(TYPE_INT))
93 IOCTL(RTC_VL_CLR, 0, TYPE_NULL)
94
95 IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT))
96 IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT))
97 IOCTL(BLKRRPART, 0, TYPE_NULL)
98 IOCTL(BLKGETSIZE, IOC_R, MK_PTR(TYPE_ULONG))
99 #ifdef BLKGETSIZE64
100 IOCTL(BLKGETSIZE64, IOC_R, MK_PTR(TYPE_ULONGLONG))
101 #endif
102 IOCTL(BLKFLSBUF, 0, TYPE_NULL)
103 IOCTL(BLKRASET, 0, TYPE_INT)
104 IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG))
105 IOCTL(BLKSSZGET, IOC_R, MK_PTR(TYPE_INT))
106 IOCTL(BLKBSZGET, IOC_R, MK_PTR(TYPE_INT))
107 IOCTL_SPECIAL(BLKPG, IOC_W, do_ioctl_blkpg,
108 MK_PTR(MK_STRUCT(STRUCT_blkpg_ioctl_arg)))
109
110 #ifdef BLKDISCARD
111 IOCTL(BLKDISCARD, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
112 #endif
113 #ifdef BLKIOMIN
114 IOCTL(BLKIOMIN, IOC_R, MK_PTR(TYPE_INT))
115 #endif
116 #ifdef BLKIOOPT
117 IOCTL(BLKIOOPT, IOC_R, MK_PTR(TYPE_INT))
118 #endif
119 #ifdef BLKALIGNOFF
120 IOCTL(BLKALIGNOFF, IOC_R, MK_PTR(TYPE_INT))
121 #endif
122 #ifdef BLKPBSZGET
123 IOCTL(BLKPBSZGET, IOC_R, MK_PTR(TYPE_INT))
124 #endif
125 #ifdef BLKDISCARDZEROES
126 IOCTL(BLKDISCARDZEROES, IOC_R, MK_PTR(TYPE_INT))
127 #endif
128 #ifdef BLKSECDISCARD
129 IOCTL(BLKSECDISCARD, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
130 #endif
131 #ifdef BLKROTATIONAL
132 IOCTL(BLKROTATIONAL, IOC_R, MK_PTR(TYPE_SHORT))
133 #endif
134 #ifdef BLKZEROOUT
135 IOCTL(BLKZEROOUT, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2)))
136 #endif
137
138 IOCTL(FDMSGON, 0, TYPE_NULL)
139 IOCTL(FDMSGOFF, 0, TYPE_NULL)
140 IOCTL(FDSETEMSGTRESH, 0, TYPE_NULL)
141 IOCTL(FDFMTBEG, 0, TYPE_NULL)
142 IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr)))
143 IOCTL(FDFMTEND, 0, TYPE_NULL)
144 IOCTL(FDFLUSH, 0, TYPE_NULL)
145 IOCTL(FDSETMAXERRS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)))
146 IOCTL(FDGETMAXERRS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)))
147 IOCTL(FDRESET, 0, TYPE_NULL)
148 IOCTL(FDRAWCMD, 0, TYPE_NULL)
149 IOCTL(FDTWADDLE, 0, TYPE_NULL)
150 IOCTL(FDEJECT, 0, TYPE_NULL)
151
152 #ifdef FIBMAP
153 IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG))
154 #endif
155 #ifdef FICLONE
156 IOCTL(FICLONE, IOC_W, TYPE_INT)
157 IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range)))
158 #endif
159
160 #ifdef FIGETBSZ
161 IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
162 #endif
163 #ifdef CONFIG_FIEMAP
164 IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap,
165 MK_PTR(MK_STRUCT(STRUCT_fiemap)))
166 #endif
167
168 IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT))
169 IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT))
170 IOCTL(FS_IOC_GETVERSION, IOC_R, MK_PTR(TYPE_INT))
171 IOCTL(FS_IOC_SETVERSION, IOC_W, MK_PTR(TYPE_INT))
172 IOCTL(FS_IOC32_GETFLAGS, IOC_R, MK_PTR(TYPE_INT))
173 IOCTL(FS_IOC32_SETFLAGS, IOC_W, MK_PTR(TYPE_INT))
174 IOCTL(FS_IOC32_GETVERSION, IOC_R, MK_PTR(TYPE_INT))
175 IOCTL(FS_IOC32_SETVERSION, IOC_W, MK_PTR(TYPE_INT))
176
177 #ifdef BTRFS_IOC_SNAP_CREATE
178 IOCTL(BTRFS_IOC_SNAP_CREATE, IOC_W,
179 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
180 #endif
181 #ifdef BTRFS_IOC_SCAN_DEV
182 IOCTL(BTRFS_IOC_SCAN_DEV, IOC_W,
183 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
184 #endif
185 #ifdef BTRFS_IOC_FORGET_DEV
186 IOCTL(BTRFS_IOC_FORGET_DEV, IOC_W,
187 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
188 #endif
189 #ifdef BTRFS_IOC_ADD_DEV
190 IOCTL(BTRFS_IOC_ADD_DEV, IOC_W,
191 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
192 #endif
193 #ifdef BTRFS_IOC_RM_DEV
194 IOCTL(BTRFS_IOC_RM_DEV, IOC_W,
195 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
196 #endif
197 #ifdef BTRFS_IOC_SUBVOL_CREATE
198 IOCTL(BTRFS_IOC_SUBVOL_CREATE, IOC_W,
199 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
200 #endif
201 #ifdef BTRFS_IOC_SNAP_DESTROY
202 IOCTL(BTRFS_IOC_SNAP_DESTROY, IOC_W,
203 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_vol_args)))
204 #endif
205 #ifdef BTRFS_IOC_INO_LOOKUP
206 IOCTL(BTRFS_IOC_INO_LOOKUP, IOC_RW,
207 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_args)))
208 #endif
209 #ifdef BTRFS_IOC_DEFAULT_SUBVOL
210 IOCTL(BTRFS_IOC_DEFAULT_SUBVOL, IOC_W, MK_PTR(TYPE_ULONGLONG))
211 #endif
212 #ifdef BTRFS_IOC_SUBVOL_GETFLAGS
213 IOCTL(BTRFS_IOC_SUBVOL_GETFLAGS, IOC_R, MK_PTR(TYPE_ULONGLONG))
214 #endif
215 #ifdef BTRFS_IOC_SUBVOL_SETFLAGS
216 IOCTL(BTRFS_IOC_SUBVOL_SETFLAGS, IOC_W, MK_PTR(TYPE_ULONGLONG))
217 #endif
218 #ifdef BTRFS_IOC_DEV_INFO
219 IOCTL(BTRFS_IOC_DEV_INFO, IOC_RW,
220 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_dev_info_args)))
221 #endif
222 #ifdef BTRFS_IOC_INO_PATHS
223 IOCTL(BTRFS_IOC_INO_PATHS, IOC_RW,
224 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_path_args)))
225 #endif
226 #ifdef BTRFS_IOC_LOGICAL_INO
227 IOCTL(BTRFS_IOC_LOGICAL_INO, IOC_RW,
228 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args)))
229 #endif
230 #ifdef BTRFS_IOC_GET_DEV_STATS
231 IOCTL(BTRFS_IOC_GET_DEV_STATS, IOC_RW,
232 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_dev_stats)))
233 #endif
234 #ifdef BTRFS_IOC_GET_FEATURES
235 IOCTL(BTRFS_IOC_GET_FEATURES, IOC_R,
236 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags)))
237 #endif
238 #ifdef BTRFS_IOC_SET_FEATURES
239 IOCTL(BTRFS_IOC_SET_FEATURES, IOC_W,
240 MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 2)))
241 #endif
242 #ifdef BTRFS_IOC_GET_SUPPORTED_FEATURES
243 IOCTL(BTRFS_IOC_GET_SUPPORTED_FEATURES, IOC_R,
244 MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_btrfs_ioctl_feature_flags), 3)))
245 #endif
246 #ifdef BTRFS_IOC_LOGICAL_INO_V2
247 IOCTL(BTRFS_IOC_LOGICAL_INO_V2, IOC_RW,
248 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_logical_ino_args)))
249 #endif
250 #ifdef BTRFS_IOC_GET_SUBVOL_INFO
251 IOCTL(BTRFS_IOC_GET_SUBVOL_INFO, IOC_R,
252 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_info_args)))
253 #endif
254 #ifdef BTRFS_IOC_GET_SUBVOL_ROOTREF
255 IOCTL(BTRFS_IOC_GET_SUBVOL_ROOTREF, IOC_RW,
256 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_get_subvol_rootref_args)))
257 #endif
258 #ifdef BTRFS_IOC_INO_LOOKUP_USER
259 IOCTL(BTRFS_IOC_INO_LOOKUP_USER, IOC_RW,
260 MK_PTR(MK_STRUCT(STRUCT_btrfs_ioctl_ino_lookup_user_args)))
261 #endif
262
263 #ifdef CONFIG_USBFS
264 /* USB ioctls */
265 IOCTL(USBDEVFS_CONTROL, IOC_RW,
266 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_ctrltransfer)))
267 IOCTL(USBDEVFS_BULK, IOC_RW,
268 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_bulktransfer)))
269 IOCTL(USBDEVFS_RESETEP, IOC_W, MK_PTR(TYPE_INT))
270 IOCTL(USBDEVFS_SETINTERFACE, IOC_W,
271 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_setinterface)))
272 IOCTL(USBDEVFS_SETCONFIGURATION, IOC_W, MK_PTR(TYPE_INT))
273 IOCTL(USBDEVFS_GETDRIVER, IOC_R,
274 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_getdriver)))
275 IOCTL_SPECIAL(USBDEVFS_SUBMITURB, IOC_W, do_ioctl_usbdevfs_submiturb,
276 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
277 IOCTL_SPECIAL(USBDEVFS_DISCARDURB, IOC_RW, do_ioctl_usbdevfs_discardurb,
278 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
279 IOCTL_SPECIAL(USBDEVFS_REAPURB, IOC_R, do_ioctl_usbdevfs_reapurb,
280 MK_PTR(TYPE_PTRVOID))
281 IOCTL_SPECIAL(USBDEVFS_REAPURBNDELAY, IOC_R, do_ioctl_usbdevfs_reapurb,
282 MK_PTR(TYPE_PTRVOID))
283 IOCTL(USBDEVFS_DISCSIGNAL, IOC_W,
284 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_disconnectsignal)))
285 IOCTL(USBDEVFS_CLAIMINTERFACE, IOC_W, MK_PTR(TYPE_INT))
286 IOCTL(USBDEVFS_RELEASEINTERFACE, IOC_W, MK_PTR(TYPE_INT))
287 IOCTL(USBDEVFS_CONNECTINFO, IOC_R,
288 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_connectinfo)))
289 IOCTL(USBDEVFS_IOCTL, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_usbdevfs_ioctl)))
290 IOCTL(USBDEVFS_HUB_PORTINFO, IOC_R,
291 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_hub_portinfo)))
292 IOCTL(USBDEVFS_RESET, 0, TYPE_NULL)
293 IOCTL(USBDEVFS_CLEAR_HALT, IOC_W, MK_PTR(TYPE_INT))
294 IOCTL(USBDEVFS_DISCONNECT, 0, TYPE_NULL)
295 IOCTL(USBDEVFS_CONNECT, 0, TYPE_NULL)
296 IOCTL(USBDEVFS_CLAIM_PORT, IOC_W, MK_PTR(TYPE_INT))
297 IOCTL(USBDEVFS_RELEASE_PORT, IOC_W, MK_PTR(TYPE_INT))
298 IOCTL(USBDEVFS_GET_CAPABILITIES, IOC_R, MK_PTR(TYPE_INT))
299 IOCTL(USBDEVFS_DISCONNECT_CLAIM, IOC_W,
300 MK_PTR(MK_STRUCT(STRUCT_usbdevfs_disconnect_claim)))
301 #ifdef USBDEVFS_DROP_PRIVILEGES
302 IOCTL(USBDEVFS_DROP_PRIVILEGES, IOC_W, MK_PTR(TYPE_INT))
303 #endif
304 #ifdef USBDEVFS_GET_SPEED
305 IOCTL(USBDEVFS_GET_SPEED, 0, TYPE_NULL)
306 #endif
307 #endif /* CONFIG_USBFS */
308
309 IOCTL(FIOGETOWN, IOC_R, MK_PTR(TYPE_INT))
310 IOCTL(FIOSETOWN, IOC_W, MK_PTR(TYPE_INT))
311 IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
312 IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
313 IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
314 IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
315 IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
316 IOCTL(SIOCSIFADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
317 IOCTL(SIOCGIFBRDADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
318 IOCTL(SIOCSIFBRDADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
319 IOCTL(SIOCGIFDSTADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
320 IOCTL(SIOCSIFDSTADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
321 IOCTL(SIOCGIFNETMASK, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
322 IOCTL(SIOCSIFNETMASK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
323 IOCTL(SIOCGIFHWADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
324 IOCTL(SIOCSIFHWADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
325 IOCTL(SIOCGIFTXQLEN, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
326 IOCTL(SIOCSIFTXQLEN, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
327 IOCTL(SIOCGIFMETRIC, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
328 IOCTL(SIOCSIFMETRIC, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
329 IOCTL(SIOCGIFMTU, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
330 IOCTL(SIOCSIFMTU, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
331 IOCTL(SIOCGIFMAP, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
332 IOCTL(SIOCSIFMAP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
333 IOCTL(SIOCGIFSLAVE, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
334 IOCTL(SIOCSIFSLAVE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
335 IOCTL(SIOCGIFMEM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
336 IOCTL(SIOCSIFMEM, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
337 IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
338 IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
339 IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
340 IOCTL(SIOCSIFPFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
341 IOCTL(SIOCGIFPFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
342 IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
343 IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
344 MK_PTR(MK_STRUCT(STRUCT_ifconf)))
345 IOCTL(SIOCGIFENCAP, IOC_RW, MK_PTR(TYPE_INT))
346 IOCTL(SIOCSIFENCAP, IOC_W, MK_PTR(TYPE_INT))
347 IOCTL(SIOCDARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
348 IOCTL(SIOCSARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
349 IOCTL(SIOCGARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
350 IOCTL(SIOCDRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
351 IOCTL(SIOCSRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
352 IOCTL(SIOCGRARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
353 IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
354 IOCTL(SIOCSPGRP, IOC_W, MK_PTR(TYPE_INT)) /* pid_t */
355 IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
356
357 /*
358 * We can't use IOCTL_SPECIAL() because it will set
359 * host_cmd to XXX_OLD and XXX_NEW and these macros
360 * are not defined with kernel prior to 5.2.
361 * We must set host_cmd to the same value as in target_cmd
362 * otherwise the consistency check in syscall_init()
363 * will trigger an error.
364 * host_cmd is ignored by the do_ioctl_XXX() helpers.
365 * FIXME: create a macro to define this kind of entry
366 */
367 { TARGET_SIOCGSTAMP_OLD, TARGET_SIOCGSTAMP_OLD,
368 "SIOCGSTAMP_OLD", IOC_R, do_ioctl_SIOCGSTAMP,
369 { MK_PTR(MK_STRUCT(STRUCT_timeval)) } },
370 { TARGET_SIOCGSTAMPNS_OLD, TARGET_SIOCGSTAMPNS_OLD,
371 "SIOCGSTAMPNS_OLD", IOC_R, do_ioctl_SIOCGSTAMPNS,
372 { MK_PTR(MK_STRUCT(STRUCT_timespec)) } },
373 { TARGET_SIOCGSTAMP_NEW, TARGET_SIOCGSTAMP_NEW,
374 "SIOCGSTAMP_NEW", IOC_R, do_ioctl_SIOCGSTAMP,
375 { MK_PTR(MK_STRUCT(STRUCT__kernel_sock_timeval)) } },
376 { TARGET_SIOCGSTAMPNS_NEW, TARGET_SIOCGSTAMPNS_NEW,
377 "SIOCGSTAMPNS_NEW", IOC_R, do_ioctl_SIOCGSTAMPNS,
378 { MK_PTR(MK_STRUCT(STRUCT__kernel_timespec)) } },
379
380 IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT))
381 IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT))
382 IOCTL(RNDZAPENTCNT, 0, TYPE_NULL)
383 IOCTL(RNDCLEARPOOL, 0, TYPE_NULL)
384 #ifdef RNDRESEEDCRNG
385 IOCTL(RNDRESEEDCRNG, 0, TYPE_NULL)
386 #endif
387
388 IOCTL(CDROMPAUSE, 0, TYPE_NULL)
389 IOCTL(CDROMSTART, 0, TYPE_NULL)
390 IOCTL(CDROMSTOP, 0, TYPE_NULL)
391 IOCTL(CDROMRESUME, 0, TYPE_NULL)
392 IOCTL(CDROMEJECT, 0, TYPE_NULL)
393 IOCTL(CDROMEJECT_SW, 0, TYPE_INT)
394 IOCTL(CDROMCLOSETRAY, 0, TYPE_NULL)
395 IOCTL(CDROMRESET, 0, TYPE_NULL)
396 IOCTL(CDROMPLAYMSF, IOC_W, MK_PTR(TYPE_INT))
397 IOCTL(CDROMPLAYTRKIND, IOC_W, MK_PTR(TYPE_INT))
398 IOCTL(CDROMREADTOCHDR, IOC_R, MK_PTR(TYPE_INT))
399 IOCTL(CDROMREADTOCENTRY, IOC_RW, MK_PTR(TYPE_INT))
400 IOCTL(CDROMVOLCTRL, IOC_W, MK_PTR(TYPE_INT))
401 IOCTL(CDROMSUBCHNL, IOC_RW, MK_PTR(TYPE_INT))
402 /* XXX: incorrect (need specific handling) */
403 IOCTL(CDROMREADAUDIO, IOC_W, MK_PTR(MK_STRUCT(STRUCT_cdrom_read_audio)))
404 IOCTL(CDROMREADCOOKED, IOC_RW, MK_PTR(TYPE_INT))
405 IOCTL(CDROMREADRAW, IOC_RW, MK_PTR(TYPE_INT))
406 IOCTL(CDROMREADMODE1, IOC_RW, MK_PTR(TYPE_INT))
407 IOCTL(CDROMREADMODE2, IOC_RW, MK_PTR(TYPE_INT))
408 IOCTL(CDROMREADALL, IOC_RW, MK_PTR(TYPE_INT))
409 IOCTL(CDROMMULTISESSION, IOC_RW, MK_PTR(TYPE_INT))
410 IOCTL(CDROM_GET_UPC, IOC_R, MK_PTR(TYPE_INT))
411 IOCTL(CDROMVOLREAD, IOC_R, MK_PTR(TYPE_INT))
412 IOCTL(CDROMSEEK, IOC_W, MK_PTR(TYPE_INT))
413 IOCTL(CDROMPLAYBLK, IOC_W, MK_PTR(TYPE_INT))
414 IOCTL(CDROM_MEDIA_CHANGED, 0, TYPE_NULL)
415 IOCTL(CDROM_SET_OPTIONS, 0, TYPE_INT)
416 IOCTL(CDROM_CLEAR_OPTIONS, 0, TYPE_INT)
417 IOCTL(CDROM_SELECT_SPEED, 0, TYPE_INT)
418 IOCTL(CDROM_SELECT_DISC, 0, TYPE_INT)
419 IOCTL(CDROM_DRIVE_STATUS, 0, TYPE_NULL)
420 IOCTL(CDROM_DISC_STATUS, 0, TYPE_NULL)
421 IOCTL(CDROMAUDIOBUFSIZ, 0, TYPE_INT)
422
423 #if 0
424 IOCTL(SNDCTL_COPR_HALT, IOC_RW, MK_PTR(TYPE_INT))
425 IOCTL(SNDCTL_COPR_LOAD, IOC_RW, MK_PTR(TYPE_INT))
426 IOCTL(SNDCTL_COPR_RCODE, IOC_RW, MK_PTR(TYPE_INT))
427 IOCTL(SNDCTL_COPR_RCVMSG, IOC_R, MK_PTR(TYPE_INT))
428 IOCTL(SNDCTL_COPR_RDATA, IOC_RW, MK_PTR(TYPE_INT))
429 IOCTL(SNDCTL_COPR_RESET, 0, TYPE_NULL)
430 IOCTL(SNDCTL_COPR_RUN, IOC_RW, MK_PTR(TYPE_INT))
431 IOCTL(SNDCTL_COPR_SENDMSG, IOC_RW, MK_PTR(TYPE_INT))
432 IOCTL(SNDCTL_COPR_WCODE, IOC_W, MK_PTR(TYPE_INT))
433 IOCTL(SNDCTL_COPR_WDATA, IOC_W, MK_PTR(TYPE_INT))
434 #endif
435 IOCTL(SNDCTL_DSP_CHANNELS, IOC_RW, MK_PTR(TYPE_INT))
436 IOCTL(SNDCTL_DSP_GETBLKSIZE, IOC_RW, MK_PTR(TYPE_INT))
437 IOCTL(SNDCTL_DSP_GETCAPS, IOC_R, MK_PTR(TYPE_INT))
438 IOCTL(SNDCTL_DSP_GETFMTS, IOC_R, MK_PTR(TYPE_INT))
439 IOCTL(SNDCTL_DSP_GETIPTR, IOC_R, MK_PTR(MK_STRUCT(STRUCT_count_info)))
440 IOCTL(SNDCTL_DSP_GETOPTR, IOC_R, MK_PTR(MK_STRUCT(STRUCT_count_info)))
441 IOCTL(SNDCTL_DSP_GETISPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
442 IOCTL(SNDCTL_DSP_GETOSPACE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_audio_buf_info)))
443 IOCTL(SNDCTL_DSP_GETTRIGGER, IOC_R, MK_PTR(TYPE_INT))
444 IOCTL(SNDCTL_DSP_MAPINBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
445 IOCTL(SNDCTL_DSP_MAPOUTBUF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_buffmem_desc)))
446 IOCTL(SNDCTL_DSP_NONBLOCK, 0, TYPE_NULL)
447 IOCTL(SNDCTL_DSP_POST, 0, TYPE_NULL)
448 IOCTL(SNDCTL_DSP_RESET, 0, TYPE_NULL)
449 IOCTL(SNDCTL_DSP_SETDUPLEX, 0, TYPE_NULL)
450 IOCTL(SNDCTL_DSP_SETFMT, IOC_RW, MK_PTR(TYPE_INT))
451 IOCTL(SNDCTL_DSP_SETFRAGMENT, IOC_RW, MK_PTR(TYPE_INT))
452 IOCTL(SNDCTL_DSP_SETSYNCRO, 0, TYPE_NULL)
453 IOCTL(SNDCTL_DSP_SETTRIGGER, IOC_W, MK_PTR(TYPE_INT))
454 IOCTL(SNDCTL_DSP_SPEED, IOC_RW, MK_PTR(TYPE_INT))
455 IOCTL(SNDCTL_DSP_STEREO, IOC_RW, MK_PTR(TYPE_INT))
456 IOCTL(SNDCTL_DSP_SUBDIVIDE, IOC_RW, MK_PTR(TYPE_INT))
457 IOCTL(SNDCTL_DSP_SYNC, 0, TYPE_NULL)
458 #if 0
459 IOCTL(SNDCTL_FM_4OP_ENABLE, IOC_W, MK_PTR(TYPE_INT))
460 IOCTL(SNDCTL_FM_LOAD_INSTR, IOC_W, MK_PTR(TYPE_INT))
461 IOCTL(SNDCTL_MIDI_INFO, IOC_RW, MK_PTR(TYPE_INT))
462 IOCTL(SNDCTL_MIDI_MPUCMD, IOC_RW, MK_PTR(TYPE_INT))
463 IOCTL(SNDCTL_MIDI_MPUMODE, IOC_RW, MK_PTR(TYPE_INT))
464 IOCTL(SNDCTL_MIDI_PRETIME, IOC_RW, MK_PTR(TYPE_INT))
465 IOCTL(SNDCTL_SEQ_CTRLRATE, IOC_RW, MK_PTR(TYPE_INT))
466 IOCTL(SNDCTL_SEQ_GETINCOUNT, IOC_R, MK_PTR(TYPE_INT))
467 IOCTL(SNDCTL_SEQ_GETOUTCOUNT, IOC_R, MK_PTR(TYPE_INT))
468 IOCTL(SNDCTL_SEQ_NRMIDIS, IOC_R, MK_PTR(TYPE_INT))
469 IOCTL(SNDCTL_SEQ_NRSYNTHS, IOC_R, MK_PTR(TYPE_INT))
470 IOCTL(SNDCTL_SEQ_OUTOFBAND, IOC_W, MK_PTR(TYPE_INT))
471 IOCTL(SNDCTL_SEQ_PANIC, 0, TYPE_NULL)
472 IOCTL(SNDCTL_SEQ_PERCMODE, IOC_W, MK_PTR(TYPE_INT))
473 IOCTL(SNDCTL_SEQ_RESET, 0, TYPE_NULL)
474 IOCTL(SNDCTL_SEQ_RESETSAMPLES, IOC_W, MK_PTR(TYPE_INT))
475 IOCTL(SNDCTL_SEQ_SYNC, 0, TYPE_NULL)
476 IOCTL(SNDCTL_SEQ_TESTMIDI, IOC_W, MK_PTR(TYPE_INT))
477 IOCTL(SNDCTL_SEQ_THRESHOLD, IOC_W, MK_PTR(TYPE_INT))
478 IOCTL(SNDCTL_SYNTH_INFO, IOC_RW, MK_PTR(TYPE_INT))
479 IOCTL(SNDCTL_SYNTH_MEMAVL, IOC_RW, MK_PTR(TYPE_INT))
480 IOCTL(SNDCTL_TMR_CONTINUE, 0, TYPE_NULL)
481 IOCTL(SNDCTL_TMR_METRONOME, IOC_W, MK_PTR(TYPE_INT))
482 IOCTL(SNDCTL_TMR_SELECT, IOC_W, MK_PTR(TYPE_INT))
483 IOCTL(SNDCTL_TMR_SOURCE, IOC_RW, MK_PTR(TYPE_INT))
484 #if 0
485 /* we invalidate these defines because they have a same number as
486 termios ioctls */
487 IOCTL(SNDCTL_TMR_START, 0, TYPE_NULL)
488 IOCTL(SNDCTL_TMR_STOP, 0, TYPE_NULL)
489 #endif
490 IOCTL(SNDCTL_TMR_TEMPO, IOC_RW, MK_PTR(TYPE_INT))
491 IOCTL(SNDCTL_TMR_TIMEBASE, IOC_RW, MK_PTR(TYPE_INT))
492
493 IOCTL(SOUND_PCM_WRITE_FILTER, IOC_W | IOC_R, MK_PTR(TYPE_INT))
494 IOCTL(SOUND_PCM_READ_RATE, IOC_R, MK_PTR(TYPE_INT))
495 IOCTL(SOUND_PCM_READ_CHANNELS, IOC_R, MK_PTR(TYPE_INT))
496 IOCTL(SOUND_PCM_READ_BITS, IOC_R, MK_PTR(TYPE_INT))
497 IOCTL(SOUND_PCM_READ_FILTER, IOC_R, MK_PTR(TYPE_INT))
498 #endif
499 IOCTL(SOUND_MIXER_INFO, IOC_R, MK_PTR(TYPE_INT))
500 IOCTL(SOUND_MIXER_ACCESS, 0, TYPE_PTRVOID)
501 IOCTL(SOUND_MIXER_PRIVATE1, IOC_RW, MK_PTR(TYPE_INT))
502 IOCTL(SOUND_MIXER_PRIVATE2, IOC_RW, MK_PTR(TYPE_INT))
503 IOCTL(SOUND_MIXER_PRIVATE3, IOC_RW, MK_PTR(TYPE_INT))
504 IOCTL(SOUND_MIXER_PRIVATE4, IOC_RW, MK_PTR(TYPE_INT))
505 IOCTL(SOUND_MIXER_PRIVATE5, IOC_RW, MK_PTR(TYPE_INT))
506 IOCTL(SOUND_MIXER_READ_VOLUME, IOC_R, MK_PTR(TYPE_INT))
507 IOCTL(SOUND_MIXER_READ_BASS, IOC_R, MK_PTR(TYPE_INT))
508 IOCTL(SOUND_MIXER_READ_TREBLE, IOC_R, MK_PTR(TYPE_INT))
509 IOCTL(SOUND_MIXER_READ_SYNTH, IOC_R, MK_PTR(TYPE_INT))
510 IOCTL(SOUND_MIXER_READ_PCM, IOC_R, MK_PTR(TYPE_INT))
511 IOCTL(SOUND_MIXER_READ_SPEAKER, IOC_R, MK_PTR(TYPE_INT))
512 IOCTL(SOUND_MIXER_READ_LINE, IOC_R, MK_PTR(TYPE_INT))
513 IOCTL(SOUND_MIXER_READ_MIC, IOC_R, MK_PTR(TYPE_INT))
514 IOCTL(SOUND_MIXER_READ_CD, IOC_R, MK_PTR(TYPE_INT))
515 IOCTL(SOUND_MIXER_READ_IMIX, IOC_R, MK_PTR(TYPE_INT))
516 IOCTL(SOUND_MIXER_READ_ALTPCM, IOC_R, MK_PTR(TYPE_INT))
517 IOCTL(SOUND_MIXER_READ_RECLEV, IOC_R, MK_PTR(TYPE_INT))
518 IOCTL(SOUND_MIXER_READ_IGAIN, IOC_R, MK_PTR(TYPE_INT))
519 IOCTL(SOUND_MIXER_READ_OGAIN, IOC_R, MK_PTR(TYPE_INT))
520 IOCTL(SOUND_MIXER_READ_LINE1, IOC_R, MK_PTR(TYPE_INT))
521 IOCTL(SOUND_MIXER_READ_LINE2, IOC_R, MK_PTR(TYPE_INT))
522 IOCTL(SOUND_MIXER_READ_LINE3, IOC_R, MK_PTR(TYPE_INT))
523 IOCTL(SOUND_MIXER_READ_MUTE, IOC_R, MK_PTR(TYPE_INT))
524 IOCTL(SOUND_MIXER_READ_ENHANCE, IOC_R, MK_PTR(TYPE_INT))
525 IOCTL(SOUND_MIXER_READ_LOUD, IOC_R, MK_PTR(TYPE_INT))
526 IOCTL(SOUND_MIXER_READ_RECSRC, IOC_R, MK_PTR(TYPE_INT))
527 IOCTL(SOUND_MIXER_READ_DEVMASK, IOC_R, MK_PTR(TYPE_INT))
528 IOCTL(SOUND_MIXER_READ_RECMASK, IOC_R, MK_PTR(TYPE_INT))
529 IOCTL(SOUND_MIXER_READ_STEREODEVS, IOC_R, MK_PTR(TYPE_INT))
530 IOCTL(SOUND_MIXER_READ_CAPS, IOC_R, MK_PTR(TYPE_INT))
531
532 IOCTL(SOUND_MIXER_WRITE_VOLUME, IOC_W, MK_PTR(TYPE_INT))
533 IOCTL(SOUND_MIXER_WRITE_BASS, IOC_W, MK_PTR(TYPE_INT))
534 IOCTL(SOUND_MIXER_WRITE_TREBLE, IOC_W, MK_PTR(TYPE_INT))
535 IOCTL(SOUND_MIXER_WRITE_SYNTH, IOC_W, MK_PTR(TYPE_INT))
536 IOCTL(SOUND_MIXER_WRITE_PCM, IOC_W, MK_PTR(TYPE_INT))
537 IOCTL(SOUND_MIXER_WRITE_SPEAKER, IOC_W, MK_PTR(TYPE_INT))
538 IOCTL(SOUND_MIXER_WRITE_LINE, IOC_W, MK_PTR(TYPE_INT))
539 IOCTL(SOUND_MIXER_WRITE_MIC, IOC_W, MK_PTR(TYPE_INT))
540 IOCTL(SOUND_MIXER_WRITE_CD, IOC_W, MK_PTR(TYPE_INT))
541 IOCTL(SOUND_MIXER_WRITE_IMIX, IOC_W, MK_PTR(TYPE_INT))
542 IOCTL(SOUND_MIXER_WRITE_ALTPCM, IOC_W, MK_PTR(TYPE_INT))
543 IOCTL(SOUND_MIXER_WRITE_RECLEV, IOC_W, MK_PTR(TYPE_INT))
544 IOCTL(SOUND_MIXER_WRITE_IGAIN, IOC_W, MK_PTR(TYPE_INT))
545 IOCTL(SOUND_MIXER_WRITE_OGAIN, IOC_W, MK_PTR(TYPE_INT))
546 IOCTL(SOUND_MIXER_WRITE_LINE1, IOC_W, MK_PTR(TYPE_INT))
547 IOCTL(SOUND_MIXER_WRITE_LINE2, IOC_W, MK_PTR(TYPE_INT))
548 IOCTL(SOUND_MIXER_WRITE_LINE3, IOC_W, MK_PTR(TYPE_INT))
549 IOCTL(SOUND_MIXER_WRITE_MUTE, IOC_W, MK_PTR(TYPE_INT))
550 IOCTL(SOUND_MIXER_WRITE_ENHANCE, IOC_W, MK_PTR(TYPE_INT))
551 IOCTL(SOUND_MIXER_WRITE_LOUD, IOC_W, MK_PTR(TYPE_INT))
552 IOCTL(SOUND_MIXER_WRITE_RECSRC, IOC_W, MK_PTR(TYPE_INT))
553
554 IOCTL(SNDRV_TIMER_IOCTL_PVERSION, IOC_R, MK_PTR(TYPE_INT))
555 IOCTL(SNDRV_TIMER_IOCTL_NEXT_DEVICE, IOC_RW,
556 MK_PTR(MK_STRUCT(STRUCT_snd_timer_id)))
557 IOCTL(SNDRV_TIMER_IOCTL_GINFO, IOC_RW,
558 MK_PTR(MK_STRUCT(STRUCT_snd_timer_ginfo)))
559 IOCTL(SNDRV_TIMER_IOCTL_GPARAMS, IOC_W,
560 MK_PTR(MK_STRUCT(STRUCT_snd_timer_gparams)))
561 IOCTL(SNDRV_TIMER_IOCTL_GSTATUS, IOC_RW,
562 MK_PTR(MK_STRUCT(STRUCT_snd_timer_gstatus)))
563 IOCTL(SNDRV_TIMER_IOCTL_SELECT, IOC_W,
564 MK_PTR(MK_STRUCT(STRUCT_snd_timer_select)))
565 IOCTL(SNDRV_TIMER_IOCTL_INFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_timer_info)))
566 IOCTL(SNDRV_TIMER_IOCTL_PARAMS, IOC_W,
567 MK_PTR(MK_STRUCT(STRUCT_snd_timer_params)))
568 IOCTL(SNDRV_TIMER_IOCTL_STATUS, IOC_R,
569 MK_PTR(MK_STRUCT(STRUCT_snd_timer_status)))
570 IOCTL(SNDRV_TIMER_IOCTL_START, 0, TYPE_NULL)
571 IOCTL(SNDRV_TIMER_IOCTL_STOP, 0, TYPE_NULL)
572 IOCTL(SNDRV_TIMER_IOCTL_CONTINUE, 0, TYPE_NULL)
573 IOCTL(SNDRV_TIMER_IOCTL_PAUSE, 0, TYPE_NULL)
574
575 IOCTL(HDIO_GETGEO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_hd_geometry)))
576 IOCTL(HDIO_GET_UNMASKINTR, IOC_R, MK_PTR(TYPE_INT))
577 IOCTL(HDIO_GET_MULTCOUNT, IOC_R, MK_PTR(TYPE_INT))
578 IOCTL(HDIO_GET_IDENTITY, IOC_R, MK_PTR(TYPE_INT))
579 IOCTL(HDIO_GET_KEEPSETTINGS, IOC_R, MK_PTR(TYPE_INT))
580 IOCTL(HDIO_GET_NOWERR, IOC_R, MK_PTR(TYPE_INT))
581 IOCTL(HDIO_GET_DMA, IOC_R, MK_PTR(TYPE_INT))
582 IOCTL(HDIO_GET_32BIT, IOC_R, MK_PTR(TYPE_INT))
583 IOCTL(HDIO_DRIVE_CMD, IOC_R, MK_PTR(TYPE_INT))
584 IOCTL(HDIO_SET_UNMASKINTR, 0, TYPE_INT)
585 IOCTL(HDIO_SET_MULTCOUNT, 0, TYPE_INT)
586 IOCTL(HDIO_SET_KEEPSETTINGS, 0, TYPE_INT)
587 IOCTL(HDIO_SET_NOWERR, 0, TYPE_INT)
588 IOCTL(HDIO_SET_DMA, 0, TYPE_INT)
589 IOCTL(HDIO_SET_32BIT, 0, TYPE_INT)
590 IOCTL(HDIO_SET_PIO_MODE, 0, TYPE_INT)
591
592 IOCTL(VFAT_IOCTL_READDIR_BOTH, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2)))
593 IOCTL(VFAT_IOCTL_READDIR_SHORT, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2)))
594
595 IOCTL(LOOP_SET_FD, 0, TYPE_INT)
596 IOCTL(LOOP_CLR_FD, 0, TYPE_INT)
597 IOCTL(LOOP_SET_STATUS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
598 IOCTL(LOOP_GET_STATUS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
599 IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
600 IOCTL(LOOP_GET_STATUS64, IOC_R, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
601 IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT)
602
603 IOCTL(LOOP_CTL_ADD, 0, TYPE_INT)
604 IOCTL(LOOP_CTL_REMOVE, 0, TYPE_INT)
605 IOCTL(LOOP_CTL_GET_FREE, 0, TYPE_NULL)
606
607 IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop)))
608 IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget)))
609 IOCTL(MTIOCPOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtpos)))
610
611 IOCTL(FBIOGET_FSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_fix_screeninfo)))
612 IOCTL(FBIOGET_VSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
613 IOCTL(FBIOPUT_VSCREENINFO, IOC_W, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
614 IOCTL(FBIOGETCMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
615 IOCTL(FBIOPUTCMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
616 IOCTL(FBIOPAN_DISPLAY, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
617 IOCTL(FBIOGET_CON2FBMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
618 IOCTL(FBIOPUT_CON2FBMAP, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
619
620 IOCTL(VT_OPENQRY, IOC_R, MK_PTR(TYPE_INT))
621 IOCTL(VT_GETSTATE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_vt_stat)))
622 IOCTL(VT_ACTIVATE, 0, TYPE_INT)
623 IOCTL(VT_WAITACTIVE, 0, TYPE_INT)
624 IOCTL(VT_LOCKSWITCH, 0, TYPE_INT)
625 IOCTL(VT_UNLOCKSWITCH, 0, TYPE_INT)
626 IOCTL(VT_GETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
627 IOCTL(VT_SETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
628 IOCTL(VT_RELDISP, 0, TYPE_INT)
629 IOCTL(VT_DISALLOCATE, 0, TYPE_INT)
630
631 IOCTL(DM_VERSION, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
632 IOCTL_SPECIAL(DM_REMOVE_ALL, IOC_RW, do_ioctl_dm,
633 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
634 IOCTL_SPECIAL(DM_LIST_DEVICES, IOC_RW, do_ioctl_dm,
635 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
636 IOCTL_SPECIAL(DM_DEV_CREATE, IOC_RW, do_ioctl_dm,
637 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
638 IOCTL_SPECIAL(DM_DEV_REMOVE, IOC_RW, do_ioctl_dm,
639 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
640 IOCTL_SPECIAL(DM_DEV_RENAME, IOC_RW, do_ioctl_dm,
641 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
642 IOCTL_SPECIAL(DM_DEV_SUSPEND, IOC_RW, do_ioctl_dm,
643 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
644 IOCTL_SPECIAL(DM_DEV_STATUS, IOC_RW, do_ioctl_dm,
645 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
646 IOCTL_SPECIAL(DM_DEV_WAIT, IOC_RW, do_ioctl_dm,
647 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
648 IOCTL_SPECIAL(DM_TABLE_LOAD, IOC_RW, do_ioctl_dm,
649 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
650 IOCTL_SPECIAL(DM_TABLE_CLEAR, IOC_RW, do_ioctl_dm,
651 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
652 IOCTL_SPECIAL(DM_TABLE_DEPS, IOC_RW, do_ioctl_dm,
653 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
654 IOCTL_SPECIAL(DM_TABLE_STATUS, IOC_RW, do_ioctl_dm,
655 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
656 IOCTL_SPECIAL(DM_LIST_VERSIONS,IOC_RW, do_ioctl_dm,
657 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
658 IOCTL_SPECIAL(DM_TARGET_MSG, IOC_RW, do_ioctl_dm,
659 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
660 IOCTL_SPECIAL(DM_DEV_SET_GEOMETRY, IOC_RW, do_ioctl_dm,
661 MK_PTR(MK_STRUCT(STRUCT_dm_ioctl)))
662 IOCTL_SPECIAL(SIOCADDRT, IOC_W, do_ioctl_rt,
663 MK_PTR(MK_STRUCT(STRUCT_rtentry)))
664 IOCTL_SPECIAL(SIOCDELRT, IOC_W, do_ioctl_rt,
665 MK_PTR(MK_STRUCT(STRUCT_rtentry)))
666
667 #ifdef HAVE_DRM_H
668 IOCTL_SPECIAL(DRM_IOCTL_VERSION, IOC_RW, do_ioctl_drm,
669 MK_PTR(MK_STRUCT(STRUCT_drm_version)))
670
671 IOCTL_SPECIAL(DRM_IOCTL_I915_GETPARAM, IOC_RW, do_ioctl_drm_i915,
672 MK_PTR(MK_STRUCT(STRUCT_drm_i915_getparam)))
673 #endif
674
675 #ifdef TARGET_TIOCSTART
676 IOCTL_IGNORE(TIOCSTART)
677 IOCTL_IGNORE(TIOCSTOP)
678 #endif
679
680 #ifdef CONFIG_KCOV
681 IOCTL(KCOV_ENABLE, 0, TYPE_NULL)
682 IOCTL(KCOV_DISABLE, 0, TYPE_NULL)
683 IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG)
684 #endif