syscalls.master revision 1.53
11.53Skleink	$NetBSD: syscalls.master,v 1.53 1999/07/12 21:55:20 kleink Exp $
21.20Scgd
31.17Scgd;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
41.1Sderaadt
51.18Sderaadt; NetBSD COMPAT_SUNOS system call name/number "master" file.
61.18Sderaadt; (See syscalls.conf to see what it is processed into.)
71.18Sderaadt;
81.18Sderaadt; Fields: number type [type-dependent ...]
91.1Sderaadt;	number	system call number, must be in order
101.18Sderaadt;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
111.18Sderaadt;		the compatibility options defined in syscalls.conf.
121.18Sderaadt;
131.1Sderaadt; types:
141.1Sderaadt;	STD	always included
151.18Sderaadt;	OBSOL	obsolete, not included in system
161.18Sderaadt;	UNIMPL	unimplemented, not included in system
171.18Sderaadt;	NODEF	included, but don't define the syscall number
181.18Sderaadt;	NOARGS	included, but don't define the syscall args structure
191.18Sderaadt;
201.18Sderaadt; The compat options are defined in the syscalls.conf file, and the
211.18Sderaadt; compat option name is prefixed to the syscall name.  Other than
221.18Sderaadt; that, they're like NODEF (for 'compat' options), or STD (for
231.18Sderaadt; 'libcompat' options).
241.18Sderaadt;
251.18Sderaadt; The type-dependent arguments are as follows:
261.18Sderaadt; For STD, NODEF, NOARGS, and compat syscalls:
271.18Sderaadt;	{ pseudo-proto } [alias]
281.18Sderaadt; For other syscalls:
291.18Sderaadt;	[comment]
301.18Sderaadt;
311.18Sderaadt; #ifdef's, etc. may be included, and are copied to the output files.
321.45Sthorpej; #include's are copied to the syscall names and switch definition files only.
331.46Sthorpej
341.46Sthorpej#include "opt_nfsserver.h"
351.48Stron#include "opt_sysv.h"
361.45Sthorpej
371.45Sthorpej#include "fs_nfs.h"
381.1Sderaadt
391.18Sderaadt#include <sys/param.h>
401.18Sderaadt#include <sys/systm.h>
411.18Sderaadt#include <sys/signal.h>
421.18Sderaadt#include <sys/mount.h>
431.37Smycroft#include <sys/poll.h>
441.18Sderaadt#include <sys/syscallargs.h>
451.37Smycroft
461.18Sderaadt#include <compat/sunos/sunos.h>
471.19Sderaadt#include <compat/sunos/sunos_syscallargs.h>
481.1Sderaadt
491.32Smycroft0	NOARGS		{ int sys_nosys(void); } syscall
501.32Smycroft1	NOARGS		{ int sys_exit(int rval); }
511.32Smycroft2	NOARGS		{ int sys_fork(void); }
521.32Smycroft3	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
531.32Smycroft4	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
541.51Schristos5	STD		{ int sunos_sys_open(const char *path, int flags, \
551.51Schristos			    int mode); }
561.32Smycroft6	NOARGS		{ int sys_close(int fd); }
571.32Smycroft7	STD		{ int sunos_sys_wait4(int pid, int *status, \
581.32Smycroft			    int options, struct rusage *rusage); }
591.51Schristos8	STD		{ int sunos_sys_creat(const char *path, int mode); }
601.32Smycroft9	NOARGS		{ int sys_link(char *path, char *link); }
611.32Smycroft10	NOARGS		{ int sys_unlink(char *path); }
621.51Schristos11	STD		{ int sunos_sys_execv(const char *path, char **argp); }
631.32Smycroft12	NOARGS		{ int sys_chdir(char *path); }
641.18Sderaadt13	OBSOL		time
651.51Schristos14	STD		{ int sunos_sys_mknod(const char *path, int mode, \
661.51Schristos			    int dev); }
671.32Smycroft15	NOARGS		{ int sys_chmod(char *path, int mode); }
681.32Smycroft16	NOARGS		{ int sys_chown(char *path, int uid, int gid); }
691.32Smycroft17	NOARGS		{ int sys_obreak(char *nsize); } break
701.18Sderaadt18	OBSOL		stat
711.32Smycroft19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, int whence); }
721.32Smycroft20	NOARGS		{ pid_t sys_getpid(void); }
731.18Sderaadt21	OBSOL		sunos_old_mount
741.18Sderaadt22	UNIMPL		System V umount
751.32Smycroft23	NOARGS		{ int sys_setuid(uid_t uid); }
761.32Smycroft24	NOARGS		{ uid_t sys_getuid(void); }
771.36Schristos25	STD		{ int sunos_sys_stime(time_t *tp); }
781.32Smycroft26	STD		{ long sunos_sys_ptrace(int req, pid_t pid, \
791.32Smycroft			    caddr_t addr, int data, char *addr2); }
801.18Sderaadt27	UNIMPL		sunos_alarm
811.18Sderaadt28	UNIMPL		sunos_fstat
821.18Sderaadt29	UNIMPL		sunos_pause
831.18Sderaadt30	UNIMPL		sunos_utime
841.18Sderaadt31	UNIMPL		sunos_stty
851.18Sderaadt32	UNIMPL		sunos_gtty
861.51Schristos33	STD		{ int sunos_sys_access(const char *path, int flags); }
871.18Sderaadt34	UNIMPL		sunos_nice
881.18Sderaadt35	UNIMPL		sunos_ftime
891.32Smycroft36	NOARGS		{ int sys_sync(void); }
901.32Smycroft37	NOARGS		{ int sys_kill(int pid, int signum); }
911.51Schristos38	STD		{ int sunos_sys_stat(const char *path, \
921.51Schristos			    struct stat43 *ub); }
931.18Sderaadt39	UNIMPL		sunos_setpgrp
941.51Schristos40	STD		{ int sunos_sys_lstat(const char *path, \
951.51Schristos			    struct stat43 *ub); }
961.32Smycroft41	NOARGS		{ int sys_dup(u_int fd); }
971.32Smycroft42	NOARGS		{ int sys_pipe(void); }
981.18Sderaadt43	UNIMPL		sunos_times
991.32Smycroft44	NOARGS		{ int sys_profil(caddr_t samples, u_int size, \
1001.18Sderaadt			    u_int offset, u_int scale); }
1011.18Sderaadt45	UNIMPL		
1021.32Smycroft46	NOARGS		{ int sys_setgid(uid_t gid); }
1031.32Smycroft47	NOARGS		{ gid_t sys_getgid(void); }
1041.18Sderaadt48	UNIMPL		sunos_ssig
1051.18Sderaadt49	UNIMPL		reserved for USG
1061.18Sderaadt50	UNIMPL		reserved for USG
1071.32Smycroft51	NOARGS		{ int sys_acct(char *path); }
1081.18Sderaadt52	UNIMPL		
1091.44Schristos53	STD		{ int sunos_sys_mctl(void *addr, int len, int func, \
1101.18Sderaadt			    void *arg); }
1111.32Smycroft54	STD		{ int sunos_sys_ioctl(int fd, u_long com, \
1121.32Smycroft			    caddr_t data); }
1131.32Smycroft55	STD		{ int sunos_sys_reboot(int howto, char *bootstr); }
1141.18Sderaadt56	OBSOL		sunos_owait3
1151.32Smycroft57	NOARGS		{ int sys_symlink(char *path, char *link); }
1161.32Smycroft58	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
1171.51Schristos59	STD		{ int sunos_sys_execve(const char *path, char **argp, \
1181.32Smycroft			    char **envp); }
1191.32Smycroft60	NOARGS		{ int sys_umask(int newmask); }
1201.32Smycroft61	NOARGS		{ int sys_chroot(char *path); }
1211.43Schristos62	NOARGS		{ int compat_43_sys_fstat(int fd, struct stat43 *sb); }
1221.18Sderaadt63	UNIMPL		
1231.32Smycroft64	NOARGS		{ int compat_43_sys_getpagesize(void); }
1241.32Smycroft65	STD		{ int sunos_sys_omsync(caddr_t addr, size_t len, \
1251.32Smycroft			    int flags); }
1261.32Smycroft66	NOARGS		{ int sys_vfork(void); }
1271.18Sderaadt67	OBSOL		vread
1281.18Sderaadt68	OBSOL		vwrite
1291.53Skleink69	NOARGS		{ int sys_sbrk(intptr_t incr); }
1301.32Smycroft70	NOARGS		{ int sys_sstk(int incr); }
1311.44Schristos71	STD		{ void *sunos_sys_mmap(void *addr, size_t len, \
1321.32Smycroft			    int prot, int flags, int fd, long pos); }
1331.32Smycroft72	NOARGS		{ int sys_ovadvise(int anom); } vadvise
1341.44Schristos73	NOARGS		{ int sys_munmap(void *addr, size_t len); }
1351.44Schristos74	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
1361.32Smycroft			    int prot); }
1371.44Schristos75	NOARGS		{ int sys_madvise(void *addr, size_t len, \
1381.32Smycroft			    int behav); }
1391.32Smycroft76	STD		{ int sunos_sys_vhangup(void); }
1401.18Sderaadt77	UNIMPL		vlimit
1411.44Schristos78	NOARGS		{ int sys_mincore(void *addr, size_t len, \
1421.32Smycroft			    char *vec); }
1431.32Smycroft79	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
1441.32Smycroft80	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
1451.32Smycroft81	NOARGS		{ int sys_getpgrp(void); }
1461.32Smycroft82	STD		{ int sunos_sys_setpgrp(int pid, int pgid); }
1471.32Smycroft83	NOARGS		{ int sys_setitimer(u_int which, \
1481.32Smycroft			    struct itimerval *itv, struct itimerval *oitv); }
1491.32Smycroft84	UNIMPL		{ int sunos_sys_wait(void); }
1501.41Sthorpej85	NOARGS		{ int compat_12_sys_swapon(char *name); }
1511.32Smycroft86	NOARGS		{ int sys_getitimer(u_int which, \
1521.32Smycroft			    struct itimerval *itv); }
1531.32Smycroft87	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
1541.32Smycroft			    u_int len); }
1551.32Smycroft88	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
1561.32Smycroft			    u_int len); }
1571.32Smycroft89	NOARGS		{ int compat_43_sys_getdtablesize(void); }
1581.32Smycroft90	NOARGS		{ int sys_dup2(u_int from, u_int to); }
1591.18Sderaadt91	UNIMPL		getdopt
1601.33Spk92	STD		{ int sunos_sys_fcntl(int fd, int cmd, void *arg); }
1611.32Smycroft93	NOARGS		{ int sys_select(u_int nd, fd_set *in, fd_set *ou, \
1621.18Sderaadt			    fd_set *ex, struct timeval *tv); }
1631.18Sderaadt94	UNIMPL		setdopt
1641.32Smycroft95	NOARGS		{ int sys_fsync(int fd); }
1651.32Smycroft96	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
1661.32Smycroft97	NOARGS		{ int sys_socket(int domain, int type, int protocol); }
1671.32Smycroft98	NOARGS		{ int sys_connect(int s, caddr_t name, int namelen); }
1681.32Smycroft99	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
1691.32Smycroft			    int *anamelen); }
1701.32Smycroft100	NOARGS		{ int sys_getpriority(int which, int who); }
1711.32Smycroft101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
1721.32Smycroft			    int flags); }
1731.32Smycroft102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
1741.32Smycroft			    int flags); }
1751.18Sderaadt103	UNIMPL		old socketaddr
1761.32Smycroft104	NOARGS		{ int sys_bind(int s, caddr_t name, int namelen); }
1771.32Smycroft105	STD		{ int sunos_sys_setsockopt(int s, int level, int name, \
1781.18Sderaadt			    caddr_t val, int valsize); }
1791.32Smycroft106	NOARGS		{ int sys_listen(int s, int backlog); }
1801.18Sderaadt107	UNIMPL		vtimes
1811.32Smycroft108	STD		{ int sunos_sys_sigvec(int signum, struct sigvec *nsv, \
1821.18Sderaadt			    struct sigvec *osv); }
1831.32Smycroft109	NOARGS		{ int compat_43_sys_sigblock(int mask); }
1841.32Smycroft110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); }
1851.47Spk111	STD		{ int sunos_sys_sigsuspend(int mask); }
1861.32Smycroft112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
1871.18Sderaadt			    struct sigstack *oss); }
1881.32Smycroft113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
1891.32Smycroft			    struct omsghdr *msg, int flags); }
1901.32Smycroft114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
1911.32Smycroft			    int flags); }
1921.18Sderaadt115	OBSOL		vtrace
1931.32Smycroft116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
1941.18Sderaadt			    struct timezone *tzp); }
1951.32Smycroft117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
1961.32Smycroft118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
1971.18Sderaadt			    caddr_t val, int *avalsize); }
1981.18Sderaadt119	UNIMPL		
1991.32Smycroft120	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
2001.32Smycroft			    u_int iovcnt); }
2011.32Smycroft121	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
2021.18Sderaadt			    u_int iovcnt); }
2031.32Smycroft122	NOARGS		{ int sys_settimeofday(struct timeval *tv, \
2041.18Sderaadt			    struct timezone *tzp); }
2051.32Smycroft123	NOARGS		{ int sys_fchown(int fd, int uid, int gid); }
2061.32Smycroft124	NOARGS		{ int sys_fchmod(int fd, int mode); }
2071.32Smycroft125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
2081.32Smycroft			    size_t len, int flags, caddr_t from, \
2091.32Smycroft			    int *fromlenaddr); }
2101.34Smycroft126	NOARGS		{ int sys_setreuid(int ruid, int euid); }
2111.34Smycroft127	NOARGS		{ int sys_setregid(int rgid, int egid); }
2121.32Smycroft128	NOARGS		{ int sys_rename(char *from, char *to); }
2131.32Smycroft129	NOARGS		{ int compat_43_sys_truncate(char *path, long length); }
2141.32Smycroft130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
2151.32Smycroft131	NOARGS		{ int sys_flock(int fd, int how); }
2161.18Sderaadt132	UNIMPL		
2171.32Smycroft133	NOARGS		{ int sys_sendto(int s, caddr_t buf, size_t len, \
2181.18Sderaadt			    int flags, caddr_t to, int tolen); }
2191.32Smycroft134	NOARGS		{ int sys_shutdown(int s, int how); }
2201.32Smycroft135	NOARGS		{ int sys_socketpair(int domain, int type, \
2211.32Smycroft			    int protocol, int *rsv); }
2221.32Smycroft136	NOARGS		{ int sys_mkdir(char *path, int mode); }
2231.32Smycroft137	NOARGS		{ int sys_rmdir(char *path); }
2241.32Smycroft138	NOARGS		{ int sys_utimes(char *path, struct timeval *tptr); }
2251.32Smycroft139	STD		{ int sunos_sys_sigreturn(struct sigcontext *sigcntxp); }
2261.32Smycroft140	NOARGS		{ int sys_adjtime(struct timeval *delta, \
2271.18Sderaadt			    struct timeval *olddelta); }
2281.32Smycroft141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t asa, \
2291.32Smycroft			    int *alen); }
2301.32Smycroft142	NOARGS		{ int compat_43_sys_gethostid(void); }
2311.18Sderaadt143	UNIMPL		old sethostid
2321.32Smycroft144	STD		{ int sunos_sys_getrlimit(u_int which, \
2331.32Smycroft			    struct orlimit *rlp); }
2341.32Smycroft145	STD		{ int sunos_sys_setrlimit(u_int which, \
2351.32Smycroft			    struct orlimit *rlp); }
2361.32Smycroft146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); }
2371.18Sderaadt147	UNIMPL		
2381.18Sderaadt148	UNIMPL		
2391.18Sderaadt149	UNIMPL		
2401.32Smycroft150	NOARGS		{ int compat_43_sys_getsockname(int fdes, caddr_t asa, \
2411.32Smycroft			    int *alen); }
2421.18Sderaadt151	UNIMPL		getmsg
2431.18Sderaadt152	UNIMPL		putmsg
2441.38Smycroft153	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
2451.37Smycroft			    int timeout); }
2461.18Sderaadt154	UNIMPL		
2471.9Sderaadt#ifdef NFSSERVER
2481.32Smycroft155	STD		{ int sunos_sys_nfssvc(int fd); }
2491.9Sderaadt#else
2501.18Sderaadt155	UNIMPL		
2511.9Sderaadt#endif
2521.42Sfvdl156	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
2531.32Smycroft			    u_int count, long *basep); }
2541.51Schristos157	STD		{ int sunos_sys_statfs(const char *path, \
2551.32Smycroft			    struct sunos_statfs *buf); }
2561.32Smycroft158	STD		{ int sunos_sys_fstatfs(int fd, \
2571.32Smycroft			    struct sunos_statfs *buf); }
2581.32Smycroft159	STD		{ int sunos_sys_unmount(char *path); }
2591.39Sthorpej#ifdef NFS
2601.18Sderaadt160	NOARGS		{ int async_daemon(void); }
2611.32Smycroft161	NOARGS		{ int sys_getfh(char *fname, fhandle_t *fhp); }
2621.9Sderaadt#else
2631.18Sderaadt160	UNIMPL		
2641.18Sderaadt161	UNIMPL		
2651.9Sderaadt#endif
2661.32Smycroft162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
2671.32Smycroft			    int len); }
2681.32Smycroft163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
2691.32Smycroft			    int len); }
2701.18Sderaadt164	UNIMPL		rtschedule
2711.32Smycroft165	STD		{ int sunos_sys_quotactl(int cmd, char *special, \
2721.32Smycroft			    int uid, caddr_t addr); }
2731.32Smycroft166	STD		{ int sunos_sys_exportfs(char *path, char *ex); }
2741.32Smycroft167	STD		{ int sunos_sys_mount(char *type, char *dir, \
2751.32Smycroft			    int flags, caddr_t data); }
2761.32Smycroft168	STD		{ int sunos_sys_ustat(int dev, \
2771.32Smycroft			    struct sunos_ustat *buf); }
2781.6Sderaadt#ifdef SYSVSEM
2791.32Smycroft169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
2801.32Smycroft			    int a4, int a5); }
2811.6Sderaadt#else
2821.32Smycroft169	UNIMPL		semsys
2831.6Sderaadt#endif
2841.6Sderaadt#ifdef SYSVMSG
2851.32Smycroft170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
2861.32Smycroft			    int a4, int a5, int a6); }
2871.6Sderaadt#else
2881.32Smycroft170	UNIMPL		msgsys
2891.6Sderaadt#endif
2901.1Sderaadt#ifdef SYSVSHM
2911.32Smycroft171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
2921.32Smycroft			    int a4); }
2931.1Sderaadt#else
2941.32Smycroft171	UNIMPL		shmsys
2951.1Sderaadt#endif
2961.32Smycroft172	STD		{ int sunos_sys_auditsys(char *record); }
2971.18Sderaadt173	UNIMPL		rfssys
2981.32Smycroft174	STD		{ int sunos_sys_getdents(int fd, char *buf, \
2991.32Smycroft			    int nbytes); }
3001.32Smycroft175	NOARGS		{ int sys_setsid(void); }
3011.32Smycroft176	NOARGS		{ int sys_fchdir(int fd); }
3021.52Ssommerfe177	NOARGS		{ int sys_fchroot(int fd); }
3031.18Sderaadt178	UNIMPL		vpixsys
3041.18Sderaadt179	UNIMPL		aioread
3051.18Sderaadt180	UNIMPL		aiowrite
3061.18Sderaadt181	UNIMPL		aiowait
3071.18Sderaadt182	UNIMPL		aiocancel
3081.32Smycroft183	STD		{ int sunos_sys_sigpending(int *mask); }
3091.18Sderaadt184	UNIMPL		
3101.32Smycroft185	NOARGS		{ int sys_setpgid(int pid, int pgid); }
3111.32Smycroft186	NOARGS		{ long sys_pathconf(char *path, int name); }
3121.32Smycroft187	NOARGS		{ long sys_fpathconf(int fd, int name); }
3131.32Smycroft188	STD		{ int sunos_sys_sysconf(int name); }
3141.32Smycroft189	STD		{ int sunos_sys_uname(struct sunos_utsname *name); }
315