syscalls.master revision 1.73
1	$NetBSD: syscalls.master,v 1.73 2009/01/13 21:57:55 pooka Exp $
2
3;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
4
5; NetBSD COMPAT_SUNOS system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.)
7;
8; Fields: number type [type-dependent ...]
9;	number	system call number, must be in order
10;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11;		the compatibility options defined in syscalls.conf.
12;
13; types:
14;	STD	always included
15;	OBSOL	obsolete, not included in system
16;	UNIMPL	unimplemented, not included in system
17;	NODEF	included, but don't define the syscall number
18;	NOARGS	included, but don't define the syscall args structure
19;
20; The compat options are defined in the syscalls.conf file, and the
21; compat option name is prefixed to the syscall name.  Other than
22; that, they're like NODEF (for 'compat' options), or STD (for
23; 'libcompat' options).
24;
25; The type-dependent arguments are as follows:
26; For STD, NODEF, NOARGS, and compat syscalls:
27;	{ pseudo-proto } [alias]
28; For other syscalls:
29;	[comment]
30;
31; #ifdef's, etc. may be included, and are copied to the output files.
32; #include's are copied to the syscall names and switch definition files only.
33
34#if defined(_KERNEL_OPT)
35#include "opt_sysv.h"
36#endif
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/signal.h>
41#include <sys/mount.h>
42#include <sys/poll.h>
43#include <sys/sched.h>
44#include <sys/syscallargs.h>
45
46#include <compat/sunos/sunos.h>
47#include <compat/sunos/sunos_syscallargs.h>
48
49%%
50
510	NOARGS		{ int sys_nosys(void); } syscall
521	NOARGS		{ int sys_exit(int rval); }
532	NOARGS		{ int sys_fork(void); }
543	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
554	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
565	STD		{ int sunos_sys_open(const char *path, int flags, \
57			    int mode); }
586	NOARGS		{ int sys_close(int fd); }
597	STD		{ int sunos_sys_wait4(int pid, int *status, \
60			    int options, struct rusage50 *rusage); }
618	STD		{ int sunos_sys_creat(const char *path, int mode); }
629	NOARGS		{ int sys_link(char *path, char *link); }
6310	NOARGS		{ int sys_unlink(char *path); }
6411	STD		{ int sunos_sys_execv(const char *path, char **argp); }
6512	NOARGS		{ int sys_chdir(char *path); }
6613	OBSOL		old_time
6714	STD		{ int sunos_sys_mknod(const char *path, int mode, \
68			    int dev); }
6915	NOARGS		{ int sys_chmod(char *path, int mode); }
7016	NOARGS		{ int sys_chown(char *path, int uid, int gid); }
7117	NOARGS		{ int sys_obreak(char *nsize); } break
7218	OBSOL		old_stat
7319	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, int whence); }
7420	NOARGS		{ pid_t sys_getpid_with_ppid(void); }
7521	OBSOL		sunos_old_mount
7622	UNIMPL		System V umount
7723	NOARGS		{ int sys_setuid(uid_t uid); }
7824	NOARGS		{ uid_t sys_getuid_with_euid(void); }
7925	STD		{ int sunos_sys_stime(sunos_time_t *tp); }
8026	STD		{ long sunos_sys_ptrace(int req, pid_t pid, \
81			    void *addr, int data, char *addr2); }
8227	UNIMPL		old_sunos_alarm
8328	UNIMPL		old_sunos_fstat
8429	UNIMPL		old_sunos_pause
8530	UNIMPL		old_sunos_utime
8631	UNIMPL		old_sunos_stty
8732	UNIMPL		old_sunos_gtty
8833	NOARGS		{ int sys_access(const char *path, int flags); }
8934	UNIMPL		old_sunos_nice
9035	UNIMPL		old_sunos_ftime
9136	NOARGS		{ int sys_sync(void); }
9237	NOARGS		{ int sys_kill(int pid, int signum); }
9338	NOARGS		{ int compat_43_sys_stat(const char *path, \
94			    struct stat43 *ub); }
9539	UNIMPL		sunos_setpgrp
9640	NOARGS		{ int compat_43_sys_lstat(const char *path, \
97			    struct stat43 *ub); }
9841	NOARGS		{ int sys_dup(u_int fd); }
9942	NOARGS		{ int sys_pipe(void); }
10043	UNIMPL		sunos_times
10144	NOARGS		{ int sys_profil(void *samples, u_int size, \
102			    u_int offset, u_int scale); }
10345	UNIMPL
10446	NOARGS		{ int sys_setgid(uid_t gid); }
10547	NOARGS		{ gid_t sys_getgid_with_egid(void); }
10648	UNIMPL		sunos_ssig
10749	UNIMPL		reserved for USG
10850	UNIMPL		reserved for USG
10951	NOARGS		{ int sys_acct(char *path); }
11052	UNIMPL
11153	STD		{ int sunos_sys_mctl(void *addr, int len, int func, \
112			    void *arg); }
11354	STD		{ int sunos_sys_ioctl(int fd, u_long com, \
114			    void *data); }
11555	STD		{ int sunos_sys_reboot(int howto, char *bootstr); }
11656	OBSOL		sunos_owait3
11757	NOARGS		{ int sys_symlink(char *path, char *link); }
11858	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
11959	STD		{ int sunos_sys_execve(const char *path, char **argp, \
120			    char **envp); }
12160	NOARGS		{ int sys_umask(int newmask); }
12261	NOARGS		{ int sys_chroot(char *path); }
12362	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); }
12463	UNIMPL
12564	NOARGS		{ int compat_43_sys_getpagesize(void); }
12665	STD		{ int sunos_sys_omsync(void *addr, size_t len, \
127			    int flags); }
12866	NOARGS		{ int sys_vfork(void); }
12967	OBSOL		vread
13068	OBSOL		vwrite
13169	NOARGS		{ int sys_sbrk(intptr_t incr); }
13270	NOARGS		{ int sys_sstk(int incr); }
13371	STD		{ void *sunos_sys_mmap(void *addr, size_t len, \
134			    int prot, int flags, int fd, long pos); }
13572	NOARGS		{ int sys_ovadvise(int anom); } vadvise
13673	NOARGS		{ int sys_munmap(void *addr, size_t len); }
13774	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
138			    int prot); }
13975	NOARGS		{ int sys_madvise(void *addr, size_t len, \
140			    int behav); }
14176	STD		{ int sunos_sys_vhangup(void); }
14277	UNIMPL		vlimit
14378	NOARGS		{ int sys_mincore(void *addr, size_t len, \
144			    char *vec); }
14579	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
14680	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
14781	NOARGS		{ int sys_getpgrp(void); }
14882	STD		{ int sunos_sys_setpgrp(int pid, int pgid); }
14983	NOARGS		{ int compat_50_sys_setitimer(u_int which, \
150			    struct itimerval50 *itv, \
151			    struct itimerval50 *oitv); }
15284	UNIMPL		sunos_sys_wait
15385	NOARGS		{ int compat_12_sys_swapon(char *name); }
15486	NOARGS		{ int compat_50_sys_getitimer(u_int which, \
155			    struct itimerval50 *itv); }
15687	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
157			    u_int len); }
15888	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
159			    u_int len); }
16089	NOARGS		{ int compat_43_sys_getdtablesize(void); }
16190	NOARGS		{ int sys_dup2(u_int from, u_int to); }
16291	UNIMPL		getdopt
16392	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
16493	NOARGS		{ int compat_50_sys_select(u_int nd, fd_set *in, \
165			    fd_set *ou, fd_set *ex, struct timeval50 *tv); }
16694	UNIMPL		setdopt
16795	NOARGS		{ int sys_fsync(int fd); }
16896	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
16997	STD		{ int sunos_sys_socket(int domain, int type, int protocol); }
17098	NOARGS		{ int sys_connect(int s, void *name, int namelen); }
17199	NOARGS		{ int compat_43_sys_accept(int s, void *name, \
172			    int *anamelen); }
173100	NOARGS		{ int sys_getpriority(int which, int who); }
174101	NOARGS		{ int compat_43_sys_send(int s, void *buf, int len, \
175			    int flags); }
176102	NOARGS		{ int compat_43_sys_recv(int s, void *buf, int len, \
177			    int flags); }
178103	UNIMPL		old socketaddr
179104	NOARGS		{ int sys_bind(int s, void *name, int namelen); }
180105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
181			    void *val, int valsize); }
182106	NOARGS		{ int sys_listen(int s, int backlog); }
183107	UNIMPL		vtimes
184108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
185			    struct sigvec *osv); }
186109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
187110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
188111	STD		{ int sunos_sys_sigsuspend(int mask); }
189112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
190			    struct sigstack *oss); }
191113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
192			    struct omsghdr *msg, int flags); }
193114	NOARGS		{ int compat_43_sys_sendmsg(int s, void *msg, \
194			    int flags); }
195115	OBSOL		vtrace
196116	NOARGS		{ int compat_50_sys_gettimeofday(struct timeval50 *tp, \
197			    struct timezone *tzp); }
198117	NOARGS		{ int compat_50_sys_getrusage(int who, \
199			    struct rusage50 *rusage); }
200118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
201			    void *val, int *avalsize); }
202119	UNIMPL
203120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
204			    u_int iovcnt); }
205121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
206			    u_int iovcnt); }
207122	NOARGS		{ int compat_50_sys_settimeofday(struct timeval50 *tv, \
208			    struct timezone *tzp); }
209123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
210124	NOARGS		{ int sys_fchmod(int fd, int mode); }
211125	NOARGS		{ int compat_43_sys_recvfrom(int s, void *buf, \
212			    size_t len, int flags, void *from, \
213			    int *fromlenaddr); }
214126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
215127	NOARGS		{ int sys_setregid(int rgid, int egid); }
216128	NOARGS		{ int sys_rename(char *from, char *to); }
217129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
218130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
219131	NOARGS		{ int sys_flock(int fd, int how); }
220132	UNIMPL
221133	NOARGS		{ int sys_sendto(int s, void *buf, size_t len, \
222			    int flags, void *to, int tolen); }
223134	NOARGS		{ int sys_shutdown(int s, int how); }
224135	STD		{ int sunos_sys_socketpair(int domain, int type, \
225			    int protocol, int *rsv); }
226136	NOARGS		{ int sys_mkdir(char *path, int mode); }
227137	NOARGS		{ int sys_rmdir(char *path); }
228138	NOARGS		{ int compat_50_sys_utimes(char *path, \
229			    struct timeval50 *tptr); }
230139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
231140	NOARGS		{ int compat_50_sys_adjtime(struct timeval50 *delta, \
232			    struct timeval50 *olddelta); }
233141	NOARGS		{ int compat_43_sys_getpeername(int fdes, void *asa, \
234			    int *alen); }
235142	NOARGS		{ int compat_43_sys_gethostid(void); }
236143	UNIMPL		old sethostid
237144	STD		{ int sunos_sys_getrlimit(u_int which, \
238			    struct orlimit *rlp); }
239145	STD		{ int sunos_sys_setrlimit(u_int which, \
240			    struct orlimit *rlp); }
241146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); }
242147	UNIMPL
243148	UNIMPL
244149	UNIMPL
245150	NOARGS		{ int compat_43_sys_getsockname(int fdes, void *asa, \
246			    int *alen); }
247151	UNIMPL		getmsg
248152	UNIMPL		putmsg
249153	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
250			    int timeout); }
251154	UNIMPL
252155	STD		{ int sunos_sys_nfssvc(int fd); }
253156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
254			    u_int count, long *basep); }
255157	STD		{ int sunos_sys_statfs(const char *path, \
256			    struct sunos_statfs *buf); }
257158	STD		{ int sunos_sys_fstatfs(int fd, \
258			    struct sunos_statfs *buf); }
259159	STD		{ int sunos_sys_unmount(char *path); }
260160	NOARGS		{ int async_daemon(void); }
261161	NOARGS		{ int compat_30_sys_getfh(char *fname, fhandle_t *fhp); }
262162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
263			    int len); }
264163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
265			    int len); }
266164	UNIMPL		rtschedule
267165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
268			    int uid, void *addr); }
269166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
270167	STD		{ int sunos_sys_mount(char *type, char *dir, \
271			    int flags, void *data); }
272168	STD		{ int sunos_sys_ustat(int dev, \
273			    struct sunos_ustat *buf); }
274#ifdef SYSVSEM
275169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
276			    int a4, int a5); }
277#else
278169	UNIMPL		semsys
279#endif
280#ifdef SYSVMSG
281170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
282			    int a4, int a5, int a6); }
283#else
284170	UNIMPL		msgsys
285#endif
286#ifdef SYSVSHM
287171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
288			    int a4); }
289#else
290171	UNIMPL		shmsys
291#endif
292172	STD		{ int sunos_sys_auditsys(char *record); }
293173	UNIMPL		rfssys
294174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
295			    int nbytes); }
296175	NOARGS		{ int sys_setsid(void); }
297176	NOARGS		{ int sys_fchdir(int fd); }
298177	NOARGS		{ int sys_fchroot(int fd); }
299178	UNIMPL		vpixsys
300179	UNIMPL		aioread
301180	UNIMPL		aiowrite
302181	UNIMPL		aiowait
303182	UNIMPL		aiocancel
304183	STD		{ int sunos_sys_sigpending(int *mask); }
305184	UNIMPL
306185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
307186	NOARGS		{ long sys_pathconf(char *path, int name); }
308187	NOARGS		{ long sys_fpathconf(int fd, int name); }
309188	STD		{ int sunos_sys_sysconf(int name); }
310189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
311