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