syscalls.master revision 1.64
1	$NetBSD: syscalls.master,v 1.64 2006/08/30 23:00:06 he 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); }
83#if defined(PTRACE) || !defined(_KERNEL)
8426	STD		{ long sunos_sys_ptrace(int req, pid_t pid, \
85			    caddr_t addr, int data, char *addr2); }
86#else
8726	EXCL		ptrace
88#endif
8927	UNIMPL		old_sunos_alarm
9028	UNIMPL		old_sunos_fstat
9129	UNIMPL		old_sunos_pause
9230	UNIMPL		old_sunos_utime
9331	UNIMPL		old_sunos_stty
9432	UNIMPL		old_sunos_gtty
9533	STD		{ int sunos_sys_access(const char *path, int flags); }
9634	UNIMPL		old_sunos_nice
9735	UNIMPL		old_sunos_ftime
9836	NOARGS		{ int sys_sync(void); }
9937	NOARGS		{ int sys_kill(int pid, int signum); }
10038	STD		{ int sunos_sys_stat(const char *path, \
101			    struct stat43 *ub); }
10239	UNIMPL		sunos_setpgrp
10340	STD		{ int sunos_sys_lstat(const char *path, \
104			    struct stat43 *ub); }
10541	NOARGS		{ int sys_dup(u_int fd); }
10642	NOARGS		{ int sys_pipe(void); }
10743	UNIMPL		sunos_times
10844	NOARGS		{ int sys_profil(caddr_t samples, u_int size, \
109			    u_int offset, u_int scale); }
11045	UNIMPL
11146	NOARGS		{ int sys_setgid(uid_t gid); }
11247	NOARGS		{ gid_t sys_getgid_with_egid(void); }
11348	UNIMPL		sunos_ssig
11449	UNIMPL		reserved for USG
11550	UNIMPL		reserved for USG
11651	NOARGS		{ int sys_acct(char *path); }
11752	UNIMPL
11853	STD		{ int sunos_sys_mctl(void *addr, int len, int func, \
119			    void *arg); }
12054	STD		{ int sunos_sys_ioctl(int fd, u_long com, \
121			    caddr_t data); }
12255	STD		{ int sunos_sys_reboot(int howto, char *bootstr); }
12356	OBSOL		sunos_owait3
12457	NOARGS		{ int sys_symlink(char *path, char *link); }
12558	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
12659	STD		{ int sunos_sys_execve(const char *path, char **argp, \
127			    char **envp); }
12860	NOARGS		{ int sys_umask(int newmask); }
12961	NOARGS		{ int sys_chroot(char *path); }
13062	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); }
13163	UNIMPL
13264	NOARGS		{ int compat_43_sys_getpagesize(void); }
13365	STD		{ int sunos_sys_omsync(caddr_t addr, size_t len, \
134			    int flags); }
13566	NOARGS		{ int sys_vfork(void); }
13667	OBSOL		vread
13768	OBSOL		vwrite
13869	NOARGS		{ int sys_sbrk(intptr_t incr); }
13970	NOARGS		{ int sys_sstk(int incr); }
14071	STD		{ void *sunos_sys_mmap(void *addr, size_t len, \
141			    int prot, int flags, int fd, long pos); }
14272	NOARGS		{ int sys_ovadvise(int anom); } vadvise
14373	NOARGS		{ int sys_munmap(void *addr, size_t len); }
14474	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
145			    int prot); }
14675	NOARGS		{ int sys_madvise(void *addr, size_t len, \
147			    int behav); }
14876	STD		{ int sunos_sys_vhangup(void); }
14977	UNIMPL		vlimit
15078	NOARGS		{ int sys_mincore(void *addr, size_t len, \
151			    char *vec); }
15279	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
15380	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
15481	NOARGS		{ int sys_getpgrp(void); }
15582	STD		{ int sunos_sys_setpgrp(int pid, int pgid); }
15683	NOARGS		{ int sys_setitimer(u_int which, \
157			    struct itimerval *itv, struct itimerval *oitv); }
15884	UNIMPL		{ int sunos_sys_wait(void); }
15985	NOARGS		{ int compat_12_sys_swapon(char *name); }
16086	NOARGS		{ int sys_getitimer(u_int which, \
161			    struct itimerval *itv); }
16287	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
163			    u_int len); }
16488	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
165			    u_int len); }
16689	NOARGS		{ int compat_43_sys_getdtablesize(void); }
16790	NOARGS		{ int sys_dup2(u_int from, u_int to); }
16891	UNIMPL		getdopt
16992	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
17093	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
171			    fd_set *ex, struct timeval *tv); }
17294	UNIMPL		setdopt
17395	NOARGS		{ int sys_fsync(int fd); }
17496	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
17597	STD		{ int sunos_sys_socket(int domain, int type, int protocol); }
17698	NOARGS		{ int sys_connect(int s, caddr_t name, int namelen); }
17799	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
178			    int *anamelen); }
179100	NOARGS		{ int sys_getpriority(int which, int who); }
180101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
181			    int flags); }
182102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
183			    int flags); }
184103	UNIMPL		old socketaddr
185104	NOARGS		{ int sys_bind(int s, caddr_t name, int namelen); }
186105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
187			    caddr_t val, int valsize); }
188106	NOARGS		{ int sys_listen(int s, int backlog); }
189107	UNIMPL		vtimes
190108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
191			    struct sigvec *osv); }
192109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
193110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
194111	STD		{ int sunos_sys_sigsuspend(int mask); }
195112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
196			    struct sigstack *oss); }
197113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
198			    struct omsghdr *msg, int flags); }
199114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
200			    int flags); }
201115	OBSOL		vtrace
202116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
203			    struct timezone *tzp); }
204117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
205118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
206			    caddr_t val, int *avalsize); }
207119	UNIMPL
208120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
209			    u_int iovcnt); }
210121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
211			    u_int iovcnt); }
212122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
213			    struct timezone *tzp); }
214123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
215124	NOARGS		{ int sys_fchmod(int fd, int mode); }
216125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
217			    size_t len, int flags, caddr_t from, \
218			    int *fromlenaddr); }
219126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
220127	NOARGS		{ int sys_setregid(int rgid, int egid); }
221128	NOARGS		{ int sys_rename(char *from, char *to); }
222129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
223130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
224131	NOARGS		{ int sys_flock(int fd, int how); }
225132	UNIMPL
226133	NOARGS		{ int sys_sendto(int s, caddr_t buf, size_t len, \
227			    int flags, caddr_t to, int tolen); }
228134	NOARGS		{ int sys_shutdown(int s, int how); }
229135	STD		{ int sunos_sys_socketpair(int domain, int type, \
230			    int protocol, int *rsv); }
231136	NOARGS		{ int sys_mkdir(char *path, int mode); }
232137	NOARGS		{ int sys_rmdir(char *path); }
233138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
234139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
235140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
236			    struct timeval *olddelta); }
237141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t asa, \
238			    int *alen); }
239142	NOARGS		{ int compat_43_sys_gethostid(void); }
240143	UNIMPL		old sethostid
241144	STD		{ int sunos_sys_getrlimit(u_int which, \
242			    struct orlimit *rlp); }
243145	STD		{ int sunos_sys_setrlimit(u_int which, \
244			    struct orlimit *rlp); }
245146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); }
246147	UNIMPL
247148	UNIMPL
248149	UNIMPL
249150	NOARGS		{ int compat_43_sys_getsockname(int fdes, caddr_t asa, \
250			    int *alen); }
251151	UNIMPL		getmsg
252152	UNIMPL		putmsg
253153	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
254			    int timeout); }
255154	UNIMPL
256#ifdef NFSSERVER
257155	STD		{ int sunos_sys_nfssvc(int fd); }
258#else
259155	UNIMPL
260#endif
261156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
262			    u_int count, long *basep); }
263157	STD		{ int sunos_sys_statfs(const char *path, \
264			    struct sunos_statfs *buf); }
265158	STD		{ int sunos_sys_fstatfs(int fd, \
266			    struct sunos_statfs *buf); }
267159	STD		{ int sunos_sys_unmount(char *path); }
268#ifdef NFS
269160	NOARGS		{ int async_daemon(void); }
270161	NOARGS		{ int compat_30_sys_getfh(char *fname, fhandle_t *fhp); }
271#else
272160	UNIMPL
273161	UNIMPL
274#endif
275162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
276			    int len); }
277163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
278			    int len); }
279164	UNIMPL		rtschedule
280165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
281			    int uid, caddr_t addr); }
282166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
283167	STD		{ int sunos_sys_mount(char *type, char *dir, \
284			    int flags, caddr_t data); }
285168	STD		{ int sunos_sys_ustat(int dev, \
286			    struct sunos_ustat *buf); }
287#ifdef SYSVSEM
288169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
289			    int a4, int a5); }
290#else
291169	UNIMPL		semsys
292#endif
293#ifdef SYSVMSG
294170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
295			    int a4, int a5, int a6); }
296#else
297170	UNIMPL		msgsys
298#endif
299#ifdef SYSVSHM
300171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
301			    int a4); }
302#else
303171	UNIMPL		shmsys
304#endif
305172	STD		{ int sunos_sys_auditsys(char *record); }
306173	UNIMPL		rfssys
307174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
308			    int nbytes); }
309175	NOARGS		{ int sys_setsid(void); }
310176	NOARGS		{ int sys_fchdir(int fd); }
311177	NOARGS		{ int sys_fchroot(int fd); }
312178	UNIMPL		vpixsys
313179	UNIMPL		aioread
314180	UNIMPL		aiowrite
315181	UNIMPL		aiowait
316182	UNIMPL		aiocancel
317183	STD		{ int sunos_sys_sigpending(int *mask); }
318184	UNIMPL
319185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
320186	NOARGS		{ long sys_pathconf(char *path, int name); }
321187	NOARGS		{ long sys_fpathconf(int fd, int name); }
322188	STD		{ int sunos_sys_sysconf(int name); }
323189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
324