xref: /netbsd-src/sys/compat/sunos/syscalls.master (revision e5548b402ae4c44fb816de42c7bba9581ce23ef5)
1	$NetBSD: syscalls.master,v 1.62 2005/12/11 12:20:23 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_nfsserver.h"
36#include "opt_sysv.h"
37
38#include "fs_nfs.h"
39#endif
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/signal.h>
44#include <sys/mount.h>
45#include <sys/poll.h>
46#include <sys/sa.h>
47#include <sys/syscallargs.h>
48
49#include <compat/sunos/sunos.h>
50#include <compat/sunos/sunos_syscallargs.h>
51
52%%
53
540	NOARGS		{ int sys_nosys(void); } syscall
551	NOARGS		{ int sys_exit(int rval); }
562	NOARGS		{ int sys_fork(void); }
573	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
584	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
595	STD		{ int sunos_sys_open(const char *path, int flags, \
60			    int mode); }
616	NOARGS		{ int sys_close(int fd); }
627	STD		{ int sunos_sys_wait4(int pid, int *status, \
63			    int options, struct rusage *rusage); }
648	STD		{ int sunos_sys_creat(const char *path, int mode); }
659	NOARGS		{ int sys_link(char *path, char *link); }
6610	NOARGS		{ int sys_unlink(char *path); }
6711	STD		{ int sunos_sys_execv(const char *path, char **argp); }
6812	NOARGS		{ int sys_chdir(char *path); }
6913	OBSOL		old_time
7014	STD		{ int sunos_sys_mknod(const char *path, int mode, \
71			    int dev); }
7215	NOARGS		{ int sys_chmod(char *path, int mode); }
7316	NOARGS		{ int sys_chown(char *path, int uid, int gid); }
7417	NOARGS		{ int sys_obreak(char *nsize); } break
7518	OBSOL		old_stat
7619	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, int whence); }
7720	NOARGS		{ pid_t sys_getpid_with_ppid(void); }
7821	OBSOL		sunos_old_mount
7922	UNIMPL		System V umount
8023	NOARGS		{ int sys_setuid(uid_t uid); }
8124	NOARGS		{ uid_t sys_getuid_with_euid(void); }
8225	STD		{ int sunos_sys_stime(time_t *tp); }
8326	STD		{ long sunos_sys_ptrace(int req, pid_t pid, \
84			    caddr_t addr, int data, char *addr2); }
8527	UNIMPL		old_sunos_alarm
8628	UNIMPL		old_sunos_fstat
8729	UNIMPL		old_sunos_pause
8830	UNIMPL		old_sunos_utime
8931	UNIMPL		old_sunos_stty
9032	UNIMPL		old_sunos_gtty
9133	STD		{ int sunos_sys_access(const char *path, int flags); }
9234	UNIMPL		old_sunos_nice
9335	UNIMPL		old_sunos_ftime
9436	NOARGS		{ int sys_sync(void); }
9537	NOARGS		{ int sys_kill(int pid, int signum); }
9638	STD		{ int sunos_sys_stat(const char *path, \
97			    struct stat43 *ub); }
9839	UNIMPL		sunos_setpgrp
9940	STD		{ int sunos_sys_lstat(const char *path, \
100			    struct stat43 *ub); }
10141	NOARGS		{ int sys_dup(u_int fd); }
10242	NOARGS		{ int sys_pipe(void); }
10343	UNIMPL		sunos_times
10444	NOARGS		{ int sys_profil(caddr_t samples, u_int size, \
105			    u_int offset, u_int scale); }
10645	UNIMPL
10746	NOARGS		{ int sys_setgid(uid_t gid); }
10847	NOARGS		{ gid_t sys_getgid_with_egid(void); }
10948	UNIMPL		sunos_ssig
11049	UNIMPL		reserved for USG
11150	UNIMPL		reserved for USG
11251	NOARGS		{ int sys_acct(char *path); }
11352	UNIMPL
11453	STD		{ int sunos_sys_mctl(void *addr, int len, int func, \
115			    void *arg); }
11654	STD		{ int sunos_sys_ioctl(int fd, u_long com, \
117			    caddr_t data); }
11855	STD		{ int sunos_sys_reboot(int howto, char *bootstr); }
11956	OBSOL		sunos_owait3
12057	NOARGS		{ int sys_symlink(char *path, char *link); }
12158	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
12259	STD		{ int sunos_sys_execve(const char *path, char **argp, \
123			    char **envp); }
12460	NOARGS		{ int sys_umask(int newmask); }
12561	NOARGS		{ int sys_chroot(char *path); }
12662	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); }
12763	UNIMPL
12864	NOARGS		{ int compat_43_sys_getpagesize(void); }
12965	STD		{ int sunos_sys_omsync(caddr_t addr, size_t len, \
130			    int flags); }
13166	NOARGS		{ int sys_vfork(void); }
13267	OBSOL		vread
13368	OBSOL		vwrite
13469	NOARGS		{ int sys_sbrk(intptr_t incr); }
13570	NOARGS		{ int sys_sstk(int incr); }
13671	STD		{ void *sunos_sys_mmap(void *addr, size_t len, \
137			    int prot, int flags, int fd, long pos); }
13872	NOARGS		{ int sys_ovadvise(int anom); } vadvise
13973	NOARGS		{ int sys_munmap(void *addr, size_t len); }
14074	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
141			    int prot); }
14275	NOARGS		{ int sys_madvise(void *addr, size_t len, \
143			    int behav); }
14476	STD		{ int sunos_sys_vhangup(void); }
14577	UNIMPL		vlimit
14678	NOARGS		{ int sys_mincore(void *addr, size_t len, \
147			    char *vec); }
14879	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
14980	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
15081	NOARGS		{ int sys_getpgrp(void); }
15182	STD		{ int sunos_sys_setpgrp(int pid, int pgid); }
15283	NOARGS		{ int sys_setitimer(u_int which, \
153			    struct itimerval *itv, struct itimerval *oitv); }
15484	UNIMPL		{ int sunos_sys_wait(void); }
15585	NOARGS		{ int compat_12_sys_swapon(char *name); }
15686	NOARGS		{ int sys_getitimer(u_int which, \
157			    struct itimerval *itv); }
15887	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
159			    u_int len); }
16088	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
161			    u_int len); }
16289	NOARGS		{ int compat_43_sys_getdtablesize(void); }
16390	NOARGS		{ int sys_dup2(u_int from, u_int to); }
16491	UNIMPL		getdopt
16592	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
16693	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
167			    fd_set *ex, struct timeval *tv); }
16894	UNIMPL		setdopt
16995	NOARGS		{ int sys_fsync(int fd); }
17096	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
17197	STD		{ int sunos_sys_socket(int domain, int type, int protocol); }
17298	NOARGS		{ int sys_connect(int s, caddr_t name, int namelen); }
17399	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
174			    int *anamelen); }
175100	NOARGS		{ int sys_getpriority(int which, int who); }
176101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
177			    int flags); }
178102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
179			    int flags); }
180103	UNIMPL		old socketaddr
181104	NOARGS		{ int sys_bind(int s, caddr_t name, int namelen); }
182105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
183			    caddr_t val, int valsize); }
184106	NOARGS		{ int sys_listen(int s, int backlog); }
185107	UNIMPL		vtimes
186108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
187			    struct sigvec *osv); }
188109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
189110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
190111	STD		{ int sunos_sys_sigsuspend(int mask); }
191112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
192			    struct sigstack *oss); }
193113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
194			    struct omsghdr *msg, int flags); }
195114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
196			    int flags); }
197115	OBSOL		vtrace
198116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
199			    struct timezone *tzp); }
200117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
201118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
202			    caddr_t val, int *avalsize); }
203119	UNIMPL
204120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
205			    u_int iovcnt); }
206121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
207			    u_int iovcnt); }
208122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
209			    struct timezone *tzp); }
210123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
211124	NOARGS		{ int sys_fchmod(int fd, int mode); }
212125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
213			    size_t len, int flags, caddr_t from, \
214			    int *fromlenaddr); }
215126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
216127	NOARGS		{ int sys_setregid(int rgid, int egid); }
217128	NOARGS		{ int sys_rename(char *from, char *to); }
218129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
219130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
220131	NOARGS		{ int sys_flock(int fd, int how); }
221132	UNIMPL
222133	NOARGS		{ int sys_sendto(int s, caddr_t buf, size_t len, \
223			    int flags, caddr_t to, int tolen); }
224134	NOARGS		{ int sys_shutdown(int s, int how); }
225135	STD		{ int sunos_sys_socketpair(int domain, int type, \
226			    int protocol, int *rsv); }
227136	NOARGS		{ int sys_mkdir(char *path, int mode); }
228137	NOARGS		{ int sys_rmdir(char *path); }
229138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
230139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
231140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
232			    struct timeval *olddelta); }
233141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t 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, caddr_t 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
252#ifdef NFSSERVER
253155	STD		{ int sunos_sys_nfssvc(int fd); }
254#else
255155	UNIMPL
256#endif
257156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
258			    u_int count, long *basep); }
259157	STD		{ int sunos_sys_statfs(const char *path, \
260			    struct sunos_statfs *buf); }
261158	STD		{ int sunos_sys_fstatfs(int fd, \
262			    struct sunos_statfs *buf); }
263159	STD		{ int sunos_sys_unmount(char *path); }
264#ifdef NFS
265160	NOARGS		{ int async_daemon(void); }
266161	NOARGS		{ int sys_getfh(char *fname, fhandle_t *fhp); }
267#else
268160	UNIMPL
269161	UNIMPL
270#endif
271162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
272			    int len); }
273163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
274			    int len); }
275164	UNIMPL		rtschedule
276165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
277			    int uid, caddr_t addr); }
278166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
279167	STD		{ int sunos_sys_mount(char *type, char *dir, \
280			    int flags, caddr_t data); }
281168	STD		{ int sunos_sys_ustat(int dev, \
282			    struct sunos_ustat *buf); }
283#ifdef SYSVSEM
284169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
285			    int a4, int a5); }
286#else
287169	UNIMPL		semsys
288#endif
289#ifdef SYSVMSG
290170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
291			    int a4, int a5, int a6); }
292#else
293170	UNIMPL		msgsys
294#endif
295#ifdef SYSVSHM
296171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
297			    int a4); }
298#else
299171	UNIMPL		shmsys
300#endif
301172	STD		{ int sunos_sys_auditsys(char *record); }
302173	UNIMPL		rfssys
303174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
304			    int nbytes); }
305175	NOARGS		{ int sys_setsid(void); }
306176	NOARGS		{ int sys_fchdir(int fd); }
307177	NOARGS		{ int sys_fchroot(int fd); }
308178	UNIMPL		vpixsys
309179	UNIMPL		aioread
310180	UNIMPL		aiowrite
311181	UNIMPL		aiowait
312182	UNIMPL		aiocancel
313183	STD		{ int sunos_sys_sigpending(int *mask); }
314184	UNIMPL
315185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
316186	NOARGS		{ long sys_pathconf(char *path, int name); }
317187	NOARGS		{ long sys_fpathconf(int fd, int name); }
318188	STD		{ int sunos_sys_sysconf(int name); }
319189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
320