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