root / linux-user / syscall_defs.h @ 9e5f5284
History | View | Annotate | Download (52.8 kB)
1 | 31e31b8a | bellard | /* common syscall defines for all architectures */
|
---|---|---|---|
2 | 31e31b8a | bellard | |
3 | 2521d698 | bellard | /* Note: although the syscall numbers change between architectures,
|
4 | 2521d698 | bellard | most of them stay the same, so we handle it by puting ifdefs if
|
5 | 2521d698 | bellard | necessary */
|
6 | 2521d698 | bellard | |
7 | 2521d698 | bellard | #define TARGET_NR_exit 1 |
8 | 2521d698 | bellard | #define TARGET_NR_fork 2 |
9 | 2521d698 | bellard | #define TARGET_NR_read 3 |
10 | 2521d698 | bellard | #define TARGET_NR_write 4 |
11 | 2521d698 | bellard | #define TARGET_NR_open 5 |
12 | 2521d698 | bellard | #define TARGET_NR_close 6 |
13 | 2521d698 | bellard | #define TARGET_NR_waitpid 7 |
14 | 2521d698 | bellard | #define TARGET_NR_creat 8 |
15 | 2521d698 | bellard | #define TARGET_NR_link 9 |
16 | 2521d698 | bellard | #define TARGET_NR_unlink 10 |
17 | 2521d698 | bellard | #define TARGET_NR_execve 11 |
18 | 2521d698 | bellard | #define TARGET_NR_chdir 12 |
19 | 2521d698 | bellard | #define TARGET_NR_time 13 |
20 | 2521d698 | bellard | #define TARGET_NR_mknod 14 |
21 | 2521d698 | bellard | #define TARGET_NR_chmod 15 |
22 | 2521d698 | bellard | #define TARGET_NR_lchown 16 |
23 | 2521d698 | bellard | #define TARGET_NR_break 17 |
24 | 2521d698 | bellard | #define TARGET_NR_oldstat 18 |
25 | 2521d698 | bellard | #define TARGET_NR_lseek 19 |
26 | 2521d698 | bellard | #define TARGET_NR_getpid 20 |
27 | 2521d698 | bellard | #define TARGET_NR_mount 21 |
28 | 2521d698 | bellard | #define TARGET_NR_umount 22 |
29 | 2521d698 | bellard | #define TARGET_NR_setuid 23 |
30 | 2521d698 | bellard | #define TARGET_NR_getuid 24 |
31 | 2521d698 | bellard | #define TARGET_NR_stime 25 |
32 | 2521d698 | bellard | #define TARGET_NR_ptrace 26 |
33 | 2521d698 | bellard | #define TARGET_NR_alarm 27 |
34 | 2521d698 | bellard | #define TARGET_NR_oldfstat 28 |
35 | 2521d698 | bellard | #define TARGET_NR_pause 29 |
36 | 2521d698 | bellard | #define TARGET_NR_utime 30 |
37 | 2521d698 | bellard | #define TARGET_NR_stty 31 |
38 | 2521d698 | bellard | #define TARGET_NR_gtty 32 |
39 | 2521d698 | bellard | #define TARGET_NR_access 33 |
40 | 2521d698 | bellard | #define TARGET_NR_nice 34 |
41 | 2521d698 | bellard | #define TARGET_NR_ftime 35 |
42 | 2521d698 | bellard | #define TARGET_NR_sync 36 |
43 | 2521d698 | bellard | #define TARGET_NR_kill 37 |
44 | 2521d698 | bellard | #define TARGET_NR_rename 38 |
45 | 2521d698 | bellard | #define TARGET_NR_mkdir 39 |
46 | 2521d698 | bellard | #define TARGET_NR_rmdir 40 |
47 | 2521d698 | bellard | #define TARGET_NR_dup 41 |
48 | 2521d698 | bellard | #define TARGET_NR_pipe 42 |
49 | 2521d698 | bellard | #define TARGET_NR_times 43 |
50 | 2521d698 | bellard | #define TARGET_NR_prof 44 |
51 | 2521d698 | bellard | #define TARGET_NR_brk 45 |
52 | 2521d698 | bellard | #define TARGET_NR_setgid 46 |
53 | 2521d698 | bellard | #define TARGET_NR_getgid 47 |
54 | 2521d698 | bellard | #define TARGET_NR_signal 48 |
55 | 2521d698 | bellard | #define TARGET_NR_geteuid 49 |
56 | 2521d698 | bellard | #define TARGET_NR_getegid 50 |
57 | 2521d698 | bellard | #define TARGET_NR_acct 51 |
58 | 2521d698 | bellard | #define TARGET_NR_umount2 52 |
59 | 2521d698 | bellard | #define TARGET_NR_lock 53 |
60 | 2521d698 | bellard | #define TARGET_NR_ioctl 54 |
61 | 2521d698 | bellard | #define TARGET_NR_fcntl 55 |
62 | 2521d698 | bellard | #define TARGET_NR_mpx 56 |
63 | 2521d698 | bellard | #define TARGET_NR_setpgid 57 |
64 | 2521d698 | bellard | #define TARGET_NR_ulimit 58 |
65 | 2521d698 | bellard | #define TARGET_NR_oldolduname 59 |
66 | 2521d698 | bellard | #define TARGET_NR_umask 60 |
67 | 2521d698 | bellard | #define TARGET_NR_chroot 61 |
68 | 2521d698 | bellard | #define TARGET_NR_ustat 62 |
69 | 2521d698 | bellard | #define TARGET_NR_dup2 63 |
70 | 2521d698 | bellard | #define TARGET_NR_getppid 64 |
71 | 2521d698 | bellard | #define TARGET_NR_getpgrp 65 |
72 | 2521d698 | bellard | #define TARGET_NR_setsid 66 |
73 | 2521d698 | bellard | #define TARGET_NR_sigaction 67 |
74 | 2521d698 | bellard | #define TARGET_NR_sgetmask 68 |
75 | 2521d698 | bellard | #define TARGET_NR_ssetmask 69 |
76 | 2521d698 | bellard | #define TARGET_NR_setreuid 70 |
77 | 2521d698 | bellard | #define TARGET_NR_setregid 71 |
78 | 2521d698 | bellard | #define TARGET_NR_sigsuspend 72 |
79 | 2521d698 | bellard | #define TARGET_NR_sigpending 73 |
80 | 2521d698 | bellard | #define TARGET_NR_sethostname 74 |
81 | 2521d698 | bellard | #define TARGET_NR_setrlimit 75 |
82 | 2521d698 | bellard | #define TARGET_NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ |
83 | 2521d698 | bellard | #define TARGET_NR_getrusage 77 |
84 | 2521d698 | bellard | #define TARGET_NR_gettimeofday 78 |
85 | 2521d698 | bellard | #define TARGET_NR_settimeofday 79 |
86 | 2521d698 | bellard | #define TARGET_NR_getgroups 80 |
87 | 2521d698 | bellard | #define TARGET_NR_setgroups 81 |
88 | 2521d698 | bellard | #define TARGET_NR_select 82 |
89 | 2521d698 | bellard | #define TARGET_NR_symlink 83 |
90 | 2521d698 | bellard | #define TARGET_NR_oldlstat 84 |
91 | 2521d698 | bellard | #define TARGET_NR_readlink 85 |
92 | 2521d698 | bellard | #define TARGET_NR_uselib 86 |
93 | 2521d698 | bellard | #define TARGET_NR_swapon 87 |
94 | 2521d698 | bellard | #define TARGET_NR_reboot 88 |
95 | 2521d698 | bellard | #define TARGET_NR_readdir 89 |
96 | 2521d698 | bellard | #define TARGET_NR_mmap 90 |
97 | 2521d698 | bellard | #define TARGET_NR_munmap 91 |
98 | 2521d698 | bellard | #define TARGET_NR_truncate 92 |
99 | 2521d698 | bellard | #define TARGET_NR_ftruncate 93 |
100 | 2521d698 | bellard | #define TARGET_NR_fchmod 94 |
101 | 2521d698 | bellard | #define TARGET_NR_fchown 95 |
102 | 2521d698 | bellard | #define TARGET_NR_getpriority 96 |
103 | 2521d698 | bellard | #define TARGET_NR_setpriority 97 |
104 | 2521d698 | bellard | #define TARGET_NR_profil 98 |
105 | 2521d698 | bellard | #define TARGET_NR_statfs 99 |
106 | 2521d698 | bellard | #define TARGET_NR_fstatfs 100 |
107 | 2521d698 | bellard | #define TARGET_NR_ioperm 101 |
108 | 2521d698 | bellard | #define TARGET_NR_socketcall 102 |
109 | 2521d698 | bellard | #define TARGET_NR_syslog 103 |
110 | 2521d698 | bellard | #define TARGET_NR_setitimer 104 |
111 | 2521d698 | bellard | #define TARGET_NR_getitimer 105 |
112 | 2521d698 | bellard | #define TARGET_NR_stat 106 |
113 | 2521d698 | bellard | #define TARGET_NR_lstat 107 |
114 | 2521d698 | bellard | #define TARGET_NR_fstat 108 |
115 | 2521d698 | bellard | #define TARGET_NR_olduname 109 |
116 | 2521d698 | bellard | #define TARGET_NR_iopl 110 |
117 | 2521d698 | bellard | #define TARGET_NR_vhangup 111 |
118 | 2521d698 | bellard | #define TARGET_NR_idle 112 |
119 | 2521d698 | bellard | #define TARGET_NR_vm86old 113 |
120 | 2521d698 | bellard | #define TARGET_NR_wait4 114 |
121 | 2521d698 | bellard | #define TARGET_NR_swapoff 115 |
122 | 2521d698 | bellard | #define TARGET_NR_sysinfo 116 |
123 | 2521d698 | bellard | #define TARGET_NR_ipc 117 |
124 | 2521d698 | bellard | #define TARGET_NR_fsync 118 |
125 | 2521d698 | bellard | #define TARGET_NR_sigreturn 119 |
126 | 2521d698 | bellard | #define TARGET_NR_clone 120 |
127 | 2521d698 | bellard | #define TARGET_NR_setdomainname 121 |
128 | 2521d698 | bellard | #define TARGET_NR_uname 122 |
129 | 2521d698 | bellard | #define TARGET_NR_modify_ldt 123 |
130 | 2521d698 | bellard | #define TARGET_NR_adjtimex 124 |
131 | 2521d698 | bellard | #define TARGET_NR_mprotect 125 |
132 | 2521d698 | bellard | #define TARGET_NR_sigprocmask 126 |
133 | 2521d698 | bellard | #define TARGET_NR_create_module 127 |
134 | 2521d698 | bellard | #define TARGET_NR_init_module 128 |
135 | 2521d698 | bellard | #define TARGET_NR_delete_module 129 |
136 | 2521d698 | bellard | #define TARGET_NR_get_kernel_syms 130 |
137 | 2521d698 | bellard | #define TARGET_NR_quotactl 131 |
138 | 2521d698 | bellard | #define TARGET_NR_getpgid 132 |
139 | 2521d698 | bellard | #define TARGET_NR_fchdir 133 |
140 | 2521d698 | bellard | #define TARGET_NR_bdflush 134 |
141 | 2521d698 | bellard | #define TARGET_NR_sysfs 135 |
142 | 2521d698 | bellard | #define TARGET_NR_personality 136 |
143 | 2521d698 | bellard | #define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ |
144 | 2521d698 | bellard | #define TARGET_NR_setfsuid 138 |
145 | 2521d698 | bellard | #define TARGET_NR_setfsgid 139 |
146 | 2521d698 | bellard | #define TARGET_NR__llseek 140 |
147 | 2521d698 | bellard | #define TARGET_NR_getdents 141 |
148 | 2521d698 | bellard | #define TARGET_NR__newselect 142 |
149 | 2521d698 | bellard | #define TARGET_NR_flock 143 |
150 | 2521d698 | bellard | #define TARGET_NR_msync 144 |
151 | 2521d698 | bellard | #define TARGET_NR_readv 145 |
152 | 2521d698 | bellard | #define TARGET_NR_writev 146 |
153 | 2521d698 | bellard | #define TARGET_NR_getsid 147 |
154 | 2521d698 | bellard | #define TARGET_NR_fdatasync 148 |
155 | 2521d698 | bellard | #define TARGET_NR__sysctl 149 |
156 | 2521d698 | bellard | #define TARGET_NR_mlock 150 |
157 | 2521d698 | bellard | #define TARGET_NR_munlock 151 |
158 | 2521d698 | bellard | #define TARGET_NR_mlockall 152 |
159 | 2521d698 | bellard | #define TARGET_NR_munlockall 153 |
160 | 2521d698 | bellard | #define TARGET_NR_sched_setparam 154 |
161 | 2521d698 | bellard | #define TARGET_NR_sched_getparam 155 |
162 | 2521d698 | bellard | #define TARGET_NR_sched_setscheduler 156 |
163 | 2521d698 | bellard | #define TARGET_NR_sched_getscheduler 157 |
164 | 2521d698 | bellard | #define TARGET_NR_sched_yield 158 |
165 | 2521d698 | bellard | #define TARGET_NR_sched_get_priority_max 159 |
166 | 2521d698 | bellard | #define TARGET_NR_sched_get_priority_min 160 |
167 | 2521d698 | bellard | #define TARGET_NR_sched_rr_get_interval 161 |
168 | 2521d698 | bellard | #define TARGET_NR_nanosleep 162 |
169 | 2521d698 | bellard | #define TARGET_NR_mremap 163 |
170 | 2521d698 | bellard | #define TARGET_NR_setresuid 164 |
171 | 2521d698 | bellard | #define TARGET_NR_getresuid 165 |
172 | 2521d698 | bellard | #define TARGET_NR_vm86 166 |
173 | 2521d698 | bellard | #define TARGET_NR_query_module 167 |
174 | 2521d698 | bellard | #define TARGET_NR_poll 168 |
175 | 2521d698 | bellard | #define TARGET_NR_nfsservctl 169 |
176 | 2521d698 | bellard | #define TARGET_NR_setresgid 170 |
177 | 2521d698 | bellard | #define TARGET_NR_getresgid 171 |
178 | 2521d698 | bellard | #define TARGET_NR_prctl 172 |
179 | 2521d698 | bellard | #define TARGET_NR_rt_sigreturn 173 |
180 | 2521d698 | bellard | #define TARGET_NR_rt_sigaction 174 |
181 | 2521d698 | bellard | #define TARGET_NR_rt_sigprocmask 175 |
182 | 2521d698 | bellard | #define TARGET_NR_rt_sigpending 176 |
183 | 2521d698 | bellard | #define TARGET_NR_rt_sigtimedwait 177 |
184 | 2521d698 | bellard | #define TARGET_NR_rt_sigqueueinfo 178 |
185 | 2521d698 | bellard | #define TARGET_NR_rt_sigsuspend 179 |
186 | 2521d698 | bellard | #define TARGET_NR_pread 180 |
187 | 2521d698 | bellard | #define TARGET_NR_pwrite 181 |
188 | 2521d698 | bellard | #define TARGET_NR_chown 182 |
189 | 2521d698 | bellard | #define TARGET_NR_getcwd 183 |
190 | 2521d698 | bellard | #define TARGET_NR_capget 184 |
191 | 2521d698 | bellard | #define TARGET_NR_capset 185 |
192 | 2521d698 | bellard | #define TARGET_NR_sigaltstack 186 |
193 | 2521d698 | bellard | #define TARGET_NR_sendfile 187 |
194 | 2521d698 | bellard | #define TARGET_NR_getpmsg 188 /* some people actually want streams */ |
195 | 2521d698 | bellard | #define TARGET_NR_putpmsg 189 /* some people actually want streams */ |
196 | 2521d698 | bellard | #define TARGET_NR_vfork 190 |
197 | 2521d698 | bellard | #define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ |
198 | 2521d698 | bellard | #define TARGET_NR_mmap2 192 |
199 | 2521d698 | bellard | #define TARGET_NR_truncate64 193 |
200 | 2521d698 | bellard | #define TARGET_NR_ftruncate64 194 |
201 | 2521d698 | bellard | #define TARGET_NR_stat64 195 |
202 | 2521d698 | bellard | #define TARGET_NR_lstat64 196 |
203 | 2521d698 | bellard | #define TARGET_NR_fstat64 197 |
204 | 2521d698 | bellard | #define TARGET_NR_lchown32 198 |
205 | 2521d698 | bellard | #define TARGET_NR_getuid32 199 |
206 | 2521d698 | bellard | #define TARGET_NR_getgid32 200 |
207 | 2521d698 | bellard | #define TARGET_NR_geteuid32 201 |
208 | 2521d698 | bellard | #define TARGET_NR_getegid32 202 |
209 | 2521d698 | bellard | #define TARGET_NR_setreuid32 203 |
210 | 2521d698 | bellard | #define TARGET_NR_setregid32 204 |
211 | 2521d698 | bellard | #define TARGET_NR_getgroups32 205 |
212 | 2521d698 | bellard | #define TARGET_NR_setgroups32 206 |
213 | 2521d698 | bellard | #define TARGET_NR_fchown32 207 |
214 | 2521d698 | bellard | #define TARGET_NR_setresuid32 208 |
215 | 2521d698 | bellard | #define TARGET_NR_getresuid32 209 |
216 | 2521d698 | bellard | #define TARGET_NR_setresgid32 210 |
217 | 2521d698 | bellard | #define TARGET_NR_getresgid32 211 |
218 | 2521d698 | bellard | #define TARGET_NR_chown32 212 |
219 | 2521d698 | bellard | #define TARGET_NR_setuid32 213 |
220 | 2521d698 | bellard | #define TARGET_NR_setgid32 214 |
221 | 2521d698 | bellard | #define TARGET_NR_setfsuid32 215 |
222 | 2521d698 | bellard | #define TARGET_NR_setfsgid32 216 |
223 | 2521d698 | bellard | |
224 | 2521d698 | bellard | #if defined(TARGET_I386)
|
225 | 2521d698 | bellard | #define TARGET_NR_pivot_root 217 |
226 | 2521d698 | bellard | #define TARGET_NR_mincore 218 |
227 | 2521d698 | bellard | #define TARGET_NR_madvise 219 |
228 | 2521d698 | bellard | #define TARGET_NR_madvise1 219 /* delete when C lib stub is removed */ |
229 | 2521d698 | bellard | #define TARGET_NR_getdents64 220 |
230 | 2521d698 | bellard | #endif
|
231 | 2521d698 | bellard | |
232 | 2521d698 | bellard | #if defined(TARGET_ARM)
|
233 | 2521d698 | bellard | #define TARGET_NR_getdents64 217 |
234 | 2521d698 | bellard | #define TARGET_NR_pivot_root 218 |
235 | 2521d698 | bellard | #define TARGET_NR_mincore 219 |
236 | 2521d698 | bellard | #define TARGET_NR_madvise 220 |
237 | 2521d698 | bellard | #endif
|
238 | 2521d698 | bellard | |
239 | 2521d698 | bellard | #define TARGET_NR_fcntl64 221 |
240 | 2521d698 | bellard | #define TARGET_NR_security 223 /* syscall for security modules */ |
241 | 2521d698 | bellard | #define TARGET_NR_gettid 224 |
242 | 2521d698 | bellard | #define TARGET_NR_readahead 225 |
243 | 2521d698 | bellard | #define TARGET_NR_setxattr 226 |
244 | 2521d698 | bellard | #define TARGET_NR_lsetxattr 227 |
245 | 2521d698 | bellard | #define TARGET_NR_fsetxattr 228 |
246 | 2521d698 | bellard | #define TARGET_NR_getxattr 229 |
247 | 2521d698 | bellard | #define TARGET_NR_lgetxattr 230 |
248 | 2521d698 | bellard | #define TARGET_NR_fgetxattr 231 |
249 | 2521d698 | bellard | #define TARGET_NR_listxattr 232 |
250 | 2521d698 | bellard | #define TARGET_NR_llistxattr 233 |
251 | 2521d698 | bellard | #define TARGET_NR_flistxattr 234 |
252 | 2521d698 | bellard | #define TARGET_NR_removexattr 235 |
253 | 2521d698 | bellard | #define TARGET_NR_lremovexattr 236 |
254 | 2521d698 | bellard | #define TARGET_NR_fremovexattr 237 |
255 | 2521d698 | bellard | #define TARGET_NR_tkill 238 |
256 | 2521d698 | bellard | #define TARGET_NR_sendfile64 239 |
257 | 2521d698 | bellard | #define TARGET_NR_futex 240 |
258 | 2521d698 | bellard | #define TARGET_NR_sched_setaffinity 241 |
259 | 2521d698 | bellard | #define TARGET_NR_sched_getaffinity 242 |
260 | 2521d698 | bellard | #define TARGET_NR_set_thread_area 243 |
261 | 2521d698 | bellard | #define TARGET_NR_get_thread_area 244 |
262 | 2521d698 | bellard | #define TARGET_NR_io_setup 245 |
263 | 2521d698 | bellard | #define TARGET_NR_io_destroy 246 |
264 | 2521d698 | bellard | #define TARGET_NR_io_getevents 247 |
265 | 2521d698 | bellard | #define TARGET_NR_io_submit 248 |
266 | 2521d698 | bellard | #define TARGET_NR_io_cancel 249 |
267 | 2521d698 | bellard | #define TARGET_NR_fadvise64 250 |
268 | 2521d698 | bellard | |
269 | 2521d698 | bellard | #define TARGET_NR_exit_group 252 |
270 | 2521d698 | bellard | #define TARGET_NR_lookup_dcookie 253 |
271 | 2521d698 | bellard | #define TARGET_NR_epoll_create 254 |
272 | 2521d698 | bellard | #define TARGET_NR_epoll_ctl 255 |
273 | 2521d698 | bellard | #define TARGET_NR_epoll_wait 256 |
274 | 2521d698 | bellard | #define TARGET_NR_remap_file_pages 257 |
275 | 2521d698 | bellard | #define TARGET_NR_set_tid_address 258 |
276 | 2521d698 | bellard | #define TARGET_NR_timer_create 259 |
277 | 2521d698 | bellard | #define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) |
278 | 2521d698 | bellard | #define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) |
279 | 2521d698 | bellard | #define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) |
280 | 2521d698 | bellard | #define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) |
281 | 2521d698 | bellard | #define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) |
282 | 2521d698 | bellard | #define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) |
283 | 2521d698 | bellard | #define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) |
284 | 2521d698 | bellard | #define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) |
285 | 2521d698 | bellard | |
286 | 31e31b8a | bellard | #define SOCKOP_socket 1 |
287 | 31e31b8a | bellard | #define SOCKOP_bind 2 |
288 | 31e31b8a | bellard | #define SOCKOP_connect 3 |
289 | 31e31b8a | bellard | #define SOCKOP_listen 4 |
290 | 31e31b8a | bellard | #define SOCKOP_accept 5 |
291 | 31e31b8a | bellard | #define SOCKOP_getsockname 6 |
292 | 31e31b8a | bellard | #define SOCKOP_getpeername 7 |
293 | 31e31b8a | bellard | #define SOCKOP_socketpair 8 |
294 | 31e31b8a | bellard | #define SOCKOP_send 9 |
295 | 31e31b8a | bellard | #define SOCKOP_recv 10 |
296 | 31e31b8a | bellard | #define SOCKOP_sendto 11 |
297 | 31e31b8a | bellard | #define SOCKOP_recvfrom 12 |
298 | 31e31b8a | bellard | #define SOCKOP_shutdown 13 |
299 | 31e31b8a | bellard | #define SOCKOP_setsockopt 14 |
300 | 31e31b8a | bellard | #define SOCKOP_getsockopt 15 |
301 | 31e31b8a | bellard | #define SOCKOP_sendmsg 16 |
302 | 31e31b8a | bellard | #define SOCKOP_recvmsg 17 |
303 | 31e31b8a | bellard | |
304 | 2521d698 | bellard | /*
|
305 | 2521d698 | bellard | * The following is for compatibility across the various Linux
|
306 | 2521d698 | bellard | * platforms. The i386 ioctl numbering scheme doesn't really enforce
|
307 | 2521d698 | bellard | * a type field. De facto, however, the top 8 bits of the lower 16
|
308 | 2521d698 | bellard | * bits are indeed used as a type field, so we might just as well make
|
309 | 2521d698 | bellard | * this explicit here. Please be sure to use the decoding macros
|
310 | 2521d698 | bellard | * below from now on.
|
311 | 2521d698 | bellard | */
|
312 | 2521d698 | bellard | #define TARGET_IOC_NRBITS 8 |
313 | 2521d698 | bellard | #define TARGET_IOC_TYPEBITS 8 |
314 | 2521d698 | bellard | |
315 | 2521d698 | bellard | #if defined(TARGET_I386) || defined(TARGET_ARM)
|
316 | 2521d698 | bellard | |
317 | 2521d698 | bellard | #define TARGET_IOC_SIZEBITS 14 |
318 | 2521d698 | bellard | #define TARGET_IOC_DIRBITS 2 |
319 | 2521d698 | bellard | |
320 | 2521d698 | bellard | #define TARGET_IOC_NONE 0U |
321 | 2521d698 | bellard | #define TARGET_IOC_WRITE 1U |
322 | 2521d698 | bellard | #define TARGET_IOC_READ 2U |
323 | 2521d698 | bellard | |
324 | 2521d698 | bellard | #elif defined(TARGET_PPC) || defined(TARGET_ALPHA)
|
325 | 2521d698 | bellard | |
326 | 2521d698 | bellard | #define TARGET_IOC_SIZEBITS 13 |
327 | 2521d698 | bellard | #define TARGET_IOC_DIRBITS 3 |
328 | 2521d698 | bellard | |
329 | 2521d698 | bellard | #define TARGET_IOC_NONE 1U |
330 | 2521d698 | bellard | #define TARGET_IOC_READ 2U |
331 | 2521d698 | bellard | #define TARGET_IOC_WRITE 4U |
332 | 2521d698 | bellard | |
333 | 2521d698 | bellard | #else
|
334 | 2521d698 | bellard | #error unsupported CPU
|
335 | 2521d698 | bellard | #endif
|
336 | 2521d698 | bellard | |
337 | 2521d698 | bellard | #define TARGET_IOC_NRMASK ((1 << TARGET_IOC_NRBITS)-1) |
338 | 2521d698 | bellard | #define TARGET_IOC_TYPEMASK ((1 << TARGET_IOC_TYPEBITS)-1) |
339 | 2521d698 | bellard | #define TARGET_IOC_SIZEMASK ((1 << TARGET_IOC_SIZEBITS)-1) |
340 | 2521d698 | bellard | #define TARGET_IOC_DIRMASK ((1 << TARGET_IOC_DIRBITS)-1) |
341 | 2521d698 | bellard | |
342 | 2521d698 | bellard | #define TARGET_IOC_NRSHIFT 0 |
343 | 2521d698 | bellard | #define TARGET_IOC_TYPESHIFT (TARGET_IOC_NRSHIFT+TARGET_IOC_NRBITS)
|
344 | 2521d698 | bellard | #define TARGET_IOC_SIZESHIFT (TARGET_IOC_TYPESHIFT+TARGET_IOC_TYPEBITS)
|
345 | 2521d698 | bellard | #define TARGET_IOC_DIRSHIFT (TARGET_IOC_SIZESHIFT+TARGET_IOC_SIZEBITS)
|
346 | 2521d698 | bellard | |
347 | 2521d698 | bellard | #define TARGET_IOC(dir,type,nr,size) \
|
348 | 2521d698 | bellard | (((dir) << TARGET_IOC_DIRSHIFT) | \ |
349 | 2521d698 | bellard | ((type) << TARGET_IOC_TYPESHIFT) | \ |
350 | 2521d698 | bellard | ((nr) << TARGET_IOC_NRSHIFT) | \ |
351 | 2521d698 | bellard | ((size) << TARGET_IOC_SIZESHIFT)) |
352 | 2521d698 | bellard | |
353 | 2521d698 | bellard | /* used to create numbers */
|
354 | 2521d698 | bellard | #define TARGET_IO(type,nr) TARGET_IOC(TARGET_IOC_NONE,(type),(nr),0) |
355 | 2521d698 | bellard | #define TARGET_IOR(type,nr,size) TARGET_IOC(TARGET_IOC_READ,(type),(nr),sizeof(size)) |
356 | 2521d698 | bellard | #define TARGET_IOW(type,nr,size) TARGET_IOC(TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
357 | 2521d698 | bellard | #define TARGET_IOWR(type,nr,size) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
358 | 2521d698 | bellard | |
359 | 2521d698 | bellard | /* the size is automatically computed for these defines */
|
360 | 2521d698 | bellard | #define TARGET_IORU(type,nr) TARGET_IOC(TARGET_IOC_READ,(type),(nr),TARGET_IOC_SIZEMASK)
|
361 | 2521d698 | bellard | #define TARGET_IOWU(type,nr) TARGET_IOC(TARGET_IOC_WRITE,(type),(nr),TARGET_IOC_SIZEMASK)
|
362 | 2521d698 | bellard | #define TARGET_IOWRU(type,nr) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),TARGET_IOC_SIZEMASK)
|
363 | 2521d698 | bellard | |
364 | 7854b056 | bellard | struct target_sockaddr {
|
365 | 7854b056 | bellard | uint16_t sa_family; |
366 | 7854b056 | bellard | uint8_t sa_data[14];
|
367 | 7854b056 | bellard | }; |
368 | 7854b056 | bellard | |
369 | 31e31b8a | bellard | struct target_timeval {
|
370 | 31e31b8a | bellard | target_long tv_sec; |
371 | 31e31b8a | bellard | target_long tv_usec; |
372 | 31e31b8a | bellard | }; |
373 | 31e31b8a | bellard | |
374 | 1b6b029e | bellard | struct target_timespec {
|
375 | 1b6b029e | bellard | target_long tv_sec; |
376 | 1b6b029e | bellard | target_long tv_nsec; |
377 | 1b6b029e | bellard | }; |
378 | 1b6b029e | bellard | |
379 | 66fb9763 | bellard | struct target_itimerval {
|
380 | 66fb9763 | bellard | struct target_timeval it_interval;
|
381 | 66fb9763 | bellard | struct target_timeval it_value;
|
382 | 66fb9763 | bellard | }; |
383 | 66fb9763 | bellard | |
384 | 32f36bce | bellard | typedef target_long target_clock_t;
|
385 | 32f36bce | bellard | |
386 | c596ed17 | bellard | #define TARGET_HZ 100 |
387 | c596ed17 | bellard | |
388 | 32f36bce | bellard | struct target_tms {
|
389 | 32f36bce | bellard | target_clock_t tms_utime; |
390 | 32f36bce | bellard | target_clock_t tms_stime; |
391 | 32f36bce | bellard | target_clock_t tms_cutime; |
392 | 32f36bce | bellard | target_clock_t tms_cstime; |
393 | 32f36bce | bellard | }; |
394 | 32f36bce | bellard | |
395 | f2674e31 | bellard | struct target_sel_arg_struct {
|
396 | f2674e31 | bellard | target_long n; |
397 | f2674e31 | bellard | target_long inp, outp, exp; |
398 | f2674e31 | bellard | target_long tvp; |
399 | f2674e31 | bellard | }; |
400 | f2674e31 | bellard | |
401 | 31e31b8a | bellard | struct target_iovec {
|
402 | 31e31b8a | bellard | target_long iov_base; /* Starting address */
|
403 | 31e31b8a | bellard | target_long iov_len; /* Number of bytes */
|
404 | 31e31b8a | bellard | }; |
405 | 31e31b8a | bellard | |
406 | 1a9353d2 | bellard | struct target_msghdr {
|
407 | 1a9353d2 | bellard | target_long msg_name; /* Socket name */
|
408 | 1a9353d2 | bellard | int msg_namelen; /* Length of name */ |
409 | 1a9353d2 | bellard | target_long msg_iov; /* Data blocks */
|
410 | 1a9353d2 | bellard | target_long msg_iovlen; /* Number of blocks */
|
411 | 1a9353d2 | bellard | target_long msg_control; /* Per protocol magic (eg BSD file descriptor passing) */
|
412 | 1a9353d2 | bellard | target_long msg_controllen; /* Length of cmsg list */
|
413 | 1a9353d2 | bellard | unsigned int msg_flags; |
414 | 1a9353d2 | bellard | }; |
415 | 1a9353d2 | bellard | |
416 | 7854b056 | bellard | struct target_cmsghdr {
|
417 | 7854b056 | bellard | target_long cmsg_len; |
418 | 7854b056 | bellard | int cmsg_level;
|
419 | 7854b056 | bellard | int cmsg_type;
|
420 | 7854b056 | bellard | }; |
421 | 7854b056 | bellard | |
422 | 7854b056 | bellard | #define TARGET_CMSG_DATA(cmsg) ((unsigned char *) ((struct target_cmsghdr *) (cmsg) + 1)) |
423 | 7854b056 | bellard | #define TARGET_CMSG_NXTHDR(mhdr, cmsg) __target_cmsg_nxthdr (mhdr, cmsg)
|
424 | 7854b056 | bellard | #define TARGET_CMSG_FIRSTHDR(mhdr) \
|
425 | 7854b056 | bellard | ((size_t) tswapl((mhdr)->msg_controllen) >= sizeof (struct target_cmsghdr) \ |
426 | 7854b056 | bellard | ? (struct target_cmsghdr *) tswapl((mhdr)->msg_control) : (struct target_cmsghdr *) NULL) |
427 | 7854b056 | bellard | #define TARGET_CMSG_ALIGN(len) (((len) + sizeof (target_long) - 1) \ |
428 | 7854b056 | bellard | & (size_t) ~(sizeof (target_long) - 1)) |
429 | 7854b056 | bellard | #define TARGET_CMSG_SPACE(len) (TARGET_CMSG_ALIGN (len) \
|
430 | 7854b056 | bellard | + TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr))) |
431 | 7854b056 | bellard | #define TARGET_CMSG_LEN(len) (TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr)) + (len)) |
432 | 7854b056 | bellard | |
433 | 7854b056 | bellard | static __inline__ struct target_cmsghdr * |
434 | 7854b056 | bellard | __target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cmsg) |
435 | 7854b056 | bellard | { |
436 | 7854b056 | bellard | if (tswapl(__cmsg->cmsg_len) < sizeof (struct target_cmsghdr)) |
437 | 7854b056 | bellard | /* The kernel header does this so there may be a reason. */
|
438 | 7854b056 | bellard | return 0; |
439 | 7854b056 | bellard | |
440 | 7854b056 | bellard | __cmsg = (struct target_cmsghdr *) ((unsigned char *) __cmsg |
441 | 7854b056 | bellard | + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len))); |
442 | 7854b056 | bellard | if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) tswapl(__mhdr->msg_control) |
443 | 7854b056 | bellard | + tswapl(__mhdr->msg_controllen)) |
444 | 7854b056 | bellard | || ((unsigned char *) __cmsg + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)) |
445 | 7854b056 | bellard | > ((unsigned char *) tswapl(__mhdr->msg_control) |
446 | 7854b056 | bellard | + tswapl(__mhdr->msg_controllen)))) |
447 | 7854b056 | bellard | /* No more entries. */
|
448 | 7854b056 | bellard | return 0; |
449 | 7854b056 | bellard | return __cmsg;
|
450 | 7854b056 | bellard | } |
451 | 7854b056 | bellard | |
452 | 7854b056 | bellard | |
453 | 31e31b8a | bellard | struct target_rusage {
|
454 | 31e31b8a | bellard | struct target_timeval ru_utime; /* user time used */ |
455 | 31e31b8a | bellard | struct target_timeval ru_stime; /* system time used */ |
456 | 31e31b8a | bellard | target_long ru_maxrss; /* maximum resident set size */
|
457 | 31e31b8a | bellard | target_long ru_ixrss; /* integral shared memory size */
|
458 | 31e31b8a | bellard | target_long ru_idrss; /* integral unshared data size */
|
459 | 31e31b8a | bellard | target_long ru_isrss; /* integral unshared stack size */
|
460 | 31e31b8a | bellard | target_long ru_minflt; /* page reclaims */
|
461 | 31e31b8a | bellard | target_long ru_majflt; /* page faults */
|
462 | 31e31b8a | bellard | target_long ru_nswap; /* swaps */
|
463 | 31e31b8a | bellard | target_long ru_inblock; /* block input operations */
|
464 | 31e31b8a | bellard | target_long ru_oublock; /* block output operations */
|
465 | 31e31b8a | bellard | target_long ru_msgsnd; /* messages sent */
|
466 | 31e31b8a | bellard | target_long ru_msgrcv; /* messages received */
|
467 | 31e31b8a | bellard | target_long ru_nsignals; /* signals received */
|
468 | 31e31b8a | bellard | target_long ru_nvcsw; /* voluntary context switches */
|
469 | 31e31b8a | bellard | target_long ru_nivcsw; /* involuntary " */
|
470 | 31e31b8a | bellard | }; |
471 | 31e31b8a | bellard | |
472 | 31e31b8a | bellard | typedef struct { |
473 | 31e31b8a | bellard | int val[2]; |
474 | 31e31b8a | bellard | } kernel_fsid_t; |
475 | 31e31b8a | bellard | |
476 | 72f03900 | bellard | struct kernel_statfs {
|
477 | 31e31b8a | bellard | int f_type;
|
478 | 31e31b8a | bellard | int f_bsize;
|
479 | 31e31b8a | bellard | int f_blocks;
|
480 | 31e31b8a | bellard | int f_bfree;
|
481 | 31e31b8a | bellard | int f_bavail;
|
482 | 31e31b8a | bellard | int f_files;
|
483 | 31e31b8a | bellard | int f_ffree;
|
484 | 31e31b8a | bellard | kernel_fsid_t f_fsid; |
485 | 31e31b8a | bellard | int f_namelen;
|
486 | 31e31b8a | bellard | int f_spare[6]; |
487 | 31e31b8a | bellard | }; |
488 | 31e31b8a | bellard | |
489 | dab2ed99 | bellard | struct target_dirent {
|
490 | dab2ed99 | bellard | target_long d_ino; |
491 | dab2ed99 | bellard | target_long d_off; |
492 | dab2ed99 | bellard | unsigned short d_reclen; |
493 | dab2ed99 | bellard | char d_name[256]; /* We must not include limits.h! */ |
494 | dab2ed99 | bellard | }; |
495 | dab2ed99 | bellard | |
496 | dab2ed99 | bellard | struct target_dirent64 {
|
497 | dab2ed99 | bellard | uint64_t d_ino; |
498 | dab2ed99 | bellard | int64_t d_off; |
499 | dab2ed99 | bellard | unsigned short d_reclen; |
500 | dab2ed99 | bellard | unsigned char d_type; |
501 | dab2ed99 | bellard | char d_name[256]; |
502 | dab2ed99 | bellard | }; |
503 | dab2ed99 | bellard | |
504 | dab2ed99 | bellard | |
505 | 31e31b8a | bellard | /* mostly generic signal stuff */
|
506 | 31e31b8a | bellard | #define TARGET_SIG_DFL ((target_long)0) /* default signal handling */ |
507 | 31e31b8a | bellard | #define TARGET_SIG_IGN ((target_long)1) /* ignore signal */ |
508 | 31e31b8a | bellard | #define TARGET_SIG_ERR ((target_long)-1) /* error return from signal */ |
509 | 31e31b8a | bellard | |
510 | 31e31b8a | bellard | #ifdef TARGET_MIPS
|
511 | 31e31b8a | bellard | #define TARGET_NSIG 128 |
512 | 31e31b8a | bellard | #else
|
513 | 31e31b8a | bellard | #define TARGET_NSIG 64 |
514 | 31e31b8a | bellard | #endif
|
515 | 31e31b8a | bellard | #define TARGET_NSIG_BPW TARGET_LONG_BITS
|
516 | 31e31b8a | bellard | #define TARGET_NSIG_WORDS (TARGET_NSIG / TARGET_NSIG_BPW)
|
517 | 31e31b8a | bellard | |
518 | 31e31b8a | bellard | typedef struct { |
519 | 31e31b8a | bellard | target_ulong sig[TARGET_NSIG_WORDS]; |
520 | 31e31b8a | bellard | } target_sigset_t; |
521 | 31e31b8a | bellard | |
522 | 66fb9763 | bellard | #ifdef BSWAP_NEEDED
|
523 | 66fb9763 | bellard | static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s) |
524 | 66fb9763 | bellard | { |
525 | 66fb9763 | bellard | int i;
|
526 | 66fb9763 | bellard | for(i = 0;i < TARGET_NSIG_WORDS; i++) |
527 | 66fb9763 | bellard | d->sig[i] = tswapl(s->sig[i]); |
528 | 66fb9763 | bellard | } |
529 | 66fb9763 | bellard | #else
|
530 | 66fb9763 | bellard | static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s) |
531 | 66fb9763 | bellard | { |
532 | 66fb9763 | bellard | *d = *s; |
533 | 66fb9763 | bellard | } |
534 | 66fb9763 | bellard | #endif
|
535 | 66fb9763 | bellard | |
536 | 66fb9763 | bellard | static inline void target_siginitset(target_sigset_t *d, target_ulong set) |
537 | 66fb9763 | bellard | { |
538 | 66fb9763 | bellard | int i;
|
539 | 66fb9763 | bellard | d->sig[0] = set;
|
540 | 66fb9763 | bellard | for(i = 1;i < TARGET_NSIG_WORDS; i++) |
541 | 66fb9763 | bellard | d->sig[i] = 0;
|
542 | 66fb9763 | bellard | } |
543 | 66fb9763 | bellard | |
544 | c596ed17 | bellard | void host_to_target_sigset(target_sigset_t *d, const sigset_t *s); |
545 | c596ed17 | bellard | void target_to_host_sigset(sigset_t *d, const target_sigset_t *s); |
546 | 66fb9763 | bellard | void host_to_target_old_sigset(target_ulong *old_sigset,
|
547 | 66fb9763 | bellard | const sigset_t *sigset);
|
548 | 66fb9763 | bellard | void target_to_host_old_sigset(sigset_t *sigset,
|
549 | 66fb9763 | bellard | const target_ulong *old_sigset);
|
550 | 66fb9763 | bellard | struct target_sigaction;
|
551 | 66fb9763 | bellard | int do_sigaction(int sig, const struct target_sigaction *act, |
552 | 66fb9763 | bellard | struct target_sigaction *oact);
|
553 | 66fb9763 | bellard | |
554 | 2521d698 | bellard | #if defined(TARGET_I386) || defined(TARGET_ARM)
|
555 | 2521d698 | bellard | |
556 | 2521d698 | bellard | #define TARGET_SA_NOCLDSTOP 0x00000001 |
557 | 2521d698 | bellard | #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ |
558 | 2521d698 | bellard | #define TARGET_SA_SIGINFO 0x00000004 |
559 | 2521d698 | bellard | #define TARGET_SA_ONSTACK 0x08000000 |
560 | 2521d698 | bellard | #define TARGET_SA_RESTART 0x10000000 |
561 | 2521d698 | bellard | #define TARGET_SA_NODEFER 0x40000000 |
562 | 2521d698 | bellard | #define TARGET_SA_RESETHAND 0x80000000 |
563 | 2521d698 | bellard | #define TARGET_SA_RESTORER 0x04000000 |
564 | 2521d698 | bellard | |
565 | 2521d698 | bellard | #define TARGET_SIGHUP 1 |
566 | 2521d698 | bellard | #define TARGET_SIGINT 2 |
567 | 2521d698 | bellard | #define TARGET_SIGQUIT 3 |
568 | 2521d698 | bellard | #define TARGET_SIGILL 4 |
569 | 2521d698 | bellard | #define TARGET_SIGTRAP 5 |
570 | 2521d698 | bellard | #define TARGET_SIGABRT 6 |
571 | 2521d698 | bellard | #define TARGET_SIGIOT 6 |
572 | 2521d698 | bellard | #define TARGET_SIGBUS 7 |
573 | 2521d698 | bellard | #define TARGET_SIGFPE 8 |
574 | 2521d698 | bellard | #define TARGET_SIGKILL 9 |
575 | 2521d698 | bellard | #define TARGET_SIGUSR1 10 |
576 | 2521d698 | bellard | #define TARGET_SIGSEGV 11 |
577 | 2521d698 | bellard | #define TARGET_SIGUSR2 12 |
578 | 2521d698 | bellard | #define TARGET_SIGPIPE 13 |
579 | 2521d698 | bellard | #define TARGET_SIGALRM 14 |
580 | 2521d698 | bellard | #define TARGET_SIGTERM 15 |
581 | 2521d698 | bellard | #define TARGET_SIGSTKFLT 16 |
582 | 2521d698 | bellard | #define TARGET_SIGCHLD 17 |
583 | 2521d698 | bellard | #define TARGET_SIGCONT 18 |
584 | 2521d698 | bellard | #define TARGET_SIGSTOP 19 |
585 | 2521d698 | bellard | #define TARGET_SIGTSTP 20 |
586 | 2521d698 | bellard | #define TARGET_SIGTTIN 21 |
587 | 2521d698 | bellard | #define TARGET_SIGTTOU 22 |
588 | 2521d698 | bellard | #define TARGET_SIGURG 23 |
589 | 2521d698 | bellard | #define TARGET_SIGXCPU 24 |
590 | 2521d698 | bellard | #define TARGET_SIGXFSZ 25 |
591 | 2521d698 | bellard | #define TARGET_SIGVTALRM 26 |
592 | 2521d698 | bellard | #define TARGET_SIGPROF 27 |
593 | 2521d698 | bellard | #define TARGET_SIGWINCH 28 |
594 | 2521d698 | bellard | #define TARGET_SIGIO 29 |
595 | c596ed17 | bellard | #define TARGET_SIGPWR 30 |
596 | c596ed17 | bellard | #define TARGET_SIGSYS 31 |
597 | 2521d698 | bellard | #define TARGET_SIGRTMIN 32 |
598 | 2521d698 | bellard | |
599 | 2521d698 | bellard | #define TARGET_SIG_BLOCK 0 /* for blocking signals */ |
600 | 2521d698 | bellard | #define TARGET_SIG_UNBLOCK 1 /* for unblocking signals */ |
601 | 2521d698 | bellard | #define TARGET_SIG_SETMASK 2 /* for setting the signal mask */ |
602 | 2521d698 | bellard | |
603 | 2521d698 | bellard | struct target_old_sigaction {
|
604 | 2521d698 | bellard | target_ulong _sa_handler; |
605 | 2521d698 | bellard | target_ulong sa_mask; |
606 | 2521d698 | bellard | target_ulong sa_flags; |
607 | 2521d698 | bellard | target_ulong sa_restorer; |
608 | 2521d698 | bellard | }; |
609 | 2521d698 | bellard | |
610 | 2521d698 | bellard | struct target_sigaction {
|
611 | 2521d698 | bellard | target_ulong _sa_handler; |
612 | 2521d698 | bellard | target_ulong sa_flags; |
613 | 2521d698 | bellard | target_ulong sa_restorer; |
614 | 2521d698 | bellard | target_sigset_t sa_mask; |
615 | 2521d698 | bellard | }; |
616 | 2521d698 | bellard | |
617 | 2521d698 | bellard | typedef union target_sigval { |
618 | 2521d698 | bellard | int sival_int;
|
619 | 2521d698 | bellard | target_ulong sival_ptr; |
620 | 2521d698 | bellard | } target_sigval_t; |
621 | 2521d698 | bellard | |
622 | 2521d698 | bellard | #define TARGET_SI_MAX_SIZE 128 |
623 | 2521d698 | bellard | #define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3) |
624 | 2521d698 | bellard | |
625 | 2521d698 | bellard | typedef struct target_siginfo { |
626 | 2521d698 | bellard | int si_signo;
|
627 | 2521d698 | bellard | int si_errno;
|
628 | 2521d698 | bellard | int si_code;
|
629 | 2521d698 | bellard | |
630 | 2521d698 | bellard | union {
|
631 | 2521d698 | bellard | int _pad[TARGET_SI_PAD_SIZE];
|
632 | 2521d698 | bellard | |
633 | 2521d698 | bellard | /* kill() */
|
634 | 2521d698 | bellard | struct {
|
635 | 2521d698 | bellard | pid_t _pid; /* sender's pid */
|
636 | 2521d698 | bellard | uid_t _uid; /* sender's uid */
|
637 | 2521d698 | bellard | } _kill; |
638 | 2521d698 | bellard | |
639 | 2521d698 | bellard | /* POSIX.1b timers */
|
640 | 2521d698 | bellard | struct {
|
641 | 2521d698 | bellard | unsigned int _timer1; |
642 | 2521d698 | bellard | unsigned int _timer2; |
643 | 2521d698 | bellard | } _timer; |
644 | 2521d698 | bellard | |
645 | 2521d698 | bellard | /* POSIX.1b signals */
|
646 | 2521d698 | bellard | struct {
|
647 | 2521d698 | bellard | pid_t _pid; /* sender's pid */
|
648 | 2521d698 | bellard | uid_t _uid; /* sender's uid */
|
649 | 2521d698 | bellard | target_sigval_t _sigval; |
650 | 2521d698 | bellard | } _rt; |
651 | 2521d698 | bellard | |
652 | 2521d698 | bellard | /* SIGCHLD */
|
653 | 2521d698 | bellard | struct {
|
654 | 2521d698 | bellard | pid_t _pid; /* which child */
|
655 | 2521d698 | bellard | uid_t _uid; /* sender's uid */
|
656 | 2521d698 | bellard | int _status; /* exit code */ |
657 | 2521d698 | bellard | target_clock_t _utime; |
658 | 2521d698 | bellard | target_clock_t _stime; |
659 | 2521d698 | bellard | } _sigchld; |
660 | 2521d698 | bellard | |
661 | 2521d698 | bellard | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
662 | 2521d698 | bellard | struct {
|
663 | 2521d698 | bellard | target_ulong _addr; /* faulting insn/memory ref. */
|
664 | 2521d698 | bellard | } _sigfault; |
665 | 2521d698 | bellard | |
666 | 2521d698 | bellard | /* SIGPOLL */
|
667 | 2521d698 | bellard | struct {
|
668 | 2521d698 | bellard | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
669 | 2521d698 | bellard | int _fd;
|
670 | 2521d698 | bellard | } _sigpoll; |
671 | 2521d698 | bellard | } _sifields; |
672 | 2521d698 | bellard | } target_siginfo_t; |
673 | 2521d698 | bellard | |
674 | 2521d698 | bellard | /*
|
675 | 2521d698 | bellard | * si_code values
|
676 | 2521d698 | bellard | * Digital reserves positive values for kernel-generated signals.
|
677 | 2521d698 | bellard | */
|
678 | 2521d698 | bellard | #define TARGET_SI_USER 0 /* sent by kill, sigsend, raise */ |
679 | 2521d698 | bellard | #define TARGET_SI_KERNEL 0x80 /* sent by the kernel from somewhere */ |
680 | 2521d698 | bellard | #define TARGET_SI_QUEUE -1 /* sent by sigqueue */ |
681 | 2521d698 | bellard | #define TARGET_SI_TIMER -2 /* sent by timer expiration */ |
682 | 2521d698 | bellard | #define TARGET_SI_MESGQ -3 /* sent by real time mesq state change */ |
683 | 2521d698 | bellard | #define TARGET_SI_ASYNCIO -4 /* sent by AIO completion */ |
684 | 2521d698 | bellard | #define TARGET_SI_SIGIO -5 /* sent by queued SIGIO */ |
685 | 2521d698 | bellard | |
686 | 2521d698 | bellard | /*
|
687 | 2521d698 | bellard | * SIGILL si_codes
|
688 | 2521d698 | bellard | */
|
689 | 2521d698 | bellard | #define TARGET_ILL_ILLOPN (2) /* illegal operand */ |
690 | 2521d698 | bellard | |
691 | 2521d698 | bellard | /*
|
692 | 2521d698 | bellard | * SIGFPE si_codes
|
693 | 2521d698 | bellard | */
|
694 | 2521d698 | bellard | #define TARGET_FPE_INTDIV (1) /* integer divide by zero */ |
695 | 2521d698 | bellard | #define TARGET_FPE_INTOVF (2) /* integer overflow */ |
696 | 2521d698 | bellard | #define TARGET_FPE_FLTDIV (3) /* floating point divide by zero */ |
697 | 2521d698 | bellard | #define TARGET_FPE_FLTOVF (4) /* floating point overflow */ |
698 | 2521d698 | bellard | #define TARGET_FPE_FLTUND (5) /* floating point underflow */ |
699 | 2521d698 | bellard | #define TARGET_FPE_FLTRES (6) /* floating point inexact result */ |
700 | 2521d698 | bellard | #define TARGET_FPE_FLTINV (7) /* floating point invalid operation */ |
701 | 2521d698 | bellard | #define TARGET_FPE_FLTSUB (8) /* subscript out of range */ |
702 | 2521d698 | bellard | #define TARGET_NSIGFPE 8 |
703 | 2521d698 | bellard | |
704 | 2521d698 | bellard | /*
|
705 | 2521d698 | bellard | * SIGSEGV si_codes
|
706 | 2521d698 | bellard | */
|
707 | 2521d698 | bellard | #define TARGET_SEGV_MAPERR (1) /* address not mapped to object */ |
708 | 2521d698 | bellard | #define TARGET_SEGV_ACCERR (2) /* invalid permissions for mapped object */ |
709 | 2521d698 | bellard | |
710 | 2521d698 | bellard | /*
|
711 | 2521d698 | bellard | * SIGTRAP si_codes
|
712 | 2521d698 | bellard | */
|
713 | 2521d698 | bellard | #define TARGET_TRAP_BRKPT (1) /* process breakpoint */ |
714 | 2521d698 | bellard | #define TARGET_TRAP_TRACE (2) /* process trace trap */ |
715 | 2521d698 | bellard | |
716 | 2521d698 | bellard | #endif /* defined(TARGET_I386) || defined(TARGET_ARM) */ |
717 | 2521d698 | bellard | |
718 | 9de5e440 | bellard | struct target_rlimit {
|
719 | 9de5e440 | bellard | target_ulong rlim_cur; |
720 | 9de5e440 | bellard | target_ulong rlim_max; |
721 | 9de5e440 | bellard | }; |
722 | 9de5e440 | bellard | |
723 | 9de5e440 | bellard | struct target_pollfd {
|
724 | 9de5e440 | bellard | int fd; /* file descriptor */ |
725 | 9de5e440 | bellard | short events; /* requested events */ |
726 | 9de5e440 | bellard | short revents; /* returned events */ |
727 | 9de5e440 | bellard | }; |
728 | 9de5e440 | bellard | |
729 | 8e5a0667 | bellard | /* virtual terminal ioctls */
|
730 | 0221cfcd | bellard | #define TARGET_KIOCSOUND 0x4B2F /* start sound generation (0 for off) */ |
731 | 0221cfcd | bellard | #define TARGET_KDMKTONE 0x4B30 /* generate tone */ |
732 | 8e5a0667 | bellard | #define TARGET_KDGKBTYPE 0x4b33 |
733 | 0221cfcd | bellard | #define TARGET_KDGKBENT 0x4B46 /* gets one entry in translation table */ |
734 | 0221cfcd | bellard | #define TARGET_KDGKBSENT 0x4B48 /* gets one function key string entry */ |
735 | 8e5a0667 | bellard | |
736 | 2521d698 | bellard | #define TARGET_SIOCATMARK 0x8905 |
737 | 2521d698 | bellard | |
738 | 31e31b8a | bellard | /* Networking ioctls */
|
739 | 31e31b8a | bellard | #define TARGET_SIOCADDRT 0x890B /* add routing table entry */ |
740 | 31e31b8a | bellard | #define TARGET_SIOCDELRT 0x890C /* delete routing table entry */ |
741 | 31e31b8a | bellard | #define TARGET_SIOCGIFNAME 0x8910 /* get iface name */ |
742 | 31e31b8a | bellard | #define TARGET_SIOCSIFLINK 0x8911 /* set iface channel */ |
743 | 31e31b8a | bellard | #define TARGET_SIOCGIFCONF 0x8912 /* get iface list */ |
744 | 31e31b8a | bellard | #define TARGET_SIOCGIFFLAGS 0x8913 /* get flags */ |
745 | 31e31b8a | bellard | #define TARGET_SIOCSIFFLAGS 0x8914 /* set flags */ |
746 | 31e31b8a | bellard | #define TARGET_SIOCGIFADDR 0x8915 /* get PA address */ |
747 | 31e31b8a | bellard | #define TARGET_SIOCSIFADDR 0x8916 /* set PA address */ |
748 | 31e31b8a | bellard | #define TARGET_SIOCGIFDSTADDR 0x8917 /* get remote PA address */ |
749 | 31e31b8a | bellard | #define TARGET_SIOCSIFDSTADDR 0x8918 /* set remote PA address */ |
750 | 31e31b8a | bellard | #define TARGET_SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ |
751 | 31e31b8a | bellard | #define TARGET_SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ |
752 | 31e31b8a | bellard | #define TARGET_SIOCGIFNETMASK 0x891b /* get network PA mask */ |
753 | 31e31b8a | bellard | #define TARGET_SIOCSIFNETMASK 0x891c /* set network PA mask */ |
754 | 31e31b8a | bellard | #define TARGET_SIOCGIFMETRIC 0x891d /* get metric */ |
755 | 31e31b8a | bellard | #define TARGET_SIOCSIFMETRIC 0x891e /* set metric */ |
756 | 31e31b8a | bellard | #define TARGET_SIOCGIFMEM 0x891f /* get memory address (BSD) */ |
757 | 31e31b8a | bellard | #define TARGET_SIOCSIFMEM 0x8920 /* set memory address (BSD) */ |
758 | 31e31b8a | bellard | #define TARGET_SIOCGIFMTU 0x8921 /* get MTU size */ |
759 | 31e31b8a | bellard | #define TARGET_SIOCSIFMTU 0x8922 /* set MTU size */ |
760 | 31e31b8a | bellard | #define TARGET_SIOCSIFHWADDR 0x8924 /* set hardware address (NI) */ |
761 | 31e31b8a | bellard | #define TARGET_SIOCGIFENCAP 0x8925 /* get/set slip encapsulation */ |
762 | 31e31b8a | bellard | #define TARGET_SIOCSIFENCAP 0x8926 |
763 | 31e31b8a | bellard | #define TARGET_SIOCGIFHWADDR 0x8927 /* Get hardware address */ |
764 | 31e31b8a | bellard | #define TARGET_SIOCGIFSLAVE 0x8929 /* Driver slaving support */ |
765 | 31e31b8a | bellard | #define TARGET_SIOCSIFSLAVE 0x8930 |
766 | 31e31b8a | bellard | #define TARGET_SIOCADDMULTI 0x8931 /* Multicast address lists */ |
767 | 31e31b8a | bellard | #define TARGET_SIOCDELMULTI 0x8932 |
768 | 31e31b8a | bellard | |
769 | 31e31b8a | bellard | /* Bridging control calls */
|
770 | 31e31b8a | bellard | #define TARGET_SIOCGIFBR 0x8940 /* Bridging support */ |
771 | 31e31b8a | bellard | #define TARGET_SIOCSIFBR 0x8941 /* Set bridging options */ |
772 | 31e31b8a | bellard | |
773 | 31e31b8a | bellard | #define TARGET_SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ |
774 | 31e31b8a | bellard | #define TARGET_SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ |
775 | 31e31b8a | bellard | |
776 | 31e31b8a | bellard | /* ARP cache control calls. */
|
777 | 31e31b8a | bellard | #define TARGET_OLD_SIOCDARP 0x8950 /* old delete ARP table entry */ |
778 | 31e31b8a | bellard | #define TARGET_OLD_SIOCGARP 0x8951 /* old get ARP table entry */ |
779 | 31e31b8a | bellard | #define TARGET_OLD_SIOCSARP 0x8952 /* old set ARP table entry */ |
780 | 31e31b8a | bellard | #define TARGET_SIOCDARP 0x8953 /* delete ARP table entry */ |
781 | 31e31b8a | bellard | #define TARGET_SIOCGARP 0x8954 /* get ARP table entry */ |
782 | 31e31b8a | bellard | #define TARGET_SIOCSARP 0x8955 /* set ARP table entry */ |
783 | 31e31b8a | bellard | |
784 | 31e31b8a | bellard | /* RARP cache control calls. */
|
785 | 31e31b8a | bellard | #define TARGET_SIOCDRARP 0x8960 /* delete RARP table entry */ |
786 | 31e31b8a | bellard | #define TARGET_SIOCGRARP 0x8961 /* get RARP table entry */ |
787 | 31e31b8a | bellard | #define TARGET_SIOCSRARP 0x8962 /* set RARP table entry */ |
788 | 31e31b8a | bellard | |
789 | 31e31b8a | bellard | /* Driver configuration calls */
|
790 | 31e31b8a | bellard | #define TARGET_SIOCGIFMAP 0x8970 /* Get device parameters */ |
791 | 31e31b8a | bellard | #define TARGET_SIOCSIFMAP 0x8971 /* Set device parameters */ |
792 | 31e31b8a | bellard | |
793 | 31e31b8a | bellard | /* DLCI configuration calls */
|
794 | 31e31b8a | bellard | #define TARGET_SIOCADDDLCI 0x8980 /* Create new DLCI device */ |
795 | 31e31b8a | bellard | #define TARGET_SIOCDELDLCI 0x8981 /* Delete DLCI device */ |
796 | 31e31b8a | bellard | |
797 | 31e31b8a | bellard | |
798 | 31e31b8a | bellard | /* From <linux/fs.h> */
|
799 | 31e31b8a | bellard | |
800 | 31e31b8a | bellard | #define TARGET_BLKROSET TARGET_IO(0x12,93) /* set device read-only (0 = read-write) */ |
801 | 31e31b8a | bellard | #define TARGET_BLKROGET TARGET_IO(0x12,94) /* get read-only status (0 = read_write) */ |
802 | 31e31b8a | bellard | #define TARGET_BLKRRPART TARGET_IO(0x12,95) /* re-read partition table */ |
803 | 31e31b8a | bellard | #define TARGET_BLKGETSIZE TARGET_IO(0x12,96) /* return device size /512 (long *arg) */ |
804 | 31e31b8a | bellard | #define TARGET_BLKFLSBUF TARGET_IO(0x12,97) /* flush buffer cache */ |
805 | 31e31b8a | bellard | #define TARGET_BLKRASET TARGET_IO(0x12,98) /* Set read ahead for block device */ |
806 | 31e31b8a | bellard | #define TARGET_BLKRAGET TARGET_IO(0x12,99) /* get current read ahead setting */ |
807 | 31e31b8a | bellard | #define TARGET_BLKFRASET TARGET_IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ |
808 | 31e31b8a | bellard | #define TARGET_BLKFRAGET TARGET_IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */ |
809 | 31e31b8a | bellard | #define TARGET_BLKSECTSET TARGET_IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */ |
810 | 31e31b8a | bellard | #define TARGET_BLKSECTGET TARGET_IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ |
811 | 31e31b8a | bellard | #define TARGET_BLKSSZGET TARGET_IO(0x12,104)/* get block device sector size */ |
812 | 31e31b8a | bellard | /* A jump here: 108-111 have been used for various private purposes. */
|
813 | 31e31b8a | bellard | #define TARGET_BLKBSZGET TARGET_IOR(0x12,112,sizeof(int)) |
814 | 31e31b8a | bellard | #define TARGET_BLKBSZSET TARGET_IOW(0x12,113,sizeof(int)) |
815 | 31e31b8a | bellard | #define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,sizeof(uint64_t)) /* return device size in bytes (u64 *arg) */ |
816 | 31e31b8a | bellard | #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ |
817 | 31e31b8a | bellard | #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ |
818 | 31e31b8a | bellard | |
819 | 31e31b8a | bellard | /* cdrom commands */
|
820 | 31e31b8a | bellard | #define TARGET_CDROMPAUSE 0x5301 /* Pause Audio Operation */ |
821 | 31e31b8a | bellard | #define TARGET_CDROMRESUME 0x5302 /* Resume paused Audio Operation */ |
822 | 31e31b8a | bellard | #define TARGET_CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */ |
823 | 31e31b8a | bellard | #define TARGET_CDROMPLAYTRKIND 0x5304 /* Play Audio Track/index |
824 | 31e31b8a | bellard | (struct cdrom_ti) */
|
825 | 31e31b8a | bellard | #define TARGET_CDROMREADTOCHDR 0x5305 /* Read TOC header |
826 | 31e31b8a | bellard | (struct cdrom_tochdr) */
|
827 | 31e31b8a | bellard | #define TARGET_CDROMREADTOCENTRY 0x5306 /* Read TOC entry |
828 | 31e31b8a | bellard | (struct cdrom_tocentry) */
|
829 | 31e31b8a | bellard | #define TARGET_CDROMSTOP 0x5307 /* Stop the cdrom drive */ |
830 | 31e31b8a | bellard | #define TARGET_CDROMSTART 0x5308 /* Start the cdrom drive */ |
831 | 31e31b8a | bellard | #define TARGET_CDROMEJECT 0x5309 /* Ejects the cdrom media */ |
832 | 31e31b8a | bellard | #define TARGET_CDROMVOLCTRL 0x530a /* Control output volume |
833 | 31e31b8a | bellard | (struct cdrom_volctrl) */
|
834 | 31e31b8a | bellard | #define TARGET_CDROMSUBCHNL 0x530b /* Read subchannel data |
835 | 31e31b8a | bellard | (struct cdrom_subchnl) */
|
836 | 31e31b8a | bellard | #define TARGET_CDROMREADMODE2 0x530c /* Read TARGET_CDROM mode 2 data (2336 Bytes) |
837 | 31e31b8a | bellard | (struct cdrom_read) */
|
838 | 31e31b8a | bellard | #define TARGET_CDROMREADMODE1 0x530d /* Read TARGET_CDROM mode 1 data (2048 Bytes) |
839 | 31e31b8a | bellard | (struct cdrom_read) */
|
840 | 31e31b8a | bellard | #define TARGET_CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */ |
841 | 31e31b8a | bellard | #define TARGET_CDROMEJECT_SW 0x530f /* enable(1)/disable(0) auto-ejecting */ |
842 | 31e31b8a | bellard | #define TARGET_CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session |
843 | 31e31b8a | bellard | address of multi session disks
|
844 | 31e31b8a | bellard | (struct cdrom_multisession) */
|
845 | 31e31b8a | bellard | #define TARGET_CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" |
846 | 31e31b8a | bellard | if available (struct cdrom_mcn) */
|
847 | 31e31b8a | bellard | #define TARGET_CDROM_GET_UPC TARGET_CDROM_GET_MCN /* This one is depricated, |
848 | 31e31b8a | bellard | but here anyway for compatability */
|
849 | 31e31b8a | bellard | #define TARGET_CDROMRESET 0x5312 /* hard-reset the drive */ |
850 | 31e31b8a | bellard | #define TARGET_CDROMVOLREAD 0x5313 /* Get the drive's volume setting |
851 | 31e31b8a | bellard | (struct cdrom_volctrl) */
|
852 | 31e31b8a | bellard | #define TARGET_CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes) |
853 | 31e31b8a | bellard | (struct cdrom_read) */
|
854 | 31e31b8a | bellard | /*
|
855 | 31e31b8a | bellard | * These ioctls are used only used in aztcd.c and optcd.c
|
856 | 31e31b8a | bellard | */
|
857 | 31e31b8a | bellard | #define TARGET_CDROMREADCOOKED 0x5315 /* read data in cooked mode */ |
858 | 31e31b8a | bellard | #define TARGET_CDROMSEEK 0x5316 /* seek msf address */ |
859 | 31e31b8a | bellard | |
860 | 31e31b8a | bellard | /*
|
861 | 31e31b8a | bellard | * This ioctl is only used by the scsi-cd driver.
|
862 | 31e31b8a | bellard | It is for playing audio in logical block addressing mode.
|
863 | 31e31b8a | bellard | */
|
864 | 31e31b8a | bellard | #define TARGET_CDROMPLAYBLK 0x5317 /* (struct cdrom_blk) */ |
865 | 31e31b8a | bellard | |
866 | 31e31b8a | bellard | /*
|
867 | 31e31b8a | bellard | * These ioctls are only used in optcd.c
|
868 | 31e31b8a | bellard | */
|
869 | 31e31b8a | bellard | #define TARGET_CDROMREADALL 0x5318 /* read all 2646 bytes */ |
870 | 31e31b8a | bellard | |
871 | 31e31b8a | bellard | /*
|
872 | 31e31b8a | bellard | * These ioctls are (now) only in ide-cd.c for controlling
|
873 | 31e31b8a | bellard | * drive spindown time. They should be implemented in the
|
874 | 31e31b8a | bellard | * Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
|
875 | 31e31b8a | bellard | * GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
|
876 | 31e31b8a | bellard | * -Erik
|
877 | 31e31b8a | bellard | */
|
878 | 31e31b8a | bellard | #define TARGET_CDROMGETSPINDOWN 0x531d |
879 | 31e31b8a | bellard | #define TARGET_CDROMSETSPINDOWN 0x531e |
880 | 31e31b8a | bellard | |
881 | 31e31b8a | bellard | /*
|
882 | 31e31b8a | bellard | * These ioctls are implemented through the uniform CD-ROM driver
|
883 | 31e31b8a | bellard | * They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM
|
884 | 31e31b8a | bellard | * drivers are eventually ported to the uniform CD-ROM driver interface.
|
885 | 31e31b8a | bellard | */
|
886 | 31e31b8a | bellard | #define TARGET_CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */ |
887 | 31e31b8a | bellard | #define TARGET_CDROM_SET_OPTIONS 0x5320 /* Set behavior options */ |
888 | 31e31b8a | bellard | #define TARGET_CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */ |
889 | 31e31b8a | bellard | #define TARGET_CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ |
890 | 31e31b8a | bellard | #define TARGET_CDROM_SELECT_DISC 0x5323 /* Select disc (for juke-boxes) */ |
891 | 31e31b8a | bellard | #define TARGET_CDROM_MEDIA_CHANGED 0x5325 /* Check is media changed */ |
892 | 31e31b8a | bellard | #define TARGET_CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */ |
893 | 31e31b8a | bellard | #define TARGET_CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */ |
894 | 31e31b8a | bellard | #define TARGET_CDROM_CHANGER_NSLOTS 0x5328 /* Get number of slots */ |
895 | 31e31b8a | bellard | #define TARGET_CDROM_LOCKDOOR 0x5329 /* lock or unlock door */ |
896 | 31e31b8a | bellard | #define TARGET_CDROM_DEBUG 0x5330 /* Turn debug messages on/off */ |
897 | 31e31b8a | bellard | #define TARGET_CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ |
898 | 31e31b8a | bellard | |
899 | 31e31b8a | bellard | /* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386.
|
900 | 31e31b8a | bellard | * Future CDROM ioctls should be kept below 0x537F
|
901 | 31e31b8a | bellard | */
|
902 | 31e31b8a | bellard | |
903 | 31e31b8a | bellard | /* This ioctl is only used by sbpcd at the moment */
|
904 | 31e31b8a | bellard | #define TARGET_CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */ |
905 | 31e31b8a | bellard | /* conflict with SCSI_IOCTL_GET_IDLUN */
|
906 | 31e31b8a | bellard | |
907 | 31e31b8a | bellard | /* DVD-ROM Specific ioctls */
|
908 | 31e31b8a | bellard | #define TARGET_DVD_READ_STRUCT 0x5390 /* Read structure */ |
909 | 31e31b8a | bellard | #define TARGET_DVD_WRITE_STRUCT 0x5391 /* Write structure */ |
910 | 31e31b8a | bellard | #define TARGET_DVD_AUTH 0x5392 /* Authentication */ |
911 | 31e31b8a | bellard | |
912 | 31e31b8a | bellard | #define TARGET_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */ |
913 | 31e31b8a | bellard | #define TARGET_CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */ |
914 | 31e31b8a | bellard | #define TARGET_CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */ |
915 | 31e31b8a | bellard | |
916 | 31e31b8a | bellard | /* HD commands */
|
917 | 31e31b8a | bellard | |
918 | 31e31b8a | bellard | /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
|
919 | 31e31b8a | bellard | #define TARGET_HDIO_GETGEO 0x0301 /* get device geometry */ |
920 | 31e31b8a | bellard | #define TARGET_HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ |
921 | 31e31b8a | bellard | #define TARGET_HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ |
922 | 31e31b8a | bellard | #define TARGET_HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ |
923 | 31e31b8a | bellard | #define TARGET_HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ |
924 | 31e31b8a | bellard | #define TARGET_HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ |
925 | 31e31b8a | bellard | #define TARGET_HDIO_GET_DMA 0x030b /* get use-dma flag */ |
926 | 2521d698 | bellard | #define TARGET_HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ |
927 | 31e31b8a | bellard | #define TARGET_HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ |
928 | 31e31b8a | bellard | |
929 | 31e31b8a | bellard | /* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
|
930 | 31e31b8a | bellard | #define TARGET_HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ |
931 | 31e31b8a | bellard | #define TARGET_HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ |
932 | 31e31b8a | bellard | #define TARGET_HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ |
933 | 31e31b8a | bellard | #define TARGET_HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ |
934 | 31e31b8a | bellard | #define TARGET_HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ |
935 | 31e31b8a | bellard | #define TARGET_HDIO_SET_DMA 0x0326 /* change use-dma flag */ |
936 | 31e31b8a | bellard | #define TARGET_HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ |
937 | 2521d698 | bellard | |
938 | 2521d698 | bellard | |
939 | 2521d698 | bellard | #if defined(TARGET_I386) || defined(TARGET_ARM)
|
940 | 2521d698 | bellard | |
941 | 2521d698 | bellard | /* 0x54 is just a magic number to make these relatively unique ('T') */
|
942 | 2521d698 | bellard | |
943 | 2521d698 | bellard | #define TARGET_TCGETS 0x5401 |
944 | 2521d698 | bellard | #define TARGET_TCSETS 0x5402 |
945 | 2521d698 | bellard | #define TARGET_TCSETSW 0x5403 |
946 | 2521d698 | bellard | #define TARGET_TCSETSF 0x5404 |
947 | 2521d698 | bellard | #define TARGET_TCGETA 0x5405 |
948 | 2521d698 | bellard | #define TARGET_TCSETA 0x5406 |
949 | 2521d698 | bellard | #define TARGET_TCSETAW 0x5407 |
950 | 2521d698 | bellard | #define TARGET_TCSETAF 0x5408 |
951 | 2521d698 | bellard | #define TARGET_TCSBRK 0x5409 |
952 | 2521d698 | bellard | #define TARGET_TCXONC 0x540A |
953 | 2521d698 | bellard | #define TARGET_TCFLSH 0x540B |
954 | 2521d698 | bellard | #define TARGET_TIOCEXCL 0x540C |
955 | 2521d698 | bellard | #define TARGET_TIOCNXCL 0x540D |
956 | 2521d698 | bellard | #define TARGET_TIOCSCTTY 0x540E |
957 | 2521d698 | bellard | #define TARGET_TIOCGPGRP 0x540F |
958 | 2521d698 | bellard | #define TARGET_TIOCSPGRP 0x5410 |
959 | 2521d698 | bellard | #define TARGET_TIOCOUTQ 0x5411 |
960 | 2521d698 | bellard | #define TARGET_TIOCSTI 0x5412 |
961 | 2521d698 | bellard | #define TARGET_TIOCGWINSZ 0x5413 |
962 | 2521d698 | bellard | #define TARGET_TIOCSWINSZ 0x5414 |
963 | 2521d698 | bellard | #define TARGET_TIOCMGET 0x5415 |
964 | 2521d698 | bellard | #define TARGET_TIOCMBIS 0x5416 |
965 | 2521d698 | bellard | #define TARGET_TIOCMBIC 0x5417 |
966 | 2521d698 | bellard | #define TARGET_TIOCMSET 0x5418 |
967 | 2521d698 | bellard | #define TARGET_TIOCGSOFTCAR 0x5419 |
968 | 2521d698 | bellard | #define TARGET_TIOCSSOFTCAR 0x541A |
969 | 2521d698 | bellard | #define TARGET_FIONREAD 0x541B |
970 | 2521d698 | bellard | #define TARGET_TIOCINQ FIONREAD
|
971 | 2521d698 | bellard | #define TARGET_TIOCLINUX 0x541C |
972 | 2521d698 | bellard | #define TARGET_TIOCCONS 0x541D |
973 | 2521d698 | bellard | #define TARGET_TIOCGSERIAL 0x541E |
974 | 2521d698 | bellard | #define TARGET_TIOCSSERIAL 0x541F |
975 | 2521d698 | bellard | #define TARGET_TIOCPKT 0x5420 |
976 | 2521d698 | bellard | #define TARGET_FIONBIO 0x5421 |
977 | 2521d698 | bellard | #define TARGET_TIOCNOTTY 0x5422 |
978 | 2521d698 | bellard | #define TARGET_TIOCSETD 0x5423 |
979 | 2521d698 | bellard | #define TARGET_TIOCGETD 0x5424 |
980 | 2521d698 | bellard | #define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ |
981 | 2521d698 | bellard | #define TARGET_TIOCTTYGSTRUCT 0x5426 /* For debugging only */ |
982 | 2521d698 | bellard | #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ |
983 | 2521d698 | bellard | #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ |
984 | 2521d698 | bellard | #define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ |
985 | 2521d698 | bellard | #define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
986 | 2521d698 | bellard | #define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ |
987 | 2521d698 | bellard | |
988 | 2521d698 | bellard | #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
989 | 2521d698 | bellard | #define TARGET_FIOCLEX 0x5451 |
990 | 2521d698 | bellard | #define TARGET_FIOASYNC 0x5452 |
991 | 2521d698 | bellard | #define TARGET_TIOCSERCONFIG 0x5453 |
992 | 2521d698 | bellard | #define TARGET_TIOCSERGWILD 0x5454 |
993 | 2521d698 | bellard | #define TARGET_TIOCSERSWILD 0x5455 |
994 | 2521d698 | bellard | #define TARGET_TIOCGLCKTRMIOS 0x5456 |
995 | 2521d698 | bellard | #define TARGET_TIOCSLCKTRMIOS 0x5457 |
996 | 2521d698 | bellard | #define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
997 | 2521d698 | bellard | #define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ |
998 | 2521d698 | bellard | #define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ |
999 | 2521d698 | bellard | #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ |
1000 | 2521d698 | bellard | |
1001 | 2521d698 | bellard | #define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ |
1002 | 2521d698 | bellard | #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
1003 | 2521d698 | bellard | #define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ |
1004 | 2521d698 | bellard | #define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ |
1005 | 2521d698 | bellard | |
1006 | 2521d698 | bellard | /* Used for packet mode */
|
1007 | 2521d698 | bellard | #define TARGET_TIOCPKT_DATA 0 |
1008 | 2521d698 | bellard | #define TARGET_TIOCPKT_FLUSHREAD 1 |
1009 | 2521d698 | bellard | #define TARGET_TIOCPKT_FLUSHWRITE 2 |
1010 | 2521d698 | bellard | #define TARGET_TIOCPKT_STOP 4 |
1011 | 2521d698 | bellard | #define TARGET_TIOCPKT_START 8 |
1012 | 2521d698 | bellard | #define TARGET_TIOCPKT_NOSTOP 16 |
1013 | 2521d698 | bellard | #define TARGET_TIOCPKT_DOSTOP 32 |
1014 | 2521d698 | bellard | |
1015 | 2521d698 | bellard | #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
1016 | 2521d698 | bellard | |
1017 | 2521d698 | bellard | /* from asm/termbits.h */
|
1018 | 2521d698 | bellard | |
1019 | 2521d698 | bellard | #define TARGET_NCCS 19 |
1020 | 2521d698 | bellard | |
1021 | 2521d698 | bellard | struct target_termios {
|
1022 | 2521d698 | bellard | unsigned int c_iflag; /* input mode flags */ |
1023 | 2521d698 | bellard | unsigned int c_oflag; /* output mode flags */ |
1024 | 2521d698 | bellard | unsigned int c_cflag; /* control mode flags */ |
1025 | 2521d698 | bellard | unsigned int c_lflag; /* local mode flags */ |
1026 | 2521d698 | bellard | unsigned char c_line; /* line discipline */ |
1027 | 2521d698 | bellard | unsigned char c_cc[TARGET_NCCS]; /* control characters */ |
1028 | 2521d698 | bellard | }; |
1029 | 2521d698 | bellard | |
1030 | 2521d698 | bellard | /* c_iflag bits */
|
1031 | 2521d698 | bellard | #define TARGET_IGNBRK 0000001 |
1032 | 2521d698 | bellard | #define TARGET_BRKINT 0000002 |
1033 | 2521d698 | bellard | #define TARGET_IGNPAR 0000004 |
1034 | 2521d698 | bellard | #define TARGET_PARMRK 0000010 |
1035 | 2521d698 | bellard | #define TARGET_INPCK 0000020 |
1036 | 2521d698 | bellard | #define TARGET_ISTRIP 0000040 |
1037 | 2521d698 | bellard | #define TARGET_INLCR 0000100 |
1038 | 2521d698 | bellard | #define TARGET_IGNCR 0000200 |
1039 | 2521d698 | bellard | #define TARGET_ICRNL 0000400 |
1040 | 2521d698 | bellard | #define TARGET_IUCLC 0001000 |
1041 | 2521d698 | bellard | #define TARGET_IXON 0002000 |
1042 | 2521d698 | bellard | #define TARGET_IXANY 0004000 |
1043 | 2521d698 | bellard | #define TARGET_IXOFF 0010000 |
1044 | 2521d698 | bellard | #define TARGET_IMAXBEL 0020000 |
1045 | 2521d698 | bellard | |
1046 | 2521d698 | bellard | /* c_oflag bits */
|
1047 | 2521d698 | bellard | #define TARGET_OPOST 0000001 |
1048 | 2521d698 | bellard | #define TARGET_OLCUC 0000002 |
1049 | 2521d698 | bellard | #define TARGET_ONLCR 0000004 |
1050 | 2521d698 | bellard | #define TARGET_OCRNL 0000010 |
1051 | 2521d698 | bellard | #define TARGET_ONOCR 0000020 |
1052 | 2521d698 | bellard | #define TARGET_ONLRET 0000040 |
1053 | 2521d698 | bellard | #define TARGET_OFILL 0000100 |
1054 | 2521d698 | bellard | #define TARGET_OFDEL 0000200 |
1055 | 2521d698 | bellard | #define TARGET_NLDLY 0000400 |
1056 | 2521d698 | bellard | #define TARGET_NL0 0000000 |
1057 | 2521d698 | bellard | #define TARGET_NL1 0000400 |
1058 | 2521d698 | bellard | #define TARGET_CRDLY 0003000 |
1059 | 2521d698 | bellard | #define TARGET_CR0 0000000 |
1060 | 2521d698 | bellard | #define TARGET_CR1 0001000 |
1061 | 2521d698 | bellard | #define TARGET_CR2 0002000 |
1062 | 2521d698 | bellard | #define TARGET_CR3 0003000 |
1063 | 2521d698 | bellard | #define TARGET_TABDLY 0014000 |
1064 | 2521d698 | bellard | #define TARGET_TAB0 0000000 |
1065 | 2521d698 | bellard | #define TARGET_TAB1 0004000 |
1066 | 2521d698 | bellard | #define TARGET_TAB2 0010000 |
1067 | 2521d698 | bellard | #define TARGET_TAB3 0014000 |
1068 | 2521d698 | bellard | #define TARGET_XTABS 0014000 |
1069 | 2521d698 | bellard | #define TARGET_BSDLY 0020000 |
1070 | 2521d698 | bellard | #define TARGET_BS0 0000000 |
1071 | 2521d698 | bellard | #define TARGET_BS1 0020000 |
1072 | 2521d698 | bellard | #define TARGET_VTDLY 0040000 |
1073 | 2521d698 | bellard | #define TARGET_VT0 0000000 |
1074 | 2521d698 | bellard | #define TARGET_VT1 0040000 |
1075 | 2521d698 | bellard | #define TARGET_FFDLY 0100000 |
1076 | 2521d698 | bellard | #define TARGET_FF0 0000000 |
1077 | 2521d698 | bellard | #define TARGET_FF1 0100000 |
1078 | 2521d698 | bellard | |
1079 | 2521d698 | bellard | /* c_cflag bit meaning */
|
1080 | 2521d698 | bellard | #define TARGET_CBAUD 0010017 |
1081 | 2521d698 | bellard | #define TARGET_B0 0000000 /* hang up */ |
1082 | 2521d698 | bellard | #define TARGET_B50 0000001 |
1083 | 2521d698 | bellard | #define TARGET_B75 0000002 |
1084 | 2521d698 | bellard | #define TARGET_B110 0000003 |
1085 | 2521d698 | bellard | #define TARGET_B134 0000004 |
1086 | 2521d698 | bellard | #define TARGET_B150 0000005 |
1087 | 2521d698 | bellard | #define TARGET_B200 0000006 |
1088 | 2521d698 | bellard | #define TARGET_B300 0000007 |
1089 | 2521d698 | bellard | #define TARGET_B600 0000010 |
1090 | 2521d698 | bellard | #define TARGET_B1200 0000011 |
1091 | 2521d698 | bellard | #define TARGET_B1800 0000012 |
1092 | 2521d698 | bellard | #define TARGET_B2400 0000013 |
1093 | 2521d698 | bellard | #define TARGET_B4800 0000014 |
1094 | 2521d698 | bellard | #define TARGET_B9600 0000015 |
1095 | 2521d698 | bellard | #define TARGET_B19200 0000016 |
1096 | 2521d698 | bellard | #define TARGET_B38400 0000017 |
1097 | 2521d698 | bellard | #define TARGET_EXTA B19200
|
1098 | 2521d698 | bellard | #define TARGET_EXTB B38400
|
1099 | 2521d698 | bellard | #define TARGET_CSIZE 0000060 |
1100 | 2521d698 | bellard | #define TARGET_CS5 0000000 |
1101 | 2521d698 | bellard | #define TARGET_CS6 0000020 |
1102 | 2521d698 | bellard | #define TARGET_CS7 0000040 |
1103 | 2521d698 | bellard | #define TARGET_CS8 0000060 |
1104 | 2521d698 | bellard | #define TARGET_CSTOPB 0000100 |
1105 | 2521d698 | bellard | #define TARGET_CREAD 0000200 |
1106 | 2521d698 | bellard | #define TARGET_PARENB 0000400 |
1107 | 2521d698 | bellard | #define TARGET_PARODD 0001000 |
1108 | 2521d698 | bellard | #define TARGET_HUPCL 0002000 |
1109 | 2521d698 | bellard | #define TARGET_CLOCAL 0004000 |
1110 | 2521d698 | bellard | #define TARGET_CBAUDEX 0010000 |
1111 | 2521d698 | bellard | #define TARGET_B57600 0010001 |
1112 | 2521d698 | bellard | #define TARGET_B115200 0010002 |
1113 | 2521d698 | bellard | #define TARGET_B230400 0010003 |
1114 | 2521d698 | bellard | #define TARGET_B460800 0010004 |
1115 | 2521d698 | bellard | #define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ |
1116 | 2521d698 | bellard | #define TARGET_CRTSCTS 020000000000 /* flow control */ |
1117 | 2521d698 | bellard | |
1118 | 2521d698 | bellard | /* c_lflag bits */
|
1119 | 2521d698 | bellard | #define TARGET_ISIG 0000001 |
1120 | 2521d698 | bellard | #define TARGET_ICANON 0000002 |
1121 | 2521d698 | bellard | #define TARGET_XCASE 0000004 |
1122 | 2521d698 | bellard | #define TARGET_ECHO 0000010 |
1123 | 2521d698 | bellard | #define TARGET_ECHOE 0000020 |
1124 | 2521d698 | bellard | #define TARGET_ECHOK 0000040 |
1125 | 2521d698 | bellard | #define TARGET_ECHONL 0000100 |
1126 | 2521d698 | bellard | #define TARGET_NOFLSH 0000200 |
1127 | 2521d698 | bellard | #define TARGET_TOSTOP 0000400 |
1128 | 2521d698 | bellard | #define TARGET_ECHOCTL 0001000 |
1129 | 2521d698 | bellard | #define TARGET_ECHOPRT 0002000 |
1130 | 2521d698 | bellard | #define TARGET_ECHOKE 0004000 |
1131 | 2521d698 | bellard | #define TARGET_FLUSHO 0010000 |
1132 | 2521d698 | bellard | #define TARGET_PENDIN 0040000 |
1133 | 2521d698 | bellard | #define TARGET_IEXTEN 0100000 |
1134 | 2521d698 | bellard | |
1135 | 2521d698 | bellard | /* c_cc character offsets */
|
1136 | 2521d698 | bellard | #define TARGET_VINTR 0 |
1137 | 2521d698 | bellard | #define TARGET_VQUIT 1 |
1138 | 2521d698 | bellard | #define TARGET_VERASE 2 |
1139 | 2521d698 | bellard | #define TARGET_VKILL 3 |
1140 | 2521d698 | bellard | #define TARGET_VEOF 4 |
1141 | 2521d698 | bellard | #define TARGET_VTIME 5 |
1142 | 2521d698 | bellard | #define TARGET_VMIN 6 |
1143 | 2521d698 | bellard | #define TARGET_VSWTC 7 |
1144 | 2521d698 | bellard | #define TARGET_VSTART 8 |
1145 | 2521d698 | bellard | #define TARGET_VSTOP 9 |
1146 | 2521d698 | bellard | #define TARGET_VSUSP 10 |
1147 | 2521d698 | bellard | #define TARGET_VEOL 11 |
1148 | 2521d698 | bellard | #define TARGET_VREPRINT 12 |
1149 | 2521d698 | bellard | #define TARGET_VDISCARD 13 |
1150 | 2521d698 | bellard | #define TARGET_VWERASE 14 |
1151 | 2521d698 | bellard | #define TARGET_VLNEXT 15 |
1152 | 2521d698 | bellard | #define TARGET_VEOL2 16 |
1153 | 2521d698 | bellard | |
1154 | 2521d698 | bellard | #define TARGET_MAP_SHARED 0x01 /* Share changes */ |
1155 | 2521d698 | bellard | #define TARGET_MAP_PRIVATE 0x02 /* Changes are private */ |
1156 | 2521d698 | bellard | #define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ |
1157 | 2521d698 | bellard | #define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ |
1158 | 2521d698 | bellard | #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ |
1159 | 2521d698 | bellard | |
1160 | 2521d698 | bellard | #define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
1161 | 2521d698 | bellard | #define TARGET_MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
1162 | 2521d698 | bellard | #define TARGET_MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
1163 | 2521d698 | bellard | #define TARGET_MAP_LOCKED 0x2000 /* pages are locked */ |
1164 | 2521d698 | bellard | #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ |
1165 | 2521d698 | bellard | |
1166 | 2521d698 | bellard | struct target_stat {
|
1167 | 2521d698 | bellard | unsigned short st_dev; |
1168 | 2521d698 | bellard | unsigned short __pad1; |
1169 | 2521d698 | bellard | target_ulong st_ino; |
1170 | 2521d698 | bellard | unsigned short st_mode; |
1171 | 2521d698 | bellard | unsigned short st_nlink; |
1172 | 2521d698 | bellard | unsigned short st_uid; |
1173 | 2521d698 | bellard | unsigned short st_gid; |
1174 | 2521d698 | bellard | unsigned short st_rdev; |
1175 | 2521d698 | bellard | unsigned short __pad2; |
1176 | 2521d698 | bellard | target_ulong st_size; |
1177 | 2521d698 | bellard | target_ulong st_blksize; |
1178 | 2521d698 | bellard | target_ulong st_blocks; |
1179 | 2521d698 | bellard | target_ulong target_st_atime; |
1180 | 2521d698 | bellard | target_ulong __unused1; |
1181 | 2521d698 | bellard | target_ulong target_st_mtime; |
1182 | 2521d698 | bellard | target_ulong __unused2; |
1183 | 2521d698 | bellard | target_ulong target_st_ctime; |
1184 | 2521d698 | bellard | target_ulong __unused3; |
1185 | 2521d698 | bellard | target_ulong __unused4; |
1186 | 2521d698 | bellard | target_ulong __unused5; |
1187 | 2521d698 | bellard | }; |
1188 | 2521d698 | bellard | |
1189 | 2521d698 | bellard | /* This matches struct stat64 in glibc2.1, hence the absolutely
|
1190 | 2521d698 | bellard | * insane amounts of padding around dev_t's.
|
1191 | 2521d698 | bellard | */
|
1192 | 2521d698 | bellard | struct target_stat64 {
|
1193 | 2521d698 | bellard | unsigned short st_dev; |
1194 | 2521d698 | bellard | unsigned char __pad0[10]; |
1195 | 2521d698 | bellard | |
1196 | 2521d698 | bellard | #define TARGET_STAT64_HAS_BROKEN_ST_INO 1 |
1197 | 2521d698 | bellard | target_ulong __st_ino; |
1198 | 2521d698 | bellard | |
1199 | 2521d698 | bellard | unsigned int st_mode; |
1200 | 2521d698 | bellard | unsigned int st_nlink; |
1201 | 2521d698 | bellard | |
1202 | 2521d698 | bellard | target_ulong st_uid; |
1203 | 2521d698 | bellard | target_ulong st_gid; |
1204 | 2521d698 | bellard | |
1205 | 2521d698 | bellard | unsigned short st_rdev; |
1206 | 2521d698 | bellard | unsigned char __pad3[10]; |
1207 | 2521d698 | bellard | |
1208 | 2521d698 | bellard | long long st_size; |
1209 | 2521d698 | bellard | target_ulong st_blksize; |
1210 | 2521d698 | bellard | |
1211 | 2521d698 | bellard | target_ulong st_blocks; /* Number 512-byte blocks allocated. */
|
1212 | 2521d698 | bellard | target_ulong __pad4; /* future possible st_blocks high bits */
|
1213 | 2521d698 | bellard | |
1214 | 2521d698 | bellard | target_ulong target_st_atime; |
1215 | 2521d698 | bellard | target_ulong __pad5; |
1216 | 2521d698 | bellard | |
1217 | 2521d698 | bellard | target_ulong target_st_mtime; |
1218 | 2521d698 | bellard | target_ulong __pad6; |
1219 | 2521d698 | bellard | |
1220 | 2521d698 | bellard | target_ulong target_st_ctime; |
1221 | 2521d698 | bellard | target_ulong __pad7; /* will be high 32 bits of ctime someday */
|
1222 | 2521d698 | bellard | |
1223 | 2521d698 | bellard | unsigned long long st_ino; |
1224 | 2521d698 | bellard | } __attribute__((packed)); |
1225 | 2521d698 | bellard | |
1226 | 2521d698 | bellard | #endif /* defined(TARGET_I386) || defined(TARGET_ARM) */ |
1227 | 2521d698 | bellard | |
1228 | 2521d698 | bellard | #define TARGET_F_DUPFD 0 /* dup */ |
1229 | 2521d698 | bellard | #define TARGET_F_GETFD 1 /* get close_on_exec */ |
1230 | 2521d698 | bellard | #define TARGET_F_SETFD 2 /* set/clear close_on_exec */ |
1231 | 2521d698 | bellard | #define TARGET_F_GETFL 3 /* get file->f_flags */ |
1232 | 2521d698 | bellard | #define TARGET_F_SETFL 4 /* set file->f_flags */ |
1233 | 2521d698 | bellard | |
1234 | 2521d698 | bellard | #if defined(TARGET_ALPHA)
|
1235 | 2521d698 | bellard | #define TARGET_F_GETLK 7 |
1236 | 2521d698 | bellard | #define TARGET_F_SETLK 8 |
1237 | 2521d698 | bellard | #define TARGET_F_SETLKW 9 |
1238 | 2521d698 | bellard | #define TARGET_F_SETOWN 5 /* for sockets. */ |
1239 | 2521d698 | bellard | #define TARGET_F_GETOWN 6 /* for sockets. */ |
1240 | 2521d698 | bellard | #else
|
1241 | 2521d698 | bellard | #define TARGET_F_GETLK 5 |
1242 | 2521d698 | bellard | #define TARGET_F_SETLK 6 |
1243 | 2521d698 | bellard | #define TARGET_F_SETLKW 7 |
1244 | 2521d698 | bellard | #define TARGET_F_SETOWN 8 /* for sockets. */ |
1245 | 2521d698 | bellard | #define TARGET_F_GETOWN 9 /* for sockets. */ |
1246 | 2521d698 | bellard | #endif
|
1247 | 2521d698 | bellard | |
1248 | 2521d698 | bellard | #define TARGET_F_SETSIG 10 /* for sockets. */ |
1249 | 2521d698 | bellard | #define TARGET_F_GETSIG 11 /* for sockets. */ |
1250 | 2521d698 | bellard | |
1251 | 2521d698 | bellard | #define TARGET_F_GETLK64 12 /* using 'struct flock64' */ |
1252 | 2521d698 | bellard | #define TARGET_F_SETLK64 13 |
1253 | 2521d698 | bellard | #define TARGET_F_SETLKW64 14 |
1254 | 2521d698 | bellard | |
1255 | 2521d698 | bellard | struct target_flock {
|
1256 | 2521d698 | bellard | short l_type;
|
1257 | 2521d698 | bellard | short l_whence;
|
1258 | 2521d698 | bellard | target_ulong l_start; |
1259 | 2521d698 | bellard | target_ulong l_len; |
1260 | 2521d698 | bellard | int l_pid;
|
1261 | 2521d698 | bellard | }; |
1262 | 2521d698 | bellard | |
1263 | 2521d698 | bellard | struct target_flock64 {
|
1264 | 2521d698 | bellard | short l_type;
|
1265 | 2521d698 | bellard | short l_whence;
|
1266 | 2521d698 | bellard | unsigned long long l_start; |
1267 | 2521d698 | bellard | unsigned long long l_len; |
1268 | 2521d698 | bellard | int l_pid;
|
1269 | 2521d698 | bellard | }; |
1270 | 2521d698 | bellard | |
1271 | 2521d698 | bellard | |
1272 | 2521d698 | bellard | /* soundcard defines */
|
1273 | 2521d698 | bellard | /* XXX: convert them all to arch indepedent entries */
|
1274 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_HALT TARGET_IOWR('C', 7, int); |
1275 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_LOAD 0xcfb04301 |
1276 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_RCODE 0xc0144303 |
1277 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_RCVMSG 0x8fa44309 |
1278 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_RDATA 0xc0144302 |
1279 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_RESET 0x00004300 |
1280 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_RUN 0xc0144306 |
1281 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_SENDMSG 0xcfa44308 |
1282 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_WCODE 0x40144305 |
1283 | 2521d698 | bellard | #define TARGET_SNDCTL_COPR_WDATA 0x40144304 |
1284 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_RESET TARGET_IO('P', 0) |
1285 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SYNC TARGET_IO('P', 1) |
1286 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SPEED TARGET_IOWR('P', 2, int) |
1287 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_STEREO TARGET_IOWR('P', 3, int) |
1288 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETBLKSIZE TARGET_IOWR('P', 4, int) |
1289 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SETFMT TARGET_IOWR('P', 5, int) |
1290 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_CHANNELS TARGET_IOWR('P', 6, int) |
1291 | 2521d698 | bellard | #define TARGET_SOUND_PCM_WRITE_FILTER TARGET_IOWR('P', 7, int) |
1292 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_POST TARGET_IO('P', 8) |
1293 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SUBDIVIDE TARGET_IOWR('P', 9, int) |
1294 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SETFRAGMENT TARGET_IOWR('P',10, int) |
1295 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETFMTS TARGET_IOR('P', 11, int) |
1296 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETOSPACE TARGET_IORU('P',12) |
1297 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETISPACE TARGET_IORU('P',13) |
1298 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETCAPS TARGET_IOR('P', 15, int) |
1299 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETTRIGGER TARGET_IOR('P',16, int) |
1300 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETIPTR TARGET_IORU('P',17) |
1301 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_GETOPTR TARGET_IORU('P',18) |
1302 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_MAPINBUF 0x80085013 |
1303 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_MAPOUTBUF 0x80085014 |
1304 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_NONBLOCK 0x0000500e |
1305 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SAMPLESIZE 0xc0045005 |
1306 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SETDUPLEX 0x00005016 |
1307 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SETSYNCRO 0x00005015 |
1308 | 2521d698 | bellard | #define TARGET_SNDCTL_DSP_SETTRIGGER 0x40045010 |
1309 | 2521d698 | bellard | #define TARGET_SNDCTL_FM_4OP_ENABLE 0x4004510f |
1310 | 2521d698 | bellard | #define TARGET_SNDCTL_FM_LOAD_INSTR 0x40285107 |
1311 | 2521d698 | bellard | #define TARGET_SNDCTL_MIDI_INFO 0xc074510c |
1312 | 2521d698 | bellard | #define TARGET_SNDCTL_MIDI_MPUCMD 0xc0216d02 |
1313 | 2521d698 | bellard | #define TARGET_SNDCTL_MIDI_MPUMODE 0xc0046d01 |
1314 | 2521d698 | bellard | #define TARGET_SNDCTL_MIDI_PRETIME 0xc0046d00 |
1315 | 2521d698 | bellard | #define TARGET_SNDCTL_PMGR_ACCESS 0xcfb85110 |
1316 | 2521d698 | bellard | #define TARGET_SNDCTL_PMGR_IFACE 0xcfb85001 |
1317 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_CTRLRATE 0xc0045103 |
1318 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_GETINCOUNT 0x80045105 |
1319 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_GETOUTCOUNT 0x80045104 |
1320 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_NRMIDIS 0x8004510b |
1321 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_NRSYNTHS 0x8004510a |
1322 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_OUTOFBAND 0x40085112 |
1323 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_PANIC 0x00005111 |
1324 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_PERCMODE 0x40045106 |
1325 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_RESET 0x00005100 |
1326 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_RESETSAMPLES 0x40045109 |
1327 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_SYNC 0x00005101 |
1328 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_TESTMIDI 0x40045108 |
1329 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_THRESHOLD 0x4004510d |
1330 | 2521d698 | bellard | #define TARGET_SNDCTL_SEQ_TRESHOLD 0x4004510d |
1331 | 2521d698 | bellard | #define TARGET_SNDCTL_SYNTH_INFO 0xc08c5102 |
1332 | 2521d698 | bellard | #define TARGET_SNDCTL_SYNTH_MEMAVL 0xc004510e |
1333 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_CONTINUE 0x00005404 |
1334 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_METRONOME 0x40045407 |
1335 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_SELECT 0x40045408 |
1336 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_SOURCE 0xc0045406 |
1337 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_START 0x00005402 |
1338 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_STOP 0x00005403 |
1339 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_TEMPO 0xc0045405 |
1340 | 2521d698 | bellard | #define TARGET_SNDCTL_TMR_TIMEBASE 0xc0045401 |
1341 | 2521d698 | bellard | #define TARGET_SOUND_PCM_READ_RATE 0x80045002 |
1342 | 2521d698 | bellard | #define TARGET_SOUND_PCM_READ_CHANNELS 0x80045006 |
1343 | 2521d698 | bellard | #define TARGET_SOUND_PCM_READ_BITS 0x80045005 |
1344 | 2521d698 | bellard | #define TARGET_SOUND_PCM_READ_FILTER 0x80045007 |
1345 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_INFO TARGET_IOR ('M', 101, mixer_info) |
1346 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_ACCESS 0xc0804d66 |
1347 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_PRIVATE1 TARGET_IOWR('M', 111, int) |
1348 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_PRIVATE2 TARGET_IOWR('M', 112, int) |
1349 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_PRIVATE3 TARGET_IOWR('M', 113, int) |
1350 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_PRIVATE4 TARGET_IOWR('M', 114, int) |
1351 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_PRIVATE5 TARGET_IOWR('M', 115, int) |
1352 | 2521d698 | bellard | |
1353 | 2521d698 | bellard | #define TARGET_MIXER_READ(dev) TARGET_IOR('M', dev, int) |
1354 | 2521d698 | bellard | |
1355 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_VOLUME TARGET_MIXER_READ(SOUND_MIXER_VOLUME)
|
1356 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_BASS TARGET_MIXER_READ(SOUND_MIXER_BASS)
|
1357 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_TREBLE TARGET_MIXER_READ(SOUND_MIXER_TREBLE)
|
1358 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_SYNTH TARGET_MIXER_READ(SOUND_MIXER_SYNTH)
|
1359 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_PCM TARGET_MIXER_READ(SOUND_MIXER_PCM)
|
1360 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_SPEAKER TARGET_MIXER_READ(SOUND_MIXER_SPEAKER)
|
1361 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_LINE TARGET_MIXER_READ(SOUND_MIXER_LINE)
|
1362 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_MIC TARGET_MIXER_READ(SOUND_MIXER_MIC)
|
1363 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_CD TARGET_MIXER_READ(SOUND_MIXER_CD)
|
1364 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_IMIX TARGET_MIXER_READ(SOUND_MIXER_IMIX)
|
1365 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_ALTPCM TARGET_MIXER_READ(SOUND_MIXER_ALTPCM)
|
1366 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_RECLEV TARGET_MIXER_READ(SOUND_MIXER_RECLEV)
|
1367 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_IGAIN TARGET_MIXER_READ(SOUND_MIXER_IGAIN)
|
1368 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_OGAIN TARGET_MIXER_READ(SOUND_MIXER_OGAIN)
|
1369 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_LINE1 TARGET_MIXER_READ(SOUND_MIXER_LINE1)
|
1370 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_LINE2 TARGET_MIXER_READ(SOUND_MIXER_LINE2)
|
1371 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_LINE3 TARGET_MIXER_READ(SOUND_MIXER_LINE3)
|
1372 | 2521d698 | bellard | |
1373 | 2521d698 | bellard | /* Obsolete macros */
|
1374 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_MUTE TARGET_MIXER_READ(SOUND_MIXER_MUTE)
|
1375 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_ENHANCE TARGET_MIXER_READ(SOUND_MIXER_ENHANCE)
|
1376 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_LOUD TARGET_MIXER_READ(SOUND_MIXER_LOUD)
|
1377 | 2521d698 | bellard | |
1378 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_RECSRC TARGET_MIXER_READ(SOUND_MIXER_RECSRC)
|
1379 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_DEVMASK TARGET_MIXER_READ(SOUND_MIXER_DEVMASK)
|
1380 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_RECMASK TARGET_MIXER_READ(SOUND_MIXER_RECMASK)
|
1381 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_STEREODEVS TARGET_MIXER_READ(SOUND_MIXER_STEREODEVS)
|
1382 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_READ_CAPS TARGET_MIXER_READ(SOUND_MIXER_CAPS)
|
1383 | 2521d698 | bellard | |
1384 | 2521d698 | bellard | #define TARGET_MIXER_WRITE(dev) TARGET_IOWR('M', dev, int) |
1385 | 2521d698 | bellard | |
1386 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_VOLUME TARGET_MIXER_WRITE(SOUND_MIXER_VOLUME)
|
1387 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_BASS TARGET_MIXER_WRITE(SOUND_MIXER_BASS)
|
1388 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_TREBLE TARGET_MIXER_WRITE(SOUND_MIXER_TREBLE)
|
1389 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_SYNTH TARGET_MIXER_WRITE(SOUND_MIXER_SYNTH)
|
1390 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_PCM TARGET_MIXER_WRITE(SOUND_MIXER_PCM)
|
1391 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_SPEAKER TARGET_MIXER_WRITE(SOUND_MIXER_SPEAKER)
|
1392 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE TARGET_MIXER_WRITE(SOUND_MIXER_LINE)
|
1393 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_MIC TARGET_MIXER_WRITE(SOUND_MIXER_MIC)
|
1394 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_CD TARGET_MIXER_WRITE(SOUND_MIXER_CD)
|
1395 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_IMIX TARGET_MIXER_WRITE(SOUND_MIXER_IMIX)
|
1396 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_ALTPCM TARGET_MIXER_WRITE(SOUND_MIXER_ALTPCM)
|
1397 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_RECLEV TARGET_MIXER_WRITE(SOUND_MIXER_RECLEV)
|
1398 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_IGAIN TARGET_MIXER_WRITE(SOUND_MIXER_IGAIN)
|
1399 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_OGAIN TARGET_MIXER_WRITE(SOUND_MIXER_OGAIN)
|
1400 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE1 TARGET_MIXER_WRITE(SOUND_MIXER_LINE1)
|
1401 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE2 TARGET_MIXER_WRITE(SOUND_MIXER_LINE2)
|
1402 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE3 TARGET_MIXER_WRITE(SOUND_MIXER_LINE3)
|
1403 | 2521d698 | bellard | |
1404 | 2521d698 | bellard | /* Obsolete macros */
|
1405 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_MUTE TARGET_MIXER_WRITE(SOUND_MIXER_MUTE)
|
1406 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_ENHANCE TARGET_MIXER_WRITE(SOUND_MIXER_ENHANCE)
|
1407 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_LOUD TARGET_MIXER_WRITE(SOUND_MIXER_LOUD)
|
1408 | 2521d698 | bellard | |
1409 | 2521d698 | bellard | #define TARGET_SOUND_MIXER_WRITE_RECSRC TARGET_MIXER_WRITE(SOUND_MIXER_RECSRC)
|
1410 | 2521d698 | bellard | |
1411 | 2521d698 | bellard | /* vfat ioctls */
|
1412 | 2521d698 | bellard | #define TARGET_VFAT_IOCTL_READDIR_BOTH TARGET_IORU('r', 1) |
1413 | 2521d698 | bellard | #define TARGET_VFAT_IOCTL_READDIR_SHORT TARGET_IORU('r', 2) |