syscalls.master revision 1.18
11.18Sderaadt	$NetBSD: syscalls.master,v 1.18 1994/10/25 23:03:33 deraadt Exp $
21.17Scgd;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
31.1Sderaadt
41.18Sderaadt; NetBSD COMPAT_SUNOS system call name/number "master" file.
51.18Sderaadt; (See syscalls.conf to see what it is processed into.)
61.18Sderaadt;
71.18Sderaadt; Fields: number type [type-dependent ...]
81.1Sderaadt;	number	system call number, must be in order
91.18Sderaadt;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
101.18Sderaadt;		the compatibility options defined in syscalls.conf.
111.18Sderaadt;
121.1Sderaadt; types:
131.1Sderaadt;	STD	always included
141.18Sderaadt;	OBSOL	obsolete, not included in system
151.18Sderaadt;	UNIMPL	unimplemented, not included in system
161.18Sderaadt;	NODEF	included, but don't define the syscall number
171.18Sderaadt;	NOARGS	included, but don't define the syscall args structure
181.18Sderaadt;
191.18Sderaadt; The compat options are defined in the syscalls.conf file, and the
201.18Sderaadt; compat option name is prefixed to the syscall name.  Other than
211.18Sderaadt; that, they're like NODEF (for 'compat' options), or STD (for
221.18Sderaadt; 'libcompat' options).
231.18Sderaadt;
241.18Sderaadt; The type-dependent arguments are as follows:
251.18Sderaadt; For STD, NODEF, NOARGS, and compat syscalls:
261.18Sderaadt;	{ pseudo-proto } [alias]
271.18Sderaadt; For other syscalls:
281.18Sderaadt;	[comment]
291.18Sderaadt;
301.18Sderaadt; #ifdef's, etc. may be included, and are copied to the output files.
311.18Sderaadt; #include's are copied to the syscall switch definition file only.
321.1Sderaadt
331.18Sderaadt#include <sys/param.h>
341.18Sderaadt#include <sys/systm.h>
351.18Sderaadt#include <sys/signal.h>
361.18Sderaadt#include <sys/mount.h>
371.18Sderaadt#include <sys/syscallargs.h>
381.18Sderaadt#include <compat/sunos/sunos.h>
391.18Sderaadt#include <compat/sunos/syscallargs.h>
401.1Sderaadt
411.18Sderaadt0	NOARGS		{ int nosys(void); } syscall
421.18Sderaadt1	NOARGS		{ int exit(int rval); }
431.18Sderaadt2	NOARGS		{ int fork(void); }
441.18Sderaadt3	NOARGS		{ int read(int fd, char *buf, u_int nbyte); }
451.18Sderaadt4	NOARGS		{ int write(int fd, char *buf, u_int nbyte); }
461.18Sderaadt5	STD		{ int sunos_open(char *path, int flags, int mode); }
471.18Sderaadt6	NOARGS		{ int close(int fd); }
481.18Sderaadt7	STD		{ int sunos_wait4(int pid, int *status, int options, \
491.18Sderaadt			  struct rusage *rusage); }
501.18Sderaadt8	STD		{ int sunos_creat(char *path, int mode); }
511.18Sderaadt9	NOARGS		{ int link(char *path, char *link); }
521.18Sderaadt10	NOARGS		{ int unlink(char *path); }
531.18Sderaadt11	STD		{ int sunos_execv(char *path, char **argp); }
541.18Sderaadt12	NOARGS		{ int chdir(char *path); }
551.18Sderaadt13	OBSOL		time
561.18Sderaadt14	STD		{ int sunos_mknod(char *path, int mode, int dev); }
571.18Sderaadt15	NOARGS		{ int chmod(char *path, int mode); }
581.18Sderaadt16	NOARGS		{ int chown(char *path, int uid, int gid); }
591.18Sderaadt17	NOARGS		{ int obreak(char *nsize); } break
601.18Sderaadt18	OBSOL		stat
611.18Sderaadt19	NOARGS		{ long compat_43_lseek(int fd, long offset, int whence); }
621.18Sderaadt20	NOARGS		{ pid_t getpid(void); }
631.18Sderaadt21	OBSOL		sunos_old_mount
641.18Sderaadt22	UNIMPL		System V umount
651.18Sderaadt23	NOARGS		{ int setuid(uid_t uid); }
661.18Sderaadt24	NOARGS		{ uid_t getuid(void); }
671.18Sderaadt25	UNIMPL		sunos_stime
681.18Sderaadt26	UNIMPL		sunos_ptrace
691.18Sderaadt27	UNIMPL		sunos_alarm
701.18Sderaadt28	UNIMPL		sunos_fstat
711.18Sderaadt29	UNIMPL		sunos_pause
721.18Sderaadt30	UNIMPL		sunos_utime
731.18Sderaadt31	UNIMPL		sunos_stty
741.18Sderaadt32	UNIMPL		sunos_gtty
751.18Sderaadt33	NOARGS		{ int access(char *path, int flags); }
761.18Sderaadt34	UNIMPL		sunos_nice
771.18Sderaadt35	UNIMPL		sunos_ftime
781.18Sderaadt36	NOARGS		{ int sync(void); }
791.18Sderaadt37	NOARGS		{ int kill(int pid, int signum); }
801.18Sderaadt38	NOARGS		{ int compat_43_stat(char *path, struct ostat *ub); }
811.18Sderaadt39	UNIMPL		sunos_setpgrp
821.18Sderaadt40	NOARGS		{ int compat_43_lstat(char *path, struct ostat *ub); }
831.18Sderaadt41	NOARGS		{ int dup(u_int fd); }
841.18Sderaadt42	NOARGS		{ int pipe(void); }
851.18Sderaadt43	UNIMPL		sunos_times
861.18Sderaadt44	NOARGS		{ int profil(caddr_t samples, u_int size, \
871.18Sderaadt			    u_int offset, u_int scale); }
881.18Sderaadt45	UNIMPL		
891.18Sderaadt46	UNIMPL		sunos_setgid
901.18Sderaadt47	NOARGS		{ gid_t getgid(void); }
911.18Sderaadt48	UNIMPL		sunos_ssig
921.18Sderaadt49	UNIMPL		reserved for USG
931.18Sderaadt50	UNIMPL		reserved for USG
941.18Sderaadt51	NOARGS		{ int acct(char *path); }
951.18Sderaadt52	UNIMPL		
961.18Sderaadt53	STD		{ int sunos_mctl(caddr_t addr, int len, int func, \
971.18Sderaadt			    void *arg); }
981.18Sderaadt54	STD		{ int sunos_ioctl(int fd, u_long com, caddr_t data); }
991.18Sderaadt55	NOARGS		{ int reboot(int opt); }
1001.18Sderaadt56	OBSOL		sunos_owait3
1011.18Sderaadt57	NOARGS		{ int symlink(char *path, char *link); }
1021.18Sderaadt58	NOARGS		{ int readlink(char *path, char *buf, int count); }
1031.18Sderaadt59	NOARGS		{ int execve(char *path, char **argp, char **envp); }
1041.18Sderaadt60	NOARGS		{ int umask(int newmask); }
1051.18Sderaadt61	NOARGS		{ int chroot(char *path); }
1061.18Sderaadt62	NOARGS		{ int compat_43_fstat(int fd, struct ostat *sb); }
1071.18Sderaadt63	UNIMPL		
1081.18Sderaadt64	NOARGS		{ int compat_43_getpagesize(void); }
1091.18Sderaadt65	STD		{ int sunos_omsync(caddr_t addr, int len, int flags); }
1101.18Sderaadt66	NOARGS		{ int vfork(void); }
1111.18Sderaadt67	OBSOL		vread
1121.18Sderaadt68	OBSOL		vwrite
1131.18Sderaadt69	NOARGS		{ int sbrk(int incr); }
1141.18Sderaadt70	NOARGS		{ int sstk(int incr); }
1151.18Sderaadt71	STD		{ int sunos_mmap(caddr_t addr, int len, int prot, \
1161.18Sderaadt			    int flags, int fd, long pos); }
1171.18Sderaadt72	NOARGS		{ int ovadvise(int anom); } vadvise
1181.18Sderaadt73	NOARGS		{ int munmap(caddr_t addr, int len); }
1191.18Sderaadt74	NOARGS		{ int mprotect(caddr_t addr, int len, int prot); }
1201.18Sderaadt75	NOARGS		{ int madvise(caddr_t addr, int len, int behav); }
1211.18Sderaadt76	STD		{ int sunos_vhangup(void); }
1221.18Sderaadt77	UNIMPL		vlimit
1231.18Sderaadt78	NOARGS		{ int mincore(caddr_t addr, int len, char *vec); }
1241.18Sderaadt79	NOARGS		{ int getgroups(u_int gidsetsize, gid_t *gidset); }
1251.18Sderaadt80	NOARGS		{ int setgroups(u_int gidsetsize, gid_t *gidset); }
1261.18Sderaadt81	NOARGS		{ int getpgrp(void); }
1271.18Sderaadt82	STD		{ int sunos_setpgid(int pid, int pgid); }
1281.18Sderaadt83	NOARGS		{ int setitimer(u_int which, struct itimerval *itv, \
1291.18Sderaadt			    struct itimerval *oitv); }
1301.18Sderaadt84	UNIMPL		{ int wait(void); }
1311.18Sderaadt85	NOARGS		{ int swapon(char *name); }
1321.18Sderaadt86	NOARGS		{ int getitimer(u_int which, struct itimerval *itv); }
1331.18Sderaadt87	NOARGS		{ int compat_43_gethostname(char *hostname, u_int len); }
1341.18Sderaadt88	NOARGS		{ int compat_43_sethostname(char *hostname, u_int len); }
1351.18Sderaadt89	NOARGS		{ int compat_43_getdtablesize(void); }
1361.18Sderaadt90	NOARGS		{ int dup2(u_int from, u_int to); }
1371.18Sderaadt91	UNIMPL		getdopt
1381.18Sderaadt92	NOARGS		{ int fcntl(int fd, int cmd, void *arg); }
1391.18Sderaadt93	NOARGS		{ int select(u_int nd, fd_set *in, fd_set *ou, \
1401.18Sderaadt			    fd_set *ex, struct timeval *tv); }
1411.18Sderaadt94	UNIMPL		setdopt
1421.18Sderaadt95	NOARGS		{ int fsync(int fd); }
1431.18Sderaadt96	NOARGS		{ int setpriority(int which, int who, int prio); }
1441.18Sderaadt97	NOARGS		{ int socket(int domain, int type, int protocol); }
1451.18Sderaadt98	NOARGS		{ int connect(int s, caddr_t name, int namelen); }
1461.18Sderaadt99	NOARGS		{ int compat_43_accept(int s, caddr_t name, int *anamelen); }
1471.18Sderaadt100	NOARGS		{ int getpriority(int which, int who); }
1481.18Sderaadt101	NOARGS		{ int compat_43_send(int s, caddr_t buf, int len, int flags); }
1491.18Sderaadt102	NOARGS		{ int compat_43_recv(int s, caddr_t buf, int len, int flags); }
1501.18Sderaadt103	UNIMPL		old socketaddr
1511.18Sderaadt104	NOARGS		{ int bind(int s, caddr_t name, int namelen); }
1521.18Sderaadt105	STD		{ int sunos_setsockopt(int s, int level, int name, \
1531.18Sderaadt			    caddr_t val, int valsize); }
1541.18Sderaadt106	NOARGS		{ int listen(int s, int backlog); }
1551.18Sderaadt107	UNIMPL		vtimes
1561.18Sderaadt108	NOARGS		{ int compat_43_sigvec(int signum, struct sigvec *nsv, \
1571.18Sderaadt			    struct sigvec *osv); }
1581.18Sderaadt109	NOARGS		{ int compat_43_sigblock(int mask); }
1591.18Sderaadt110	NOARGS		{ int compat_43_sigsetmask(int mask); }
1601.18Sderaadt111	NOARGS		{ int sigsuspend(int mask); }
1611.18Sderaadt112	NOARGS		{ int compat_43_sigstack(struct sigstack *nss, \
1621.18Sderaadt			    struct sigstack *oss); }
1631.18Sderaadt113	NOARGS		{ int compat_43_recvmsg(int s, struct omsghdr *msg, int flags); }
1641.18Sderaadt114	NOARGS		{ int compat_43_sendmsg(int s, caddr_t msg, int flags); }
1651.18Sderaadt115	OBSOL		vtrace
1661.18Sderaadt116	NOARGS		{ int gettimeofday(struct timeval *tp, \
1671.18Sderaadt			    struct timezone *tzp); }
1681.18Sderaadt117	NOARGS		{ int getrusage(int who, struct rusage *rusage); }
1691.18Sderaadt118	NOARGS		{ int getsockopt(int s, int level, int name, \
1701.18Sderaadt			    caddr_t val, int *avalsize); }
1711.18Sderaadt119	UNIMPL		
1721.18Sderaadt120	NOARGS		{ int readv(int fd, struct iovec *iovp, u_int iovcnt); }
1731.18Sderaadt121	NOARGS		{ int writev(int fd, struct iovec *iovp, \
1741.18Sderaadt			    u_int iovcnt); }
1751.18Sderaadt122	NOARGS		{ int settimeofday(struct timeval *tv, \
1761.18Sderaadt			    struct timezone *tzp); }
1771.18Sderaadt123	NOARGS		{ int fchown(int fd, int uid, int gid); }
1781.18Sderaadt124	NOARGS		{ int fchmod(int fd, int mode); }
1791.18Sderaadt125	NOARGS		{ int compat_43_recvfrom(int s, caddr_t buf, size_t len, \
1801.18Sderaadt			    int flags, caddr_t from, int *fromlenaddr); }
1811.18Sderaadt126	NOARGS		{ int compat_43_setreuid(int ruid, int euid); }
1821.18Sderaadt127	NOARGS		{ int compat_43_setregid(int rgid, int egid); }
1831.18Sderaadt128	NOARGS		{ int rename(char *from, char *to); }
1841.18Sderaadt129	NOARGS		{ int compat_43_truncate(char *path, long length); }
1851.18Sderaadt130	NOARGS		{ int compat_43_ftruncate(int fd, long length); }
1861.18Sderaadt131	NOARGS		{ int flock(int fd, int how); }
1871.18Sderaadt132	UNIMPL		
1881.18Sderaadt133	NOARGS		{ int sendto(int s, caddr_t buf, size_t len, \
1891.18Sderaadt			    int flags, caddr_t to, int tolen); }
1901.18Sderaadt134	NOARGS		{ int shutdown(int s, int how); }
1911.18Sderaadt135	NOARGS		{ int socketpair(int domain, int type, int protocol, \
1921.18Sderaadt			    int *rsv); }
1931.18Sderaadt136	NOARGS		{ int mkdir(char *path, int mode); }
1941.18Sderaadt137	NOARGS		{ int rmdir(char *path); }
1951.18Sderaadt138	NOARGS		{ int utimes(char *path, struct timeval *tptr); }
1961.18Sderaadt139	NOARGS		{ int sigreturn(struct sigcontext *sigcntxp); }
1971.18Sderaadt140	NOARGS		{ int adjtime(struct timeval *delta, \
1981.18Sderaadt			    struct timeval *olddelta); }
1991.18Sderaadt141	NOARGS		{ int compat_43_getpeername(int fdes, caddr_t asa, int *alen); }
2001.18Sderaadt142	NOARGS		{ int compat_43_gethostid(void); }
2011.18Sderaadt143	UNIMPL		old sethostid
2021.18Sderaadt144	STD		{ int sunos_getrlimit(u_int which, struct orlimit *rlp); }
2031.18Sderaadt145	STD		{ int sunos_setrlimit(u_int which, struct orlimit *rlp); }
2041.18Sderaadt146	NOARGS		{ int compat_43_killpg(int pgid, int signum); }
2051.18Sderaadt147	UNIMPL		
2061.18Sderaadt148	UNIMPL		
2071.18Sderaadt149	UNIMPL		
2081.18Sderaadt150	NOARGS		{ int compat_43_getsockname(int fdes, caddr_t asa, int *alen); }
2091.18Sderaadt151	UNIMPL		getmsg
2101.18Sderaadt152	UNIMPL		putmsg
2111.18Sderaadt153	UNIMPL		poll
2121.18Sderaadt154	UNIMPL		
2131.9Sderaadt#ifdef NFSSERVER
2141.18Sderaadt155	STD		{ int sunos_nfssvc(int fd); }
2151.9Sderaadt#else
2161.18Sderaadt155	UNIMPL		
2171.9Sderaadt#endif
2181.18Sderaadt156	NOARGS		{ int getdirentries(int fd, char *buf, u_int count, \
2191.18Sderaadt			    long *basep); }
2201.18Sderaadt157	STD		{ int sunos_statfs(char *path, struct sunos_statfs *buf); }
2211.18Sderaadt158	STD		{ int sunos_fstatfs(int fd, struct sunos_statfs *buf); }
2221.18Sderaadt159	STD		{ int sunos_unmount(char *path, int flags); }
2231.9Sderaadt#ifdef NFSCLIENT
2241.18Sderaadt160	NOARGS		{ int async_daemon(void); }
2251.18Sderaadt161	NOARGS		{ int getfh(char *fname, fhandle_t *fhp); }
2261.9Sderaadt#else
2271.18Sderaadt160	UNIMPL		
2281.18Sderaadt161	UNIMPL		
2291.9Sderaadt#endif
2301.18Sderaadt162	NOARGS		{ int compat_09_getdomainname(char *domainname, int len); }
2311.18Sderaadt163	NOARGS		{ int compat_09_setdomainname(char *domainname, int len); }
2321.18Sderaadt164	UNIMPL		rtschedule
2331.18Sderaadt165	STD		{ int sunos_quotactl(int cmd, char *special, int uid, \
2341.18Sderaadt			    caddr_t addr); }
2351.18Sderaadt166	STD		{ int sunos_exportfs(char *path, char *ex); }
2361.18Sderaadt167	STD		{ int sunos_mount(char *type, char *dir, int flags, \
2371.18Sderaadt			    caddr_t data); }
2381.18Sderaadt168	STD		{ int sunos_ustat(int dev, struct sunos_ustat *buf); }
2391.6Sderaadt#ifdef SYSVSEM
2401.18Sderaadt169	NOARGS		{ int semsys(int which, int a2, int a3, int a4, \
2411.18Sderaadt			    int a5); }
2421.6Sderaadt#else
2431.18Sderaadt169	UNIMPL		1.0 semsys
2441.6Sderaadt#endif
2451.6Sderaadt#ifdef SYSVMSG
2461.18Sderaadt170	NOARGS		{ int msgsys(int which, int a2, int a3, int a4, \
2471.18Sderaadt			    int a5, int a6); }
2481.6Sderaadt#else
2491.18Sderaadt170	UNIMPL		1.0 msgsys
2501.6Sderaadt#endif
2511.1Sderaadt#ifdef SYSVSHM
2521.18Sderaadt171	NOARGS		{ int shmsys(int which, int a2, int a3, int a4); }
2531.1Sderaadt#else
2541.18Sderaadt171	UNIMPL		1.0 shmsys
2551.1Sderaadt#endif
2561.18Sderaadt172	STD		{ int sunos_auditsys(char *record); }
2571.18Sderaadt173	UNIMPL		rfssys
2581.18Sderaadt174	STD		{ int sunos_getdents(int fd, char *buf, int nbytes); }
2591.18Sderaadt175	NOARGS		{ int setsid(void); }
2601.18Sderaadt176	NOARGS		{ int fchdir(int fd); }
2611.18Sderaadt177	STD		{ int sunos_fchroot(int fd); }
2621.18Sderaadt178	UNIMPL		vpixsys
2631.18Sderaadt179	UNIMPL		aioread
2641.18Sderaadt180	UNIMPL		aiowrite
2651.18Sderaadt181	UNIMPL		aiowait
2661.18Sderaadt182	UNIMPL		aiocancel
2671.18Sderaadt183	STD		{ int sunos_sigpending(int *mask); }
2681.18Sderaadt184	UNIMPL		
2691.18Sderaadt185	NOARGS		{ int setpgid(int pid, int pgid); }
2701.18Sderaadt186	UNIMPL		{ long pathconf(char *path, int name); }
2711.18Sderaadt187	UNIMPL		{ long fpathconf(int fd, int name); }
2721.18Sderaadt188	STD		{ int sunos_sysconf(int name); }
2731.18Sderaadt189	STD		{ int sunos_uname(struct sunos_utsname *name); }
274