1
2
3
4
5
6
7
8
9
10 #include <sys/param.h>
11 #include <sys/systm.h>
12 #include <sys/signal.h>
13 #include <sys/mount.h>
14 #include <sys/syscallargs.h>
15 #include <compat/svr4/svr4_types.h>
16 #include <compat/svr4/svr4_time.h>
17 #include <compat/svr4/svr4_signal.h>
18 #include <compat/svr4/svr4_ucontext.h>
19 #include <compat/svr4/svr4_syscallargs.h>
20 #include <compat/svr4/svr4_statvfs.h>
21 #include <compat/svr4/svr4_acl.h>
22
23 #define s(type) sizeof(type)
24
25 struct sysent svr4_sysent[] = {
26 { 0, 0,
27 sys_nosys },
28 { 1, s(struct sys_exit_args),
29 sys_exit },
30 { 0, 0,
31 sys_fork },
32 { 3, s(struct sys_read_args),
33 sys_read },
34 { 3, s(struct sys_write_args),
35 sys_write },
36 { 3, s(struct svr4_sys_open_args),
37 svr4_sys_open },
38 { 1, s(struct sys_close_args),
39 sys_close },
40 { 1, s(struct svr4_sys_wait_args),
41 svr4_sys_wait },
42 { 2, s(struct svr4_sys_creat_args),
43 svr4_sys_creat },
44 { 2, s(struct sys_link_args),
45 sys_link },
46 { 1, s(struct sys_unlink_args),
47 sys_unlink },
48 { 2, s(struct svr4_sys_execv_args),
49 svr4_sys_execv },
50 { 1, s(struct sys_chdir_args),
51 sys_chdir },
52 { 1, s(struct svr4_sys_time_args),
53 svr4_sys_time },
54 { 3, s(struct svr4_sys_mknod_args),
55 svr4_sys_mknod },
56 { 2, s(struct sys_chmod_args),
57 sys_chmod },
58 { 3, s(struct sys_chown_args),
59 sys_chown },
60 { 1, s(struct svr4_sys_break_args),
61 svr4_sys_break },
62 { 2, s(struct svr4_sys_stat_args),
63 svr4_sys_stat },
64 { 3, s(struct compat_43_sys_lseek_args),
65 compat_43_sys_lseek },
66 { 0, 0,
67 sys_getpid },
68 { 0, 0,
69 sys_nosys },
70 { 0, 0,
71 sys_nosys },
72 { 1, s(struct sys_setuid_args),
73 sys_setuid },
74 { 0, 0,
75 sys_getuid },
76 { 0, 0,
77 sys_nosys },
78 { 0, 0,
79 sys_nosys },
80 { 1, s(struct svr4_sys_alarm_args),
81 svr4_sys_alarm },
82 { 2, s(struct svr4_sys_fstat_args),
83 svr4_sys_fstat },
84 { 0, 0,
85 svr4_sys_pause },
86 { 2, s(struct svr4_sys_utime_args),
87 svr4_sys_utime },
88 { 0, 0,
89 sys_nosys },
90 { 0, 0,
91 sys_nosys },
92 { 2, s(struct svr4_sys_access_args),
93 svr4_sys_access },
94 { 1, s(struct svr4_sys_nice_args),
95 svr4_sys_nice },
96 { 0, 0,
97 sys_nosys },
98 { 0, 0,
99 sys_sync },
100 { 2, s(struct svr4_sys_kill_args),
101 svr4_sys_kill },
102 { 0, 0,
103 sys_nosys },
104 { 3, s(struct svr4_sys_pgrpsys_args),
105 svr4_sys_pgrpsys },
106 { 0, 0,
107 sys_nosys },
108 { 1, s(struct sys_dup_args),
109 sys_dup },
110 { 0, 0,
111 sys_opipe },
112 { 1, s(struct svr4_sys_times_args),
113 svr4_sys_times },
114 { 0, 0,
115 sys_nosys },
116 { 0, 0,
117 sys_nosys },
118 { 1, s(struct sys_setgid_args),
119 sys_setgid },
120 { 0, 0,
121 sys_getgid },
122 { 2, s(struct svr4_sys_signal_args),
123 svr4_sys_signal },
124 #ifdef SYSVMSG
125 { 5, s(struct svr4_sys_msgsys_args),
126 svr4_sys_msgsys },
127 #else
128 { 0, 0,
129 sys_nosys },
130 #endif
131 { 2, s(struct svr4_sys_sysarch_args),
132 svr4_sys_sysarch },
133 { 0, 0,
134 sys_nosys },
135 #ifdef SYSVSHM
136 { 4, s(struct svr4_sys_shmsys_args),
137 svr4_sys_shmsys },
138 #else
139 { 0, 0,
140 sys_nosys },
141 #endif
142 #ifdef SYSVSEM
143 { 5, s(struct svr4_sys_semsys_args),
144 svr4_sys_semsys },
145 #else
146 { 0, 0,
147 sys_nosys },
148 #endif
149 { 3, s(struct svr4_sys_ioctl_args),
150 svr4_sys_ioctl },
151 { 0, 0,
152 sys_nosys },
153 { 0, 0,
154 sys_nosys },
155 { 4, s(struct svr4_sys_utssys_args),
156 svr4_sys_utssys },
157 { 1, s(struct sys_fsync_args),
158 sys_fsync },
159 { 3, s(struct svr4_sys_execve_args),
160 svr4_sys_execve },
161 { 1, s(struct sys_umask_args),
162 sys_umask },
163 { 1, s(struct sys_chroot_args),
164 sys_chroot },
165 { 3, s(struct svr4_sys_fcntl_args),
166 svr4_sys_fcntl },
167 { 2, s(struct svr4_sys_ulimit_args),
168 svr4_sys_ulimit },
169 { 0, 0,
170 sys_nosys },
171 { 0, 0,
172 sys_nosys },
173 { 0, 0,
174 sys_nosys },
175 { 0, 0,
176 sys_nosys },
177 { 0, 0,
178 sys_nosys },
179 { 0, 0,
180 sys_nosys },
181 { 0, 0,
182 sys_nosys },
183 { 0, 0,
184 sys_nosys },
185 { 0, 0,
186 sys_nosys },
187 { 0, 0,
188 sys_nosys },
189 { 0, 0,
190 sys_nosys },
191 { 0, 0,
192 sys_nosys },
193 { 0, 0,
194 svr4_sys_rdebug },
195 { 0, 0,
196 sys_nosys },
197 { 0, 0,
198 sys_nosys },
199 { 1, s(struct sys_rmdir_args),
200 sys_rmdir },
201 { 2, s(struct sys_mkdir_args),
202 sys_mkdir },
203 { 3, s(struct svr4_sys_getdents_args),
204 svr4_sys_getdents },
205 { 0, 0,
206 sys_nosys },
207 { 0, 0,
208 sys_nosys },
209 { 0, 0,
210 sys_nosys },
211 { 4, s(struct svr4_sys_getmsg_args),
212 svr4_sys_getmsg },
213 { 4, s(struct svr4_sys_putmsg_args),
214 svr4_sys_putmsg },
215 { 3, s(struct sys_poll_args),
216 sys_poll },
217 { 2, s(struct svr4_sys_lstat_args),
218 svr4_sys_lstat },
219 { 2, s(struct sys_symlink_args),
220 sys_symlink },
221 { 3, s(struct sys_readlink_args),
222 sys_readlink },
223 { 2, s(struct sys_getgroups_args),
224 sys_getgroups },
225 { 2, s(struct sys_setgroups_args),
226 sys_setgroups },
227 { 2, s(struct sys_fchmod_args),
228 sys_fchmod },
229 { 3, s(struct sys_fchown_args),
230 sys_fchown },
231 { 3, s(struct svr4_sys_sigprocmask_args),
232 svr4_sys_sigprocmask },
233 { 1, s(struct svr4_sys_sigsuspend_args),
234 svr4_sys_sigsuspend },
235 { 2, s(struct svr4_sys_sigaltstack_args),
236 svr4_sys_sigaltstack },
237 { 3, s(struct svr4_sys_sigaction_args),
238 svr4_sys_sigaction },
239 { 2, s(struct svr4_sys_sigpending_args),
240 svr4_sys_sigpending },
241 { 2, s(struct svr4_sys_context_args),
242 svr4_sys_context },
243 { 0, 0,
244 sys_nosys },
245 { 0, 0,
246 sys_nosys },
247 { 2, s(struct svr4_sys_statvfs_args),
248 svr4_sys_statvfs },
249 { 2, s(struct svr4_sys_fstatvfs_args),
250 svr4_sys_fstatvfs },
251 { 0, 0,
252 sys_nosys },
253 { 0, 0,
254 sys_nosys },
255 { 4, s(struct svr4_sys_waitsys_args),
256 svr4_sys_waitsys },
257 { 0, 0,
258 sys_nosys },
259 { 5, s(struct svr4_sys_hrtsys_args),
260 svr4_sys_hrtsys },
261 { 0, 0,
262 sys_nosys },
263 { 0, 0,
264 sys_nosys },
265 { 0, 0,
266 sys_nosys },
267 { 2, s(struct svr4_sys_pathconf_args),
268 svr4_sys_pathconf },
269 { 3, s(struct sys_mincore_args),
270 sys_mincore },
271 { 6, s(struct svr4_sys_mmap_args),
272 svr4_sys_mmap },
273 { 3, s(struct sys_mprotect_args),
274 sys_mprotect },
275 { 2, s(struct sys_munmap_args),
276 sys_munmap },
277 { 2, s(struct svr4_sys_fpathconf_args),
278 svr4_sys_fpathconf },
279 { 0, 0,
280 sys_vfork },
281 { 1, s(struct sys_fchdir_args),
282 sys_fchdir },
283 { 3, s(struct sys_readv_args),
284 sys_readv },
285 { 3, s(struct sys_writev_args),
286 sys_writev },
287 { 3, s(struct svr4_sys_xstat_args),
288 svr4_sys_xstat },
289 { 3, s(struct svr4_sys_lxstat_args),
290 svr4_sys_lxstat },
291 { 3, s(struct svr4_sys_fxstat_args),
292 svr4_sys_fxstat },
293 { 4, s(struct svr4_sys_xmknod_args),
294 svr4_sys_xmknod },
295 { 0, 0,
296 sys_nosys },
297 { 2, s(struct svr4_sys_setrlimit_args),
298 svr4_sys_setrlimit },
299 { 2, s(struct svr4_sys_getrlimit_args),
300 svr4_sys_getrlimit },
301 { 3, s(struct sys_lchown_args),
302 sys_lchown },
303 { 6, s(struct svr4_sys_memcntl_args),
304 svr4_sys_memcntl },
305 { 0, 0,
306 sys_nosys },
307 { 0, 0,
308 sys_nosys },
309 { 2, s(struct sys_rename_args),
310 sys_rename },
311 { 2, s(struct svr4_sys_uname_args),
312 svr4_sys_uname },
313 { 1, s(struct svr4_sys_setegid_args),
314 svr4_sys_setegid },
315 { 1, s(struct svr4_sys_sysconfig_args),
316 svr4_sys_sysconfig },
317 { 2, s(struct sys_adjtime_args),
318 sys_adjtime },
319 { 3, s(struct svr4_sys_systeminfo_args),
320 svr4_sys_systeminfo },
321 { 0, 0,
322 sys_nosys },
323 { 1, s(struct sys_seteuid_args),
324 sys_seteuid },
325 { 0, 0,
326 sys_nosys },
327 { 0, 0,
328 sys_nosys },
329 { 0, 0,
330 sys_nosys },
331 { 0, 0,
332 sys_nosys },
333 { 0, 0,
334 sys_nosys },
335 { 0, 0,
336 sys_nosys },
337 { 0, 0,
338 sys_nosys },
339 { 0, 0,
340 sys_nosys },
341 { 0, 0,
342 sys_nosys },
343 { 0, 0,
344 sys_nosys },
345 { 0, 0,
346 sys_nosys },
347 { 1, s(struct svr4_sys_fchroot_args),
348 svr4_sys_fchroot },
349 { 2, s(struct svr4_sys_utimes_args),
350 svr4_sys_utimes },
351 { 0, 0,
352 svr4_sys_vhangup },
353 { 1, s(struct svr4_sys_gettimeofday_args),
354 svr4_sys_gettimeofday },
355 { 2, s(struct sys_getitimer_args),
356 sys_getitimer },
357 { 3, s(struct sys_setitimer_args),
358 sys_setitimer },
359 { 0, 0,
360 sys_nosys },
361 { 0, 0,
362 sys_nosys },
363 { 0, 0,
364 sys_nosys },
365 { 0, 0,
366 sys_nosys },
367 { 0, 0,
368 sys_nosys },
369 { 0, 0,
370 sys_nosys },
371 { 0, 0,
372 sys_nosys },
373 { 0, 0,
374 sys_nosys },
375 { 0, 0,
376 sys_nosys },
377 { 0, 0,
378 sys_nosys },
379 { 0, 0,
380 sys_nosys },
381 { 0, 0,
382 sys_nosys },
383 { 0, 0,
384 sys_nosys },
385 { 0, 0,
386 sys_nosys },
387 { 4, s(struct svr4_sys_pread_args),
388 svr4_sys_pread },
389 { 4, s(struct svr4_sys_pwrite_args),
390 svr4_sys_pwrite },
391 { 4, s(struct svr4_sys_llseek_args),
392 svr4_sys_llseek },
393 { 0, 0,
394 sys_nosys },
395 { 0, 0,
396 sys_nosys },
397 { 0, 0,
398 sys_nosys },
399 { 0, 0,
400 sys_nosys },
401 { 0, 0,
402 sys_nosys },
403 { 0, 0,
404 sys_nosys },
405 { 0, 0,
406 sys_nosys },
407 { 0, 0,
408 sys_nosys },
409 { 0, 0,
410 sys_nosys },
411 { 4, s(struct svr4_sys_acl_args),
412 svr4_sys_acl },
413 { 6, s(struct svr4_sys_auditsys_args),
414 svr4_sys_auditsys },
415 { 0, 0,
416 sys_nosys },
417 { 0, 0,
418 sys_nosys },
419 { 0, 0,
420 sys_nosys },
421 { 0, 0,
422 sys_nosys },
423 { 2, s(struct sys_clock_gettime_args),
424 sys_clock_gettime },
425 { 2, s(struct sys_clock_settime_args),
426 sys_clock_settime },
427 { 2, s(struct sys_clock_getres_args),
428 sys_clock_getres },
429 { 0, 0,
430 sys_nosys },
431 { 0, 0,
432 sys_nosys },
433 { 0, 0,
434 sys_nosys },
435 { 0, 0,
436 sys_nosys },
437 { 0, 0,
438 sys_nosys },
439 { 2, s(struct sys_nanosleep_args),
440 sys_nanosleep },
441 { 4, s(struct svr4_sys_facl_args),
442 svr4_sys_facl },
443 { 0, 0,
444 sys_nosys },
445 { 2, s(struct sys_setreuid_args),
446 sys_setreuid },
447 { 2, s(struct sys_setregid_args),
448 sys_setregid },
449 { 0, 0,
450 sys_nosys },
451 { 0, 0,
452 sys_nosys },
453 { 0, 0,
454 sys_nosys },
455 { 0, 0,
456 sys_nosys },
457 { 0, 0,
458 sys_nosys },
459 { 0, 0,
460 sys_nosys },
461 { 0, 0,
462 sys_nosys },
463 { 0, 0,
464 sys_nosys },
465 { 0, 0,
466 sys_nosys },
467 { 3, s(struct svr4_sys_getdents64_args),
468 svr4_sys_getdents64 },
469 { 6, s(struct svr4_sys_mmap64_args),
470 svr4_sys_mmap64 },
471 { 2, s(struct svr4_sys_stat64_args),
472 svr4_sys_stat64 },
473 { 2, s(struct svr4_sys_lstat64_args),
474 svr4_sys_lstat64 },
475 { 2, s(struct svr4_sys_fstat64_args),
476 svr4_sys_fstat64 },
477 { 0, 0,
478 sys_nosys },
479 { 2, s(struct svr4_sys_fstatvfs64_args),
480 svr4_sys_fstatvfs64 },
481 { 0, 0,
482 sys_nosys },
483 { 0, 0,
484 sys_nosys },
485 { 4, s(struct svr4_sys_pread64_args),
486 svr4_sys_pread64 },
487 { 4, s(struct svr4_sys_pwrite64_args),
488 svr4_sys_pwrite64 },
489 { 2, s(struct svr4_sys_creat64_args),
490 svr4_sys_creat64 },
491 { 3, s(struct svr4_sys_open64_args),
492 svr4_sys_open64 },
493 { 0, 0,
494 sys_nosys },
495 { 0, 0,
496 sys_nosys },
497 { 0, 0,
498 sys_nosys },
499 { 0, 0,
500 sys_nosys },
501 { 3, s(struct svr4_sys_socket_args),
502 svr4_sys_socket },
503 { 4, s(struct sys_socketpair_args),
504 sys_socketpair },
505 { 3, s(struct sys_bind_args),
506 sys_bind },
507 { 2, s(struct sys_listen_args),
508 sys_listen },
509 { 3, s(struct compat_43_sys_accept_args),
510 compat_43_sys_accept },
511 { 3, s(struct sys_connect_args),
512 sys_connect },
513 { 2, s(struct sys_shutdown_args),
514 sys_shutdown },
515 { 4, s(struct compat_43_sys_recv_args),
516 compat_43_sys_recv },
517 { 6, s(struct compat_43_sys_recvfrom_args),
518 compat_43_sys_recvfrom },
519 { 3, s(struct compat_43_sys_recvmsg_args),
520 compat_43_sys_recvmsg },
521 { 4, s(struct compat_43_sys_send_args),
522 compat_43_sys_send },
523 { 3, s(struct compat_43_sys_sendmsg_args),
524 compat_43_sys_sendmsg },
525 { 6, s(struct sys_sendto_args),
526 sys_sendto },
527 { 3, s(struct compat_43_sys_getpeername_args),
528 compat_43_sys_getpeername },
529 { 3, s(struct compat_43_sys_getsockname_args),
530 compat_43_sys_getsockname },
531 { 5, s(struct sys_getsockopt_args),
532 sys_getsockopt },
533 { 5, s(struct sys_setsockopt_args),
534 sys_setsockopt },
535 { 0, 0,
536 sys_nosys },
537 { 0, 0,
538 sys_nosys },
539 { 0, 0,
540 sys_nosys },
541 };
542