sunos_sysent.c revision 1.46 1 /* $NetBSD: sunos_sysent.c,v 1.46 1998/10/19 22:41:07 tron Exp $ */
2
3 /*
4 * System call switch table.
5 *
6 * DO NOT EDIT-- this file is automatically generated.
7 * created from NetBSD: syscalls.master,v 1.48 1998/10/19 22:40:29 tron Exp
8 */
9
10 #include "opt_nfsserver.h"
11 #include "opt_sysv.h"
12 #include "fs_nfs.h"
13 #include <sys/param.h>
14 #include <sys/systm.h>
15 #include <sys/signal.h>
16 #include <sys/mount.h>
17 #include <sys/poll.h>
18 #include <sys/syscallargs.h>
19 #include <compat/sunos/sunos.h>
20 #include <compat/sunos/sunos_syscallargs.h>
21
22 #ifdef COMPAT_43
23 #define compat_43(func) __CONCAT(compat_43_,func)
24 #else
25 #define compat_43(func) sys_nosys
26 #endif
27
28 #ifdef COMPAT_09
29 #define compat_09(func) __CONCAT(compat_09_,func)
30 #else
31 #define compat_09(func) sys_nosys
32 #endif
33
34 #ifdef COMPAT_10
35 #define compat_10(func) __CONCAT(compat_10_,func)
36 #else
37 #define compat_10(func) sys_nosys
38 #endif
39
40 #define s(type) sizeof(type)
41
42 struct sysent sunos_sysent[] = {
43 { 0, 0,
44 sys_nosys }, /* 0 = syscall */
45 { 1, s(struct sys_exit_args),
46 sys_exit }, /* 1 = exit */
47 { 0, 0,
48 sys_fork }, /* 2 = fork */
49 { 3, s(struct sys_read_args),
50 sys_read }, /* 3 = read */
51 { 3, s(struct sys_write_args),
52 sys_write }, /* 4 = write */
53 { 3, s(struct sunos_sys_open_args),
54 sunos_sys_open }, /* 5 = open */
55 { 1, s(struct sys_close_args),
56 sys_close }, /* 6 = close */
57 { 4, s(struct sunos_sys_wait4_args),
58 sunos_sys_wait4 }, /* 7 = wait4 */
59 { 2, s(struct sunos_sys_creat_args),
60 sunos_sys_creat }, /* 8 = creat */
61 { 2, s(struct sys_link_args),
62 sys_link }, /* 9 = link */
63 { 1, s(struct sys_unlink_args),
64 sys_unlink }, /* 10 = unlink */
65 { 2, s(struct sunos_sys_execv_args),
66 sunos_sys_execv }, /* 11 = execv */
67 { 1, s(struct sys_chdir_args),
68 sys_chdir }, /* 12 = chdir */
69 { 0, 0,
70 sys_nosys }, /* 13 = obsolete time */
71 { 3, s(struct sunos_sys_mknod_args),
72 sunos_sys_mknod }, /* 14 = mknod */
73 { 2, s(struct sys_chmod_args),
74 sys_chmod }, /* 15 = chmod */
75 { 3, s(struct sys_chown_args),
76 sys_chown }, /* 16 = chown */
77 { 1, s(struct sys_obreak_args),
78 sys_obreak }, /* 17 = break */
79 { 0, 0,
80 sys_nosys }, /* 18 = obsolete stat */
81 { 3, s(struct compat_43_sys_lseek_args),
82 compat_43_sys_lseek }, /* 19 = lseek */
83 { 0, 0,
84 sys_getpid }, /* 20 = getpid */
85 { 0, 0,
86 sys_nosys }, /* 21 = obsolete sunos_old_mount */
87 { 0, 0,
88 sys_nosys }, /* 22 = unimplemented System V umount */
89 { 1, s(struct sys_setuid_args),
90 sys_setuid }, /* 23 = setuid */
91 { 0, 0,
92 sys_getuid }, /* 24 = getuid */
93 { 1, s(struct sunos_sys_stime_args),
94 sunos_sys_stime }, /* 25 = stime */
95 { 5, s(struct sunos_sys_ptrace_args),
96 sunos_sys_ptrace }, /* 26 = ptrace */
97 { 0, 0,
98 sys_nosys }, /* 27 = unimplemented sunos_alarm */
99 { 0, 0,
100 sys_nosys }, /* 28 = unimplemented sunos_fstat */
101 { 0, 0,
102 sys_nosys }, /* 29 = unimplemented sunos_pause */
103 { 0, 0,
104 sys_nosys }, /* 30 = unimplemented sunos_utime */
105 { 0, 0,
106 sys_nosys }, /* 31 = unimplemented sunos_stty */
107 { 0, 0,
108 sys_nosys }, /* 32 = unimplemented sunos_gtty */
109 { 2, s(struct sunos_sys_access_args),
110 sunos_sys_access }, /* 33 = access */
111 { 0, 0,
112 sys_nosys }, /* 34 = unimplemented sunos_nice */
113 { 0, 0,
114 sys_nosys }, /* 35 = unimplemented sunos_ftime */
115 { 0, 0,
116 sys_sync }, /* 36 = sync */
117 { 2, s(struct sys_kill_args),
118 sys_kill }, /* 37 = kill */
119 { 2, s(struct sunos_sys_stat_args),
120 sunos_sys_stat }, /* 38 = stat */
121 { 0, 0,
122 sys_nosys }, /* 39 = unimplemented sunos_setpgrp */
123 { 2, s(struct sunos_sys_lstat_args),
124 sunos_sys_lstat }, /* 40 = lstat */
125 { 1, s(struct sys_dup_args),
126 sys_dup }, /* 41 = dup */
127 { 0, 0,
128 sys_pipe }, /* 42 = pipe */
129 { 0, 0,
130 sys_nosys }, /* 43 = unimplemented sunos_times */
131 { 4, s(struct sys_profil_args),
132 sys_profil }, /* 44 = profil */
133 { 0, 0,
134 sys_nosys }, /* 45 = unimplemented */
135 { 1, s(struct sys_setgid_args),
136 sys_setgid }, /* 46 = setgid */
137 { 0, 0,
138 sys_getgid }, /* 47 = getgid */
139 { 0, 0,
140 sys_nosys }, /* 48 = unimplemented sunos_ssig */
141 { 0, 0,
142 sys_nosys }, /* 49 = unimplemented reserved for USG */
143 { 0, 0,
144 sys_nosys }, /* 50 = unimplemented reserved for USG */
145 { 1, s(struct sys_acct_args),
146 sys_acct }, /* 51 = acct */
147 { 0, 0,
148 sys_nosys }, /* 52 = unimplemented */
149 { 4, s(struct sunos_sys_mctl_args),
150 sunos_sys_mctl }, /* 53 = mctl */
151 { 3, s(struct sunos_sys_ioctl_args),
152 sunos_sys_ioctl }, /* 54 = ioctl */
153 { 2, s(struct sunos_sys_reboot_args),
154 sunos_sys_reboot }, /* 55 = reboot */
155 { 0, 0,
156 sys_nosys }, /* 56 = obsolete sunos_owait3 */
157 { 2, s(struct sys_symlink_args),
158 sys_symlink }, /* 57 = symlink */
159 { 3, s(struct sys_readlink_args),
160 sys_readlink }, /* 58 = readlink */
161 { 3, s(struct sunos_sys_execve_args),
162 sunos_sys_execve }, /* 59 = execve */
163 { 1, s(struct sys_umask_args),
164 sys_umask }, /* 60 = umask */
165 { 1, s(struct sys_chroot_args),
166 sys_chroot }, /* 61 = chroot */
167 { 2, s(struct compat_43_sys_fstat_args),
168 compat_43_sys_fstat }, /* 62 = fstat */
169 { 0, 0,
170 sys_nosys }, /* 63 = unimplemented */
171 { 0, 0,
172 compat_43_sys_getpagesize }, /* 64 = getpagesize */
173 { 3, s(struct sunos_sys_omsync_args),
174 sunos_sys_omsync }, /* 65 = omsync */
175 { 0, 0,
176 sys_vfork }, /* 66 = vfork */
177 { 0, 0,
178 sys_nosys }, /* 67 = obsolete vread */
179 { 0, 0,
180 sys_nosys }, /* 68 = obsolete vwrite */
181 { 1, s(struct sys_sbrk_args),
182 sys_sbrk }, /* 69 = sbrk */
183 { 1, s(struct sys_sstk_args),
184 sys_sstk }, /* 70 = sstk */
185 { 6, s(struct sunos_sys_mmap_args),
186 sunos_sys_mmap }, /* 71 = mmap */
187 { 1, s(struct sys_ovadvise_args),
188 sys_ovadvise }, /* 72 = vadvise */
189 { 2, s(struct sys_munmap_args),
190 sys_munmap }, /* 73 = munmap */
191 { 3, s(struct sys_mprotect_args),
192 sys_mprotect }, /* 74 = mprotect */
193 { 3, s(struct sys_madvise_args),
194 sys_madvise }, /* 75 = madvise */
195 { 0, 0,
196 sunos_sys_vhangup }, /* 76 = vhangup */
197 { 0, 0,
198 sys_nosys }, /* 77 = unimplemented vlimit */
199 { 3, s(struct sys_mincore_args),
200 sys_mincore }, /* 78 = mincore */
201 { 2, s(struct sys_getgroups_args),
202 sys_getgroups }, /* 79 = getgroups */
203 { 2, s(struct sys_setgroups_args),
204 sys_setgroups }, /* 80 = setgroups */
205 { 0, 0,
206 sys_getpgrp }, /* 81 = getpgrp */
207 { 2, s(struct sunos_sys_setpgrp_args),
208 sunos_sys_setpgrp }, /* 82 = setpgrp */
209 { 3, s(struct sys_setitimer_args),
210 sys_setitimer }, /* 83 = setitimer */
211 { 0, 0,
212 sys_nosys }, /* 84 = unimplemented { int sunos_sys_wait ( void ) ; } */
213 { 1, s(struct compat_12_sys_swapon_args),
214 compat_12_sys_swapon }, /* 85 = swapon */
215 { 2, s(struct sys_getitimer_args),
216 sys_getitimer }, /* 86 = getitimer */
217 { 2, s(struct compat_43_sys_gethostname_args),
218 compat_43_sys_gethostname }, /* 87 = gethostname */
219 { 2, s(struct compat_43_sys_sethostname_args),
220 compat_43_sys_sethostname }, /* 88 = sethostname */
221 { 0, 0,
222 compat_43_sys_getdtablesize }, /* 89 = getdtablesize */
223 { 2, s(struct sys_dup2_args),
224 sys_dup2 }, /* 90 = dup2 */
225 { 0, 0,
226 sys_nosys }, /* 91 = unimplemented getdopt */
227 { 3, s(struct sunos_sys_fcntl_args),
228 sunos_sys_fcntl }, /* 92 = fcntl */
229 { 5, s(struct sys_select_args),
230 sys_select }, /* 93 = select */
231 { 0, 0,
232 sys_nosys }, /* 94 = unimplemented setdopt */
233 { 1, s(struct sys_fsync_args),
234 sys_fsync }, /* 95 = fsync */
235 { 3, s(struct sys_setpriority_args),
236 sys_setpriority }, /* 96 = setpriority */
237 { 3, s(struct sys_socket_args),
238 sys_socket }, /* 97 = socket */
239 { 3, s(struct sys_connect_args),
240 sys_connect }, /* 98 = connect */
241 { 3, s(struct compat_43_sys_accept_args),
242 compat_43_sys_accept }, /* 99 = accept */
243 { 2, s(struct sys_getpriority_args),
244 sys_getpriority }, /* 100 = getpriority */
245 { 4, s(struct compat_43_sys_send_args),
246 compat_43_sys_send }, /* 101 = send */
247 { 4, s(struct compat_43_sys_recv_args),
248 compat_43_sys_recv }, /* 102 = recv */
249 { 0, 0,
250 sys_nosys }, /* 103 = unimplemented old socketaddr */
251 { 3, s(struct sys_bind_args),
252 sys_bind }, /* 104 = bind */
253 { 5, s(struct sunos_sys_setsockopt_args),
254 sunos_sys_setsockopt }, /* 105 = setsockopt */
255 { 2, s(struct sys_listen_args),
256 sys_listen }, /* 106 = listen */
257 { 0, 0,
258 sys_nosys }, /* 107 = unimplemented vtimes */
259 { 3, s(struct sunos_sys_sigvec_args),
260 sunos_sys_sigvec }, /* 108 = sigvec */
261 { 1, s(struct compat_43_sys_sigblock_args),
262 compat_43_sys_sigblock }, /* 109 = sigblock */
263 { 1, s(struct compat_43_sys_sigsetmask_args),
264 compat_43_sys_sigsetmask }, /* 110 = sigsetmask */
265 { 1, s(struct sunos_sys_sigsuspend_args),
266 sunos_sys_sigsuspend }, /* 111 = sigsuspend */
267 { 2, s(struct compat_43_sys_sigstack_args),
268 compat_43_sys_sigstack }, /* 112 = sigstack */
269 { 3, s(struct compat_43_sys_recvmsg_args),
270 compat_43_sys_recvmsg }, /* 113 = recvmsg */
271 { 3, s(struct compat_43_sys_sendmsg_args),
272 compat_43_sys_sendmsg }, /* 114 = sendmsg */
273 { 0, 0,
274 sys_nosys }, /* 115 = obsolete vtrace */
275 { 2, s(struct sys_gettimeofday_args),
276 sys_gettimeofday }, /* 116 = gettimeofday */
277 { 2, s(struct sys_getrusage_args),
278 sys_getrusage }, /* 117 = getrusage */
279 { 5, s(struct sys_getsockopt_args),
280 sys_getsockopt }, /* 118 = getsockopt */
281 { 0, 0,
282 sys_nosys }, /* 119 = unimplemented */
283 { 3, s(struct sys_readv_args),
284 sys_readv }, /* 120 = readv */
285 { 3, s(struct sys_writev_args),
286 sys_writev }, /* 121 = writev */
287 { 2, s(struct sys_settimeofday_args),
288 sys_settimeofday }, /* 122 = settimeofday */
289 { 3, s(struct sys_fchown_args),
290 sys_fchown }, /* 123 = fchown */
291 { 2, s(struct sys_fchmod_args),
292 sys_fchmod }, /* 124 = fchmod */
293 { 6, s(struct compat_43_sys_recvfrom_args),
294 compat_43_sys_recvfrom }, /* 125 = recvfrom */
295 { 2, s(struct sys_setreuid_args),
296 sys_setreuid }, /* 126 = setreuid */
297 { 2, s(struct sys_setregid_args),
298 sys_setregid }, /* 127 = setregid */
299 { 2, s(struct sys_rename_args),
300 sys_rename }, /* 128 = rename */
301 { 2, s(struct compat_43_sys_truncate_args),
302 compat_43_sys_truncate }, /* 129 = truncate */
303 { 2, s(struct compat_43_sys_ftruncate_args),
304 compat_43_sys_ftruncate }, /* 130 = ftruncate */
305 { 2, s(struct sys_flock_args),
306 sys_flock }, /* 131 = flock */
307 { 0, 0,
308 sys_nosys }, /* 132 = unimplemented */
309 { 6, s(struct sys_sendto_args),
310 sys_sendto }, /* 133 = sendto */
311 { 2, s(struct sys_shutdown_args),
312 sys_shutdown }, /* 134 = shutdown */
313 { 4, s(struct sys_socketpair_args),
314 sys_socketpair }, /* 135 = socketpair */
315 { 2, s(struct sys_mkdir_args),
316 sys_mkdir }, /* 136 = mkdir */
317 { 1, s(struct sys_rmdir_args),
318 sys_rmdir }, /* 137 = rmdir */
319 { 2, s(struct sys_utimes_args),
320 sys_utimes }, /* 138 = utimes */
321 { 1, s(struct sunos_sys_sigreturn_args),
322 sunos_sys_sigreturn }, /* 139 = sigreturn */
323 { 2, s(struct sys_adjtime_args),
324 sys_adjtime }, /* 140 = adjtime */
325 { 3, s(struct compat_43_sys_getpeername_args),
326 compat_43_sys_getpeername }, /* 141 = getpeername */
327 { 0, 0,
328 compat_43_sys_gethostid }, /* 142 = gethostid */
329 { 0, 0,
330 sys_nosys }, /* 143 = unimplemented old sethostid */
331 { 2, s(struct sunos_sys_getrlimit_args),
332 sunos_sys_getrlimit }, /* 144 = getrlimit */
333 { 2, s(struct sunos_sys_setrlimit_args),
334 sunos_sys_setrlimit }, /* 145 = setrlimit */
335 { 2, s(struct compat_43_sys_killpg_args),
336 compat_43_sys_killpg }, /* 146 = killpg */
337 { 0, 0,
338 sys_nosys }, /* 147 = unimplemented */
339 { 0, 0,
340 sys_nosys }, /* 148 = unimplemented */
341 { 0, 0,
342 sys_nosys }, /* 149 = unimplemented */
343 { 3, s(struct compat_43_sys_getsockname_args),
344 compat_43_sys_getsockname }, /* 150 = getsockname */
345 { 0, 0,
346 sys_nosys }, /* 151 = unimplemented getmsg */
347 { 0, 0,
348 sys_nosys }, /* 152 = unimplemented putmsg */
349 { 3, s(struct sys_poll_args),
350 sys_poll }, /* 153 = poll */
351 { 0, 0,
352 sys_nosys }, /* 154 = unimplemented */
353 #ifdef NFSSERVER
354 { 1, s(struct sunos_sys_nfssvc_args),
355 sunos_sys_nfssvc }, /* 155 = nfssvc */
356 #else
357 { 0, 0,
358 sys_nosys }, /* 155 = unimplemented */
359 #endif
360 { 4, s(struct compat_12_sys_getdirentries_args),
361 compat_12_sys_getdirentries }, /* 156 = getdirentries */
362 { 2, s(struct sunos_sys_statfs_args),
363 sunos_sys_statfs }, /* 157 = statfs */
364 { 2, s(struct sunos_sys_fstatfs_args),
365 sunos_sys_fstatfs }, /* 158 = fstatfs */
366 { 1, s(struct sunos_sys_unmount_args),
367 sunos_sys_unmount }, /* 159 = unmount */
368 #ifdef NFS
369 { 0, 0,
370 async_daemon }, /* 160 = async_daemon */
371 { 2, s(struct sys_getfh_args),
372 sys_getfh }, /* 161 = getfh */
373 #else
374 { 0, 0,
375 sys_nosys }, /* 160 = unimplemented */
376 { 0, 0,
377 sys_nosys }, /* 161 = unimplemented */
378 #endif
379 { 2, s(struct compat_09_sys_getdomainname_args),
380 compat_09_sys_getdomainname }, /* 162 = getdomainname */
381 { 2, s(struct compat_09_sys_setdomainname_args),
382 compat_09_sys_setdomainname }, /* 163 = setdomainname */
383 { 0, 0,
384 sys_nosys }, /* 164 = unimplemented rtschedule */
385 { 4, s(struct sunos_sys_quotactl_args),
386 sunos_sys_quotactl }, /* 165 = quotactl */
387 { 2, s(struct sunos_sys_exportfs_args),
388 sunos_sys_exportfs }, /* 166 = exportfs */
389 { 4, s(struct sunos_sys_mount_args),
390 sunos_sys_mount }, /* 167 = mount */
391 { 2, s(struct sunos_sys_ustat_args),
392 sunos_sys_ustat }, /* 168 = ustat */
393 #ifdef SYSVSEM
394 { 5, s(struct compat_10_sys_semsys_args),
395 compat_10_sys_semsys }, /* 169 = semsys */
396 #else
397 { 0, 0,
398 sys_nosys }, /* 169 = unimplemented semsys */
399 #endif
400 #ifdef SYSVMSG
401 { 6, s(struct compat_10_sys_msgsys_args),
402 compat_10_sys_msgsys }, /* 170 = msgsys */
403 #else
404 { 0, 0,
405 sys_nosys }, /* 170 = unimplemented msgsys */
406 #endif
407 #ifdef SYSVSHM
408 { 4, s(struct compat_10_sys_shmsys_args),
409 compat_10_sys_shmsys }, /* 171 = shmsys */
410 #else
411 { 0, 0,
412 sys_nosys }, /* 171 = unimplemented shmsys */
413 #endif
414 { 1, s(struct sunos_sys_auditsys_args),
415 sunos_sys_auditsys }, /* 172 = auditsys */
416 { 0, 0,
417 sys_nosys }, /* 173 = unimplemented rfssys */
418 { 3, s(struct sunos_sys_getdents_args),
419 sunos_sys_getdents }, /* 174 = getdents */
420 { 0, 0,
421 sys_setsid }, /* 175 = setsid */
422 { 1, s(struct sys_fchdir_args),
423 sys_fchdir }, /* 176 = fchdir */
424 { 1, s(struct sunos_sys_fchroot_args),
425 sunos_sys_fchroot }, /* 177 = fchroot */
426 { 0, 0,
427 sys_nosys }, /* 178 = unimplemented vpixsys */
428 { 0, 0,
429 sys_nosys }, /* 179 = unimplemented aioread */
430 { 0, 0,
431 sys_nosys }, /* 180 = unimplemented aiowrite */
432 { 0, 0,
433 sys_nosys }, /* 181 = unimplemented aiowait */
434 { 0, 0,
435 sys_nosys }, /* 182 = unimplemented aiocancel */
436 { 1, s(struct sunos_sys_sigpending_args),
437 sunos_sys_sigpending }, /* 183 = sigpending */
438 { 0, 0,
439 sys_nosys }, /* 184 = unimplemented */
440 { 2, s(struct sys_setpgid_args),
441 sys_setpgid }, /* 185 = setpgid */
442 { 2, s(struct sys_pathconf_args),
443 sys_pathconf }, /* 186 = pathconf */
444 { 2, s(struct sys_fpathconf_args),
445 sys_fpathconf }, /* 187 = fpathconf */
446 { 1, s(struct sunos_sys_sysconf_args),
447 sunos_sys_sysconf }, /* 188 = sysconf */
448 { 1, s(struct sunos_sys_uname_args),
449 sunos_sys_uname }, /* 189 = uname */
450 };
451
452