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