xref: /openbmc/qemu/linux-user/syscall_types.h (revision 9c2037d0)
1 STRUCT_SPECIAL(termios)
2 
3 STRUCT(winsize,
4        TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT)
5 
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))
10 
11 STRUCT(serial_icounter_struct,
12        TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, MK_ARRAY(TYPE_INT, 16))
13 
14 STRUCT(sockaddr,
15        TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14))
16 
17 STRUCT(timeval,
18        MK_ARRAY(TYPE_LONG, 2))
19 
20 STRUCT(timespec,
21        MK_ARRAY(TYPE_LONG, 2))
22 
23 STRUCT(rtentry,
24        TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr),
25        TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID,
26        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT)
27 
28 STRUCT(ifmap,
29        TYPE_ULONG, TYPE_ULONG, TYPE_SHORT, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR,
30        /* Spare 3 bytes */
31        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR)
32 
33 /* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */
34 
35 STRUCT(sockaddr_ifreq,
36        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr))
37 
38 STRUCT(short_ifreq,
39        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_SHORT)
40 
41 STRUCT(int_ifreq,
42        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_INT)
43 
44 STRUCT(ifmap_ifreq,
45        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_ifmap))
46 
47 STRUCT(char_ifreq,
48        MK_ARRAY(TYPE_CHAR, IFNAMSIZ),
49        MK_ARRAY(TYPE_CHAR, IFNAMSIZ))
50 
51 STRUCT(ptr_ifreq,
52        MK_ARRAY(TYPE_CHAR, IFNAMSIZ), TYPE_PTRVOID)
53 
54 STRUCT(ifconf,
55        TYPE_INT, TYPE_PTRVOID)
56 
57 STRUCT(arpreq,
58        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr),
59        MK_ARRAY(TYPE_CHAR, 16))
60 
61 STRUCT(arpreq_old,
62        MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr))
63 
64 STRUCT(cdrom_read_audio,
65        TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID,
66        TYPE_NULL)
67 
68 STRUCT(hd_geometry,
69        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT, TYPE_ULONG)
70 
71 STRUCT(dirent,
72        TYPE_LONG, TYPE_LONG, TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 256))
73 
74 STRUCT(kbentry,
75        TYPE_CHAR, TYPE_CHAR, TYPE_SHORT)
76 
77 STRUCT(kbsentry,
78        TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512))
79 
80 STRUCT(audio_buf_info,
81        TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT)
82 
83 STRUCT(count_info,
84        TYPE_INT, TYPE_INT, TYPE_INT)
85 
86 STRUCT(buffmem_desc,
87        TYPE_PTRVOID, TYPE_INT)
88 
89 STRUCT(mixer_info,
90        MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))
91 
92 /* loop device ioctls */
93 STRUCT(loop_info,
94        TYPE_INT,                 /* lo_number */
95        TYPE_OLDDEVT,             /* lo_device */
96        TYPE_ULONG,               /* lo_inode */
97        TYPE_OLDDEVT,             /* lo_rdevice */
98        TYPE_INT,                 /* lo_offset */
99        TYPE_INT,                 /* lo_encrypt_type */
100        TYPE_INT,                 /* lo_encrypt_key_size */
101        TYPE_INT,                 /* lo_flags */
102        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
103        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
104        MK_ARRAY(TYPE_ULONG, 2),  /* lo_init */
105        MK_ARRAY(TYPE_CHAR, 4))   /* reserved */
106 
107 STRUCT(loop_info64,
108        TYPE_ULONGLONG,           /* lo_device */
109        TYPE_ULONGLONG,           /* lo_inode */
110        TYPE_ULONGLONG,           /* lo_rdevice */
111        TYPE_ULONGLONG,           /* lo_offset */
112        TYPE_ULONGLONG,           /* lo_sizelimit */
113        TYPE_INT,                 /* lo_number */
114        TYPE_INT,                 /* lo_encrypt_type */
115        TYPE_INT,                 /* lo_encrypt_key_size */
116        TYPE_INT,                 /* lo_flags */
117        MK_ARRAY(TYPE_CHAR, 64),  /* lo_name */
118        MK_ARRAY(TYPE_CHAR, 64),  /* lo_crypt_name */
119        MK_ARRAY(TYPE_CHAR, 32),  /* lo_encrypt_key */
120        MK_ARRAY(TYPE_ULONGLONG, 2))  /* lo_init */
121 
122 /* mag tape ioctls */
123 STRUCT(mtop, TYPE_SHORT, TYPE_INT)
124 STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG,
125        TYPE_INT, TYPE_INT)
126 STRUCT(mtpos, TYPE_LONG)
127 
128 STRUCT(fb_fix_screeninfo,
129        MK_ARRAY(TYPE_CHAR, 16), /* id */
130        TYPE_ULONG, /* smem_start */
131        TYPE_INT, /* smem_len */
132        TYPE_INT, /* type */
133        TYPE_INT, /* type_aux */
134        TYPE_INT, /* visual */
135        TYPE_SHORT, /* xpanstep */
136        TYPE_SHORT, /* ypanstep */
137        TYPE_SHORT, /* ywrapstep */
138        TYPE_INT, /* line_length */
139        TYPE_ULONG, /* mmio_start */
140        TYPE_INT, /* mmio_len */
141        TYPE_INT, /* accel */
142        MK_ARRAY(TYPE_CHAR, 3)) /* reserved */
143 
144 STRUCT(fb_var_screeninfo,
145        TYPE_INT, /* xres */
146        TYPE_INT, /* yres */
147        TYPE_INT, /* xres_virtual */
148        TYPE_INT, /* yres_virtual */
149        TYPE_INT, /* xoffset */
150        TYPE_INT, /* yoffset */
151        TYPE_INT, /* bits_per_pixel */
152        TYPE_INT, /* grayscale */
153        MK_ARRAY(TYPE_INT, 3), /* red */
154        MK_ARRAY(TYPE_INT, 3), /* green */
155        MK_ARRAY(TYPE_INT, 3), /* blue */
156        MK_ARRAY(TYPE_INT, 3), /* transp */
157        TYPE_INT, /* nonstd */
158        TYPE_INT, /* activate */
159        TYPE_INT, /* height */
160        TYPE_INT, /* width */
161        TYPE_INT, /* accel_flags */
162        TYPE_INT, /* pixclock */
163        TYPE_INT, /* left_margin */
164        TYPE_INT, /* right_margin */
165        TYPE_INT, /* upper_margin */
166        TYPE_INT, /* lower_margin */
167        TYPE_INT, /* hsync_len */
168        TYPE_INT, /* vsync_len */
169        TYPE_INT, /* sync */
170        TYPE_INT, /* vmode */
171        TYPE_INT, /* rotate */
172        MK_ARRAY(TYPE_INT, 5)) /* reserved */
173 
174 STRUCT(fb_cmap,
175        TYPE_INT, /* start  */
176        TYPE_INT, /* len    */
177        TYPE_PTRVOID, /* red    */
178        TYPE_PTRVOID, /* green  */
179        TYPE_PTRVOID, /* blue   */
180        TYPE_PTRVOID) /* transp */
181 
182 STRUCT(fb_con2fbmap,
183        TYPE_INT, /* console     */
184        TYPE_INT) /* framebuffer */
185 
186 
187 STRUCT(vt_stat,
188        TYPE_SHORT, /* v_active */
189        TYPE_SHORT, /* v_signal */
190        TYPE_SHORT) /* v_state */
191 
192 STRUCT(vt_mode,
193        TYPE_CHAR,  /* mode   */
194        TYPE_CHAR,  /* waitv  */
195        TYPE_SHORT, /* relsig */
196        TYPE_SHORT, /* acqsig */
197        TYPE_SHORT) /* frsig  */
198 
199 STRUCT(dm_ioctl,
200        MK_ARRAY(TYPE_INT, 3), /* version */
201        TYPE_INT, /* data_size */
202        TYPE_INT, /* data_start */
203        TYPE_INT, /* target_count*/
204        TYPE_INT, /* open_count */
205        TYPE_INT, /* flags */
206        TYPE_INT, /* event_nr */
207        TYPE_INT, /* padding */
208        TYPE_ULONGLONG, /* dev */
209        MK_ARRAY(TYPE_CHAR, 128), /* name */
210        MK_ARRAY(TYPE_CHAR, 129), /* uuid */
211        MK_ARRAY(TYPE_CHAR, 7)) /* data */
212 
213 STRUCT(dm_target_spec,
214        TYPE_ULONGLONG, /* sector_start */
215        TYPE_ULONGLONG, /* length */
216        TYPE_INT, /* status */
217        TYPE_INT, /* next */
218        MK_ARRAY(TYPE_CHAR, 16)) /* target_type */
219 
220 STRUCT(dm_target_deps,
221        TYPE_INT, /* count */
222        TYPE_INT) /* padding */
223 
224 STRUCT(dm_name_list,
225        TYPE_ULONGLONG, /* dev */
226        TYPE_INT) /* next */
227 
228 STRUCT(dm_target_versions,
229        TYPE_INT, /* next */
230        MK_ARRAY(TYPE_INT, 3)) /* version*/
231 
232 STRUCT(dm_target_msg,
233        TYPE_ULONGLONG) /* sector */
234 
235 STRUCT(fiemap_extent,
236        TYPE_ULONGLONG, /* fe_logical */
237        TYPE_ULONGLONG, /* fe_physical */
238        TYPE_ULONGLONG, /* fe_length */
239        MK_ARRAY(TYPE_ULONGLONG, 2), /* fe_reserved64[2] */
240        TYPE_INT, /* fe_flags */
241        MK_ARRAY(TYPE_INT, 3)) /* fe_reserved[3] */
242 
243 STRUCT(fiemap,
244        TYPE_ULONGLONG, /* fm_start */
245        TYPE_ULONGLONG, /* fm_length */
246        TYPE_INT, /* fm_flags */
247        TYPE_INT, /* fm_mapped_extents */
248        TYPE_INT, /* fm_extent_count */
249        TYPE_INT) /* fm_reserved */
250 
251 STRUCT(blkpg_partition,
252        TYPE_LONGLONG, /* start */
253        TYPE_LONGLONG, /* length */
254        TYPE_INT, /* pno */
255        MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
256        MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
257 
258 STRUCT(blkpg_ioctl_arg,
259        TYPE_INT, /* op */
260        TYPE_INT, /* flags */
261        TYPE_INT, /* datalen */
262        TYPE_PTRVOID) /* data */
263