xref: /netbsd-src/sys/compat/sunos/syscalls.master (revision 50728e7823a76d5bd1a7bfa3a4eac400269b1339)
1	$NetBSD: syscalls.master,v 1.71 2009/01/11 02:45:49 christos 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 rusage *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 sys_setitimer(u_int which, \
150			    struct itimerval *itv, struct itimerval *oitv); }
15184	UNIMPL		{ int sunos_sys_wait(void); }
15285	NOARGS		{ int compat_12_sys_swapon(char *name); }
15386	NOARGS		{ int sys_getitimer(u_int which, \
154			    struct itimerval *itv); }
15587	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
156			    u_int len); }
15788	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
158			    u_int len); }
15989	NOARGS		{ int compat_43_sys_getdtablesize(void); }
16090	NOARGS		{ int sys_dup2(u_int from, u_int to); }
16191	UNIMPL		getdopt
16292	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
16393	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
164			    fd_set *ex, struct timeval *tv); }
16594	UNIMPL		setdopt
16695	NOARGS		{ int sys_fsync(int fd); }
16796	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
16897	STD		{ int sunos_sys_socket(int domain, int type, int protocol); }
16998	NOARGS		{ int sys_connect(int s, void *name, int namelen); }
17099	NOARGS		{ int compat_43_sys_accept(int s, void *name, \
171			    int *anamelen); }
172100	NOARGS		{ int sys_getpriority(int which, int who); }
173101	NOARGS		{ int compat_43_sys_send(int s, void *buf, int len, \
174			    int flags); }
175102	NOARGS		{ int compat_43_sys_recv(int s, void *buf, int len, \
176			    int flags); }
177103	UNIMPL		old socketaddr
178104	NOARGS		{ int sys_bind(int s, void *name, int namelen); }
179105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
180			    void *val, int valsize); }
181106	NOARGS		{ int sys_listen(int s, int backlog); }
182107	UNIMPL		vtimes
183108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
184			    struct sigvec *osv); }
185109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
186110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
187111	STD		{ int sunos_sys_sigsuspend(int mask); }
188112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
189			    struct sigstack *oss); }
190113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
191			    struct omsghdr *msg, int flags); }
192114	NOARGS		{ int compat_43_sys_sendmsg(int s, void *msg, \
193			    int flags); }
194115	OBSOL		vtrace
195116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
196			    struct timezone *tzp); }
197117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
198118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
199			    void *val, int *avalsize); }
200119	UNIMPL
201120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
202			    u_int iovcnt); }
203121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
204			    u_int iovcnt); }
205122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
206			    struct timezone *tzp); }
207123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
208124	NOARGS		{ int sys_fchmod(int fd, int mode); }
209125	NOARGS		{ int compat_43_sys_recvfrom(int s, void *buf, \
210			    size_t len, int flags, void *from, \
211			    int *fromlenaddr); }
212126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
213127	NOARGS		{ int sys_setregid(int rgid, int egid); }
214128	NOARGS		{ int sys_rename(char *from, char *to); }
215129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
216130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
217131	NOARGS		{ int sys_flock(int fd, int how); }
218132	UNIMPL
219133	NOARGS		{ int sys_sendto(int s, void *buf, size_t len, \
220			    int flags, void *to, int tolen); }
221134	NOARGS		{ int sys_shutdown(int s, int how); }
222135	STD		{ int sunos_sys_socketpair(int domain, int type, \
223			    int protocol, int *rsv); }
224136	NOARGS		{ int sys_mkdir(char *path, int mode); }
225137	NOARGS		{ int sys_rmdir(char *path); }
226138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
227139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
228140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
229			    struct timeval *olddelta); }
230141	NOARGS		{ int compat_43_sys_getpeername(int fdes, void *asa, \
231			    int *alen); }
232142	NOARGS		{ int compat_43_sys_gethostid(void); }
233143	UNIMPL		old sethostid
234144	STD		{ int sunos_sys_getrlimit(u_int which, \
235			    struct orlimit *rlp); }
236145	STD		{ int sunos_sys_setrlimit(u_int which, \
237			    struct orlimit *rlp); }
238146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); }
239147	UNIMPL
240148	UNIMPL
241149	UNIMPL
242150	NOARGS		{ int compat_43_sys_getsockname(int fdes, void *asa, \
243			    int *alen); }
244151	UNIMPL		getmsg
245152	UNIMPL		putmsg
246153	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
247			    int timeout); }
248154	UNIMPL
249155	STD		{ int sunos_sys_nfssvc(int fd); }
250156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
251			    u_int count, long *basep); }
252157	STD		{ int sunos_sys_statfs(const char *path, \
253			    struct sunos_statfs *buf); }
254158	STD		{ int sunos_sys_fstatfs(int fd, \
255			    struct sunos_statfs *buf); }
256159	STD		{ int sunos_sys_unmount(char *path); }
257160	NOARGS		{ int async_daemon(void); }
258161	NOARGS		{ int compat_30_sys_getfh(char *fname, fhandle_t *fhp); }
259162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
260			    int len); }
261163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
262			    int len); }
263164	UNIMPL		rtschedule
264165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
265			    int uid, void *addr); }
266166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
267167	STD		{ int sunos_sys_mount(char *type, char *dir, \
268			    int flags, void *data); }
269168	STD		{ int sunos_sys_ustat(int dev, \
270			    struct sunos_ustat *buf); }
271#ifdef SYSVSEM
272169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
273			    int a4, int a5); }
274#else
275169	UNIMPL		semsys
276#endif
277#ifdef SYSVMSG
278170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
279			    int a4, int a5, int a6); }
280#else
281170	UNIMPL		msgsys
282#endif
283#ifdef SYSVSHM
284171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
285			    int a4); }
286#else
287171	UNIMPL		shmsys
288#endif
289172	STD		{ int sunos_sys_auditsys(char *record); }
290173	UNIMPL		rfssys
291174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
292			    int nbytes); }
293175	NOARGS		{ int sys_setsid(void); }
294176	NOARGS		{ int sys_fchdir(int fd); }
295177	NOARGS		{ int sys_fchroot(int fd); }
296178	UNIMPL		vpixsys
297179	UNIMPL		aioread
298180	UNIMPL		aiowrite
299181	UNIMPL		aiowait
300182	UNIMPL		aiocancel
301183	STD		{ int sunos_sys_sigpending(int *mask); }
302184	UNIMPL
303185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
304186	NOARGS		{ long sys_pathconf(char *path, int name); }
305187	NOARGS		{ long sys_fpathconf(int fd, int name); }
306188	STD		{ int sunos_sys_sysconf(int name); }
307189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
308