s390x/s390-virtio-ccw: fix off-by-one in loadparm getter
[qemu/ar7.git] / linux-user / syscall_types.h
blob3f1f0334649b5ca5068aa07e546414414d51746d
1 STRUCT_SPECIAL(termios)
3 STRUCT(winsize,
4 TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT)
6 STRUCT(serial_multiport_struct,
7 TYPE_INT, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR,
8 TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_CHAR, TYPE_CHAR, TYPE_INT,
9 MK_ARRAY(TYPE_INT, 32))
11 STRUCT(serial_icounter_struct,
12 TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, MK_ARRAY(TYPE_INT, 16))
14 STRUCT(sockaddr,
15 TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14))
17 STRUCT(rtentry,
18 TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr),
19 TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID,
20 TYPE_ULONG, TYPE_ULONG, TYPE_SHORT)
22 STRUCT(ifmap,
23 TYPE_ULONG, TYPE_ULONG, TYPE_SHORT, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR,
24 /* Spare 3 bytes */
25 TYPE_CHAR, TYPE_CHAR, TYPE_CHAR)
27 /* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */
29 STRUCT(sockaddr_ifreq,
30 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr))
32 STRUCT(short_ifreq,
33 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_SHORT)
35 STRUCT(int_ifreq,
36 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_INT)
38 STRUCT(ifmap_ifreq,
39 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_ifmap))
41 STRUCT(char_ifreq,
42 MK_ARRAY(TYPE_CHAR, IFNAMSIZ),
43 MK_ARRAY(TYPE_CHAR, IFNAMSIZ))
45 STRUCT(ptr_ifreq,
46 MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_PTRVOID)
48 STRUCT(ifconf,
49 TYPE_INT, TYPE_PTRVOID)
51 STRUCT(arpreq,
52 MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr),
53 MK_ARRAY(TYPE_CHAR, 16))
55 STRUCT(arpreq_old,
56 MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr))
58 STRUCT(cdrom_read_audio,
59 TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID,
60 TYPE_NULL)
62 STRUCT(hd_geometry,
63 TYPE_CHAR, TYPE_CHAR, TYPE_SHORT, TYPE_ULONG)
65 STRUCT(dirent,
66 TYPE_LONG, TYPE_LONG, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 256))
68 STRUCT(kbentry,
69 TYPE_CHAR, TYPE_CHAR, TYPE_SHORT)
71 STRUCT(kbsentry,
72 TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512))
74 STRUCT(audio_buf_info,
75 TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT)
77 STRUCT(count_info,
78 TYPE_INT, TYPE_INT, TYPE_INT)
80 STRUCT(buffmem_desc,
81 TYPE_PTRVOID, TYPE_INT)
83 STRUCT(mixer_info,
84 MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))
86 STRUCT(snd_timer_id,
87 TYPE_INT, /* dev_class */
88 TYPE_INT, /* dev_sclass */
89 TYPE_INT, /* card */
90 TYPE_INT, /* device */
91 TYPE_INT) /* subdevice */
93 STRUCT(snd_timer_ginfo,
94 MK_STRUCT(STRUCT_snd_timer_id), /* tid */
95 TYPE_INT, /* flags */
96 TYPE_INT, /* card */
97 MK_ARRAY(TYPE_CHAR, 64), /* id */
98 MK_ARRAY(TYPE_CHAR, 80), /* name */
99 TYPE_ULONG, /* reserved0 */
100 TYPE_ULONG, /* resolution */
101 TYPE_ULONG, /* resolution_min */
102 TYPE_ULONG, /* resolution_max */
103 TYPE_INT, /* clients */
104 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
106 STRUCT(snd_timer_gparams,
107 MK_STRUCT(STRUCT_snd_timer_id), /* tid */
108 TYPE_ULONG, /* period_num */
109 TYPE_ULONG, /* period_den */
110 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
112 STRUCT(snd_timer_gstatus,
113 MK_STRUCT(STRUCT_snd_timer_id), /* tid */
114 TYPE_ULONG, /* resolution */
115 TYPE_ULONG, /* resolution_num */
116 TYPE_ULONG, /* resolution_den */
117 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
119 STRUCT(snd_timer_select,
120 MK_STRUCT(STRUCT_snd_timer_id), /* id */
121 MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
123 STRUCT(snd_timer_info,
124 TYPE_INT, /* flags */
125 TYPE_INT, /* card */
126 MK_ARRAY(TYPE_CHAR, 64), /* id */
127 MK_ARRAY(TYPE_CHAR, 80), /* name */
128 TYPE_ULONG, /* reserved0 */
129 TYPE_ULONG, /* resolution */
130 MK_ARRAY(TYPE_CHAR, 64)) /* reserved */
132 STRUCT(snd_timer_params,
133 TYPE_INT, /* flags */
134 TYPE_INT, /* ticks */
135 TYPE_INT, /* queue_size */
136 TYPE_INT, /* reserved0 */
137 TYPE_INT, /* filter */
138 MK_ARRAY(TYPE_CHAR, 60)) /* reserved */
140 #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
141 STRUCT(timeval,
142 TYPE_LONG, /* tv_sec */
143 TYPE_INT) /* tv_usec */
145 STRUCT(_kernel_sock_timeval,
146 TYPE_LONG, /* tv_sec */
147 TYPE_INT) /* tv_usec */
148 #else
149 STRUCT(timeval,
150 TYPE_LONG, /* tv_sec */
151 TYPE_LONG) /* tv_usec */
153 STRUCT(_kernel_sock_timeval,
154 TYPE_LONGLONG, /* tv_sec */
155 TYPE_LONGLONG) /* tv_usec */
156 #endif
158 STRUCT(timespec,
159 TYPE_LONG, /* tv_sec */
160 TYPE_LONG) /* tv_nsec */
162 STRUCT(_kernel_timespec,
163 TYPE_LONGLONG, /* tv_sec */
164 TYPE_LONGLONG) /* tv_nsec */
166 STRUCT(snd_timer_status,
167 MK_STRUCT(STRUCT_timespec), /* tstamp */
168 TYPE_INT, /* resolution */
169 TYPE_INT, /* lost */
170 TYPE_INT, /* overrun */
171 TYPE_INT, /* queue */
172 MK_ARRAY(TYPE_CHAR, 64)) /* reserved */
174 /* loop device ioctls */
175 STRUCT(loop_info,
176 TYPE_INT, /* lo_number */
177 TYPE_OLDDEVT, /* lo_device */
178 TYPE_ULONG, /* lo_inode */
179 TYPE_OLDDEVT, /* lo_rdevice */
180 TYPE_INT, /* lo_offset */
181 TYPE_INT, /* lo_encrypt_type */
182 TYPE_INT, /* lo_encrypt_key_size */
183 TYPE_INT, /* lo_flags */
184 MK_ARRAY(TYPE_CHAR, 64), /* lo_name */
185 MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */
186 MK_ARRAY(TYPE_ULONG, 2), /* lo_init */
187 MK_ARRAY(TYPE_CHAR, 4)) /* reserved */
189 STRUCT(loop_info64,
190 TYPE_ULONGLONG, /* lo_device */
191 TYPE_ULONGLONG, /* lo_inode */
192 TYPE_ULONGLONG, /* lo_rdevice */
193 TYPE_ULONGLONG, /* lo_offset */
194 TYPE_ULONGLONG, /* lo_sizelimit */
195 TYPE_INT, /* lo_number */
196 TYPE_INT, /* lo_encrypt_type */
197 TYPE_INT, /* lo_encrypt_key_size */
198 TYPE_INT, /* lo_flags */
199 MK_ARRAY(TYPE_CHAR, 64), /* lo_name */
200 MK_ARRAY(TYPE_CHAR, 64), /* lo_crypt_name */
201 MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */
202 MK_ARRAY(TYPE_ULONGLONG, 2)) /* lo_init */
204 /* mag tape ioctls */
205 STRUCT(mtop, TYPE_SHORT, TYPE_INT)
206 STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG,
207 TYPE_INT, TYPE_INT)
208 STRUCT(mtpos, TYPE_LONG)
210 STRUCT(fb_fix_screeninfo,
211 MK_ARRAY(TYPE_CHAR, 16), /* id */
212 TYPE_ULONG, /* smem_start */
213 TYPE_INT, /* smem_len */
214 TYPE_INT, /* type */
215 TYPE_INT, /* type_aux */
216 TYPE_INT, /* visual */
217 TYPE_SHORT, /* xpanstep */
218 TYPE_SHORT, /* ypanstep */
219 TYPE_SHORT, /* ywrapstep */
220 TYPE_INT, /* line_length */
221 TYPE_ULONG, /* mmio_start */
222 TYPE_INT, /* mmio_len */
223 TYPE_INT, /* accel */
224 MK_ARRAY(TYPE_CHAR, 3)) /* reserved */
226 STRUCT(fb_var_screeninfo,
227 TYPE_INT, /* xres */
228 TYPE_INT, /* yres */
229 TYPE_INT, /* xres_virtual */
230 TYPE_INT, /* yres_virtual */
231 TYPE_INT, /* xoffset */
232 TYPE_INT, /* yoffset */
233 TYPE_INT, /* bits_per_pixel */
234 TYPE_INT, /* grayscale */
235 MK_ARRAY(TYPE_INT, 3), /* red */
236 MK_ARRAY(TYPE_INT, 3), /* green */
237 MK_ARRAY(TYPE_INT, 3), /* blue */
238 MK_ARRAY(TYPE_INT, 3), /* transp */
239 TYPE_INT, /* nonstd */
240 TYPE_INT, /* activate */
241 TYPE_INT, /* height */
242 TYPE_INT, /* width */
243 TYPE_INT, /* accel_flags */
244 TYPE_INT, /* pixclock */
245 TYPE_INT, /* left_margin */
246 TYPE_INT, /* right_margin */
247 TYPE_INT, /* upper_margin */
248 TYPE_INT, /* lower_margin */
249 TYPE_INT, /* hsync_len */
250 TYPE_INT, /* vsync_len */
251 TYPE_INT, /* sync */
252 TYPE_INT, /* vmode */
253 TYPE_INT, /* rotate */
254 MK_ARRAY(TYPE_INT, 5)) /* reserved */
256 STRUCT(fb_cmap,
257 TYPE_INT, /* start */
258 TYPE_INT, /* len */
259 TYPE_PTRVOID, /* red */
260 TYPE_PTRVOID, /* green */
261 TYPE_PTRVOID, /* blue */
262 TYPE_PTRVOID) /* transp */
264 STRUCT(fb_con2fbmap,
265 TYPE_INT, /* console */
266 TYPE_INT) /* framebuffer */
269 STRUCT(vt_stat,
270 TYPE_SHORT, /* v_active */
271 TYPE_SHORT, /* v_signal */
272 TYPE_SHORT) /* v_state */
274 STRUCT(vt_mode,
275 TYPE_CHAR, /* mode */
276 TYPE_CHAR, /* waitv */
277 TYPE_SHORT, /* relsig */
278 TYPE_SHORT, /* acqsig */
279 TYPE_SHORT) /* frsig */
281 STRUCT(dm_ioctl,
282 MK_ARRAY(TYPE_INT, 3), /* version */
283 TYPE_INT, /* data_size */
284 TYPE_INT, /* data_start */
285 TYPE_INT, /* target_count*/
286 TYPE_INT, /* open_count */
287 TYPE_INT, /* flags */
288 TYPE_INT, /* event_nr */
289 TYPE_INT, /* padding */
290 TYPE_ULONGLONG, /* dev */
291 MK_ARRAY(TYPE_CHAR, 128), /* name */
292 MK_ARRAY(TYPE_CHAR, 129), /* uuid */
293 MK_ARRAY(TYPE_CHAR, 7)) /* data */
295 STRUCT(dm_target_spec,
296 TYPE_ULONGLONG, /* sector_start */
297 TYPE_ULONGLONG, /* length */
298 TYPE_INT, /* status */
299 TYPE_INT, /* next */
300 MK_ARRAY(TYPE_CHAR, 16)) /* target_type */
302 STRUCT(dm_target_deps,
303 TYPE_INT, /* count */
304 TYPE_INT) /* padding */
306 STRUCT(dm_name_list,
307 TYPE_ULONGLONG, /* dev */
308 TYPE_INT) /* next */
310 STRUCT(dm_target_versions,
311 TYPE_INT, /* next */
312 MK_ARRAY(TYPE_INT, 3)) /* version*/
314 STRUCT(dm_target_msg,
315 TYPE_ULONGLONG) /* sector */
317 STRUCT(drm_version,
318 TYPE_INT, /* version_major */
319 TYPE_INT, /* version_minor */
320 TYPE_INT, /* version_patchlevel */
321 TYPE_ULONG, /* name_len */
322 TYPE_PTRVOID, /* name */
323 TYPE_ULONG, /* date_len */
324 TYPE_PTRVOID, /* date */
325 TYPE_ULONG, /* desc_len */
326 TYPE_PTRVOID) /* desc */
328 STRUCT(file_clone_range,
329 TYPE_LONGLONG, /* src_fd */
330 TYPE_ULONGLONG, /* src_offset */
331 TYPE_ULONGLONG, /* src_length */
332 TYPE_ULONGLONG) /* dest_offset */
334 STRUCT(fiemap_extent,
335 TYPE_ULONGLONG, /* fe_logical */
336 TYPE_ULONGLONG, /* fe_physical */
337 TYPE_ULONGLONG, /* fe_length */
338 MK_ARRAY(TYPE_ULONGLONG, 2), /* fe_reserved64[2] */
339 TYPE_INT, /* fe_flags */
340 MK_ARRAY(TYPE_INT, 3)) /* fe_reserved[3] */
342 STRUCT(fiemap,
343 TYPE_ULONGLONG, /* fm_start */
344 TYPE_ULONGLONG, /* fm_length */
345 TYPE_INT, /* fm_flags */
346 TYPE_INT, /* fm_mapped_extents */
347 TYPE_INT, /* fm_extent_count */
348 TYPE_INT) /* fm_reserved */
350 STRUCT(blkpg_partition,
351 TYPE_LONGLONG, /* start */
352 TYPE_LONGLONG, /* length */
353 TYPE_INT, /* pno */
354 MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
355 MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
357 STRUCT(rtc_time,
358 TYPE_INT, /* tm_sec */
359 TYPE_INT, /* tm_min */
360 TYPE_INT, /* tm_hour */
361 TYPE_INT, /* tm_mday */
362 TYPE_INT, /* tm_mon */
363 TYPE_INT, /* tm_year */
364 TYPE_INT, /* tm_wday */
365 TYPE_INT, /* tm_yday */
366 TYPE_INT) /* tm_isdst */
368 STRUCT(rtc_wkalrm,
369 TYPE_CHAR, /* enabled */
370 TYPE_CHAR, /* pending */
371 MK_STRUCT(STRUCT_rtc_time)) /* time */
373 STRUCT(rtc_pll_info,
374 TYPE_INT, /* pll_ctrl */
375 TYPE_INT, /* pll_value */
376 TYPE_INT, /* pll_max */
377 TYPE_INT, /* pll_min */
378 TYPE_INT, /* pll_posmult */
379 TYPE_INT, /* pll_negmult */
380 TYPE_LONG) /* pll_clock */
382 STRUCT(blkpg_ioctl_arg,
383 TYPE_INT, /* op */
384 TYPE_INT, /* flags */
385 TYPE_INT, /* datalen */
386 TYPE_PTRVOID) /* data */
388 STRUCT(format_descr,
389 TYPE_INT, /* device */
390 TYPE_INT, /* head */
391 TYPE_INT) /* track */
393 STRUCT(floppy_max_errors,
394 TYPE_INT, /* abort */
395 TYPE_INT, /* read_track */
396 TYPE_INT, /* reset */
397 TYPE_INT, /* recal */
398 TYPE_INT) /* reporting */
400 #if defined(CONFIG_USBFS)
401 /* usb device ioctls */
402 STRUCT(usbdevfs_ctrltransfer,
403 TYPE_CHAR, /* bRequestType */
404 TYPE_CHAR, /* bRequest */
405 TYPE_SHORT, /* wValue */
406 TYPE_SHORT, /* wIndex */
407 TYPE_SHORT, /* wLength */
408 TYPE_INT, /* timeout */
409 TYPE_PTRVOID) /* data */
411 STRUCT(usbdevfs_bulktransfer,
412 TYPE_INT, /* ep */
413 TYPE_INT, /* len */
414 TYPE_INT, /* timeout */
415 TYPE_PTRVOID) /* data */
417 STRUCT(usbdevfs_setinterface,
418 TYPE_INT, /* interface */
419 TYPE_INT) /* altsetting */
421 STRUCT(usbdevfs_disconnectsignal,
422 TYPE_INT, /* signr */
423 TYPE_PTRVOID) /* context */
425 STRUCT(usbdevfs_getdriver,
426 TYPE_INT, /* interface */
427 MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
429 STRUCT(usbdevfs_connectinfo,
430 TYPE_INT, /* devnum */
431 TYPE_CHAR) /* slow */
433 STRUCT(usbdevfs_iso_packet_desc,
434 TYPE_INT, /* length */
435 TYPE_INT, /* actual_length */
436 TYPE_INT) /* status */
438 STRUCT(usbdevfs_urb,
439 TYPE_CHAR, /* type */
440 TYPE_CHAR, /* endpoint */
441 TYPE_INT, /* status */
442 TYPE_INT, /* flags */
443 TYPE_PTRVOID, /* buffer */
444 TYPE_INT, /* buffer_length */
445 TYPE_INT, /* actual_length */
446 TYPE_INT, /* start_frame */
447 TYPE_INT, /* union number_of_packets stream_id */
448 TYPE_INT, /* error_count */
449 TYPE_INT, /* signr */
450 TYPE_PTRVOID, /* usercontext */
451 MK_ARRAY(MK_STRUCT(STRUCT_usbdevfs_iso_packet_desc), 0)) /* desc */
453 STRUCT(usbdevfs_ioctl,
454 TYPE_INT, /* ifno */
455 TYPE_INT, /* ioctl_code */
456 TYPE_PTRVOID) /* data */
458 STRUCT(usbdevfs_hub_portinfo,
459 TYPE_CHAR, /* nports */
460 MK_ARRAY(TYPE_CHAR, 127)) /* port */
462 STRUCT(usbdevfs_disconnect_claim,
463 TYPE_INT, /* interface */
464 TYPE_INT, /* flags */
465 MK_ARRAY(TYPE_CHAR, USBDEVFS_MAXDRIVERNAME + 1)) /* driver */
466 #endif /* CONFIG_USBFS */