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